zwplayer-vue2x 1.0.22 → 1.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,427 +1,435 @@
1
- (function(L){function Na(){return document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||!1}function bb(p,A,u){var y=new Date;y.setTime(y.getTime()+864E5*u);u="expires="+y.toGMTString();document.cookie=p+"="+A+"; "+u}function Ga(p,A,u){if(p){var y=parseInt(p.style.opacity)||1;y*=100;A=parseInt(A/50);0===A&&(A=1);var F=y/A;5>F&&(F=5);var J=setInterval(function(){0<y?(y-=F,0>y&&(y=0),p.style.opacity=y/100):(clearInterval(J),"function"==
2
- typeof u&&u(p))},50);return J}return null}function Pa(p,A,u){if(p){var y=p.style.opacity;y*=100;A=parseInt(A/50);0===A&&(A=1);var F=(100-y)/A;5>F&&(F=5);var J=null;return J=setInterval(function(){100>y?(y+=F,100<y&&(y=100),p.style.opacity=y/100):(clearInterval(J),"function"==typeof u&&u(p))},50)}return null}function Qa(p,A){if(!p)return!1;if(p==A)return!0;var u=p.indexOf(A);if(0>u)return!1;if(0<u){if(" "==p.charAt(u-1)&&(p.length-u==A.length||" "==p.charAt(u+A.length)))return!0}else if(" "==p.charAt(A.length))return!0;
3
- return!1}function Ra(p,A,u){var y=new XMLHttpRequest;y.onreadystatechange=function(){4===y.readyState&&(200<=y.status&&300>y.status||304===y.status?A(y.response):"function"===typeof u&&u(y))};y.open("GET",p,!0);y.send(null)}function cb(p){const A=function(J,w,H){for(var K=H.length,O=0;O<K;O++)J.setUint8(w+O,H.charCodeAt(O))};var u=function(){var J=new ArrayBuffer(364);let w=new DataView(J);A(w,0,"RIFF");w.setUint32(4,204,!0);A(w,8,"WAVE");A(w,12,"fmt ");w.setUint32(16,16,!0);w.setUint16(20,1,!0);
4
- w.setUint16(22,1,!0);w.setUint32(24,16E3,!0);w.setUint32(28,32E3,!0);w.setUint16(32,4,!0);w.setUint16(34,16,!0);A(w,36,"data");w.setUint32(40,320,!0);let H=44;for(let K=0;160>K;K++)w.setInt16(H,15,!0),H+=2;J=new Uint8Array(J);return"data:audio/x-wav;base64,"+btoa(String.fromCharCode.apply(null,J))}(),y=new Audio(u),F=L.setTimeout(function(){F=0;"function"===typeof p&&p(!1)},500);y.play().then(function(){F&&L.clearTimeout(F);y.pause();p(!0)}).catch(function(J){F&&L.clearTimeout(F);"function"===typeof p&&
5
- p(!1)})}async function db(p){navigator.clipboard&&navigator.clipboard.write([new ClipboardItem({[p.type]:p})]).then(()=>{console.info("[setClipboard] clipboard suc")}).catch(A=>{console.error("[setClipboard] clipboard err",A)})}function eb(){var p=new Date,A=p.getMonth()+1;10>A&&(A="0"+A);var u=p.getDate();10>u&&(u="0"+u);var y=p.getHours();10>y&&(y="0"+y);var F=p.getMinutes();10>F&&(F="0"+F);var J=p.getSeconds();10>J&&(J="0"+J);var w=p.getMilliseconds();10>w?w="00"+w:100>w&&(w="0"+w);return""+p.getFullYear()+
6
- A+u+y+F+J+w}function fb(p){var A={font_size:.4,font_color:"#FFFFFF",background_alpha:.5,background_color:"#9C27B0",Stroke:"none",body:[]},u=function(w){w=w.split(":");if(3!==w.length)return 0;var H=3600*parseInt(w[0],10),K=60*parseInt(w[1],10),O=parseInt(w[2],10),P=w[2].indexOf(","),Z=0;0<P&&(Z=parseInt(w[2].substr(P+1))/1E3);return H+K+O+Z};p=p.replace(/\r/g,"");p=p.split("\n");for(var y=0;y<p.length-2;){var F={},J=p[y].trim();if(J){F.id=parseInt(J);J=p[y+1].split(" --\x3e ");if(2!==J.length)break;
7
- F.from=u(J[0].trim());F.to=u(J[1].trim());F.location=2;F.content=p[y+2].trim();A.body.push(F);y+=3}else y++}return A}function Sa(p){var A={font_size:.4,font_color:"#FFFFFF",background_alpha:.5,background_color:"#9C27B0",Stroke:"none",body:[]},u=function(w){w=w.split(":");var H=0,K=0;if(3===w.length){H=3600*parseInt(w[0],10);K=60*parseInt(w[1],10);var O=parseInt(w[2],10)}else if(2===w.length)K=60*parseInt(w[0],10),O=parseInt(w[1],10);else if(1===w.length)O=parseInt(w[0],10);else return 0;var P=w.length-
8
- 1,Z=w[P].indexOf("."),ba=0;0<Z&&(ba=parseInt(w[P].substr(Z+1))/1E3);return H+K+O+ba};p=p.replace(/\r/g,"");p=p.split("\n");if(2>p.length||"WEBVTT"!==p[0].substr(0,6)||0!==p[1].trim().length)return null;for(var y=2;y<=p.length-2;){var F={};if(!p[y].startsWith("NOTE")&&""!==p[y].trim()){var J=p[y].split(" --\x3e ");if(2!==J.length&&(J=p[y].trim(),F.id=parseInt(J),y++,J=p[y].split(" --\x3e "),2!==J.length)){y++;continue}F.from=u(J[0].trim());F.to=u(J[1].trim());F.location=2;y++;F.content=p[y].trim();
9
- for(y++;y<p.length;){J=p[y].trim();if(!J)break;F.content+="<br/>"+J;y++}A.body.push(F)}y++}return A}function Ta(p){return!(!p.width()&&!p.height())&&"none"!==p.css("display")}function gb(p,A){var u="smilesFaces-view",y=Da.path+"widgets/smiles/p",F=$$(p);if(!F.hasClass("disabled")){u=F.attr("data-viewid");if(!F.attr("data-viewinit")&&0>=$$("#"+u).length){var J=F.closest(".zwp-barrage_form");p='<div id="'+u+'" style="position:absolute;display:none;z-index:1138;" class="zwp-smileview"><table border="0" cellspacing="0" cellpadding="0"><tr>';
10
- for(var w=1;40>=w;w++){var H="[sm-"+w+"]";p+='<td><img src="'+y+w+'.png" onclick="insertSmile(this,\''+H+"');\" /></td>";0==w%8&&(p+="</tr><tr>")}J.append(p+"</tr></table></div>");F.attr("data-viewinit","1");$$(document).click(function(){$$("#"+u).hide()});$$(L).on("resize",function(){var P=$$("#"+u);Ta(P)&&(F.offset(),P.outerHeight(!1),F.outerWidth(!1),P.outerWidth(!1))})}var K=$$("#"+u);if(Ta(K))K.hide();else{F.offset();K[0].style.opacity=0;K[0].style.display="block";K.outerHeight(!1);F.outerWidth(!1);
11
- K.outerWidth(!1);y=F.parent().children("DIV.zwp-barrage_inp").children(".barrage_inp_text");K.get(0).inputbox=y.get(0);K.css({bottom:"36px",right:"26px"}).show();var O=function(){var P=parseFloat(K[0].style.opacity);1>=P&&(P+=.1,1<P&&(P=1),K[0].style.opacity=P,setTimeout(O,50))};setTimeout(O,50)}if(A=A||L.event)A.preventDefault?(A.preventDefault(),A.stopPropagation()):(L.event.cancelBubble=!0,L.event.returnValue=!1)}}function hb(p,A){if(p.dragableWinInited)"object"===typeof p.zwpDragable&&("oldX"in
12
- p.zwpDragable&&(p.style.left=p.zwpDragable.oldX+"px"),"oldY"in p.zwpDragable&&(p.style.top=p.zwpDragable.oldY+"px"),"oldWidth"in p.zwpDragable&&(p.style.width=p.zwpDragable.oldWidth+"px"),"oldHeight"in p.zwpDragable&&(p.style.height=p.zwpDragable.oldHeight+"px"));else{var u='<div class="zwp-captionbar"><button class="closeBtn" title="'+(qa("closeSmallWindow","Close small window")+'"><i class="xicon xicon-close"></i></button></div><div class="zwp-gripper-right"></div><div class="zwp-gripper-bottom"></div><div class="zwp-gripper-bottom-right"></div>');
13
- p.insertAdjacentHTML("beforeend",u);var y=function(O){O.stopPropagation();O.preventDefault();var P=parseInt(p.offsetLeft),Z=parseInt(p.offsetTop),ba=O.pageX,aa=O.pageY,fa=L.innerWidth-p.offsetWidth-20,ma=L.innerHeight-p.offsetHeight-20,Y=function(ia){var na=P+ia.pageX-ba;ia=Z+ia.pageY-aa;0>na&&(na=0);0>ia&&(ia=0);na>fa&&(na=fa);ia>ma&&(ia=ma);p.style.left=na+"px";p.style.top=ia+"px";"object"===typeof p.zwpDragable&&(p.zwpDragable.oldX=na,p.zwpDragable.oldY=ia)},ka=function(ia){document.removeEventListener("mousemove",
14
- Y);document.removeEventListener("mouseup",ka)};document.addEventListener("mousemove",Y);document.addEventListener("mouseup",ka)};u=function(O){O.stopPropagation();O.preventDefault();var P=p.offsetWidth,Z=O.pageX,ba=function(fa){fa=P+fa.pageX-Z;200>fa&&(fa=200);p.style.width=fa+"px";"object"===typeof p.zwpDragable&&(p.zwpDragable.oldWidth=fa)},aa=function(fa){document.removeEventListener("mousemove",ba);document.removeEventListener("mouseup",aa)};document.addEventListener("mousemove",ba);document.addEventListener("mouseup",
15
- aa)};var F=function(O){O.stopPropagation();O.preventDefault();var P=p.offsetHeight,Z=O.pageY,ba=function(fa){fa=P+fa.pageY-Z;180>fa&&(fa=180);p.style.height=fa+"px";"object"===typeof p.zwpDragable&&(p.zwpDragable.oldHeight=fa)},aa=function(fa){document.removeEventListener("mousemove",ba);document.removeEventListener("mouseup",aa)};document.addEventListener("mousemove",ba);document.addEventListener("mouseup",aa)},J=function(O){O.stopPropagation();O.preventDefault();var P=p.offsetWidth,Z=p.offsetHeight,
16
- ba=O.pageX,aa=O.pageY,fa=function(Y){var ka=P+Y.pageX-ba;200>ka&&(ka=200);Y=Z+Y.pageY-aa;180>Y&&(Y=180);p.style.width=ka+"px";p.style.height=Y+"px";"object"===typeof p.zwpDragable&&(p.zwpDragable.oldWidth=ka,p.zwpDragable.oldHeight=Y)},ma=function(Y){document.removeEventListener("mousemove",fa);document.removeEventListener("mouseup",ma)};document.addEventListener("mousemove",fa);document.addEventListener("mouseup",ma)};p.zwpDragable={};var w=p.querySelector(".zwp-captionbar");if(w){var H=w.querySelector(".closeBtn");
17
- if(H){var K=A||function(){};H.addEventListener("click",function(O){O.preventDefault();O.stopPropagation();K(p)})}w.addEventListener("mousedown",y);p.zwpDragable.doc_mousedown=y}A=p.querySelector(".zwp-gripper-right");y=p.querySelector(".zwp-gripper-bottom");w=p.querySelector(".zwp-gripper-bottom-right");A&&(A.addEventListener("mousedown",u),p.zwpDragable.gripperR_mousedown=u);y&&(y.addEventListener("mousedown",F),p.zwpDragable.gripperB_mousedown=F);w&&(w.addEventListener("mousedown",J),p.zwpDragable.gripperBR_mousedown=
18
- J);p.dragableWinInited=!0}}(function(p){var A=!1,u=!1,y=0,F=2E3,J=0,w=document,H=p(L),K=[],O=L.requestAnimationFrame||L.webkitRequestAnimationFrame||L.mozRequestAnimationFrame||!1,P=L.cancelAnimationFrame||L.webkitCancelAnimationFrame||L.mozCancelAnimationFrame||!1;if(O)L.cancelAnimationFrame||(P=function(e){});else{var Z=0;O=function(e,n){var m=(new Date).getTime(),c=Math.max(0,16-(m-Z));n=L.setTimeout(function(){e(m+c)},c);Z=m+c;return n};P=function(e){L.clearTimeout(e)}}var ba=L.MutationObserver||
19
- L.WebKitMutationObserver||!1,aa=Date.now||function(){return(new Date).getTime()},fa={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:27,touchbehavior:!1,emulatetouch:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,
1
+ (function(K){function Na(){return document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||!1}function bb(n,B,u){var y=new Date;y.setTime(y.getTime()+864E5*u);u="expires="+y.toGMTString();document.cookie=n+"="+B+"; "+u}function Ga(n,B,u){if(n){var y=parseInt(n.style.opacity)||1;y*=100;B=parseInt(B/50);0===B&&(B=1);var F=y/B;5>F&&(F=5);var J=setInterval(function(){0<y?(y-=F,0>y&&(y=0),n.style.opacity=y/100):(clearInterval(J),"function"==
2
+ typeof u&&u(n))},50);return J}return null}function Pa(n,B,u){if(n){var y=n.style.opacity;y*=100;B=parseInt(B/50);0===B&&(B=1);var F=(100-y)/B;5>F&&(F=5);var J=null;return J=setInterval(function(){100>y?(y+=F,100<y&&(y=100),n.style.opacity=y/100):(clearInterval(J),"function"==typeof u&&u(n))},50)}return null}function Qa(n,B){if(!n)return!1;if(n==B)return!0;var u=n.indexOf(B);if(0>u)return!1;if(0<u){if(" "==n.charAt(u-1)&&(n.length-u==B.length||" "==n.charAt(u+B.length)))return!0}else if(" "==n.charAt(B.length))return!0;
3
+ return!1}function Ra(n,B,u){var y=new XMLHttpRequest;y.onreadystatechange=function(){4===y.readyState&&(200<=y.status&&300>y.status||304===y.status?B(y.response):"function"===typeof u&&u(y))};y.open("GET",n,!0);y.send(null)}function cb(n){const B=function(J,w,I){for(var L=I.length,M=0;M<L;M++)J.setUint8(w+M,I.charCodeAt(M))};var u=function(){var J=new ArrayBuffer(364);let w=new DataView(J);B(w,0,"RIFF");w.setUint32(4,204,!0);B(w,8,"WAVE");B(w,12,"fmt ");w.setUint32(16,16,!0);w.setUint16(20,1,!0);
4
+ w.setUint16(22,1,!0);w.setUint32(24,16E3,!0);w.setUint32(28,32E3,!0);w.setUint16(32,4,!0);w.setUint16(34,16,!0);B(w,36,"data");w.setUint32(40,320,!0);let I=44;for(let L=0;160>L;L++)w.setInt16(I,15,!0),I+=2;J=new Uint8Array(J);return"data:audio/x-wav;base64,"+btoa(String.fromCharCode.apply(null,J))}(),y=new Audio(u),F=K.setTimeout(function(){F=0;"function"===typeof n&&n(!1)},500);y.play().then(function(){F&&K.clearTimeout(F);y.pause();n(!0)}).catch(function(J){F&&K.clearTimeout(F);"function"===typeof n&&
5
+ n(!1)})}async function db(n){navigator.clipboard&&navigator.clipboard.write([new ClipboardItem({[n.type]:n})]).then(()=>{console.info("[setClipboard] clipboard suc")}).catch(B=>{console.error("[setClipboard] clipboard err",B)})}function eb(){var n=new Date,B=n.getMonth()+1;10>B&&(B="0"+B);var u=n.getDate();10>u&&(u="0"+u);var y=n.getHours();10>y&&(y="0"+y);var F=n.getMinutes();10>F&&(F="0"+F);var J=n.getSeconds();10>J&&(J="0"+J);var w=n.getMilliseconds();10>w?w="00"+w:100>w&&(w="0"+w);return""+n.getFullYear()+
6
+ B+u+y+F+J+w}function fb(n){var B={font_size:.4,font_color:"#FFFFFF",background_alpha:.5,background_color:"#9C27B0",Stroke:"none",body:[]},u=function(w){w=w.split(":");if(3!==w.length)return 0;var I=3600*parseInt(w[0],10),L=60*parseInt(w[1],10),M=parseInt(w[2],10),Q=w[2].indexOf(","),Y=0;0<Q&&(Y=parseInt(w[2].substr(Q+1))/1E3);return I+L+M+Y};n=n.replace(/\r/g,"");n=n.split("\n");for(var y=0;y<n.length-2;){var F={},J=n[y].trim();if(J){F.id=parseInt(J);J=n[y+1].split(" --\x3e ");if(2!==J.length)break;
7
+ F.from=u(J[0].trim());F.to=u(J[1].trim());F.location=2;F.content=n[y+2].trim();B.body.push(F);y+=3}else y++}return B}function Sa(n){var B={font_size:.4,font_color:"#FFFFFF",background_alpha:.5,background_color:"#9C27B0",Stroke:"none",body:[]},u=function(w){w=w.split(":");var I=0,L=0;if(3===w.length){I=3600*parseInt(w[0],10);L=60*parseInt(w[1],10);var M=parseInt(w[2],10)}else if(2===w.length)L=60*parseInt(w[0],10),M=parseInt(w[1],10);else if(1===w.length)M=parseInt(w[0],10);else return 0;var Q=w.length-
8
+ 1,Y=w[Q].indexOf("."),ba=0;0<Y&&(ba=parseInt(w[Q].substr(Y+1))/1E3);return I+L+M+ba};n=n.replace(/\r/g,"");n=n.split("\n");if(2>n.length||"WEBVTT"!==n[0].substr(0,6)||0!==n[1].trim().length)return null;for(var y=2;y<=n.length-2;){var F={};if(!n[y].startsWith("NOTE")&&""!==n[y].trim()){var J=n[y].split(" --\x3e ");if(2!==J.length&&(J=n[y].trim(),F.id=parseInt(J),y++,J=n[y].split(" --\x3e "),2!==J.length)){y++;continue}F.from=u(J[0].trim());F.to=u(J[1].trim());F.location=2;y++;F.content=n[y].trim();
9
+ for(y++;y<n.length;){J=n[y].trim();if(!J)break;F.content+="<br/>"+J;y++}B.body.push(F)}y++}return B}function Ta(n){return!(!n.width()&&!n.height())&&"none"!==n.css("display")}function gb(n,B){var u="smilesFaces-view",y=Da.path+"widgets/smiles/p",F=$$(n);if(!F.hasClass("disabled")){u=F.attr("data-viewid");if(!F.attr("data-viewinit")&&0>=$$("#"+u).length){var J=F.closest(".zwp-barrage_form");n='<div id="'+u+'" style="position:absolute;display:none;z-index:1138;" class="zwp-smileview"><table border="0" cellspacing="0" cellpadding="0"><tr>';
10
+ for(var w=1;40>=w;w++){var I="[sm-"+w+"]";n+='<td><img src="'+y+w+'.png" onclick="insertSmile(this,\''+I+"');\" /></td>";0==w%8&&(n+="</tr><tr>")}J.append(n+"</tr></table></div>");F.attr("data-viewinit","1");$$(document).click(function(){$$("#"+u).hide()});$$(K).on("resize",function(){var Q=$$("#"+u);Ta(Q)&&(F.offset(),Q.outerHeight(!1),F.outerWidth(!1),Q.outerWidth(!1))})}var L=$$("#"+u);if(Ta(L))L.hide();else{F.offset();L[0].style.opacity=0;L[0].style.display="block";L.outerHeight(!1);F.outerWidth(!1);
11
+ L.outerWidth(!1);y=F.parent().children("DIV.zwp-barrage_inp").children(".barrage_inp_text");L.get(0).inputbox=y.get(0);L.css({bottom:"36px",right:"26px"}).show();var M=function(){var Q=parseFloat(L[0].style.opacity);1>=Q&&(Q+=.1,1<Q&&(Q=1),L[0].style.opacity=Q,setTimeout(M,50))};setTimeout(M,50)}if(B=B||K.event)B.preventDefault?(B.preventDefault(),B.stopPropagation()):(K.event.cancelBubble=!0,K.event.returnValue=!1)}}function hb(n,B){if(n.dragableWinInited)"object"===typeof n.zwpDragable&&("oldX"in
12
+ n.zwpDragable&&(n.style.left=n.zwpDragable.oldX+"px"),"oldY"in n.zwpDragable&&(n.style.top=n.zwpDragable.oldY+"px"),"oldWidth"in n.zwpDragable&&(n.style.width=n.zwpDragable.oldWidth+"px"),"oldHeight"in n.zwpDragable&&(n.style.height=n.zwpDragable.oldHeight+"px"));else{var u='<div class="zwp-captionbar"><button class="closeBtn" title="'+(pa("closeSmallWindow","Close small window")+'"><i class="xicon xicon-close"></i></button></div><div class="zwp-gripper-right"></div><div class="zwp-gripper-bottom"></div><div class="zwp-gripper-bottom-right"></div>');
13
+ n.insertAdjacentHTML("beforeend",u);var y=function(M){M.stopPropagation();M.preventDefault();var Q=parseInt(n.offsetLeft),Y=parseInt(n.offsetTop),ba=M.pageX,Z=M.pageY,ha=K.innerWidth-n.offsetWidth-20,ma=K.innerHeight-n.offsetHeight-20,W=function(ia){var qa=Q+ia.pageX-ba;ia=Y+ia.pageY-Z;0>qa&&(qa=0);0>ia&&(ia=0);qa>ha&&(qa=ha);ia>ma&&(ia=ma);n.style.left=qa+"px";n.style.top=ia+"px";"object"===typeof n.zwpDragable&&(n.zwpDragable.oldX=qa,n.zwpDragable.oldY=ia)},ka=function(ia){document.removeEventListener("mousemove",
14
+ W);document.removeEventListener("mouseup",ka)};document.addEventListener("mousemove",W);document.addEventListener("mouseup",ka)};u=function(M){M.stopPropagation();M.preventDefault();var Q=n.offsetWidth,Y=M.pageX,ba=function(ha){ha=Q+ha.pageX-Y;200>ha&&(ha=200);n.style.width=ha+"px";"object"===typeof n.zwpDragable&&(n.zwpDragable.oldWidth=ha)},Z=function(ha){document.removeEventListener("mousemove",ba);document.removeEventListener("mouseup",Z)};document.addEventListener("mousemove",ba);document.addEventListener("mouseup",
15
+ Z)};var F=function(M){M.stopPropagation();M.preventDefault();var Q=n.offsetHeight,Y=M.pageY,ba=function(ha){ha=Q+ha.pageY-Y;180>ha&&(ha=180);n.style.height=ha+"px";"object"===typeof n.zwpDragable&&(n.zwpDragable.oldHeight=ha)},Z=function(ha){document.removeEventListener("mousemove",ba);document.removeEventListener("mouseup",Z)};document.addEventListener("mousemove",ba);document.addEventListener("mouseup",Z)},J=function(M){M.stopPropagation();M.preventDefault();var Q=n.offsetWidth,Y=n.offsetHeight,
16
+ ba=M.pageX,Z=M.pageY,ha=function(W){var ka=Q+W.pageX-ba;200>ka&&(ka=200);W=Y+W.pageY-Z;180>W&&(W=180);n.style.width=ka+"px";n.style.height=W+"px";"object"===typeof n.zwpDragable&&(n.zwpDragable.oldWidth=ka,n.zwpDragable.oldHeight=W)},ma=function(W){document.removeEventListener("mousemove",ha);document.removeEventListener("mouseup",ma)};document.addEventListener("mousemove",ha);document.addEventListener("mouseup",ma)};n.zwpDragable={};var w=n.querySelector(".zwp-captionbar");if(w){var I=w.querySelector(".closeBtn");
17
+ if(I){var L=B||function(){};I.addEventListener("click",function(M){M.preventDefault();M.stopPropagation();L(n)})}w.addEventListener("mousedown",y);n.zwpDragable.doc_mousedown=y}B=n.querySelector(".zwp-gripper-right");y=n.querySelector(".zwp-gripper-bottom");w=n.querySelector(".zwp-gripper-bottom-right");B&&(B.addEventListener("mousedown",u),n.zwpDragable.gripperR_mousedown=u);y&&(y.addEventListener("mousedown",F),n.zwpDragable.gripperB_mousedown=F);w&&(w.addEventListener("mousedown",J),n.zwpDragable.gripperBR_mousedown=
18
+ J);n.dragableWinInited=!0}}(function(n){var B=!1,u=!1,y=0,F=2E3,J=0,w=document,I=n(K),L=[],M=K.requestAnimationFrame||K.webkitRequestAnimationFrame||K.mozRequestAnimationFrame||!1,Q=K.cancelAnimationFrame||K.webkitCancelAnimationFrame||K.mozCancelAnimationFrame||!1;if(M)K.cancelAnimationFrame||(Q=function(T){});else{var Y=0;M=function(T,e){var l=(new Date).getTime(),m=Math.max(0,16-(l-Y));e=K.setTimeout(function(){T(l+m)},m);Y=l+m;return e};Q=function(T){K.clearTimeout(T)}}var ba=K.MutationObserver||
19
+ K.WebKitMutationObserver||!1,Z=Date.now||function(){return(new Date).getTime()},ha={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:27,touchbehavior:!1,emulatetouch:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,
20
20
  railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,rightdock:0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",
21
- scriptpath:function(){var e;(e=w.currentScript)||(e=w.getElementsByTagName("script"),e=e.length?e[e.length-1]:!1);e=e?e.src.split("?")[0]:"";return 0<e.split("/").length?e.split("/").slice(0,-1).join("/")+"/":""}(),preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1,scrollCLass:!1},ma=!1,Y=function(){if(ma)return ma;var e=w.createElement("DIV"),n=e.style,m=navigator.userAgent,c=navigator.platform,l={};l.haspointerlock="pointerLockElement"in w||"webkitPointerLockElement"in
22
- w||"mozPointerLockElement"in w;l.isopera="opera"in L;l.isopera12=l.isopera&&"getUserMedia"in navigator;l.isoperamini="[object OperaMini]"===Object.prototype.toString.call(L.operamini);l.isie="all"in w&&"attachEvent"in e&&!l.isopera;l.isieold=l.isie&&!("msInterpolationMode"in n);l.isie7=l.isie&&!l.isieold&&(!("documentMode"in w)||7===w.documentMode);l.isie8=l.isie&&"documentMode"in w&&8===w.documentMode;l.isie9=l.isie&&"performance"in L&&9===w.documentMode;l.isie10=l.isie&&"performance"in L&&10===
23
- w.documentMode;l.isie11="msRequestFullscreen"in e&&11<=w.documentMode;l.ismsedge="msCredentials"in L;l.ismozilla="MozAppearance"in n;l.iswebkit=!l.ismsedge&&"WebkitAppearance"in n;l.ischrome=l.iswebkit&&"chrome"in L;l.ischrome38=l.ischrome&&"touchAction"in n;l.ischrome22=!l.ischrome38&&l.ischrome&&l.haspointerlock;l.ischrome26=!l.ischrome38&&l.ischrome&&"transition"in n;l.cantouch="ontouchstart"in w.documentElement||"ontouchstart"in L;l.hasw3ctouch=(L.PointerEvent||!1)&&(0<navigator.maxTouchPoints||
24
- 0<navigator.msMaxTouchPoints);l.hasmstouch=!l.hasw3ctouch&&(L.MSPointerEvent||!1);l.ismac=/^mac$/i.test(c);l.isios=l.cantouch&&/iphone|ipad|ipod/i.test(c);l.isios4=l.isios&&!("seal"in Object);l.isios7=l.isios&&"webkitHidden"in w;l.isios8=l.isios&&"hidden"in w;l.isios10=l.isios&&L.Proxy;l.isandroid=/android/i.test(m);l.haseventlistener="addEventListener"in e;l.trstyle=!1;l.hastransform=!1;l.hastranslate3d=!1;l.transitionstyle=!1;l.hastransition=!1;l.transitionend=!1;l.trstyle="transform";l.hastransform=
25
- "transform"in n||function(){for(var v=["msTransform","webkitTransform","MozTransform","OTransform"],B=0,M=v.length;B<M;B++)if(void 0!==n[v[B]]){l.trstyle=v[B];break}l.hastransform=!!l.trstyle}();l.hastransform&&(n[l.trstyle]="translate3d(1px,2px,3px)",l.hastranslate3d=/translate3d/.test(n[l.trstyle]));l.transitionstyle="transition";l.prefixstyle="";l.transitionend="transitionend";l.hastransition="transition"in n||function(){l.transitionend=!1;for(var v="webkitTransition msTransition MozTransition OTransition OTransition KhtmlTransition".split(" "),
26
- B="-webkit- -ms- -moz- -o- -o -khtml-".split(" "),M="webkitTransitionEnd msTransitionEnd transitionend otransitionend oTransitionEnd KhtmlTransitionEnd".split(" "),b=0,Q=v.length;b<Q;b++)if(v[b]in n){l.transitionstyle=v[b];l.prefixstyle=B[b];l.transitionend=M[b];break}l.ischrome26&&(l.prefixstyle=B[1]);l.hastransition=l.transitionstyle}();l.cursorgrabvalue=function(){var v=["grab","-webkit-grab","-moz-grab"];if(l.ischrome&&!l.ischrome38||l.isie)v=[];for(var B=0,M=v.length;B<M;B++){var b=v[B];n.cursor=
27
- b;if(n.cursor==b)return b}return"url("+(fa.scriptpath+"css/openhand.cur),n-resize")}();l.hasmousecapture="setCapture"in e;l.hasMutationObserver=!1!==ba;e=null;return ma=l},ka=function(e,n){function m(){var g=b.doc.css(I.trstyle);return g&&"matrix"==g.substr(0,6)?g.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/):!1}function c(){var g=b.win;if("zIndex"in g)return g.zIndex();for(;0<g.length&&9!=g[0].nodeType;){var t=g.css("zIndex");if(!isNaN(t)&&0!==t)return parseInt(t);g=g.parent()}return!1}
28
- function l(g,t,x){t=g.css(t);g=parseFloat(t);return isNaN(g)?(g=h[t]||0,x=3==g?x?b.win.outerHeight()-b.win.innerHeight():b.win.outerWidth()-b.win.innerWidth():1,b.isie8&&g&&(g+=1),x?g:0):g}function v(g,t,x,f){b._bind(g,t,function(r){r=r||L.event;var D={original:r,target:r.target||r.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==r.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){r.preventDefault?r.preventDefault():r.returnValue=!1;return!1},stopImmediatePropagation:function(){r.stopImmediatePropagation?
29
- r.stopImmediatePropagation():r.cancelBubble=!0}};"mousewheel"==t?(r.wheelDeltaX&&(D.deltaX=-.025*r.wheelDeltaX),r.wheelDeltaY&&(D.deltaY=-.025*r.wheelDeltaY),D.deltaY||D.deltaX||(D.deltaY=-.025*r.wheelDelta)):D.deltaY=r.detail;return x.call(g,D)},f)}function B(g,t,x,f){b.scrollrunning||(b.newscrolly=b.getScrollTop(),b.newscrollx=b.getScrollLeft(),S=aa());var r=aa()-S;S=aa();T=350<r?1:T+(2-T)/10;g=g*T|0;t=t*T|0;if(g){if(f)if(0>g){if(b.getScrollLeft()>=b.page.maxw)return!0}else if(0>=b.getScrollLeft())return!0;
30
- f=0<g?1:-1;U!==f&&(b.scrollmom&&b.scrollmom.stop(),b.newscrollx=b.getScrollLeft(),U=f);b.lastdeltax-=g}if(t){if(function(){var D=b.getScrollTop();if(0>t){if(D>=b.page.maxh)return!0}else if(0>=D)return!0}()){if(z.nativeparentscrolling&&x&&!b.ispage&&!b.zoomactive)return!0;x=b.view.h>>1;b.newscrolly<-x?(b.newscrolly=-x,t=-1):b.newscrolly>b.page.maxh+x?(b.newscrolly=b.page.maxh+x,t=1):t=0}x=0<t?1:-1;N!==x&&(b.scrollmom&&b.scrollmom.stop(),b.newscrolly=b.getScrollTop(),N=x);b.lastdeltay-=t}(t||g)&&b.synched("relativexy",
31
- function(){var D=b.lastdeltay+b.newscrolly;b.lastdeltay=0;var R=b.lastdeltax+b.newscrollx;b.lastdeltax=0;b.rail.drag||b.doScrollPos(R,D)})}function M(g,t,x){if(!x&&V)return!0;if(0===g.deltaMode){var f=-(z.mousescrollstep/54*g.deltaX)|0;var r=-(z.mousescrollstep/54*g.deltaY)|0}else 1===g.deltaMode&&(f=-(g.deltaX*z.mousescrollstep*50/80)|0,r=-(g.deltaY*z.mousescrollstep*50/80)|0);t&&z.oneaxismousemode&&0===f&&r&&(f=r,r=0,x&&(0>f?b.getScrollLeft()>=b.page.maxw:0>=b.getScrollLeft())&&(r=f,f=0));b.isrtlmode&&
32
- (f=-f);if(B(f,r,x,!0))x&&(V=!0);else return V=!1,g.stopImmediatePropagation(),g.preventDefault()}var b=this;this.version="3.7.6";this.name="nicescroll";this.me=n;var Q=p("body"),z=this.opt={doc:Q,win:!1};p.extend(z,fa);z.snapbackspeed=80;if(e)for(var la in z)void 0!==e[la]&&(z[la]=e[la]);z.disablemutationobserver&&(ba=!1);this.iddoc=(this.doc=z.doc)&&this.doc[0]?this.doc[0].id||"":"";this.ispage=/^BODY|HTML/.test(z.win?z.win[0].nodeName:this.doc[0].nodeName);this.haswrapper=!1!==z.win;this.win=z.win||
33
- (this.ispage?H:this.doc);this.docscroll=this.ispage&&!this.haswrapper?H:this.win;this.body=Q;this.iframe=this.isfixed=this.viewport=!1;this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName;this.istextarea="TEXTAREA"==this.win[0].nodeName;this.forcescreen=!1;this.canshowonmouseevent="scroll"!=z.autohidemode;this.page=this.view=this.onzoomout=this.onzoomin=this.onscrollcancel=this.onscrollend=this.onscrollstart=this.onclick=this.ongesturezoom=this.onkeypress=this.onmousewheel=
34
- this.onmousemove=this.onmouseup=this.onmousedown=!1;this.scroll={x:0,y:0};this.scrollratio={x:0,y:0};this.cursorheight=20;this.scrollvaluemax=0;"auto"==z.rtlmode?(e=this.win[0]==L?this.body:this.win,n=e.css("writing-mode")||e.css("-webkit-writing-mode")||e.css("-ms-writing-mode")||e.css("-moz-writing-mode"),"horizontal-tb"==n||"lr-tb"==n||""===n?(this.isrtlmode="rtl"==e.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==n||"tb"==n||"tb-rl"==n||"rl-tb"==n,this.isvertical="vertical-rl"==
35
- n||"tb"==n||"tb-rl"==n)):(this.isrtlmode=!0===z.rtlmode,this.isvertical=!1);this.observerbody=this.observerremover=this.observer=this.scrollmom=this.scrollrunning=!1;if(!1!==z.scrollbarid)this.id=z.scrollbarid;else{do this.id="ascrail"+F++;while(w.getElementById(this.id))}this.hidden=this.locked=this.railslocked=this.hasmousefocus=this.hasfocus=this.zoomactive=this.zoom=this.selectiondrag=this.cursorfreezed=this.cursor=this.rail=!1;this.cursoractive=!0;this.wheelprevented=!1;this.overflowx=z.overflowx;
36
- this.overflowy=z.overflowy;this.nativescrollingarea=!1;this.checkarea=0;this.events=[];this.saved={};this.delaylist={};this.synclist={};this.lastdeltay=this.lastdeltax=0;this.detected=Y();var I=p.extend({},this.detected);this.ishwscroll=(this.canhwscroll=I.hastransform&&z.hwacceleration)&&b.haswrapper;this.hasreversehr=this.isrtlmode?this.isvertical?!(I.iswebkit||I.isie||I.isie11):!(I.iswebkit||I.isie&&!I.isie10&&!I.isie11):!1;this.istouchcapable=!1;I.cantouch||!I.hasw3ctouch&&!I.hasmstouch?!I.cantouch||
37
- I.isios||I.isandroid||!I.iswebkit&&!I.ismozilla||(this.istouchcapable=!0):this.istouchcapable=!0;z.enablemouselockapi||(I.hasmousecapture=!1,I.haspointerlock=!1);this.debounced=function(g,t,x){b&&(b.delaylist[g]||(b.delaylist[g]={h:O(function(){b.delaylist[g].fn.call(b);b.delaylist[g]=!1},x)},t.call(b)),b.delaylist[g].fn=t)};this.synched=function(g,t){b.synclist[g]?b.synclist[g]=t:(b.synclist[g]=t,O(function(){b&&(b.synclist[g]&&b.synclist[g].call(b),b.synclist[g]=null)}))};this.unsynched=function(g){b.synclist[g]&&
38
- (b.synclist[g]=!1)};this.css=function(g,t){for(var x in t)b.saved.css.push([g,x,g.css(x)]),g.css(x,t[x])};this.scrollTop=function(g){return void 0===g?b.getScrollTop():b.setScrollTop(g)};this.scrollLeft=function(g){return void 0===g?b.getScrollLeft():b.setScrollLeft(g)};var ja=function(g,t,x,f,r,D,R){this.st=g;this.ed=t;this.spd=x;this.p1=f||0;this.p2=r||1;this.p3=D||0;this.p4=R||1;this.ts=aa();this.df=t-g};ja.prototype={B2:function(g){return 3*(1-g)*(1-g)*g},B3:function(g){return 3*(1-g)*g*g},B4:function(g){return g*
39
- g*g},getPos:function(){return(aa()-this.ts)/this.spd},getNow:function(){var g=(aa()-this.ts)/this.spd,t=this.B2(g)+this.B3(g)+this.B4(g);return 1<=g?this.ed:this.st+this.df*t|0},update:function(g,t){this.st=this.getNow();this.ed=g;this.spd=t;this.ts=aa();this.df=this.ed-this.st;return this}};if(this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"};I.hastranslate3d&&I.isios&&this.doc.css("-webkit-backface-visibility","hidden");this.getScrollTop=function(g){if(!g){if(g=m())return 16==g.length?
40
- -g[13]:-g[5];if(b.timerscroll&&b.timerscroll.bz)return b.timerscroll.bz.getNow()}return b.doc.translate.y};this.getScrollLeft=function(g){if(!g){if(g=m())return 16==g.length?-g[12]:-g[4];if(b.timerscroll&&b.timerscroll.bh)return b.timerscroll.bh.getNow()}return b.doc.translate.x};this.notifyScrollEvent=function(g){var t=w.createEvent("UIEvents");t.initUIEvent("scroll",!1,!1,L,1);t.niceevent=!0;g.dispatchEvent(t)};var d=this.isrtlmode?1:-1;I.hastranslate3d&&z.enabletranslate3d?(this.setScrollTop=function(g,
41
- t){b.doc.translate.y=g;b.doc.translate.ty=-1*g+"px";b.doc.css(I.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0)");t||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(g,t){b.doc.translate.x=g;b.doc.translate.tx=g*d+"px";b.doc.css(I.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0)");t||b.notifyScrollEvent(b.win[0])}):(this.setScrollTop=function(g,t){b.doc.translate.y=g;b.doc.translate.ty=-1*g+"px";b.doc.css(I.trstyle,"translate("+b.doc.translate.tx+
42
- ","+b.doc.translate.ty+")");t||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(g,t){b.doc.translate.x=g;b.doc.translate.tx=g*d+"px";b.doc.css(I.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")");t||b.notifyScrollEvent(b.win[0])})}else this.getScrollTop=function(){return b.docscroll.scrollTop()},this.setScrollTop=function(g){b.docscroll.scrollTop(g)},this.getScrollLeft=function(){return b.hasreversehr?b.detected.ismozilla?b.page.maxw-Math.abs(b.docscroll.scrollLeft()):b.page.maxw-
43
- b.docscroll.scrollLeft():b.docscroll.scrollLeft()},this.setScrollLeft=function(g){return setTimeout(function(){if(b)return b.hasreversehr&&(g=b.detected.ismozilla?-(b.page.maxw-g):b.page.maxw-g),b.docscroll.scrollLeft(g)},1)};this.getTarget=function(g){return g?g.target?g.target:g.srcElement?g.srcElement:!1:!1};this.hasParent=function(g,t){if(!g)return!1;for(g=g.target||g.srcElement||g||!1;g&&g.id!=t;)g=g.parentNode||!1;return!1!==g};var h={thin:1,medium:3,thick:5};this.getDocumentScrollOffset=function(){return{top:L.pageYOffset||
44
- w.documentElement.scrollTop,left:L.pageXOffset||w.documentElement.scrollLeft}};this.getOffset=function(){if(b.isfixed){var g=b.win.offset(),t=b.getDocumentScrollOffset();g.top-=t.top;g.left-=t.left;return g}g=b.win.offset();if(!b.viewport)return g;t=b.viewport.offset();return{top:g.top-t.top,left:g.left-t.left}};this.updateScrollBar=function(g){var t;if(b.ishwscroll)b.rail.css({height:b.win.innerHeight()-(z.railpadding.top+z.railpadding.bottom)}),b.railh&&b.railh.css({width:b.win.innerWidth()-(z.railpadding.left+
45
- z.railpadding.right)});else{var x=b.getOffset();var f=x.top;var r=x.left-(z.railpadding.left+z.railpadding.right);f+=l(b.win,"border-top-width",!0);r+=b.rail.align?b.win.outerWidth()-l(b.win,"border-right-width")-b.rail.width:l(b.win,"border-left-width");if(t=z.railoffset)t.top&&(f+=t.top),t.left&&(r+=t.left);g=(g?g.h:b.win.innerHeight())-(z.railpadding.top+z.railpadding.bottom);t="left";var D=r;"number"===typeof z.rightdock&&(t="right",D=z.rightdock);b.railslocked||b.rail.css({top:f,[t]:D,height:g});
46
- b.zoom&&b.zoom.css({top:f+1,left:1==b.rail.align?r-20:r+b.rail.width+4});if(b.railh&&!b.railslocked){f=x.top;r=x.left;if(t=z.railhoffset)t.top&&(f+=t.top),t.left&&(r+=t.left);f=b.railh.align?f+l(b.win,"border-top-width",!0)+b.win.innerHeight()-b.railh.height:f+l(b.win,"border-top-width",!0);r+=l(b.win,"border-left-width");b.railh.css({top:f-(z.railpadding.top+z.railpadding.bottom),left:r,width:b.railh.width})}}};this.doRailClick=function(g,t,x){if(!b.railslocked)if(b.cancelEvent(g),"pageY"in g||(g.pageX=
47
- g.clientX+w.documentElement.scrollLeft,g.pageY=g.clientY+w.documentElement.scrollTop),t){t=x?b.doScrollLeft:b.doScrollTop;var f=x?(g.pageX-b.railh.offset().left-b.cursorwidth/2)*b.scrollratio.x:(g.pageY-b.rail.offset().top-b.cursorheight/2)*b.scrollratio.y;b.unsynched("relativexy");t(f|0)}else t=x?b.doScrollLeftBy:b.doScrollBy,f=x?b.scroll.x:b.scroll.y,g=x?g.pageX-b.railh.offset().left:g.pageY-b.rail.offset().top,x=x?b.view.w:b.view.h,t(f>=g?x:-x)};b.newscrolly=b.newscrollx=0;b.hasanimationframe=
48
- "requestAnimationFrame"in L;b.hascancelanimationframe="cancelAnimationFrame"in L;b.hasborderbox=!1;this.init=function(){b.saved.css=[];if(I.isoperamini||I.isandroid&&!("hidden"in w))return!0;z.emulatetouch=z.emulatetouch||z.touchbehavior;b.hasborderbox=L.getComputedStyle&&"border-box"===L.getComputedStyle(w.body)["box-sizing"];var g={"overflow-y":"hidden"};if(I.isie11||I.isie10)g["-ms-overflow-style"]="none";b.ishwscroll&&(this.doc.css(I.transitionstyle,I.prefixstyle+"transform 0ms ease-out"),I.transitionend&&
49
- b.bind(b.doc,I.transitionend,b.onScrollTransitionEnd,!1));b.zindex="auto";b.zindex=b.ispage||"auto"!=z.zindex?z.zindex:c()||"auto";!b.ispage&&"auto"!=b.zindex&&b.zindex>J&&(J=b.zindex);b.isie&&0===b.zindex&&"auto"==z.zindex&&(b.zindex="auto");if(!b.ispage||!I.isieold){var t=b.docscroll;b.ispage&&(t=b.haswrapper?b.win:b.doc);b.css(t,g);b.ispage&&(I.isie11||I.isie)&&b.css(p("html"),g);!I.isios||b.ispage||b.haswrapper||b.css(Q,{"-webkit-overflow-scrolling":"touch"});var x=p(w.createElement("div"));x.css({position:"relative",
50
- top:0,"float":"right",width:z.cursorwidth,height:0,"background-color":z.cursorcolor,border:z.cursorborder,"background-clip":"padding-box","-webkit-border-radius":z.cursorborderradius,"-moz-border-radius":z.cursorborderradius,"border-radius":z.cursorborderradius});x.addClass("nicescroll-cursors");b.cursor=x;var f=p(w.createElement("div"));f.attr("id",b.id);f.addClass("nicescroll-rails nicescroll-rails-vr");z.scrollCLass&&f.addClass(z.scrollCLass);var r,D=["left","right","top","bottom"],R;for(R in D){var ea=
51
- D[R];(r=z.railpadding[ea]||0)&&f.css("padding-"+ea,r+"px")}f.append(x);f.width=Math.max(parseFloat(z.cursorwidth),x.outerWidth());f.css({width:f.width+"px",zIndex:b.zindex,background:z.background,cursor:"default"});f.visibility=!0;f.scrollable=!0;f.align="left"==z.railalign?0:1;b.rail=f;x=b.rail.drag=!1;!z.boxzoom||b.ispage||I.isieold||(x=w.createElement("div"),b.bind(x,"click",b.doZoom),b.bind(x,"mouseenter",function(){b.zoom.css("opacity",z.cursoropacitymax)}),b.bind(x,"mouseleave",function(){b.zoom.css("opacity",
52
- z.cursoropacitymin)}),b.zoom=p(x),b.zoom.css({cursor:"pointer",zIndex:b.zindex,backgroundImage:"url("+z.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),z.dblclickzoom&&b.bind(b.win,"dblclick",b.doZoom),I.cantouch&&z.gesturezoom&&(b.ongesturezoom=function(E){1.5<E.scale&&b.doZoomIn(E);.8>E.scale&&b.doZoomOut(E);return b.cancelEvent(E)},b.bind(b.win,"gestureend",b.ongesturezoom)));b.railh=!1;if(z.horizrailenabled){b.css(t,{overflowX:"hidden"});x=p(w.createElement("div"));x.css({position:"absolute",
53
- top:0,height:z.cursorwidth,width:0,backgroundColor:z.cursorcolor,border:z.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":z.cursorborderradius,"-moz-border-radius":z.cursorborderradius,"border-radius":z.cursorborderradius});I.isieold&&x.css("overflow","hidden");x.addClass("nicescroll-cursors");b.cursorh=x;var da=p(w.createElement("div"));da.attr("id",b.id+"-hr");da.addClass("nicescroll-rails nicescroll-rails-hr");z.scrollCLass&&da.addClass(z.scrollCLass);da.height=Math.max(parseFloat(z.cursorwidth),
54
- x.outerHeight());da.css({height:da.height+"px",zIndex:b.zindex,background:z.background});da.append(x);da.visibility=!0;da.scrollable=!0;da.align="top"==z.railvalign?0:1;b.railh=da;b.railh.drag=!1}b.ispage?(f.css({position:"fixed",top:0,height:"100%"}),f.css(f.align?{right:0}:{left:0}),b.body.append(f),b.railh&&(da.css({position:"fixed",left:0,width:"100%"}),da.css(da.align?{bottom:0}:{top:0}),b.body.append(da))):(b.ishwscroll?("static"==b.win.css("position")&&b.css(b.win,{position:"relative"}),t=
55
- "HTML"==b.win[0].nodeName?b.body:b.win,p(t).scrollTop(0).scrollLeft(0),b.zoom&&(b.zoom.css({position:"absolute",top:1,right:0,"margin-right":f.width+4}),t.append(b.zoom)),f.css({position:"absolute",top:0}),f.css(f.align?{right:0}:{left:0}),t.append(f),da&&(da.css({position:"absolute",left:0,bottom:0}),da.css(da.align?{bottom:0}:{top:0}),t.append(da))):(b.isfixed="fixed"==b.win.css("position"),t=b.isfixed?"fixed":"absolute",b.isfixed||(b.viewport=b.getViewport(b.win[0])),b.viewport&&(b.body=b.viewport,
56
- /fixed|absolute/.test(b.viewport.css("position"))||b.css(b.viewport,{position:"relative"})),f.css({position:t}),b.zoom&&b.zoom.css({position:t}),b.updateScrollBar(),b.body.append(f),b.zoom&&b.body.append(b.zoom),b.railh&&(da.css({position:t}),b.body.append(da))),I.isios&&b.css(b.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),z.disableoutline&&(I.isie&&b.win.attr("hideFocus","true"),I.iswebkit&&b.win.css("outline","none")));!1===z.autohidemode?(b.autohidedom=!1,
57
- b.rail.css({opacity:z.cursoropacitymax}),b.railh&&b.railh.css({opacity:z.cursoropacitymax})):!0===z.autohidemode||"leave"===z.autohidemode?(b.autohidedom=p().add(b.rail),I.isie8&&(b.autohidedom=b.autohidedom.add(b.cursor)),b.railh&&(b.autohidedom=b.autohidedom.add(b.railh)),b.railh&&I.isie8&&(b.autohidedom=b.autohidedom.add(b.cursorh))):"scroll"==z.autohidemode?(b.autohidedom=p().add(b.rail),b.railh&&(b.autohidedom=b.autohidedom.add(b.railh))):"cursor"==z.autohidemode?(b.autohidedom=p().add(b.cursor),
58
- b.railh&&(b.autohidedom=b.autohidedom.add(b.cursorh))):"hidden"==z.autohidemode&&(b.autohidedom=!1,b.hide(),b.railslocked=!1);if(I.cantouch||b.istouchcapable||z.emulatetouch||I.hasmstouch){b.scrollmom=new ia(b);b.ontouchstart=function(E){if(b.locked||E.pointerType&&("mouse"===E.pointerType||E.pointerType===E.MSPOINTER_TYPE_MOUSE))return!1;b.hasmoving=!1;b.scrollmom.timer&&(b.triggerScrollEnd(),b.scrollmom.stop());if(!b.railslocked){var X=b.getTarget(E);if(X&&/INPUT/i.test(X.nodeName)&&/range/i.test(X.type))return b.stopPropagation(E);
59
- var pa="mousedown"===E.type;!("clientX"in E)&&"changedTouches"in E&&(E.clientX=E.changedTouches[0].clientX,E.clientY=E.changedTouches[0].clientY);if(b.forcescreen){var ra=E;E={original:E.original?E.original:E};E.clientX=ra.screenX;E.clientY=ra.screenY}b.rail.drag={x:E.clientX,y:E.clientY,sx:b.scroll.x,sy:b.scroll.y,st:b.getScrollTop(),sl:b.getScrollLeft(),pt:2,dl:!1,tg:X};if(b.ispage||!z.directionlockdeadzone)b.rail.drag.dl="f";else{ra=H.width();var sa=H.height(),Ea=b.getContentSize();sa=Ea.h-sa;
60
- ra=Ea.w-ra;b.rail.drag.ck=b.rail.scrollable&&!b.railh.scrollable?0<sa?"v":!1:!b.rail.scrollable&&b.railh.scrollable?0<ra?"h":!1:!1}z.emulatetouch&&b.isiframe&&I.isie&&(ra=b.win.position(),b.rail.drag.x+=ra.left,b.rail.drag.y+=ra.top);b.hasmoving=!1;b.lastmouseup=!1;b.scrollmom.reset(E.clientX,E.clientY);if(X&&pa){if(!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(X.nodeName))return I.hasmousecapture&&X.setCapture(),z.emulatetouch?(X.onclick&&!X._onclick&&(X._onclick=X.onclick,X.onclick=function(va){if(b.hasmoving)return!1;
61
- X._onclick.call(this,va)}),b.cancelEvent(E)):b.stopPropagation(E);/SUBMIT|CANCEL|BUTTON/i.test(p(X).attr("type"))&&(b.preventclick={tg:X,click:!1})}}};b.ontouchend=function(E){if(!b||!b.rail.drag)return!0;if(2==b.rail.drag.pt){if(E.pointerType&&("mouse"===E.pointerType||E.pointerType===E.MSPOINTER_TYPE_MOUSE))return!1;b.rail.drag=!1;var X="mouseup"===E.type;if(b.hasmoving&&(b.scrollmom.doMomentum(),b.lastmouseup=!0,b.hideCursor(),I.hasmousecapture&&w.releaseCapture(),X))return b.cancelEvent(E)}else if(1==
62
- b.rail.drag.pt)return b.onmouseup(E)};var wa=z.emulatetouch&&b.isiframe&&!I.hasmousecapture,ta=.3*z.directionlockdeadzone|0;b.ontouchmove=function(E,X){if(!b||!b.rail.drag||E.targetTouches&&z.preventmultitouchscrolling&&1<E.targetTouches.length||E.pointerType&&("mouse"===E.pointerType||E.pointerType===E.MSPOINTER_TYPE_MOUSE))return!0;if(2==b.rail.drag.pt){"changedTouches"in E&&(E.clientX=E.changedTouches[0].clientX,E.clientY=E.changedTouches[0].clientY);var pa;var ra=pa=0;wa&&!X&&(X=b.win.position(),
63
- ra=-X.left,pa=-X.top);var sa=E.clientY+pa;X=sa-b.rail.drag.y;var Ea=E.clientX+ra;pa=Ea-b.rail.drag.x;var va=b.rail.drag.st-X;if(b.ishwscroll&&z.bouncescroll)0>va?va=Math.round(va/2):va>b.page.maxh&&(va=b.page.maxh+Math.round((va-b.page.maxh)/2));else if(0>va?sa=va=0:va>b.page.maxh&&(va=b.page.maxh,sa=0),0===sa&&!b.hasmoving)return b.ispage||(b.rail.drag=!1),!0;var xa=b.getScrollLeft();b.railh&&b.railh.scrollable&&(xa=b.isrtlmode?pa-b.rail.drag.sl:b.rail.drag.sl-pa,b.ishwscroll&&z.bouncescroll?0>xa?
64
- xa=Math.round(xa/2):xa>b.page.maxw&&(xa=b.page.maxw+Math.round((xa-b.page.maxw)/2)):(0>xa&&(Ea=xa=0),xa>b.page.maxw&&(xa=b.page.maxw,Ea=0)));if(!b.hasmoving){if(b.rail.drag.y===E.clientY&&b.rail.drag.x===E.clientX)return b.cancelEvent(E);ra=Math.abs(X);X=Math.abs(pa);pa=z.directionlockdeadzone;b.rail.drag.ck?"v"==b.rail.drag.ck?X>pa&&ra<=ta?b.rail.drag=!1:ra>pa&&(b.rail.drag.dl="v"):"h"==b.rail.drag.ck&&(ra>pa&&X<=ta?b.rail.drag=!1:X>pa&&(b.rail.drag.dl="h")):ra>pa&&X>pa?b.rail.drag.dl="f":ra>pa?
65
- b.rail.drag.dl=X>ta?"f":"v":X>pa&&(b.rail.drag.dl=ra>ta?"f":"h");if(!b.rail.drag.dl)return b.cancelEvent(E);b.triggerScrollStart(E.clientX,E.clientY,0,0,0);b.hasmoving=!0}b.preventclick&&!b.preventclick.click&&(b.preventclick.click=b.preventclick.tg.onclick||!1,b.preventclick.tg.onclick=b.onpreventclick);b.rail.drag.dl&&("v"==b.rail.drag.dl?xa=b.rail.drag.sl:"h"==b.rail.drag.dl&&(va=b.rail.drag.st));b.synched("touchmove",function(){b.rail.drag&&2==b.rail.drag.pt&&(b.prepareTransition&&b.resetTransition(),
66
- b.rail.scrollable&&b.setScrollTop(va),b.scrollmom.update(Ea,sa),b.railh&&b.railh.scrollable?(b.setScrollLeft(xa),b.showCursor(va,xa)):b.showCursor(va),I.isie10&&w.selection.clear())});return b.cancelEvent(E)}if(1==b.rail.drag.pt)return b.onmousemove(E)};b.ontouchstartCursor=function(E,X){if(!b.rail.drag||3==b.rail.drag.pt){if(b.locked)return b.cancelEvent(E);b.cancelScroll();b.rail.drag={x:E.touches[0].clientX,y:E.touches[0].clientY,sx:b.scroll.x,sy:b.scroll.y,pt:3,hr:!!X};X=b.getTarget(E);!b.ispage&&
67
- I.hasmousecapture&&X.setCapture();b.isiframe&&!I.hasmousecapture&&(b.saved.csspointerevents=b.doc.css("pointer-events"),b.css(b.doc,{"pointer-events":"none"}));return b.cancelEvent(E)}};b.ontouchendCursor=function(E){if(b.rail.drag&&(I.hasmousecapture&&w.releaseCapture(),b.isiframe&&!I.hasmousecapture&&b.doc.css("pointer-events",b.saved.csspointerevents),3==b.rail.drag.pt))return b.rail.drag=!1,b.cancelEvent(E)};b.ontouchmoveCursor=function(E){if(b.rail.drag&&3==b.rail.drag.pt){b.cursorfreezed=!0;
68
- if(b.rail.drag.hr){b.scroll.x=b.rail.drag.sx+(E.touches[0].clientX-b.rail.drag.x);0>b.scroll.x&&(b.scroll.x=0);var X=b.scrollvaluemaxw;b.scroll.x>X&&(b.scroll.x=X)}else b.scroll.y=b.rail.drag.sy+(E.touches[0].clientY-b.rail.drag.y),0>b.scroll.y&&(b.scroll.y=0),X=b.scrollvaluemax,b.scroll.y>X&&(b.scroll.y=X);b.synched("touchmove",function(){b.rail.drag&&3==b.rail.drag.pt&&(b.showCursor(),b.rail.drag.hr?b.doScrollLeft(Math.round(b.scroll.x*b.scrollratio.x),z.cursordragspeed):b.doScrollTop(Math.round(b.scroll.y*
69
- b.scrollratio.y),z.cursordragspeed))});return b.cancelEvent(E)}}}b.onmousedown=function(E,X){if(!b.rail.drag||1==b.rail.drag.pt){if(b.railslocked)return b.cancelEvent(E);b.cancelScroll();b.rail.drag={x:E.clientX,y:E.clientY,sx:b.scroll.x,sy:b.scroll.y,pt:1,hr:X||!1};X=b.getTarget(E);I.hasmousecapture&&X.setCapture();b.isiframe&&!I.hasmousecapture&&(b.saved.csspointerevents=b.doc.css("pointer-events"),b.css(b.doc,{"pointer-events":"none"}));b.hasmoving=!1;return b.cancelEvent(E)}};b.onmouseup=function(E){if(b.rail.drag){if(1!=
70
- b.rail.drag.pt)return!0;I.hasmousecapture&&w.releaseCapture();b.isiframe&&!I.hasmousecapture&&b.doc.css("pointer-events",b.saved.csspointerevents);b.rail.drag=!1;b.cursorfreezed=!1;b.hasmoving&&b.triggerScrollEnd();return b.cancelEvent(E)}};b.onmousemove=function(E){if(b.rail.drag){if(1===b.rail.drag.pt){if(I.ischrome&&0===E.which)return b.onmouseup(E);b.cursorfreezed=!0;b.hasmoving||b.triggerScrollStart(E.clientX,E.clientY,0,0,0);b.hasmoving=!0;if(b.rail.drag.hr){b.scroll.x=b.rail.drag.sx+(E.clientX-
71
- b.rail.drag.x);0>b.scroll.x&&(b.scroll.x=0);var X=b.scrollvaluemaxw;b.scroll.x>X&&(b.scroll.x=X)}else b.scroll.y=b.rail.drag.sy+(E.clientY-b.rail.drag.y),0>b.scroll.y&&(b.scroll.y=0),X=b.scrollvaluemax,b.scroll.y>X&&(b.scroll.y=X);b.synched("mousemove",function(){b.cursorfreezed&&(b.showCursor(),b.rail.drag.hr?b.scrollLeft(Math.round(b.scroll.x*b.scrollratio.x)):b.scrollTop(Math.round(b.scroll.y*b.scrollratio.y)))});return b.cancelEvent(E)}}else b.checkarea=0};if(I.cantouch||z.emulatetouch)b.onpreventclick=
72
- function(E){if(b.preventclick)return b.preventclick.tg.onclick=b.preventclick.click,b.preventclick=!1,b.cancelEvent(E)},b.onclick=I.isios?!1:function(E){return b.lastmouseup?(b.lastmouseup=!1,b.cancelEvent(E)):!0},z.grabcursorenabled&&I.cursorgrabvalue&&(b.css(b.ispage?b.doc:b.win,{cursor:I.cursorgrabvalue}),b.css(b.rail,{cursor:I.cursorgrabvalue}));else{var ua=function(E){if(b.selectiondrag){if(E){var X=b.win.outerHeight();E=E.pageY-b.selectiondrag.top;0<E&&E<X&&(E=0);E>=X&&(E-=X);b.selectiondrag.df=
73
- E}0!==b.selectiondrag.df&&(b.doScrollBy(-(2*b.selectiondrag.df/6)|0),b.debounced("doselectionscroll",function(){ua()},50))}};b.hasTextSelected="getSelection"in w?function(){return 0<w.getSelection().rangeCount}:"selection"in w?function(){return"None"!=w.selection.type}:function(){return!1};b.onselectionstart=function(E){b.ispage||(b.selectiondrag=b.win.offset())};b.onselectionend=function(E){b.selectiondrag=!1};b.onselectiondrag=function(E){b.selectiondrag&&b.hasTextSelected()&&b.debounced("selectionscroll",
74
- function(){ua(E)},250)}}I.hasw3ctouch?(b.css(b.ispage?p("html"):b.win,{"touch-action":"none"}),b.css(b.rail,{"touch-action":"none"}),b.css(b.cursor,{"touch-action":"none"}),b.bind(b.win,"pointerdown",b.ontouchstart),b.bind(w,"pointerup",b.ontouchend),b.delegate(w,"pointermove",b.ontouchmove)):I.hasmstouch?(b.css(b.ispage?p("html"):b.win,{"-ms-touch-action":"none"}),b.css(b.rail,{"-ms-touch-action":"none"}),b.css(b.cursor,{"-ms-touch-action":"none"}),b.bind(b.win,"MSPointerDown",b.ontouchstart),b.bind(w,
75
- "MSPointerUp",b.ontouchend),b.delegate(w,"MSPointerMove",b.ontouchmove),b.bind(b.cursor,"MSGestureHold",function(E){E.preventDefault()}),b.bind(b.cursor,"contextmenu",function(E){E.preventDefault()})):I.cantouch&&(b.bind(b.win,"touchstart",b.ontouchstart,!1,!0),b.bind(w,"touchend",b.ontouchend,!1,!0),b.bind(w,"touchcancel",b.ontouchend,!1,!0),b.delegate(w,"touchmove",b.ontouchmove,!1,!0));z.emulatetouch&&(b.bind(b.win,"mousedown",b.ontouchstart,!1,!0),b.bind(w,"mouseup",b.ontouchend,!1,!0),b.bind(w,
76
- "mousemove",b.ontouchmove,!1,!0));if(z.cursordragontouch||!I.cantouch&&!z.emulatetouch)b.rail.css({cursor:"default"}),b.railh&&b.railh.css({cursor:"default"}),b.jqbind(b.rail,"mouseenter",function(){if(!b.ispage&&!b.win.is(":visible"))return!1;b.canshowonmouseevent&&b.showCursor();b.rail.active=!0}),b.jqbind(b.rail,"mouseleave",function(){b.rail.active=!1;b.rail.drag||b.hideCursor()}),z.sensitiverail&&(b.bind(b.rail,"click",function(E){b.doRailClick(E,!1,!1)}),b.bind(b.rail,"dblclick",function(E){b.doRailClick(E,
77
- !0,!1)}),b.bind(b.cursor,"click",function(E){b.cancelEvent(E)}),b.bind(b.cursor,"dblclick",function(E){b.cancelEvent(E)})),b.railh&&(b.jqbind(b.railh,"mouseenter",function(){if(!b.ispage&&!b.win.is(":visible"))return!1;b.canshowonmouseevent&&b.showCursor();b.rail.active=!0}),b.jqbind(b.railh,"mouseleave",function(){b.rail.active=!1;b.rail.drag||b.hideCursor()}),z.sensitiverail&&(b.bind(b.railh,"click",function(E){b.doRailClick(E,!1,!0)}),b.bind(b.railh,"dblclick",function(E){b.doRailClick(E,!0,!0)}),
78
- b.bind(b.cursorh,"click",function(E){b.cancelEvent(E)}),b.bind(b.cursorh,"dblclick",function(E){b.cancelEvent(E)})));z.cursordragontouch&&(this.istouchcapable||I.cantouch)&&(b.bind(b.cursor,"touchstart",b.ontouchstartCursor),b.bind(b.cursor,"touchmove",b.ontouchmoveCursor),b.bind(b.cursor,"touchend",b.ontouchendCursor),b.cursorh&&b.bind(b.cursorh,"touchstart",function(E){b.ontouchstartCursor(E,!0)}),b.cursorh&&b.bind(b.cursorh,"touchmove",b.ontouchmoveCursor),b.cursorh&&b.bind(b.cursorh,"touchend",
79
- b.ontouchendCursor));z.emulatetouch||I.isandroid||I.isios?(b.bind(I.hasmousecapture?b.win:w,"mouseup",b.ontouchend),b.onclick&&b.bind(w,"click",b.onclick),z.cursordragontouch?(b.bind(b.cursor,"mousedown",b.onmousedown),b.bind(b.cursor,"mouseup",b.onmouseup),b.cursorh&&b.bind(b.cursorh,"mousedown",function(E){b.onmousedown(E,!0)}),b.cursorh&&b.bind(b.cursorh,"mouseup",b.onmouseup)):(b.bind(b.rail,"mousedown",function(E){E.preventDefault()}),b.railh&&b.bind(b.railh,"mousedown",function(E){E.preventDefault()}))):
80
- (b.bind(I.hasmousecapture?b.win:w,"mouseup",b.onmouseup),b.bind(w,"mousemove",b.onmousemove),b.onclick&&b.bind(w,"click",b.onclick),b.bind(b.cursor,"mousedown",b.onmousedown),b.bind(b.cursor,"mouseup",b.onmouseup),b.railh&&(b.bind(b.cursorh,"mousedown",function(E){b.onmousedown(E,!0)}),b.bind(b.cursorh,"mouseup",b.onmouseup)),!b.ispage&&z.enablescrollonselection&&(b.bind(b.win[0],"mousedown",b.onselectionstart),b.bind(w,"mouseup",b.onselectionend),b.bind(b.cursor,"mouseup",b.onselectionend),b.cursorh&&
81
- b.bind(b.cursorh,"mouseup",b.onselectionend),b.bind(w,"mousemove",b.onselectiondrag)),b.zoom&&(b.jqbind(b.zoom,"mouseenter",function(){b.canshowonmouseevent&&b.showCursor();b.rail.active=!0}),b.jqbind(b.zoom,"mouseleave",function(){b.rail.active=!1;b.rail.drag||b.hideCursor()})));z.enablemousewheel&&(b.isiframe||b.mousewheel(I.isie&&b.ispage?w:b.win,b.onmousewheel),b.mousewheel(b.rail,b.onmousewheel),b.railh&&b.mousewheel(b.railh,b.onmousewheelhr));b.ispage||I.cantouch||/HTML|^BODY/.test(b.win[0].nodeName)||
82
- (b.win.attr("tabindex")||b.win.attr({tabindex:++y}),b.bind(b.win,"focus",function(E){A=b.getTarget(E).id||b.getTarget(E)||!1;b.hasfocus=!0;b.canshowonmouseevent&&b.noticeCursor()}),b.bind(b.win,"blur",function(E){A=!1;b.hasfocus=!1}),b.bind(b.win,"mouseenter",function(E){u=b.getTarget(E).id||b.getTarget(E)||!1;b.hasmousefocus=!0;b.canshowonmouseevent&&b.noticeCursor()}),b.bind(b.win,"mouseleave",function(E){u=!1;b.hasmousefocus=!1;b.rail.drag||b.hideCursor()}));b.onkeypress=function(E){if(b.railslocked&&
83
- 0===b.page.maxh)return!0;E=E||L.event;var X=b.getTarget(E);if(X&&/INPUT|TEXTAREA|SELECT|OPTION/.test(X.nodeName)&&(!X.getAttribute("type")&&!X.type||!/submit|button|cancel/i.tp)||p(X).attr("contenteditable"))return!0;if(b.hasfocus||b.hasmousefocus&&!A||b.ispage&&!A&&!u){X=E.keyCode;if(b.railslocked&&27!=X)return b.cancelEvent(E);var pa=E.ctrlKey||!1,ra=E.shiftKey||!1,sa=!1;switch(X){case 38:case 63233:b.doScrollBy(72);sa=!0;break;case 40:case 63235:b.doScrollBy(-72);sa=!0;break;case 37:case 63232:b.railh&&
84
- (pa?b.doScrollLeft(0):b.doScrollLeftBy(72),sa=!0);break;case 39:case 63234:b.railh&&(pa?b.doScrollLeft(b.page.maxw):b.doScrollLeftBy(-72),sa=!0);break;case 33:case 63276:b.doScrollBy(b.view.h);sa=!0;break;case 34:case 63277:b.doScrollBy(-b.view.h);sa=!0;break;case 36:case 63273:b.railh&&pa?b.doScrollPos(0,0):b.doScrollTo(0);sa=!0;break;case 35:case 63275:b.railh&&pa?b.doScrollPos(b.page.maxw,b.page.maxh):b.doScrollTo(b.page.maxh);sa=!0;break;case 32:z.spacebarenabled&&(ra?b.doScrollBy(b.view.h):b.doScrollBy(-b.view.h),
85
- sa=!0);break;case 27:b.zoomactive&&(b.doZoom(),sa=!0)}if(sa)return b.cancelEvent(E)}};z.enablekeyboard&&b.bind(w,I.isopera&&!I.isopera12?"keypress":"keydown",b.onkeypress);b.bind(w,"keydown",function(E){E.ctrlKey&&(b.wheelprevented=!0)});b.bind(w,"keyup",function(E){E.ctrlKey||(b.wheelprevented=!1)});b.bind(L,"blur",function(E){b.wheelprevented=!1});b.bind(L,"resize",b.onscreenresize);b.bind(L,"orientationchange",b.onscreenresize);b.bind(L,"load",b.lazyResize);if(I.ischrome&&!b.ispage&&!b.haswrapper){var Aa=
86
- b.win.attr("style");f=parseFloat(b.win.css("width"))+1;b.win.css("width",f);b.synched("chromefix",function(){b.win.attr("style",Aa)})}b.onAttributeChange=function(E){b.lazyResize(b.isieold?250:30)};if(z.enableobserver&&(b.isie11||!1===ba||(b.observerbody=new ba(function(E){E.forEach(function(X){if("attributes"==X.type)return Q.hasClass("modal-open")&&Q.hasClass("modal-dialog")&&!p.contains(p(".modal-dialog")[0],b.doc[0])?b.hide():b.show()});if(b.me.clientWidth!=b.page.width||b.me.clientHeight!=b.page.height)return b.lazyResize(30)}),
87
- b.observerbody.observe(w.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),!b.ispage&&!b.haswrapper)){var ya=b.win[0];!1!==ba?(b.observer=new ba(function(E){E.forEach(b.onAttributeChange)}),b.observer.observe(ya,{childList:!0,characterData:!1,attributes:!0,subtree:!1}),b.observerremover=new ba(function(E){E.forEach(function(X){if(0<X.removedNodes.length)for(var pa in X.removedNodes)if(b&&X.removedNodes[pa]===ya)return b.remove()})}),b.observerremover.observe(ya.parentNode,
88
- {childList:!0,characterData:!1,attributes:!1,subtree:!1})):(b.bind(ya,I.isie&&!I.isie9?"propertychange":"DOMAttrModified",b.onAttributeChange),I.isie9&&ya.attachEvent("onpropertychange",b.onAttributeChange),b.bind(ya,"DOMNodeRemoved",function(E){E.target===ya&&b.remove()}))}!b.ispage&&z.boxzoom&&b.bind(L,"resize",b.resizeZoom);b.istextarea&&(b.bind(b.win,"keydown",b.lazyResize),b.bind(b.win,"mouseup",b.lazyResize));b.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var za=function(){b.iframexd=!1;
89
- try{var E="contentDocument"in this?this.contentDocument:this.contentWindow._doc}catch(pa){b.iframexd=!0,E=!1}if(b.iframexd)return"console"in L&&console.log("NiceScroll error: policy restriced iframe"),!0;b.forcescreen=!0;b.isiframe&&(b.iframe={doc:p(E),html:b.doc.contents().find("html")[0],body:b.doc.contents().find("body")[0]},b.getContentSize=function(){return{w:Math.max(b.iframe.html.scrollWidth,b.iframe.body.scrollWidth),h:Math.max(b.iframe.html.scrollHeight,b.iframe.body.scrollHeight)}},b.docscroll=
90
- p(b.iframe.body));if(!I.isios&&z.iframeautoresize&&!b.isiframe){b.win.scrollTop(0);b.doc.height("");var X=Math.max(E.getElementsByTagName("html")[0].scrollHeight,E.body.scrollHeight);b.doc.height(X)}b.lazyResize(30);b.css(p(b.iframe.body),g);I.isios&&b.haswrapper&&b.css(p(E.body),{"-webkit-transform":"translate3d(0,0,0)"});"contentWindow"in this?b.bind(this.contentWindow,"scroll",b.onscroll):b.bind(E,"scroll",b.onscroll);z.enablemousewheel&&b.mousewheel(E,b.onmousewheel);z.enablekeyboard&&b.bind(E,
91
- I.isopera?"keypress":"keydown",b.onkeypress);I.cantouch?(b.bind(E,"touchstart",b.ontouchstart),b.bind(E,"touchmove",b.ontouchmove)):z.emulatetouch&&(b.bind(E,"mousedown",b.ontouchstart),b.bind(E,"mousemove",function(pa){return b.ontouchmove(pa,!0)}),z.grabcursorenabled&&I.cursorgrabvalue&&b.css(p(E.body),{cursor:I.cursorgrabvalue}));b.bind(E,"mouseup",b.ontouchend);b.zoom&&(z.dblclickzoom&&b.bind(E,"dblclick",b.doZoom),b.ongesturezoom&&b.bind(E,"gestureend",b.ongesturezoom))};this.doc[0].readyState&&
92
- "complete"===this.doc[0].readyState&&setTimeout(function(){za.call(b.doc[0],!1)},500);b.bind(this.doc,"load",za)}};this.showCursor=function(g,t){b.cursortimeout&&(clearTimeout(b.cursortimeout),b.cursortimeout=0);b.rail&&(b.autohidedom&&(b.autohidedom.stop().css({opacity:z.cursoropacitymax}),b.cursoractive=!0),b.rail.drag&&1==b.rail.drag.pt||(void 0!==g&&!1!==g&&(b.scroll.y=g/b.scrollratio.y|0),void 0!==t&&(b.scroll.x=t/b.scrollratio.x|0)),b.cursor.css({height:b.cursorheight,top:b.scroll.y}),b.cursorh&&
93
- (g=b.hasreversehr?b.scrollvaluemaxw-b.scroll.x:b.scroll.x,b.cursorh.css({width:b.cursorwidth,left:!b.rail.align&&b.rail.visibility?g+b.rail.width:g}),b.cursoractive=!0),b.zoom&&b.zoom.stop().css({opacity:z.cursoropacitymax}))};this.hideCursor=function(g){b.cursortimeout||!b.rail||!b.autohidedom||b.hasmousefocus&&"leave"===z.autohidemode||(b.cursortimeout=setTimeout(function(){b.rail.active&&b.showonmouseevent||(b.autohidedom.stop().animate({opacity:z.cursoropacitymin}),b.zoom&&b.zoom.stop().animate({opacity:z.cursoropacitymin}),
94
- b.cursoractive=!1);b.cursortimeout=0},g||z.hidecursordelay))};this.noticeCursor=function(g,t,x){b.showCursor(t,x);b.rail.active||b.hideCursor(g)};this.getContentSize=b.ispage?function(){return{w:Math.max(w.body.scrollWidth,w.documentElement.scrollWidth),h:Math.max(w.body.scrollHeight,w.documentElement.scrollHeight)}}:b.haswrapper?function(){return{w:b.doc[0].offsetWidth,h:b.doc[0].offsetHeight}}:function(){return{w:b.docscroll[0].scrollWidth,h:b.docscroll[0].scrollHeight}};this.onResize=function(g,
95
- t){if(!b||!b.win)return!1;g=b.page.maxh;var x=b.page.maxw,f=b.view.h,r=b.view.w;b.view={w:b.ispage?b.win.width():b.win[0].clientWidth,h:b.ispage?b.win.height():b.win[0].clientHeight};b.page=t?t:b.getContentSize();b.page.maxh=Math.max(0,b.page.h-b.view.h);b.page.maxw=Math.max(0,b.page.w-b.view.w);if(b.page.maxh==g&&b.page.maxw==x&&b.view.w==r&&b.view.h==f){if(b.ispage)return b;t=b.win.offset();if(b.lastposition&&(g=b.lastposition,g.top==t.top&&g.left==t.left))return b;b.lastposition=t}0===b.page.maxh?
96
- (b.hideRail(),b.scrollvaluemax=0,b.scroll.y=0,b.scrollratio.y=0,b.cursorheight=0,b.setScrollTop(0),b.rail&&(b.rail.scrollable=!1)):(b.page.maxh-=z.railpadding.top+z.railpadding.bottom,b.rail.scrollable=!0);0===b.page.maxw?(b.hideRailHr(),b.scrollvaluemaxw=0,b.scroll.x=0,b.scrollratio.x=0,b.cursorwidth=0,b.setScrollLeft(0),b.railh&&(b.railh.scrollable=!1)):(b.page.maxw-=z.railpadding.left+z.railpadding.right,b.railh&&(b.railh.scrollable=z.horizrailenabled));b.railslocked=b.locked||0===b.page.maxh&&
97
- 0===b.page.maxw;if(b.railslocked)return b.ispage||b.updateScrollBar(b.view),!1;b.hidden||(b.rail.visibility||b.showRail(),b.railh&&!b.railh.visibility&&b.showRailHr());b.istextarea&&b.win.css("resize")&&"none"!=b.win.css("resize")&&(b.view.h-=20);b.cursorheight=Math.min(b.view.h,Math.round(b.view.h/b.page.h*b.view.h));b.cursorheight=z.cursorfixedheight?z.cursorfixedheight:Math.max(z.cursorminheight,b.cursorheight);b.cursorwidth=Math.min(b.view.w,Math.round(b.view.w/b.page.w*b.view.w));b.cursorwidth=
98
- z.cursorfixedheight?z.cursorfixedheight:Math.max(z.cursorminheight,b.cursorwidth);b.scrollvaluemax=b.view.h-b.cursorheight-(z.railpadding.top+z.railpadding.bottom);b.hasborderbox||(b.scrollvaluemax-=b.cursor[0].offsetHeight-b.cursor[0].clientHeight);b.railh&&(b.railh.width=0<b.page.maxh?b.view.w-b.rail.width:b.view.w,b.scrollvaluemaxw=b.railh.width-b.cursorwidth-(z.railpadding.left+z.railpadding.right));b.ispage||b.updateScrollBar(b.view);b.scrollratio={x:b.page.maxw/b.scrollvaluemaxw,y:b.page.maxh/
99
- b.scrollvaluemax};b.getScrollTop()>b.page.maxh?b.doScrollTop(b.page.maxh):(b.scroll.y=b.getScrollTop()/b.scrollratio.y|0,b.scroll.x=b.getScrollLeft()/b.scrollratio.x|0,b.cursoractive&&b.noticeCursor());b.scroll.y&&0===b.getScrollTop()&&b.doScrollTo(b.scroll.y*b.scrollratio.y|0);return b};this.resize=b.onResize;var q=0;this.onscreenresize=function(g){clearTimeout(q);var t=!b.ispage&&!b.haswrapper;t&&b.hideRails();q=setTimeout(function(){b&&(t&&b.showRails(),b.resize());q=0},120)};this.lazyResize=function(g){clearTimeout(q);
100
- g=isNaN(g)?240:g;q=setTimeout(function(){b&&b.resize();q=0},g);return b};this.jqbind=function(g,t,x){b.events.push({e:g,n:t,f:x,q:!0});p(g).on(t,x)};this.mousewheel=function(g,t,x){g="jquery"in g?g[0]:g;if("onwheel"in w.createElement("div"))b._bind(g,"wheel",t,x||!1);else{var f=void 0!==w.onmousewheel?"mousewheel":"DOMMouseScroll";v(g,f,t,x||!1);"DOMMouseScroll"==f&&v(g,"MozMousePixelScroll",t,x||!1)}};var C=!1;if(I.haseventlistener){try{var G=Object.defineProperty({},"passive",{get:function(){C=
101
- !0}});L.addEventListener("test",null,G)}catch(g){}this.stopPropagation=function(g){if(!g)return!1;g=g.original?g.original:g;g.stopPropagation();return!1};this.cancelEvent=function(g){g.cancelable&&g.preventDefault();g.stopImmediatePropagation();g.preventManipulation&&g.preventManipulation();return!1}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},L.constructor.prototype.addEventListener=w.constructor.prototype.addEventListener=
102
- Element.prototype.addEventListener=function(g,t,x){this.attachEvent("on"+g,t)},L.constructor.prototype.removeEventListener=w.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(g,t,x){this.detachEvent("on"+g,t)},this.cancelEvent=function(g){if(g=g||L.event)g.cancelBubble=!0,g.cancel=!0,g.returnValue=!1;return!1},this.stopPropagation=function(g){if(g=g||L.event)g.cancelBubble=!0;return!1};this.delegate=function(g,t,x,f,r){var D=K[t]||!1;D?b.events.push({e:g,n:t,
103
- f:x,b:f,q:!1}):(D={a:[],l:[],f:function(R){for(var ea=D.l,da=!1,wa=ea.length-1;0<=wa;wa--)if(da=ea[wa].call(R.target,R),!1===da)return!1;return da}},b.bind(g,t,D.f,f,r),K[t]=D);b.ispage?(D.a=[b.id].concat(D.a),D.l=[x].concat(D.l)):(D.a.push(b.id),D.l.push(x))};this.undelegate=function(g,t,x,f,r){if((x=K[t]||!1)&&x.l)for(f=0,r=x.l.length;f<r;f++)x.a[f]===b.id&&(x.a.splice(f),x.l.splice(f),0===x.a.length&&(b._unbind(g,t,x.l.f),K[t]=null))};this.bind=function(g,t,x,f,r){b._bind("jquery"in g?g[0]:g,t,
104
- x,f||!1,r||!1)};this._bind=function(g,t,x,f,r){b.events.push({e:g,n:t,f:x,b:f,q:!1});C&&(r||g==L.document||g==L.document.body||g==L)?g.addEventListener(t,x,{passive:!1,capture:f}):g.addEventListener(t,x,f||!1)};this._unbind=function(g,t,x,f){K[t]?b.undelegate(g,t,x,f):g.removeEventListener(t,x,f)};this.unbindAll=function(){for(var g=0;g<b.events.length;g++){var t=b.events[g];t.q?t.e.unbind(t.n,t.f):b._unbind(t.e,t.n,t.f,t.b)}};this.showRails=function(){return b.showRail().showRailHr()};this.showRail=
105
- function(){0===b.page.maxh||!b.ispage&&"none"==b.win.css("display")||(b.rail.visibility=!0,b.rail.css("display","block"));return b};this.showRailHr=function(){b.railh&&0!==b.page.maxw&&(b.ispage||"none"!=b.win.css("display"))&&(b.railh.visibility=!0,b.railh.css("display","block"));return b};this.hideRails=function(){return b.hideRail().hideRailHr()};this.hideRail=function(){b.rail.visibility=!1;b.rail.css("display","none");return b};this.hideRailHr=function(){b.railh&&(b.railh.visibility=!1,b.railh.css("display",
106
- "none"));return b};this.show=function(){b.hidden=!1;b.railslocked=!1;return b.showRails()};this.hide=function(){b.hidden=!0;b.railslocked=!0;return b.hideRails()};this.toggle=function(){return b.hidden?b.show():b.hide()};this.remove=function(){b.stop();b.cursortimeout&&clearTimeout(b.cursortimeout);for(var g in b.delaylist)b.delaylist[g]&&P(b.delaylist[g].h);b.doZoomOut();I.hasw3ctouch?b.undelegate(w,"pointermove",b.ontouchmove):I.hasmstouch?b.undelegate(w,"MSPointerMove",b.ontouchmove):I.cantouch&&
107
- b.undelegate(w,"touchmove",b.ontouchmove,!1,!0);b.unbindAll();I.isie9&&b.win[0].detachEvent("onpropertychange",b.onAttributeChange);!1!==b.observer&&b.observer.disconnect();!1!==b.observerremover&&b.observerremover.disconnect();!1!==b.observerbody&&b.observerbody.disconnect();b.events=null;b.cursor&&b.cursor.remove();b.cursorh&&b.cursorh.remove();b.rail&&b.rail.remove();b.railh&&b.railh.remove();b.zoom&&b.zoom.remove();for(g=0;g<b.saved.css.length;g++){var t=b.saved.css[g];t[0].css(t[1],void 0===
108
- t[2]?"":t[2])}b.saved=!1;b.me.data("__nicescroll","");var x=p.nicescroll;x.each(function(r){if(this&&this.id===b.id){delete x[r];for(var D=++r;D<x.length;D++,r++)x[r]=x[D];x.length--;x.length&&delete x[x.length]}});for(var f in b)b[f]=null,delete b[f];b=null};this.scrollstart=function(g){this.onscrollstart=g;return b};this.scrollend=function(g){this.onscrollend=g;return b};this.scrollcancel=function(g){this.onscrollcancel=g;return b};this.zoomin=function(g){this.onzoomin=g;return b};this.zoomout=
109
- function(g){this.onzoomout=g;return b};this.isScrollable=function(g){g=g.target?g.target:g;if("OPTION"==g.nodeName)return!0;for(;g&&1==g.nodeType&&g!==this.me[0]&&!/^BODY|HTML/.test(g.nodeName);){var t=p(g);t=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(t))return g.clientHeight!=g.scrollHeight;g=g.parentNode?g.parentNode:!1}return!1};this.getViewport=function(g){for(g=g&&g.parentNode?g.parentNode:!1;g&&1==g.nodeType&&!/^BODY|HTML/.test(g.nodeName);){var t=p(g);
110
- if(/fixed|absolute/.test(t.css("position")))return t;var x=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(x)&&g.clientHeight!=g.scrollHeight||0<t.getNiceScroll().length)return t;g=g.parentNode?g.parentNode:!1}return!1};this.triggerScrollStart=function(g,t,x,f,r){b.onscrollstart&&b.onscrollstart.call(b,{type:"scrollstart",current:{x:g,y:t},request:{x,y:f},end:{x:b.newscrollx,y:b.newscrolly},speed:r})};this.triggerScrollEnd=function(){if(b.onscrollend){var g=b.getScrollLeft(),
111
- t=b.getScrollTop();b.onscrollend.call(b,{type:"scrollend",current:{x:g,y:t},end:{x:g,y:t}})}};var N=0,U=0,S=0,T=1,V=!1;this.onmousewheel=function(g){if(b.wheelprevented||b.locked)return!1;if(b.railslocked)return b.debounced("checkunlock",b.resize,250),!1;if(b.rail.drag)return b.cancelEvent(g);"auto"===z.oneaxismousemode&&0!==g.deltaX&&(z.oneaxismousemode=!1);if(z.oneaxismousemode&&0===g.deltaX&&!b.rail.scrollable)return b.railh&&b.railh.scrollable?b.onmousewheelhr(g):!0;var t=aa(),x=!1;z.preservenativescrolling&&
112
- b.checkarea+600<t&&(b.nativescrollingarea=b.isScrollable(g),x=!0);b.checkarea=t;if(b.nativescrollingarea)return!0;if(g=M(g,!1,x))b.checkarea=0;return g};this.onmousewheelhr=function(g){if(!b.wheelprevented){if(b.railslocked||!b.railh.scrollable)return!0;if(b.rail.drag)return b.cancelEvent(g);var t=aa(),x=!1;z.preservenativescrolling&&b.checkarea+600<t&&(b.nativescrollingarea=b.isScrollable(g),x=!0);b.checkarea=t;return b.nativescrollingarea?!0:b.railslocked?b.cancelEvent(g):M(g,!0,x)}};this.stop=
113
- function(){b.cancelScroll();b.scrollmon&&b.scrollmon.stop();b.cursorfreezed=!1;b.scroll.y=Math.round(b.getScrollTop()*(1/b.scrollratio.y));b.noticeCursor();return b};this.getTransitionSpeed=function(g){return 80+g/72*z.scrollspeed|0};if(z.smoothscroll)if(b.ishwscroll&&I.hastransition&&z.usetransition&&z.smoothscroll){var W="";this.resetTransition=function(){W="";b.doc.css(I.prefixstyle+"transition-duration","0ms")};this.prepareTransition=function(g,t){g=t?g:b.getTransitionSpeed(g);t=g+"ms";W!==t&&
114
- (W=t,b.doc.css(I.prefixstyle+"transition-duration",t));return g};this.doScrollLeft=function(g,t){var x=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(g,x,t)};this.doScrollTop=function(g,t){var x=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(x,g,t)};this.cursorupdate={running:!1,start:function(){var g=this;if(!g.running){g.running=!0;var t=function(){g.running&&O(t);b.showCursor(b.getScrollTop(),b.getScrollLeft());b.notifyScrollEvent(b.win[0])};O(t)}},stop:function(){this.running=
115
- !1}};this.doScrollPos=function(g,t,x){x=b.getScrollTop();var f=b.getScrollLeft();(0>(b.newscrolly-x)*(t-x)||0>(b.newscrollx-f)*(g-f))&&b.cancelScroll();z.bouncescroll?(0>t?t=t/2|0:t>b.page.maxh&&(t=b.page.maxh+(t-b.page.maxh)/2|0),0>g?g=g/2|0:g>b.page.maxw&&(g=b.page.maxw+(g-b.page.maxw)/2|0)):(0>t?t=0:t>b.page.maxh&&(t=b.page.maxh),0>g?g=0:g>b.page.maxw&&(g=b.page.maxw));if(b.scrollrunning&&g==b.newscrollx&&t==b.newscrolly)return!1;b.newscrolly=t;b.newscrollx=g;x=b.getScrollTop();f=b.getScrollLeft();
116
- var r=g-f;var D=t-x;r=b.prepareTransition(Math.sqrt(r*r+D*D)|0);b.scrollrunning||(b.scrollrunning=!0,b.triggerScrollStart(f,x,g,t,r),b.cursorupdate.start());b.scrollendtrapped=!0;I.transitionend||(b.scrollendtrapped&&clearTimeout(b.scrollendtrapped),b.scrollendtrapped=setTimeout(b.onScrollTransitionEnd,r));b.setScrollTop(b.newscrolly);b.setScrollLeft(b.newscrollx)};this.cancelScroll=function(){if(!b.scrollendtrapped)return!0;var g=b.getScrollTop(),t=b.getScrollLeft();b.scrollrunning=!1;I.transitionend||
117
- clearTimeout(I.transitionend);b.scrollendtrapped=!1;b.resetTransition();b.setScrollTop(g);b.railh&&b.setScrollLeft(t);b.timerscroll&&b.timerscroll.tm&&clearInterval(b.timerscroll.tm);b.timerscroll=!1;b.cursorfreezed=!1;b.cursorupdate.stop();b.showCursor(g,t);return b};this.onScrollTransitionEnd=function(){if(b.scrollendtrapped){var g=b.getScrollTop(),t=b.getScrollLeft();0>g?g=0:g>b.page.maxh&&(g=b.page.maxh);0>t?t=0:t>b.page.maxw&&(t=b.page.maxw);if(g!=b.newscrolly||t!=b.newscrollx)return b.doScrollPos(t,
118
- g,z.snapbackspeed);b.scrollrunning&&b.triggerScrollEnd();b.scrollrunning=!1;b.scrollendtrapped=!1;b.resetTransition();b.timerscroll=!1;b.setScrollTop(g);b.railh&&b.setScrollLeft(t);b.cursorupdate.stop();b.noticeCursor(!1,g,t);b.cursorfreezed=!1}}}else this.doScrollLeft=function(g,t){var x=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(g,x,t)},this.doScrollTop=function(g,t){var x=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(x,g,t)},this.doScrollPos=function(g,t,x){x=b.getScrollTop();
119
- var f=b.getScrollLeft();(0>(b.newscrolly-x)*(t-x)||0>(b.newscrollx-f)*(g-f))&&b.cancelScroll();var r=!1;b.bouncescroll&&b.rail.visibility||(0>t?(t=0,r=!0):t>b.page.maxh&&(t=b.page.maxh,r=!0));b.bouncescroll&&b.railh.visibility||(0>g?(g=0,r=!0):g>b.page.maxw&&(g=b.page.maxw,r=!0));if(b.scrollrunning&&b.newscrolly===t&&b.newscrollx===g)return!0;b.newscrolly=t;b.newscrollx=g;b.dst={};b.dst.x=g-f;b.dst.y=t-x;b.dst.px=f;b.dst.py=x;var D=b.getTransitionSpeed(Math.sqrt(b.dst.x*b.dst.x+b.dst.y*b.dst.y)|0);
120
- b.bzscroll={};r=r?1:.58;b.bzscroll.x=new ja(f,b.newscrollx,D,0,0,r,1);b.bzscroll.y=new ja(x,b.newscrolly,D,0,0,r,1);aa();var R=function(){if(b.scrollrunning){var ea=b.bzscroll.y.getPos();b.setScrollLeft(b.bzscroll.x.getNow());b.setScrollTop(b.bzscroll.y.getNow());1>=ea?b.timer=O(R):(b.scrollrunning=!1,b.timer=0,b.triggerScrollEnd())}};b.scrollrunning||(b.triggerScrollStart(f,x,g,t,D),b.scrollrunning=!0,b.timer=O(R))},this.cancelScroll=function(){b.timer&&P(b.timer);b.timer=0;b.bzscroll=!1;b.scrollrunning=
121
- !1;return b};else this.doScrollLeft=function(g,t){var x=b.getScrollTop();b.doScrollPos(g,x,t)},this.doScrollTop=function(g,t){var x=b.getScrollLeft();b.doScrollPos(x,g,t)},this.doScrollPos=function(g,t,x){var f=g>b.page.maxw?b.page.maxw:g;0>f&&(f=0);var r=t>b.page.maxh?b.page.maxh:t;0>r&&(r=0);b.synched("scroll",function(){b.setScrollTop(r);b.setScrollLeft(f)})},this.cancelScroll=function(){};this.doScrollBy=function(g,t){B(0,g)};this.doScrollLeftBy=function(g,t){B(g,0)};this.doScrollTo=function(g,
122
- t){b.cursorfreezed=!1;b.doScrollTop(g)};this.checkContentSize=function(){var g=b.getContentSize();g.h==b.page.h&&g.w==b.page.w||b.resize(!1,g)};b.onscroll=function(g){b.rail.drag||b.cursorfreezed||b.synched("scroll",function(){b.scroll.y=Math.round(b.getScrollTop()/b.scrollratio.y);b.railh&&(b.scroll.x=Math.round(b.getScrollLeft()/b.scrollratio.x));b.noticeCursor()})};b.bind(b.docscroll,"scroll",b.onscroll);this.doZoomIn=function(g){if(!b.zoomactive){b.zoomactive=!0;b.zoomrestore={style:{}};var t=
123
- "position top left zIndex backgroundColor marginTop marginBottom marginLeft marginRight".split(" "),x=b.win[0].style,f;for(f in t){var r=t[f];b.zoomrestore.style[r]=void 0!==x[r]?x[r]:""}b.zoomrestore.style.width=b.win.css("width");b.zoomrestore.style.height=b.win.css("height");b.zoomrestore.padding={w:b.win.outerWidth()-b.win.width(),h:b.win.outerHeight()-b.win.height()};I.isios4&&(b.zoomrestore.scrollTop=H.scrollTop(),H.scrollTop(0));b.win.css({position:I.isios4?"absolute":"fixed",top:0,left:0,
124
- zIndex:J+100,margin:0});t=b.win.css("backgroundColor");(""===t||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(t))&&b.win.css("backgroundColor","#fff");b.rail.css({zIndex:J+101});b.zoom.css({zIndex:J+102});b.zoom.css("backgroundPosition","0 -18px");b.resizeZoom();b.onzoomin&&b.onzoomin.call(b);return b.cancelEvent(g)}};this.doZoomOut=function(g){if(b.zoomactive)return b.zoomactive=!1,b.win.css("margin",""),b.win.css(b.zoomrestore.style),I.isios4&&H.scrollTop(b.zoomrestore.scrollTop),b.rail.css({"z-index":b.zindex}),
125
- b.zoom.css({"z-index":b.zindex}),b.zoomrestore=!1,b.zoom.css("backgroundPosition","0 0"),b.onResize(),b.onzoomout&&b.onzoomout.call(b),b.cancelEvent(g)};this.doZoom=function(g){return b.zoomactive?b.doZoomOut(g):b.doZoomIn(g)};this.resizeZoom=function(){if(b.zoomactive){var g=b.getScrollTop();b.win.css({width:H.width()-b.zoomrestore.padding.w+"px",height:H.height()-b.zoomrestore.padding.h+"px"});b.onResize();b.setScrollTop(Math.min(b.page.maxh,g))}};this.init();p.nicescroll.push(this)},ia=function(e){var n=
126
- this;this.nc=e;this.steptime=this.lasttime=this.speedy=this.speedx=this.lasty=this.lastx=0;this.snapy=this.snapx=!1;this.demuly=this.demulx=0;this.lastscrolly=this.lastscrollx=-1;this.timer=this.chky=this.chkx=0;this.reset=function(m,c){n.stop();n.steptime=0;n.lasttime=aa();n.speedx=0;n.speedy=0;n.lastx=m;n.lasty=c;n.lastscrollx=-1;n.lastscrolly=-1};this.update=function(m,c){var l=aa();n.steptime=l-n.lasttime;n.lasttime=l;l=c-n.lasty;var v=m-n.lastx,B=n.nc.getScrollTop(),M=n.nc.getScrollLeft();B+=
127
- l;M+=v;n.snapx=0>M||M>n.nc.page.maxw;n.snapy=0>B||B>n.nc.page.maxh;n.speedx=v;n.speedy=l;n.lastx=m;n.lasty=c};this.stop=function(){n.nc.unsynched("domomentum2d");n.timer&&clearTimeout(n.timer);n.timer=0;n.lastscrollx=-1;n.lastscrolly=-1};this.doSnapy=function(m,c){var l=!1;0>c?(c=0,l=!0):c>n.nc.page.maxh&&(c=n.nc.page.maxh,l=!0);0>m?(m=0,l=!0):m>n.nc.page.maxw&&(m=n.nc.page.maxw,l=!0);l?n.nc.doScrollPos(m,c,n.nc.opt.snapbackspeed):n.nc.triggerScrollEnd()};this.doMomentum=function(m){var c=aa(),l=
128
- m?c+m:n.lasttime;m=n.nc.getScrollLeft();var v=n.nc.getScrollTop(),B=n.nc.page.maxh,M=n.nc.page.maxw;n.speedx=0<M?Math.min(60,n.speedx):0;n.speedy=0<B?Math.min(60,n.speedy):0;l=l&&60>=c-l;if(0>v||v>B||0>m||m>M)l=!1;m=n.speedx&&l?n.speedx:!1;if(n.speedy&&l&&n.speedy||m){var b=Math.max(16,n.steptime);50<b&&(m=b/50,n.speedx*=m,n.speedy*=m,b=50);n.demulxy=0;n.lastscrollx=n.nc.getScrollLeft();n.chkx=n.lastscrollx;n.lastscrolly=n.nc.getScrollTop();n.chky=n.lastscrolly;var Q=n.lastscrollx,z=n.lastscrolly,
129
- la=function(){var I=600<aa()-c?.04:.02;n.speedx&&(Q=Math.floor(n.lastscrollx-n.speedx*(1-n.demulxy)),n.lastscrollx=Q,0>Q||Q>M)&&(I=.1);n.speedy&&(z=Math.floor(n.lastscrolly-n.speedy*(1-n.demulxy)),n.lastscrolly=z,0>z||z>B)&&(I=.1);n.demulxy=Math.min(1,n.demulxy+I);n.nc.synched("domomentum2d",function(){n.speedx&&(n.nc.getScrollLeft(),n.chkx=Q,n.nc.setScrollLeft(Q));n.speedy&&(n.nc.getScrollTop(),n.chky=z,n.nc.setScrollTop(z));n.timer||(n.nc.hideCursor(),n.doSnapy(Q,z))});1>n.demulxy?n.timer=setTimeout(la,
130
- b):(n.stop(),n.nc.hideCursor(),n.doSnapy(Q,z))};la()}else n.doSnapy(n.nc.getScrollLeft(),n.nc.getScrollTop())}},na=p.fn.scrollTop;"object"===typeof p.cssHooks&&(p.cssHooks.pageYOffset={get:function(e,n,m){return(n=p.data(e,"__nicescroll")||!1)&&n.ishwscroll?n.getScrollTop():na.call(e)},set:function(e,n){var m=p.data(e,"__nicescroll")||!1;m&&m.ishwscroll?m.setScrollTop(parseInt(n)):na.call(e,n);return this}});p.fn.scrollTop=function(e){if(void 0===e){var n=this[0]?p.data(this[0],"__nicescroll")||!1:
131
- !1;return n&&n.ishwscroll?n.getScrollTop():na.call(this)}return this.each(function(){var m=p.data(this,"__nicescroll")||!1;m&&m.ishwscroll?m.setScrollTop(parseInt(e)):na.call(p(this),e)})};var ha=p.fn.scrollLeft;"object"===typeof p.cssHooks&&(p.cssHooks.pageXOffset={get:function(e,n,m){return(n=p.data(e,"__nicescroll")||!1)&&n.ishwscroll?n.getScrollLeft():ha.call(e)},set:function(e,n){var m=p.data(e,"__nicescroll")||!1;m&&m.ishwscroll?m.setScrollLeft(parseInt(n)):ha.call(e,n);return this}});p.fn.scrollLeft=
132
- function(e){if(void 0===e){var n=this[0]?p.data(this[0],"__nicescroll")||!1:!1;return n&&n.ishwscroll?n.getScrollLeft():ha.call(this)}return this.each(function(){var m=p.data(this,"__nicescroll")||!1;m&&m.ishwscroll?m.setScrollLeft(parseInt(e)):ha.call(p(this),e)})};var ca=function(e){var n=this;this.length=0;this.name="nicescrollarray";this.each=function(l){p.each(n,l);return n};this.push=function(l){n[n.length]=l;n.length++};this.eq=function(l){return n[l]};if(e)for(var m=0;m<e.length;m++){var c=
133
- p.data(e[m],"__nicescroll")||!1;c&&(this[this.length]=c,this.length++)}return this};(function(e,n,m){for(var c=0,l=n.length;c<l;c++)m(e,n[c])})(ca.prototype,"show hide toggle onResize resize remove stop doScrollPos".split(" "),function(e,n){e[n]=function(){var m=arguments;return this.each(function(){this[n].apply(this,m)})}});p.fn.getNiceScroll=function(e){return void 0===e?new ca(this):this[e]&&p.data(this[e],"__nicescroll")||!1};if("object"===typeof p.expr){var oa=p.expr.pseudos||p.expr[":"];oa&&
134
- (oa.nicescroll=function(e){return void 0!==p.data(e,"__nicescroll")})}p.fn.niceScroll=function(e,n){void 0!==n||"object"!=typeof e||"jquery"in e||(n=e,e=!1);var m=new ca;this.each(function(){var c=p(this),l=p.extend({},n);if(e){var v=p(e);l.doc=1<v.length?p(e,c):v;l.win=c}"doc"in l&&!("win"in l)&&(l.win=c);v=c.data("__nicescroll")||!1;v||(l.doc=l.doc||c,v=new ka(l,c),c.data("__nicescroll",v));m.push(v)});return 1===m.length?m[0]:m};L.NiceScroll={getjQuery:function(){return p}};p.nicescroll||(p.nicescroll=
135
- new ca,p.nicescroll.options=fa)})(function(p){var A=function(){function u(f){return null==f?String(f):N[U.call(f)]||"object"}function y(f){return"function"==u(f)}function F(f){return null!=f&&f==f.window}function J(f){return"object"==u(f)}function w(f){return J(f)&&!F(f)&&Object.getPrototypeOf(f)==Object.prototype}function H(f){var r=!!f&&"length"in f&&f.length,D=x.type(f);return"function"!=D&&!F(f)&&("array"==D||0===r||"number"==typeof r&&0<r&&r-1 in f)}function K(f){return m.call(f,function(r){return null!=
136
- r})}function O(f){return f.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function P(f){return f in B?B[f]:B[f]=new RegExp("(^|\\s)"+f+"(\\s|$)")}function Z(f,r){return"number"!=typeof r||M[O(f)]?r:r+"px"}function ba(f){return"children"in f?c.call(f.children):x.map(f.childNodes,function(r){if(1==r.nodeType)return r})}function aa(f,r){var D,R=f?f.length:0;for(D=0;D<R;D++)this[D]=f[D];this.length=R;this.selector=r||""}
137
- function fa(f,r,D){for(ca in r)D&&(w(r[ca])||W(r[ca]))?(w(r[ca])&&!w(f[ca])&&(f[ca]={}),W(r[ca])&&!W(f[ca])&&(f[ca]=[]),fa(f[ca],r[ca],D)):r[ca]!==ha&&(f[ca]=r[ca])}function ma(f,r){return null==r?x(f):x(f).filter(r)}function Y(f,r,D,R){return y(r)?r.call(f,D,R):r}function ka(f,r){var D=f.className||"",R=D&&D.baseVal!==ha;if(r===ha)return R?D.baseVal:D;R?D.baseVal=r:f.className=r}function ia(f){try{return f?"true"==f||("false"==f?!1:"null"==f?null:+f+""==f?+f:/^[\[\{]/.test(f)?x.parseJSON(f):f):f}catch(r){return f}}
138
- function na(f,r){r(f);for(var D=0,R=f.childNodes.length;D<R;D++)na(f.childNodes[D],r)}var ha,ca,oa,e=[],n=e.concat,m=e.filter,c=e.slice,l=p.document,v={},B={},M={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},b=/^\s*<(\w+|!)[^>]*>/,Q=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,la=/^(?:body|html)$/i,I=/([A-Z])/g,ja="val css html text data width height offset".split(" "),d=l.createElement("table"),
139
- h=l.createElement("tr"),q={tr:l.createElement("tbody"),tbody:d,thead:d,tfoot:d,td:h,th:h,"*":l.createElement("div")},C=/complete|loaded|interactive/,G=/^[\w-]*$/,N={},U=N.toString,S={},T=l.createElement("div"),V={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},W=Array.isArray||function(f){return f instanceof
140
- Array};S.matches=function(f,r){if(!r||!f||1!==f.nodeType)return!1;var D=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.matchesSelector;if(D)return D.call(f,r);var R=f.parentNode;(D=!R)&&(R=T).appendChild(f);r=~S.qsa(R,r).indexOf(f);D&&T.removeChild(f);return r};var g=function(f){return f.replace(/-+(.)?/g,function(r,D){return D?D.toUpperCase():""})};var t=function(f){return m.call(f,function(r,D){return f.indexOf(r)==D})};S.fragment=function(f,r,D){var R;Q.test(f)&&
141
- (R=x(l.createElement(RegExp.$1)));if(!R){f.replace&&(f=f.replace(z,"<$1></$2>"));r===ha&&(r=b.test(f)&&RegExp.$1);r in q||(r="*");var ea=q[r];ea.innerHTML=""+f;R=x.each(c.call(ea.childNodes),function(){ea.removeChild(this)})}if(w(D)){var da=x(R);x.each(D,function(wa,ta){if(-1<ja.indexOf(wa))da[wa](ta);else da.attr(wa,ta)})}return R};S.Z=function(f,r){return new aa(f,r)};S.isZ=function(f){return f instanceof S.Z};S.init=function(f,r){if(f)if("string"==typeof f)if(f=f.trim(),"<"==f[0]&&b.test(f))r=
142
- S.fragment(f,RegExp.$1,r),f=null;else{if(r!==ha)return x(r).find(f);r=S.qsa(l,f)}else{if(y(f))return x(l).ready(f);if(S.isZ(f))return f;if(W(f))r=K(f);else if(J(f))r=[f],f=null;else if(b.test(f))r=S.fragment(f.trim(),RegExp.$1,r),f=null;else{if(r!==ha)return x(r).find(f);r=S.qsa(l,f)}}else return S.Z();return S.Z(r,f)};var x=function(f,r){return S.init(f,r)};x.extend=function(f){var r=c.call(arguments,1);if("boolean"==typeof f){var D=f;f=r.shift()}r.forEach(function(R){fa(f,R,D)});return f};S.qsa=
143
- function(f,r){var D,R="#"==r[0],ea=!R&&"."==r[0],da=R||ea?r.slice(1):r,wa=G.test(da);return f.getElementById&&wa&&R?(D=f.getElementById(da))?[D]:[]:1!==f.nodeType&&9!==f.nodeType&&11!==f.nodeType?[]:c.call(wa&&!R&&f.getElementsByClassName?ea?f.getElementsByClassName(da):f.getElementsByTagName(r):f.querySelectorAll(r))};x.contains=l.documentElement.contains?function(f,r){return f!==r&&f.contains(r)}:function(f,r){for(;r&&=r.parentNode;)if(r===f)return!0;return!1};x.type=u;x.isFunction=y;x.isWindow=
144
- F;x.isArray=W;x.isPlainObject=w;x.isEmptyObject=function(f){for(var r in f)return!1;return!0};x.isNumeric=function(f){var r=Number(f),D=typeof f;return null!=f&&"boolean"!=D&&("string"!=D||f.length)&&!isNaN(r)&&isFinite(r)||!1};x.inArray=function(f,r,D){return e.indexOf.call(r,f,D)};x.camelCase=g;x.trim=function(f){return null==f?"":String.prototype.trim.call(f)};x.uuid=0;x.support={};x.expr={};x.noop=function(){};x.map=function(f,r){var D=[],R;if(H(f))for(R=0;R<f.length;R++){var ea=r(f[R],R);null!=
145
- ea&&D.push(ea)}else for(R in f)ea=r(f[R],R),null!=ea&&D.push(ea);return 0<D.length?x.fn.concat.apply([],D):D};x.each=function(f,r){var D;if(H(f))for(D=0;D<f.length&&!1!==r.call(f[D],D,f[D]);D++);else for(D in f)if(!1===r.call(f[D],D,f[D]))break;return f};x.grep=function(f,r){return m.call(f,r)};p.JSON&&(x.parseJSON=JSON.parse);x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(f,r){N["[object "+r+"]"]=r.toLowerCase()});x.data=function(f,r,D){if(D===ha)return"undefined"!==
146
- typeof f[r]?f[r]:ha;null===D?delete f[r]:f[r]=D};x.fn={jquery:"1.2.0",constructor:S.Z,length:0,forEach:e.forEach,reduce:e.reduce,push:e.push,sort:e.sort,splice:e.splice,indexOf:e.indexOf,concat:function(){var f,r=[];for(f=0;f<arguments.length;f++){var D=arguments[f];r[f]=S.isZ(D)?D.toArray():D}return n.apply(S.isZ(this)?this.toArray():this,r)},map:function(f){return x(x.map(this,function(r,D){return f.call(r,D,r)}))},slice:function(){return x(c.apply(this,arguments))},ready:function(f){C.test(l.readyState)&&
147
- l.body?f(x):l.addEventListener("DOMContentLoaded",function(){f(x)},!1);return this},get:function(f){return f===ha?c.call(this):this[0<=f?f:f+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(f){e.every.call(this,function(r,D){return!1!==f.call(r,D,r)});return this},filter:function(f){return y(f)?this.not(this.not(f)):x(m.call(this,function(r){return S.matches(r,
148
- f)}))},add:function(f,r){return x(t(this.concat(x(f,r))))},is:function(f){return":visible"===f?0<this.length?"none"!==this.css("display"):!1:J(f)?this[0]===f?!0:!1:0<this.length&&S.matches(this[0],f)},not:function(f){var r=[];if(y(f)&&f.call!==ha)this.each(function(R){f.call(this,R)||r.push(this)});else{var D="string"==typeof f?this.filter(f):H(f)&&y(f.item)?c.call(f):x(f);this.forEach(function(R){0>D.indexOf(R)&&r.push(R)})}return x(r)},has:function(f){return this.filter(function(){return J(f)?x.contains(this,
149
- f):x(this).find(f).size()})},eq:function(f){return-1===f?this.slice(f):this.slice(f,+f+1)},first:function(){var f=this[0];return f&&!J(f)?f:x(f)},last:function(){var f=this[this.length-1];return f&&!J(f)?f:x(f)},find:function(f){var r=this;return f?"object"==typeof f?x(f).filter(function(){var D=this;return e.some.call(r,function(R){return x.contains(R,D)})}):1==this.length?x(S.qsa(this[0],f)):this.map(function(){return S.qsa(this,f)}):x()},closest:function(f,r){var D=[],R="object"==typeof f&&x(f);
150
- this.each(function(ea,da){for(;da&&!(R?0<=R.indexOf(da):S.matches(da,f));)da=da!==r&&!(null!=da&&da.nodeType==da.DOCUMENT_NODE)&&da.parentNode;da&&0>D.indexOf(da)&&D.push(da)});return x(D)},parents:function(f){for(var r=[],D=this;0<D.length;)D=x.map(D,function(R){if((R=R.parentNode)&&(null==R||R.nodeType!=R.DOCUMENT_NODE)&&0>r.indexOf(R))return r.push(R),R});return ma(r,f)},parent:function(f){return ma(t(this.pluck("parentNode")),f)},children:function(f){return ma(this.map(function(){return ba(this)}),
151
- f)},contents:function(){return this.map(function(){return this.contentDocument||c.call(this.childNodes)})},siblings:function(f){return ma(this.map(function(r,D){return m.call(ba(D.parentNode),function(R){return R!==D})}),f)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(f){return x.map(this,function(r){return r[f]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display="");if("none"==getComputedStyle(this,"").getPropertyValue("display")){var f=
152
- this.style,r=this.nodeName;if(!v[r]){var D=l.createElement(r);l.body.appendChild(D);var R=getComputedStyle(D,"").getPropertyValue("display");D.parentNode.removeChild(D);"none"==R&&(R="block");v[r]=R}f.display=v[r]}})},replaceWith:function(f){return this.before(f).remove()},wrap:function(f){var r=y(f);if(this[0]&&!r)var D=x(f).get(0),R=D.parentNode||1<this.length;return this.each(function(ea){x(this).wrapAll(r?f.call(this,ea):R?D.cloneNode(!0):D)})},wrapAll:function(f){if(this[0]){x(this[0]).before(f=
153
- x(f));for(var r;(r=f.children()).length;)f=r.first();x(f).append(this)}return this},wrapInner:function(f){var r=y(f);return this.each(function(D){var R=x(this),ea=R.contents();D=r?f.call(this,D):f;ea.length?ea.wrapAll(D):R.append(D)})},unwrap:function(){this.parent().each(function(){x(this).replaceWith(x(this).children())});return this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(f){return this.each(function(){var r=
154
- x(this);(f===ha?"none"==r.css("display"):f)?r.show():r.hide()})},prev:function(f){return x(this.pluck("previousElementSibling")).filter(f||"*")},next:function(f){return x(this.pluck("nextElementSibling")).filter(f||"*")},html:function(f){return 0 in arguments?this.each(function(r){var D=this.innerHTML;x(this).empty().append(Y(this,f,r,D))}):0 in this?this[0].innerHTML:null},text:function(f){return 0 in arguments?this.each(function(r){r=Y(this,f,r,this.textContent);this.textContent=null==r?"":""+r}):
155
- 0 in this?this.pluck("textContent").join(""):null},attr:function(f,r){var D;return"string"!=typeof f||1 in arguments?this.each(function(R){if(1===this.nodeType)if(J(f))for(ca in f){var ea=ca;R=f[ca];null==R?this.removeAttribute(ea):this.setAttribute(ea,R)}else ea=f,R=Y(this,r,R,this.getAttribute(f)),null==R?this.removeAttribute(ea):this.setAttribute(ea,R)}):0 in this&&1==this[0].nodeType&&null!=(D=this[0].getAttribute(f))?D:ha},removeAttr:function(f){return this.each(function(){1===this.nodeType&&
156
- f.split(" ").forEach(function(r){this.removeAttribute(r)},this)})},prop:function(f,r){f=V[f]||f;return 1 in arguments?this.each(function(D){this[f]=Y(this,r,D,this[f])}):this[0]&&this[0][f]},removeProp:function(f){f=V[f]||f;return this.each(function(){delete this[f]})},data:function(f,r){if("object"===typeof r)this.length&&(this[0][f]=r);else{if("undefined"===typeof r){if(this.length&&"undefined"!==typeof this[0][f])return this[0][f]}else this.length&&("undefined"!==typeof this[0][f]&&delete this[0][f],
157
- r&&(this[0][f]=r));var D="data-"+f.replace(I,"-$1").toLowerCase();D=1 in arguments?this.attr(D,r):this.attr(D);return null!==D?ia(D):ha}},val:function(f){return 0 in arguments?(null==f&&(f=""),this.each(function(r){this.value=Y(this,f,r,this.value)})):this[0]&&(this[0].multiple?x(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(f){if(f)return this.each(function(D){var R=x(this);D=Y(this,f,D,R.offset());var ea=R.offsetParent().offset();
158
- D={top:D.top-ea.top,left:D.left-ea.left};"static"==R.css("position")&&(D.position="relative");R.css(D)});if(!this.length)return null;if(l.documentElement!==this[0]&&!x.contains(l.documentElement,this[0]))return{top:0,left:0};var r=this[0].getBoundingClientRect();return{left:r.left+p.pageXOffset,top:r.top+p.pageYOffset,width:Math.round(r.width),height:Math.round(r.height)}},css:function(f,r){if(2>arguments.length){var D=this[0];if("string"==typeof f)return D?D.style[g(f)]||getComputedStyle(D,"").getPropertyValue(f):
159
- void 0;if(W(f)){if(!D)return;var R={},ea=getComputedStyle(D,"");x.each(f,function(wa,ta){R[ta]=D.style[g(ta)]||ea.getPropertyValue(ta)});return R}}var da="";if("string"==u(f))r||0===r?da=O(f)+":"+Z(f,r):this.each(function(){this.style.removeProperty(O(f))});else for(ca in f)f[ca]||0===f[ca]?da+=O(ca)+":"+Z(ca,f[ca])+";":this.each(function(){this.style.removeProperty(O(ca))});return this.each(function(){this.style.cssText+=";"+da})},index:function(f){return f?this.indexOf(x(f)[0]):this.parent().children().indexOf(this[0])},
160
- hasClass:function(f){return f?e.some.call(this,function(r){return this.test(ka(r))},P(f)):!1},addClass:function(f){return f?this.each(function(r){if("className"in this){oa=[];var D=ka(this);Y(this,f,r,D).split(/\s+/g).forEach(function(R){x(this).hasClass(R)||oa.push(R)},this);oa.length&&ka(this,D+(D?" ":"")+oa.join(" "))}}):this},removeClass:function(f){return this.each(function(r){if("className"in this){if(f===ha)return ka(this,"");oa=ka(this);Y(this,f,r,oa).split(/\s+/g).forEach(function(D){oa=
161
- oa.replace(P(D)," ")});ka(this,oa.trim())}})},toggleClass:function(f,r){return f?this.each(function(D){var R=x(this);Y(this,f,D,ka(this)).split(/\s+/g).forEach(function(ea){(r===ha?!R.hasClass(ea):r)?R.addClass(ea):R.removeClass(ea)})}):this},scrollTop:function(f){if(this.length){var r="scrollTop"in this[0];return f===ha?r?this[0].scrollTop:this[0].pageYOffset:this.each(r?function(){this.scrollTop=f}:function(){this.scrollTo(this.scrollX,f)})}},scrollLeft:function(f){if(this.length){var r="scrollLeft"in
162
- this[0];return f===ha?r?this[0].scrollLeft:this[0].pageXOffset:this.each(r?function(){this.scrollLeft=f}:function(){this.scrollTo(f,this.scrollY)})}},position:function(){if(this.length){var f=this[0],r=this.offsetParent(),D=this.offset(),R=la.test(r[0].nodeName)?{top:0,left:0}:r.offset();D.top-=parseFloat(x(f).css("margin-top"))||0;D.left-=parseFloat(x(f).css("margin-left"))||0;R.top+=parseFloat(x(r[0]).css("border-top-width"))||0;R.left+=parseFloat(x(r[0]).css("border-left-width"))||0;return{top:D.top-
163
- R.top,left:D.left-R.left}}},offsetParent:function(){return this.map(function(){for(var f=this.offsetParent||l.body;f&&!la.test(f.nodeName)&&"static"==x(f).css("position");)f=f.offsetParent;return f})}};x.fn.detach=x.fn.remove;["width","height"].forEach(function(f){var r=f.replace(/./,function(D){return D[0].toUpperCase()});x.fn[f]=function(D){var R,ea=this[0];return D===ha?F(ea)?ea["inner"+r]:null!=ea&&ea.nodeType==ea.DOCUMENT_NODE?ea.documentElement["scroll"+r]:(R=this.offset())&&R[f]:this.each(function(da){ea=
164
- x(this);ea.css(f,Y(this,D,da,ea[f]()))})}});x.fn.innerWidth=function(){return this.width()};x.fn.innerHeight=function(){return this.height()};["after","prepend","before","append"].forEach(function(f,r){var D=r%2;x.fn[f]=function(){var R,ea=x.map(arguments,function(ta){var ua=[];R=u(ta);return"array"==R?(ta.forEach(function(Aa){if(Aa.nodeType!==ha)return ua.push(Aa);if(x.zepto.isZ(Aa))return ua=ua.concat(Aa.get());ua=ua.concat(S.fragment(Aa))}),ua):"object"==R||null==ta?ta:S.fragment(ta)}),da,wa=1<
165
- this.length;return 1>ea.length?this:this.each(function(ta,ua){da=D?ua:ua.parentNode;ua=0==r?ua.nextSibling:1==r?ua.firstChild:2==r?ua:null;var Aa=x.contains(l.documentElement,da);ea.forEach(function(ya){if(wa)ya=ya.cloneNode(!0);else if(!da)return x(ya).remove();da.insertBefore(ya,ua);Aa&&na(ya,function(za){if(!(null==za.nodeName||"SCRIPT"!==za.nodeName.toUpperCase()||za.type&&"text/javascript"!==za.type||za.src)){var E=za.ownerDocument?za.ownerDocument.defaultView:p;E.eval.call(E,za.innerHTML)}})})})};
166
- x.fn[D?f+"To":"insert"+(r?"Before":"After")]=function(R){x(R)[f](this);return this}});S.Z.prototype=aa.prototype=x.fn;S.uniq=t;S.deserializeValue=ia;x.zepto=S;return x}();p.mQuery=A;void 0===p.$$&&(p.$$=A);(function(u){function y(m){return m._zid||(m._zid=Z++)}function F(m,c,l,v){c=J(c);if(c.ns)var B=new RegExp("(?:^| )"+c.ns.replace(" "," .* ?")+"(?: |$)");return(Y[y(m)]||[]).filter(function(M){return M&&(!c.e||M.e==c.e)&&(!c.ns||B.test(M.ns))&&(!l||y(M.fn)===y(l))&&(!v||M.sel==v)})}function J(m){m=
167
- (""+m).split(".");return{e:m[0],ns:m.slice(1).sort().join(" ")}}function w(m){return ha[m]||ia&&na[m]||m}function H(m,c,l,v,B,M,b){var Q=y(m),z=Y[Q]||(Y[Q]=[]);c.split(/\s/).forEach(function(la){if("ready"==la)return u(document).ready(l);var I=J(la);I.fn=l;I.sel=B;I.e in ha&&(l=function(d){var h=d.relatedTarget;if(!h||h!==this&&!u.contains(this,h))return I.fn.apply(this,arguments)});var ja=(I.del=M)||l;I.proxy=function(d){d=O(d);if(!d.isImmediatePropagationStopped()){d.data=v;var h=ja.apply(m,d._args==
168
- ba?[d]:[d].concat(d._args));!1===h&&(d.preventDefault(),d.stopPropagation());return h}};I.i=z.length;z.push(I);"addEventListener"in m&&m.addEventListener(w(I.e),I.proxy,I.del&&!ia&&I.e in na||!!b)})}function K(m,c,l,v,B){var M=y(m);(c||"").split(/\s/).forEach(function(b){F(m,b,l,v).forEach(function(Q){delete Y[M][Q.i];"removeEventListener"in m&&m.removeEventListener(w(Q.e),Q.proxy,Q.del&&!ia&&Q.e in na||!!B)})})}function O(m,c){if(c||!m.isDefaultPrevented)if(c||=m,u.each(n,function(l,v){var B=c[l];
169
- m[l]=function(){this[v]=ca;return B&&B.apply(c,arguments)};m[v]=oa}),m.timeStamp||(m.timeStamp=Date.now()),c.defaultPrevented!==ba?c.defaultPrevented:"returnValue"in c?!1===c.returnValue:c.getPreventDefault&&c.getPreventDefault())m.isDefaultPrevented=ca;return m}function P(m){var c,l={originalEvent:m};for(c in m)e.test(c)||m[c]===ba||(l[c]=m[c]);return O(l,m)}var Z=1,ba,aa=Array.prototype.slice,fa=u.isFunction,ma=function(m){return"string"==typeof m},Y={},ka={},ia="onfocusin"in p,na={focus:"focusin",
170
- blur:"focusout"},ha={mouseenter:"mouseover",mouseleave:"mouseout"};ka.click=ka.mousedown=ka.mouseup=ka.mousemove="MouseEvents";u.event={add:H,remove:K};u.proxy=function(m,c){var l=2 in arguments&&aa.call(arguments,2);if(fa(m)){var v=function(){return m.apply(c,l?l.concat(aa.call(arguments)):arguments)};v._zid=y(m);return v}if(ma(c))return l?(l.unshift(m[c],m),u.proxy.apply(null,l)):u.proxy(m[c],m);throw new TypeError("expected function");};u.fn.bind=function(m,c,l){return this.on(m,c,l)};u.fn.unbind=
171
- function(m,c){return this.off(m,c)};u.fn.one=function(m,c,l,v){return this.on(m,c,l,v,1)};var ca=function(){return!0},oa=function(){return!1},e=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,n={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};u.fn.delegate=function(m,c,l){return this.on(c,m,l)};u.fn.undelegate=function(m,c,l){return this.off(c,m,l)};u.fn.live=function(m,c){u(document.body).delegate(this.selector,
172
- m,c);return this};u.fn.die=function(m,c){u(document.body).undelegate(this.selector,m,c);return this};u.fn.on=function(m,c,l,v,B){var M,b,Q=this;if(m&&!ma(m))return u.each(m,function(z,la){Q.on(z,c,l,la,B)}),Q;ma(c)||fa(v)||!1===v||(v=l,l=c,c=ba);if(v===ba||!1===l)v=l,l=ba;!1===v&&(v=oa);return Q.each(function(z,la){B&&(M=function(I){K(la,I.type,v);return v.apply(this,arguments)});c&&(b=function(I){var ja=u(I.target).closest(c,la).get(0);if(ja&&ja!==la){var d=u.extend(P(I),{currentTarget:ja,liveFired:la});
173
- return(M||v).apply(ja,[d].concat(aa.call(arguments,1)))}});H(la,m,v,l,c,b||M)})};u.fn.off=function(m,c,l){var v=this;if(m&&!ma(m))return u.each(m,function(B,M){v.off(B,c,M)}),v;ma(c)||fa(l)||!1===l||(l=c,c=ba);!1===l&&(l=oa);return v.each(function(){K(this,m,l,c)})};u.fn.trigger=function(m,c){m=ma(m)||u.isPlainObject(m)?u.Event(m):O(m);m._args=c;return this.each(function(){if(m.type in na&&"function"==typeof this[m.type])this[m.type]();else"dispatchEvent"in this?this.dispatchEvent(m):u(this).triggerHandler(m,
174
- c)})};u.fn.triggerHandler=function(m,c){var l,v;this.each(function(B,M){l=P(ma(m)?u.Event(m):m);l._args=c;l.target=M;u.each(F(M,m.type||m),function(b,Q){v=Q.proxy(l);if(l.isImmediatePropagationStopped())return!1})});return v};"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(m){u.fn[m]=function(c){return 0 in arguments?this.bind(m,c):this.trigger(m)}});
175
- u.Event=function(m,c){ma(m)||(c=m,m=c.type);var l=document.createEvent(ka[m]||"Events"),v=!0;if(c)for(var B in c)"bubbles"==B?v=!!c[B]:l[B]=c[B];l.initEvent(m,v,!0);return O(l)}})(A);(function(u){["width","height"].forEach(function(y){var F=y.replace(/./,function(J){return J[0].toUpperCase()});u.fn["outer"+F]=function(J){var w=this;if(w){var H=w[y]();({width:["left","right"],height:["top","bottom"]})[y].forEach(function(K){J&&(H+=parseInt(w.css("margin-"+K),10))});return H}return null}})})(A);(function(u){function y(m,
176
- c,l,v){if(m.global)return m=c||Y,l=u.Event(l),u(m).trigger(l,v),!l.isDefaultPrevented()}function F(m){m.global&&0===u.active++&&y(m,null,"ajaxStart")}function J(m,c){var l=c.context;if(!1===c.beforeSend.call(l,m,c)||!1===y(c,l,"ajaxBeforeSend",[m,c]))return!1;y(c,l,"ajaxSend",[m,c])}function w(m,c,l,v){var B=l.context;l.success.call(B,m,"success",c);v&&v.resolveWith(B,[m,"success",c]);y(l,B,"ajaxSuccess",[c,l,m]);K("success",c,l)}function H(m,c,l,v,B){var M=v.context;v.error.call(M,l,c,m);B&&B.rejectWith(M,
177
- [l,c,m]);y(v,M,"ajaxError",[l,v,m||c]);K(c,l,v)}function K(m,c,l){var v=l.context;l.complete.call(v,c,m);y(l,v,"ajaxComplete",[c,l]);l.global&&!--u.active&&y(l,null,"ajaxStop")}function O(){}function P(m){m&&=m.split(";",2)[0];return m&&("text/html"==m?"html":"application/json"==m?"json":ha.test(m)?"script":ca.test(m)&&"xml")||"text"}function Z(m,c){return""==c?m:(m+"&"+c).replace(/[&?]{1,2}/,"?")}function ba(m){m.processData&&m.data&&"string"!=u.type(m.data)&&(m.data=u.param(m.data,m.traditional));
178
- !m.data||m.type&&"GET"!=m.type.toUpperCase()&&"jsonp"!=m.dataType||(m.url=Z(m.url,m.data),m.data=void 0)}function aa(m,c,l,v){u.isFunction(c)&&(v=l,l=c,c=void 0);u.isFunction(l)||(v=l,l=void 0);return{url:m,data:c,success:l,dataType:v}}function fa(m,c,l,v){var B,M=u.isArray(c),b=u.isPlainObject(c);u.each(c,function(Q,z){B=u.type(z);v&&(Q=l?v:v+"["+(b||"object"==B||"array"==B?Q:"")+"]");!v&&M?m.add(z.name,z.value):"array"==B||!l&&"object"==B?fa(m,z,l,Q):m.add(Q,z)})}var ma=+new Date,Y=p.document,ka,
179
- ia,na=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,ha=/^(?:text|application)\/javascript/i,ca=/^(?:text|application)\/xml/i,oa=/^\s*$/,e=Y.createElement("a");e.href=p.location.href;u.active=0;u.ajaxJSONP=function(m,c){if(!("type"in m))return u.ajax(m);var l=m.jsonpCallback,v=(u.isFunction(l)?l():l)||"Zepto"+ma++,B=Y.createElement("script"),M=p[v],b,Q=function(I){u(B).triggerHandler("error",I||"abort")},z={abort:Q},la;c&&c.promise(z);u(B).on("load error",function(I,ja){clearTimeout(la);u(B).off().remove();
180
- "error"!=I.type&&b?w(b[0],z,m,c):H(null,ja||"error",z,m,c);p[v]=M;b&&u.isFunction(M)&&M(b[0]);M=b=void 0});if(!1===J(z,m))return Q("abort"),z;p[v]=function(){b=arguments};B.src=m.url.replace(/\?(.+)=\?/,"?$1="+v);Y.head.appendChild(B);0<m.timeout&&(la=setTimeout(function(){Q("timeout")},m.timeout));return z};u.ajaxSettings={type:"GET",beforeSend:O,success:O,error:O,complete:O,context:null,global:!0,xhr:function(){return new p.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",
181
- json:"application/json",xml:"application/xml, text/xml",html:"text/html",text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:O};u.ajax=function(m){var c=u.extend({},m||{}),l=u.Deferred&&u.Deferred();for(ka in u.ajaxSettings)void 0===c[ka]&&(c[ka]=u.ajaxSettings[ka]);F(c);if(!c.crossDomain){var v=Y.createElement("a");v.href=c.url;v.href=v.href;c.crossDomain=e.protocol+"//"+e.host!==v.protocol+"//"+v.host}c.url||(c.url=p.location.toString());-1<(v=c.url.indexOf("#"))&&(c.url=
182
- c.url.slice(0,v));ba(c);var B=c.dataType;(v=/\?.+=\?/.test(c.url))&&(B="jsonp");!1!==c.cache&&(m&&!0===m.cache||"script"!=B&&"jsonp"!=B)||(c.url=Z(c.url,"_="+Date.now()));if("jsonp"==B)return v||(c.url=Z(c.url,c.jsonp?c.jsonp+"=?":!1===c.jsonp?"":"callback=?")),u.ajaxJSONP(c,l);m=c.accepts[B];var M={};v=function(I,ja){M[I.toLowerCase()]=[I,ja]};var b=/^([\w-]+:)\/\//.test(c.url)?RegExp.$1:p.location.protocol,Q=c.xhr(),z=Q.setRequestHeader,la;l&&l.promise(Q);c.crossDomain||v("X-Requested-With","XMLHttpRequest");
183
- v("Accept",m||"*/*");if(m=c.mimeType||m)-1<m.indexOf(",")&&(m=m.split(",",2)[0]),Q.overrideMimeType&&Q.overrideMimeType(m);(c.contentType||!1!==c.contentType&&c.data&&"GET"!=c.type.toUpperCase())&&v("Content-Type",c.contentType||"application/x-www-form-urlencoded");if(c.headers)for(ia in c.headers)v(ia,c.headers[ia]);Q.setRequestHeader=v;Q.onreadystatechange=function(){if(4==Q.readyState){Q.onreadystatechange=O;clearTimeout(la);var I=!1;if(200<=Q.status&&300>Q.status||304==Q.status||0==Q.status&&
184
- "file:"==b){B=B||P(c.mimeType||Q.getResponseHeader("content-type"));if("arraybuffer"==Q.responseType||"blob"==Q.responseType)var ja=Q.response;else{ja=Q.responseText;try{ja=c.dataFilter==O?ja:c.dataFilter.call(c.context,ja,B),"script"==B?(0,eval)(ja):"xml"==B?ja=Q.responseXML:"json"==B&&(ja=oa.test(ja)?null:u.parseJSON(ja))}catch(d){I=d}if(I)return H(I,"parsererror",Q,c,l)}w(ja,Q,c,l)}else H(Q.statusText||null,Q.status?"error":"abort",Q,c,l)}};if(!1===J(Q,c))return Q.abort(),H(null,"abort",Q,c,l),
185
- Q;Q.open(c.type,c.url,"async"in c?c.async:!0,c.username,c.password);if(c.xhrFields)for(ia in c.xhrFields)Q[ia]=c.xhrFields[ia];for(ia in M)z.apply(Q,M[ia]);0<c.timeout&&(la=setTimeout(function(){Q.onreadystatechange=O;Q.abort();H(null,"timeout",Q,c,l)},c.timeout));Q.send(c.data?c.data:null);return Q};u.get=function(){return u.ajax(aa.apply(null,arguments))};u.post=function(){var m=aa.apply(null,arguments);m.type="POST";return u.ajax(m)};u.getJSON=function(){var m=aa.apply(null,arguments);m.dataType=
186
- "json";return u.ajax(m)};u.fn.load=function(m,c,l){if(!this.length)return this;var v=this,B=m.split(/\s/);m=aa(m,c,l);var M=m.success;if(1<B.length){m.url=B[0];var b=B[1]}m.success=function(Q){v.html(b?u("<div>").html(Q.replace(na,"")).find(b):Q);M&&M.apply(v,arguments)};u.ajax(m);return this};var n=encodeURIComponent;u.param=function(m,c){var l=[];l.add=function(v,B){u.isFunction(B)&&(B=B());null==B&&(B="");this.push(n(v)+"="+n(B))};fa(l,m,c);return l.join("&").replace(/%20/g,"+")}})(A);(function(u){u.fn.serializeArray=
187
- function(){var y,F,J=[],w=function(H){if(H.forEach)return H.forEach(w);J.push({name:y,value:H})};this[0]&&u.each(this[0].elements,function(H,K){F=K.type;(y=K.name)&&"fieldset"!=K.nodeName.toLowerCase()&&!K.disabled&&"submit"!=F&&"reset"!=F&&"button"!=F&&"file"!=F&&("radio"!=F&&"checkbox"!=F||K.checked)&&w(u(K).val())});return J};u.fn.serialize=function(){var y=[];this.serializeArray().forEach(function(F){y.push(encodeURIComponent(F.name)+"="+encodeURIComponent(F.value))});return y.join("&")};u.fn.submit=
188
- function(y){if(0 in arguments)this.bind("submit",y);else if(this.length){var F=u.Event("submit");this.eq(0).trigger(F);F.isDefaultPrevented()||this.get(0).submit()}return this}})(A);(function(u,y){function F(ha){return w?w+ha:ha.toLowerCase()}var J="",w,H={Webkit:"webkit",Moz:"",O:"o"},K=document.createElement("div"),O=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,P,Z,ba,aa,fa,ma,Y,ka,ia={};K.style.transform===y&&u.each(H,function(ha,ca){if(K.style[ha+"TransitionProperty"]!==
189
- y)return J="-"+ha.toLowerCase()+"-",w=ca,!1});var na=J+"transform";ia[P=J+"transition-property"]=ia[Z=J+"transition-duration"]=ia[aa=J+"transition-delay"]=ia[ba=J+"transition-timing-function"]=ia[fa=J+"animation-name"]=ia[ma=J+"animation-duration"]=ia[ka=J+"animation-delay"]=ia[Y=J+"animation-timing-function"]="";u.fx={off:w===y&&K.style.transitionProperty===y,speeds:{_default:400,fast:200,slow:600},cssPrefix:J,transitionEnd:F("TransitionEnd"),animationEnd:F("AnimationEnd")};u.fn.animate=function(ha,
190
- ca,oa,e,n){u.isFunction(ca)&&(e=ca,ca=oa=y);u.isFunction(oa)&&(e=oa,oa=y);u.isPlainObject(ca)&&(oa=ca.easing,e=ca.complete,n=ca.delay,ca=ca.duration);ca&&=("number"==typeof ca?ca:u.fx.speeds[ca]||u.fx.speeds._default)/1E3;n&&=parseFloat(n)/1E3;return this.anim(ha,ca,oa,e,n)};u.fn.anim=function(ha,ca,oa,e,n){var m,c={},l="",v=this,B=u.fx.transitionEnd,M=!1;ca===y&&(ca=u.fx.speeds._default/1E3);n===y&&(n=0);u.fx.off&&(ca=0);if("string"==typeof ha)c[fa]=ha,c[ma]=ca+"s",c[ka]=n+"s",c[Y]=oa||"linear",
191
- B=u.fx.animationEnd;else{var b=[];for(m in ha)O.test(m)?l+=m+"("+ha[m]+") ":(c[m]=ha[m],b.push(m.replace(/([A-Z])/g,"-$1").toLowerCase()));l&&(c[na]=l,b.push(na));0<ca&&"object"===typeof ha&&(c[P]=b.join(", "),c[Z]=ca+"s",c[aa]=n+"s",c[ba]=oa||"linear")}var Q=function(z){if("undefined"!==typeof z){if(z.target!==z.currentTarget)return;u(z.target).unbind(B,Q)}else u(this).unbind(B,Q);M=!0;u(this).css(ia);e&&e.call(this)};0<ca&&(this.bind(B,Q),setTimeout(function(){M||Q.call(v)},1E3*(ca+n)+25));this.size()&&
192
- this.get(0).clientLeft;this.css(c);0>=ca&&setTimeout(function(){v.each(function(){Q.call(this)})},0);return this};u.fn.stop=function(ha,ca){return this};K=null})(A);(function(){try{getComputedStyle(void 0)}catch(y){var u=getComputedStyle;p.getComputedStyle=function(F,J){try{return u(F,J)}catch(w){return null}}}})();return A}(L));var Da=function(){if(document.currentScript)var p=document.currentScript.src;else{p=document.scripts;for(var A=p.length-1,u,y=A;0<y;y--)if("interactive"===p[y].readyState){u=
193
- p[y].src;break}p=u||p[A].src}A=p.indexOf("v=");A=0<A?p.substr(A+2):2023;p=p.substring(0,p.lastIndexOf("/")+1);p.endsWith("zwplayer/")||(p+="js/");return{path:p,v:A}}(),Ia=Da.path+"plugins/",Ja=function(p,A,u){var y=document.getElementsByTagName("head");if(0==y.length){y=document.createElement("head");var F=document.getElementsByTagName("body");if(0<F.length)F=F[0],document.insertBefore(y,F);else return alert("Invalid html document: no HEAD tag"),!1}else{y=y[0];F=y.childNodes;for(var J=0;J<F.length;J++){var w=
194
- F[J];if("SCRIPT"===w.nodeName.toUpperCase()&&w.id&&w.id==p){if("true"!=w.getAttribute("loadstate")){var H=function(){"true"!=w.getAttribute("loadstate")?setTimeout(H,50):"function"==typeof u&&u(p)};setTimeout(H,50);return!1}"function"==typeof u&&u(p);return!0}}}var K=document.createElement("script");K.type="text/javascript";K.readyState?K.onreadystatechange=function(){if("loaded"==K.readyState||"complete"==K.readyState)K.onreadystatechange=null,K.setAttribute("loadstate","true"),"function"==typeof u&&
195
- u(p)}:K.onload=function(){K.setAttribute("loadstate","true");"function"==typeof u&&u(p)};K.id=p;K.src=A;y.appendChild(K);return!1};(function(p,A,u){var y=document.getElementsByTagName("head");if(0==y.length){y=document.createElement("head");var F=document.getElementsByTagName("body");if(0<F.length)F=F[0],document.insertBefore(y,F);else return alert("Invalid html document: no HEAD tag found"),!1}else{y=y[0];F=y.childNodes;for(var J=0;J<F.length;J++){var w=F[J];if("link"===w.nodeName.toUpperCase()&&
196
- w.id&&w.id==p){if("true"!==w.getAttribute("loadstate")){var H=function(){"true"!==w.getAttribute("loadstate")?setTimeout(H,50):"function"===typeof u&&u(p)};setTimeout(H,50);return!1}"function"===typeof u&&u(p);return!0}}}var K=document.createElement("link");K.type="text/css";K.setAttribute("rel","stylesheet");K.readyState?K.onreadystatechange=function(){if("loaded"==K.readyState||"complete"==K.readyState)K.onreadystatechange=null,K.setAttribute("loadstate","true"),"function"==typeof u&&u(p)}:K.onload=
197
- function(){K.setAttribute("loadstate","true");"function"==typeof u&&u(p)};K.id=p;K.href=A;y.appendChild(K);return!1})("zwplayer-css",Da.path+"css/zwplayer.css?v="+Da.v,function(p){console.log("zwplayer.css["+p+"] is loaded")});var Ua=function(p){return"object"===typeof HTMLElement?p instanceof HTMLElement:!(!p||"object"!==typeof p||1!==p.nodeType&&9!==p.nodeType||"string"!==typeof p.nodeName)};Array.isArray||(Array.isArray=function(p){return"[object Array]"===Object.prototype.toString.call(p)});var Va=
198
- /iPhone|iPad|iPod/.test(navigator.userAgent);(function(p){p+="=";for(var A=document.cookie.split(";"),u=0;u<A.length;u++){var y=A[u].trim();if(0==y.indexOf(p))return y.substring(p.length,y.length)}return""})("ZWPlayer")||bb("ZWPlayer","V1.0",365);var ib=function(p){for(var A=navigator.languages&&navigator.languages.length?navigator.languages:[navigator.language],u=0;u<p.length;u++)for(var y=0;y<A.length;y++)if(p[u].lang&&A[y]&&-1<A[y].indexOf(p[u].lang))return p[u].text;return 1===p.length?p[0].text:
199
- null};HUAYI={};HUAYI.Danmu=function(){var p={playerObj:null,opacity:70,onInit:null,onClose:null,onResize:null};return{create:function(A){var u={};for(k in p)u[k]=p[k];for(k in A)u[k]=A[k];"undefined"==typeof u.playerId&&(u.playerId="video-body");return new function(y){y=y.playerId;this.rows=[];this.timerId=this.rowCount=0;this.frameDuration=40;this.Danmulayer=null;this.danmuMargin=50;this.speedX=100;this.hasTransition=!0;this.rowHeight=28;this.topMargin=10;this.layerHeight=this.layerWidth=0;this.fontSize=
21
+ scriptpath:function(){var T;(T=w.currentScript)||(T=w.getElementsByTagName("script"),T=T.length?T[T.length-1]:!1);T=T?T.src.split("?")[0]:"";return 0<T.split("/").length?T.split("/").slice(0,-1).join("/")+"/":""}(),preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1,scrollCLass:!1},ma=!1,W=function(){if(ma)return ma;var T=w.createElement("DIV"),e=T.style,l=navigator.userAgent,m=navigator.platform,c={};c.haspointerlock="pointerLockElement"in w||"webkitPointerLockElement"in
22
+ w||"mozPointerLockElement"in w;c.isopera="opera"in K;c.isopera12=c.isopera&&"getUserMedia"in navigator;c.isoperamini="[object OperaMini]"===Object.prototype.toString.call(K.operamini);c.isie="all"in w&&"attachEvent"in T&&!c.isopera;c.isieold=c.isie&&!("msInterpolationMode"in e);c.isie7=c.isie&&!c.isieold&&(!("documentMode"in w)||7===w.documentMode);c.isie8=c.isie&&"documentMode"in w&&8===w.documentMode;c.isie9=c.isie&&"performance"in K&&9===w.documentMode;c.isie10=c.isie&&"performance"in K&&10===
23
+ w.documentMode;c.isie11="msRequestFullscreen"in T&&11<=w.documentMode;c.ismsedge="msCredentials"in K;c.ismozilla="MozAppearance"in e;c.iswebkit=!c.ismsedge&&"WebkitAppearance"in e;c.ischrome=c.iswebkit&&"chrome"in K;c.ischrome38=c.ischrome&&"touchAction"in e;c.ischrome22=!c.ischrome38&&c.ischrome&&c.haspointerlock;c.ischrome26=!c.ischrome38&&c.ischrome&&"transition"in e;c.cantouch="ontouchstart"in w.documentElement||"ontouchstart"in K;c.hasw3ctouch=(K.PointerEvent||!1)&&(0<navigator.maxTouchPoints||
24
+ 0<navigator.msMaxTouchPoints);c.hasmstouch=!c.hasw3ctouch&&(K.MSPointerEvent||!1);c.ismac=/^mac$/i.test(m);c.isios=c.cantouch&&/iphone|ipad|ipod/i.test(m);c.isios4=c.isios&&!("seal"in Object);c.isios7=c.isios&&"webkitHidden"in w;c.isios8=c.isios&&"hidden"in w;c.isios10=c.isios&&K.Proxy;c.isandroid=/android/i.test(l);c.haseventlistener="addEventListener"in T;c.trstyle=!1;c.hastransform=!1;c.hastranslate3d=!1;c.transitionstyle=!1;c.hastransition=!1;c.transitionend=!1;c.trstyle="transform";c.hastransform=
25
+ "transform"in e||function(){for(var v=["msTransform","webkitTransform","MozTransform","OTransform"],z=0,A=v.length;z<A;z++)if(void 0!==e[v[z]]){c.trstyle=v[z];break}c.hastransform=!!c.trstyle}();c.hastransform&&(e[c.trstyle]="translate3d(1px,2px,3px)",c.hastranslate3d=/translate3d/.test(e[c.trstyle]));c.transitionstyle="transition";c.prefixstyle="";c.transitionend="transitionend";c.hastransition="transition"in e||function(){c.transitionend=!1;for(var v="webkitTransition msTransition MozTransition OTransition OTransition KhtmlTransition".split(" "),
26
+ z="-webkit- -ms- -moz- -o- -o -khtml-".split(" "),A="webkitTransitionEnd msTransitionEnd transitionend otransitionend oTransitionEnd KhtmlTransitionEnd".split(" "),b=0,O=v.length;b<O;b++)if(v[b]in e){c.transitionstyle=v[b];c.prefixstyle=z[b];c.transitionend=A[b];break}c.ischrome26&&(c.prefixstyle=z[1]);c.hastransition=c.transitionstyle}();c.cursorgrabvalue=function(){var v=["grab","-webkit-grab","-moz-grab"];if(c.ischrome&&!c.ischrome38||c.isie)v=[];for(var z=0,A=v.length;z<A;z++){var b=v[z];e.cursor=
27
+ b;if(e.cursor==b)return b}return"url("+(ha.scriptpath+"css/openhand.cur),n-resize")}();c.hasmousecapture="setCapture"in T;c.hasMutationObserver=!1!==ba;T=null;return ma=c},ka=function(T,e){function l(){var g=b.doc.css(G.trstyle);return g&&"matrix"==g.substr(0,6)?g.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/):!1}function m(){var g=b.win;if("zIndex"in g)return g.zIndex();for(;0<g.length&&9!=g[0].nodeType;){var r=g.css("zIndex");if(!isNaN(r)&&0!==r)return parseInt(r);g=g.parent()}return!1}
28
+ function c(g,r,t){r=g.css(r);g=parseFloat(r);return isNaN(g)?(g=d[r]||0,t=3==g?t?b.win.outerHeight()-b.win.innerHeight():b.win.outerWidth()-b.win.innerWidth():1,b.isie8&&g&&(g+=1),t?g:0):g}function v(g,r,t,f){b._bind(g,r,function(p){p=p||K.event;var D={original:p,target:p.target||p.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==p.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){p.preventDefault?p.preventDefault():p.returnValue=!1;return!1},stopImmediatePropagation:function(){p.stopImmediatePropagation?
29
+ p.stopImmediatePropagation():p.cancelBubble=!0}};"mousewheel"==r?(p.wheelDeltaX&&(D.deltaX=-.025*p.wheelDeltaX),p.wheelDeltaY&&(D.deltaY=-.025*p.wheelDeltaY),D.deltaY||D.deltaX||(D.deltaY=-.025*p.wheelDelta)):D.deltaY=p.detail;return t.call(g,D)},f)}function z(g,r,t,f){b.scrollrunning||(b.newscrolly=b.getScrollTop(),b.newscrollx=b.getScrollLeft(),N=Z());var p=Z()-N;N=Z();V=350<p?1:V+(2-V)/10;g=g*V|0;r=r*V|0;if(g){if(f)if(0>g){if(b.getScrollLeft()>=b.page.maxw)return!0}else if(0>=b.getScrollLeft())return!0;
30
+ f=0<g?1:-1;P!==f&&(b.scrollmom&&b.scrollmom.stop(),b.newscrollx=b.getScrollLeft(),P=f);b.lastdeltax-=g}if(r){if(function(){var D=b.getScrollTop();if(0>r){if(D>=b.page.maxh)return!0}else if(0>=D)return!0}()){if(x.nativeparentscrolling&&t&&!b.ispage&&!b.zoomactive)return!0;t=b.view.h>>1;b.newscrolly<-t?(b.newscrolly=-t,r=-1):b.newscrolly>b.page.maxh+t?(b.newscrolly=b.page.maxh+t,r=1):r=0}t=0<r?1:-1;H!==t&&(b.scrollmom&&b.scrollmom.stop(),b.newscrolly=b.getScrollTop(),H=t);b.lastdeltay-=r}(r||g)&&b.synched("relativexy",
31
+ function(){var D=b.lastdeltay+b.newscrolly;b.lastdeltay=0;var R=b.lastdeltax+b.newscrollx;b.lastdeltax=0;b.rail.drag||b.doScrollPos(R,D)})}function A(g,r,t){if(!t&&S)return!0;if(0===g.deltaMode){var f=-(x.mousescrollstep/54*g.deltaX)|0;var p=-(x.mousescrollstep/54*g.deltaY)|0}else 1===g.deltaMode&&(f=-(g.deltaX*x.mousescrollstep*50/80)|0,p=-(g.deltaY*x.mousescrollstep*50/80)|0);r&&x.oneaxismousemode&&0===f&&p&&(f=p,p=0,t&&(0>f?b.getScrollLeft()>=b.page.maxw:0>=b.getScrollLeft())&&(p=f,f=0));b.isrtlmode&&
32
+ (f=-f);if(z(f,p,t,!0))t&&(S=!0);else return S=!1,g.stopImmediatePropagation(),g.preventDefault()}var b=this;this.version="3.7.6";this.name="nicescroll";this.me=e;var O=n("body"),x=this.opt={doc:O,win:!1};n.extend(x,ha);x.snapbackspeed=80;if(T)for(var ca in x)void 0!==T[ca]&&(x[ca]=T[ca]);x.disablemutationobserver&&(ba=!1);this.iddoc=(this.doc=x.doc)&&this.doc[0]?this.doc[0].id||"":"";this.ispage=/^BODY|HTML/.test(x.win?x.win[0].nodeName:this.doc[0].nodeName);this.haswrapper=!1!==x.win;this.win=x.win||
33
+ (this.ispage?I:this.doc);this.docscroll=this.ispage&&!this.haswrapper?I:this.win;this.body=O;this.iframe=this.isfixed=this.viewport=!1;this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName;this.istextarea="TEXTAREA"==this.win[0].nodeName;this.forcescreen=!1;this.canshowonmouseevent="scroll"!=x.autohidemode;this.page=this.view=this.onzoomout=this.onzoomin=this.onscrollcancel=this.onscrollend=this.onscrollstart=this.onclick=this.ongesturezoom=this.onkeypress=this.onmousewheel=
34
+ this.onmousemove=this.onmouseup=this.onmousedown=!1;this.scroll={x:0,y:0};this.scrollratio={x:0,y:0};this.cursorheight=20;this.scrollvaluemax=0;"auto"==x.rtlmode?(T=this.win[0]==K?this.body:this.win,e=T.css("writing-mode")||T.css("-webkit-writing-mode")||T.css("-ms-writing-mode")||T.css("-moz-writing-mode"),"horizontal-tb"==e||"lr-tb"==e||""===e?(this.isrtlmode="rtl"==T.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==e||"tb"==e||"tb-rl"==e||"rl-tb"==e,this.isvertical="vertical-rl"==
35
+ e||"tb"==e||"tb-rl"==e)):(this.isrtlmode=!0===x.rtlmode,this.isvertical=!1);this.observerbody=this.observerremover=this.observer=this.scrollmom=this.scrollrunning=!1;if(!1!==x.scrollbarid)this.id=x.scrollbarid;else{do this.id="ascrail"+F++;while(w.getElementById(this.id))}this.hidden=this.locked=this.railslocked=this.hasmousefocus=this.hasfocus=this.zoomactive=this.zoom=this.selectiondrag=this.cursorfreezed=this.cursor=this.rail=!1;this.cursoractive=!0;this.wheelprevented=!1;this.overflowx=x.overflowx;
36
+ this.overflowy=x.overflowy;this.nativescrollingarea=!1;this.checkarea=0;this.events=[];this.saved={};this.delaylist={};this.synclist={};this.lastdeltay=this.lastdeltax=0;this.detected=W();var G=n.extend({},this.detected);this.ishwscroll=(this.canhwscroll=G.hastransform&&x.hwacceleration)&&b.haswrapper;this.hasreversehr=this.isrtlmode?this.isvertical?!(G.iswebkit||G.isie||G.isie11):!(G.iswebkit||G.isie&&!G.isie10&&!G.isie11):!1;this.istouchcapable=!1;G.cantouch||!G.hasw3ctouch&&!G.hasmstouch?!G.cantouch||
37
+ G.isios||G.isandroid||!G.iswebkit&&!G.ismozilla||(this.istouchcapable=!0):this.istouchcapable=!0;x.enablemouselockapi||(G.hasmousecapture=!1,G.haspointerlock=!1);this.debounced=function(g,r,t){b&&(b.delaylist[g]||(b.delaylist[g]={h:M(function(){b.delaylist[g].fn.call(b);b.delaylist[g]=!1},t)},r.call(b)),b.delaylist[g].fn=r)};this.synched=function(g,r){b.synclist[g]?b.synclist[g]=r:(b.synclist[g]=r,M(function(){b&&(b.synclist[g]&&b.synclist[g].call(b),b.synclist[g]=null)}))};this.unsynched=function(g){b.synclist[g]&&
38
+ (b.synclist[g]=!1)};this.css=function(g,r){for(var t in r)b.saved.css.push([g,t,g.css(t)]),g.css(t,r[t])};this.scrollTop=function(g){return void 0===g?b.getScrollTop():b.setScrollTop(g)};this.scrollLeft=function(g){return void 0===g?b.getScrollLeft():b.setScrollLeft(g)};var ja=function(g,r,t,f,p,D,R){this.st=g;this.ed=r;this.spd=t;this.p1=f||0;this.p2=p||1;this.p3=D||0;this.p4=R||1;this.ts=Z();this.df=r-g};ja.prototype={B2:function(g){return 3*(1-g)*(1-g)*g},B3:function(g){return 3*(1-g)*g*g},B4:function(g){return g*
39
+ g*g},getPos:function(){return(Z()-this.ts)/this.spd},getNow:function(){var g=(Z()-this.ts)/this.spd,r=this.B2(g)+this.B3(g)+this.B4(g);return 1<=g?this.ed:this.st+this.df*r|0},update:function(g,r){this.st=this.getNow();this.ed=g;this.spd=r;this.ts=Z();this.df=this.ed-this.st;return this}};if(this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"};G.hastranslate3d&&G.isios&&this.doc.css("-webkit-backface-visibility","hidden");this.getScrollTop=function(g){if(!g){if(g=l())return 16==g.length?
40
+ -g[13]:-g[5];if(b.timerscroll&&b.timerscroll.bz)return b.timerscroll.bz.getNow()}return b.doc.translate.y};this.getScrollLeft=function(g){if(!g){if(g=l())return 16==g.length?-g[12]:-g[4];if(b.timerscroll&&b.timerscroll.bh)return b.timerscroll.bh.getNow()}return b.doc.translate.x};this.notifyScrollEvent=function(g){var r=w.createEvent("UIEvents");r.initUIEvent("scroll",!1,!1,K,1);r.niceevent=!0;g.dispatchEvent(r)};var la=this.isrtlmode?1:-1;G.hastranslate3d&&x.enabletranslate3d?(this.setScrollTop=
41
+ function(g,r){b.doc.translate.y=g;b.doc.translate.ty=-1*g+"px";b.doc.css(G.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0)");r||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(g,r){b.doc.translate.x=g;b.doc.translate.tx=g*la+"px";b.doc.css(G.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0)");r||b.notifyScrollEvent(b.win[0])}):(this.setScrollTop=function(g,r){b.doc.translate.y=g;b.doc.translate.ty=-1*g+"px";b.doc.css(G.trstyle,"translate("+b.doc.translate.tx+
42
+ ","+b.doc.translate.ty+")");r||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(g,r){b.doc.translate.x=g;b.doc.translate.tx=g*la+"px";b.doc.css(G.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")");r||b.notifyScrollEvent(b.win[0])})}else this.getScrollTop=function(){return b.docscroll.scrollTop()},this.setScrollTop=function(g){b.docscroll.scrollTop(g)},this.getScrollLeft=function(){return b.hasreversehr?b.detected.ismozilla?b.page.maxw-Math.abs(b.docscroll.scrollLeft()):
43
+ b.page.maxw-b.docscroll.scrollLeft():b.docscroll.scrollLeft()},this.setScrollLeft=function(g){return setTimeout(function(){if(b)return b.hasreversehr&&(g=b.detected.ismozilla?-(b.page.maxw-g):b.page.maxw-g),b.docscroll.scrollLeft(g)},1)};this.getTarget=function(g){return g?g.target?g.target:g.srcElement?g.srcElement:!1:!1};this.hasParent=function(g,r){if(!g)return!1;for(g=g.target||g.srcElement||g||!1;g&&g.id!=r;)g=g.parentNode||!1;return!1!==g};var d={thin:1,medium:3,thick:5};this.getDocumentScrollOffset=
44
+ function(){return{top:K.pageYOffset||w.documentElement.scrollTop,left:K.pageXOffset||w.documentElement.scrollLeft}};this.getOffset=function(){if(b.isfixed){var g=b.win.offset(),r=b.getDocumentScrollOffset();g.top-=r.top;g.left-=r.left;return g}g=b.win.offset();if(!b.viewport)return g;r=b.viewport.offset();return{top:g.top-r.top,left:g.left-r.left}};this.updateScrollBar=function(g){var r;if(b.ishwscroll)b.rail.css({height:b.win.innerHeight()-(x.railpadding.top+x.railpadding.bottom)}),b.railh&&b.railh.css({width:b.win.innerWidth()-
45
+ (x.railpadding.left+x.railpadding.right)});else{var t=b.getOffset();var f=t.top;var p=t.left-(x.railpadding.left+x.railpadding.right);f+=c(b.win,"border-top-width",!0);p+=b.rail.align?b.win.outerWidth()-c(b.win,"border-right-width")-b.rail.width:c(b.win,"border-left-width");if(r=x.railoffset)r.top&&(f+=r.top),r.left&&(p+=r.left);g=(g?g.h:b.win.innerHeight())-(x.railpadding.top+x.railpadding.bottom);r="left";var D=p;"number"===typeof x.rightdock&&(r="right",D=x.rightdock);b.railslocked||b.rail.css({top:f,
46
+ [r]:D,height:g});b.zoom&&b.zoom.css({top:f+1,left:1==b.rail.align?p-20:p+b.rail.width+4});if(b.railh&&!b.railslocked){f=t.top;p=t.left;if(r=x.railhoffset)r.top&&(f+=r.top),r.left&&(p+=r.left);f=b.railh.align?f+c(b.win,"border-top-width",!0)+b.win.innerHeight()-b.railh.height:f+c(b.win,"border-top-width",!0);p+=c(b.win,"border-left-width");b.railh.css({top:f-(x.railpadding.top+x.railpadding.bottom),left:p,width:b.railh.width})}}};this.doRailClick=function(g,r,t){if(!b.railslocked)if(b.cancelEvent(g),
47
+ "pageY"in g||(g.pageX=g.clientX+w.documentElement.scrollLeft,g.pageY=g.clientY+w.documentElement.scrollTop),r){r=t?b.doScrollLeft:b.doScrollTop;var f=t?(g.pageX-b.railh.offset().left-b.cursorwidth/2)*b.scrollratio.x:(g.pageY-b.rail.offset().top-b.cursorheight/2)*b.scrollratio.y;b.unsynched("relativexy");r(f|0)}else r=t?b.doScrollLeftBy:b.doScrollBy,f=t?b.scroll.x:b.scroll.y,g=t?g.pageX-b.railh.offset().left:g.pageY-b.rail.offset().top,t=t?b.view.w:b.view.h,r(f>=g?t:-t)};b.newscrolly=b.newscrollx=
48
+ 0;b.hasanimationframe="requestAnimationFrame"in K;b.hascancelanimationframe="cancelAnimationFrame"in K;b.hasborderbox=!1;this.init=function(){b.saved.css=[];if(G.isoperamini||G.isandroid&&!("hidden"in w))return!0;x.emulatetouch=x.emulatetouch||x.touchbehavior;b.hasborderbox=K.getComputedStyle&&"border-box"===K.getComputedStyle(w.body)["box-sizing"];var g={"overflow-y":"hidden"};if(G.isie11||G.isie10)g["-ms-overflow-style"]="none";b.ishwscroll&&(this.doc.css(G.transitionstyle,G.prefixstyle+"transform 0ms ease-out"),
49
+ G.transitionend&&b.bind(b.doc,G.transitionend,b.onScrollTransitionEnd,!1));b.zindex="auto";b.zindex=b.ispage||"auto"!=x.zindex?x.zindex:m()||"auto";!b.ispage&&"auto"!=b.zindex&&b.zindex>J&&(J=b.zindex);b.isie&&0===b.zindex&&"auto"==x.zindex&&(b.zindex="auto");if(!b.ispage||!G.isieold){var r=b.docscroll;b.ispage&&(r=b.haswrapper?b.win:b.doc);b.css(r,g);b.ispage&&(G.isie11||G.isie)&&b.css(n("html"),g);!G.isios||b.ispage||b.haswrapper||b.css(O,{"-webkit-overflow-scrolling":"touch"});var t=n(w.createElement("div"));
50
+ t.css({position:"relative",top:0,"float":"right",width:x.cursorwidth,height:0,"background-color":x.cursorcolor,border:x.cursorborder,"background-clip":"padding-box","-webkit-border-radius":x.cursorborderradius,"-moz-border-radius":x.cursorborderradius,"border-radius":x.cursorborderradius});t.addClass("nicescroll-cursors");b.cursor=t;var f=n(w.createElement("div"));f.attr("id",b.id);f.addClass("nicescroll-rails nicescroll-rails-vr");x.scrollCLass&&f.addClass(x.scrollCLass);var p,D=["left","right",
51
+ "top","bottom"],R;for(R in D){var ea=D[R];(p=x.railpadding[ea]||0)&&f.css("padding-"+ea,p+"px")}f.append(t);f.width=Math.max(parseFloat(x.cursorwidth),t.outerWidth());f.css({width:f.width+"px",zIndex:b.zindex,background:x.background,cursor:"default"});f.visibility=!0;f.scrollable=!0;f.align="left"==x.railalign?0:1;b.rail=f;t=b.rail.drag=!1;!x.boxzoom||b.ispage||G.isieold||(t=w.createElement("div"),b.bind(t,"click",b.doZoom),b.bind(t,"mouseenter",function(){b.zoom.css("opacity",x.cursoropacitymax)}),
52
+ b.bind(t,"mouseleave",function(){b.zoom.css("opacity",x.cursoropacitymin)}),b.zoom=n(t),b.zoom.css({cursor:"pointer",zIndex:b.zindex,backgroundImage:"url("+x.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),x.dblclickzoom&&b.bind(b.win,"dblclick",b.doZoom),G.cantouch&&x.gesturezoom&&(b.ongesturezoom=function(E){1.5<E.scale&&b.doZoomIn(E);.8>E.scale&&b.doZoomOut(E);return b.cancelEvent(E)},b.bind(b.win,"gestureend",b.ongesturezoom)));b.railh=!1;if(x.horizrailenabled){b.css(r,
53
+ {overflowX:"hidden"});t=n(w.createElement("div"));t.css({position:"absolute",top:0,height:x.cursorwidth,width:0,backgroundColor:x.cursorcolor,border:x.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":x.cursorborderradius,"-moz-border-radius":x.cursorborderradius,"border-radius":x.cursorborderradius});G.isieold&&t.css("overflow","hidden");t.addClass("nicescroll-cursors");b.cursorh=t;var da=n(w.createElement("div"));da.attr("id",b.id+"-hr");da.addClass("nicescroll-rails nicescroll-rails-hr");
54
+ x.scrollCLass&&da.addClass(x.scrollCLass);da.height=Math.max(parseFloat(x.cursorwidth),t.outerHeight());da.css({height:da.height+"px",zIndex:b.zindex,background:x.background});da.append(t);da.visibility=!0;da.scrollable=!0;da.align="top"==x.railvalign?0:1;b.railh=da;b.railh.drag=!1}b.ispage?(f.css({position:"fixed",top:0,height:"100%"}),f.css(f.align?{right:0}:{left:0}),b.body.append(f),b.railh&&(da.css({position:"fixed",left:0,width:"100%"}),da.css(da.align?{bottom:0}:{top:0}),b.body.append(da))):
55
+ (b.ishwscroll?("static"==b.win.css("position")&&b.css(b.win,{position:"relative"}),r="HTML"==b.win[0].nodeName?b.body:b.win,n(r).scrollTop(0).scrollLeft(0),b.zoom&&(b.zoom.css({position:"absolute",top:1,right:0,"margin-right":f.width+4}),r.append(b.zoom)),f.css({position:"absolute",top:0}),f.css(f.align?{right:0}:{left:0}),r.append(f),da&&(da.css({position:"absolute",left:0,bottom:0}),da.css(da.align?{bottom:0}:{top:0}),r.append(da))):(b.isfixed="fixed"==b.win.css("position"),r=b.isfixed?"fixed":
56
+ "absolute",b.isfixed||(b.viewport=b.getViewport(b.win[0])),b.viewport&&(b.body=b.viewport,/fixed|absolute/.test(b.viewport.css("position"))||b.css(b.viewport,{position:"relative"})),f.css({position:r}),b.zoom&&b.zoom.css({position:r}),b.updateScrollBar(),b.body.append(f),b.zoom&&b.body.append(b.zoom),b.railh&&(da.css({position:r}),b.body.append(da))),G.isios&&b.css(b.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),x.disableoutline&&(G.isie&&b.win.attr("hideFocus",
57
+ "true"),G.iswebkit&&b.win.css("outline","none")));!1===x.autohidemode?(b.autohidedom=!1,b.rail.css({opacity:x.cursoropacitymax}),b.railh&&b.railh.css({opacity:x.cursoropacitymax})):!0===x.autohidemode||"leave"===x.autohidemode?(b.autohidedom=n().add(b.rail),G.isie8&&(b.autohidedom=b.autohidedom.add(b.cursor)),b.railh&&(b.autohidedom=b.autohidedom.add(b.railh)),b.railh&&G.isie8&&(b.autohidedom=b.autohidedom.add(b.cursorh))):"scroll"==x.autohidemode?(b.autohidedom=n().add(b.rail),b.railh&&(b.autohidedom=
58
+ b.autohidedom.add(b.railh))):"cursor"==x.autohidemode?(b.autohidedom=n().add(b.cursor),b.railh&&(b.autohidedom=b.autohidedom.add(b.cursorh))):"hidden"==x.autohidemode&&(b.autohidedom=!1,b.hide(),b.railslocked=!1);if(G.cantouch||b.istouchcapable||x.emulatetouch||G.hasmstouch){b.scrollmom=new ia(b);b.ontouchstart=function(E){if(b.locked||E.pointerType&&("mouse"===E.pointerType||E.pointerType===E.MSPOINTER_TYPE_MOUSE))return!1;b.hasmoving=!1;b.scrollmom.timer&&(b.triggerScrollEnd(),b.scrollmom.stop());
59
+ if(!b.railslocked){var X=b.getTarget(E);if(X&&/INPUT/i.test(X.nodeName)&&/range/i.test(X.type))return b.stopPropagation(E);var oa="mousedown"===E.type;!("clientX"in E)&&"changedTouches"in E&&(E.clientX=E.changedTouches[0].clientX,E.clientY=E.changedTouches[0].clientY);if(b.forcescreen){var ra=E;E={original:E.original?E.original:E};E.clientX=ra.screenX;E.clientY=ra.screenY}b.rail.drag={x:E.clientX,y:E.clientY,sx:b.scroll.x,sy:b.scroll.y,st:b.getScrollTop(),sl:b.getScrollLeft(),pt:2,dl:!1,tg:X};if(b.ispage||
60
+ !x.directionlockdeadzone)b.rail.drag.dl="f";else{ra=I.width();var sa=I.height(),Ea=b.getContentSize();sa=Ea.h-sa;ra=Ea.w-ra;b.rail.drag.ck=b.rail.scrollable&&!b.railh.scrollable?0<sa?"v":!1:!b.rail.scrollable&&b.railh.scrollable?0<ra?"h":!1:!1}x.emulatetouch&&b.isiframe&&G.isie&&(ra=b.win.position(),b.rail.drag.x+=ra.left,b.rail.drag.y+=ra.top);b.hasmoving=!1;b.lastmouseup=!1;b.scrollmom.reset(E.clientX,E.clientY);if(X&&oa){if(!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(X.nodeName))return G.hasmousecapture&&
61
+ X.setCapture(),x.emulatetouch?(X.onclick&&!X._onclick&&(X._onclick=X.onclick,X.onclick=function(va){if(b.hasmoving)return!1;X._onclick.call(this,va)}),b.cancelEvent(E)):b.stopPropagation(E);/SUBMIT|CANCEL|BUTTON/i.test(n(X).attr("type"))&&(b.preventclick={tg:X,click:!1})}}};b.ontouchend=function(E){if(!b||!b.rail.drag)return!0;if(2==b.rail.drag.pt){if(E.pointerType&&("mouse"===E.pointerType||E.pointerType===E.MSPOINTER_TYPE_MOUSE))return!1;b.rail.drag=!1;var X="mouseup"===E.type;if(b.hasmoving&&(b.scrollmom.doMomentum(),
62
+ b.lastmouseup=!0,b.hideCursor(),G.hasmousecapture&&w.releaseCapture(),X))return b.cancelEvent(E)}else if(1==b.rail.drag.pt)return b.onmouseup(E)};var wa=x.emulatetouch&&b.isiframe&&!G.hasmousecapture,ta=.3*x.directionlockdeadzone|0;b.ontouchmove=function(E,X){if(!b||!b.rail.drag||E.targetTouches&&x.preventmultitouchscrolling&&1<E.targetTouches.length||E.pointerType&&("mouse"===E.pointerType||E.pointerType===E.MSPOINTER_TYPE_MOUSE))return!0;if(2==b.rail.drag.pt){"changedTouches"in E&&(E.clientX=E.changedTouches[0].clientX,
63
+ E.clientY=E.changedTouches[0].clientY);var oa;var ra=oa=0;wa&&!X&&(X=b.win.position(),ra=-X.left,oa=-X.top);var sa=E.clientY+oa;X=sa-b.rail.drag.y;var Ea=E.clientX+ra;oa=Ea-b.rail.drag.x;var va=b.rail.drag.st-X;if(b.ishwscroll&&x.bouncescroll)0>va?va=Math.round(va/2):va>b.page.maxh&&(va=b.page.maxh+Math.round((va-b.page.maxh)/2));else if(0>va?sa=va=0:va>b.page.maxh&&(va=b.page.maxh,sa=0),0===sa&&!b.hasmoving)return b.ispage||(b.rail.drag=!1),!0;var xa=b.getScrollLeft();b.railh&&b.railh.scrollable&&
64
+ (xa=b.isrtlmode?oa-b.rail.drag.sl:b.rail.drag.sl-oa,b.ishwscroll&&x.bouncescroll?0>xa?xa=Math.round(xa/2):xa>b.page.maxw&&(xa=b.page.maxw+Math.round((xa-b.page.maxw)/2)):(0>xa&&(Ea=xa=0),xa>b.page.maxw&&(xa=b.page.maxw,Ea=0)));if(!b.hasmoving){if(b.rail.drag.y===E.clientY&&b.rail.drag.x===E.clientX)return b.cancelEvent(E);ra=Math.abs(X);X=Math.abs(oa);oa=x.directionlockdeadzone;b.rail.drag.ck?"v"==b.rail.drag.ck?X>oa&&ra<=ta?b.rail.drag=!1:ra>oa&&(b.rail.drag.dl="v"):"h"==b.rail.drag.ck&&(ra>oa&&
65
+ X<=ta?b.rail.drag=!1:X>oa&&(b.rail.drag.dl="h")):ra>oa&&X>oa?b.rail.drag.dl="f":ra>oa?b.rail.drag.dl=X>ta?"f":"v":X>oa&&(b.rail.drag.dl=ra>ta?"f":"h");if(!b.rail.drag.dl)return b.cancelEvent(E);b.triggerScrollStart(E.clientX,E.clientY,0,0,0);b.hasmoving=!0}b.preventclick&&!b.preventclick.click&&(b.preventclick.click=b.preventclick.tg.onclick||!1,b.preventclick.tg.onclick=b.onpreventclick);b.rail.drag.dl&&("v"==b.rail.drag.dl?xa=b.rail.drag.sl:"h"==b.rail.drag.dl&&(va=b.rail.drag.st));b.synched("touchmove",
66
+ function(){b.rail.drag&&2==b.rail.drag.pt&&(b.prepareTransition&&b.resetTransition(),b.rail.scrollable&&b.setScrollTop(va),b.scrollmom.update(Ea,sa),b.railh&&b.railh.scrollable?(b.setScrollLeft(xa),b.showCursor(va,xa)):b.showCursor(va),G.isie10&&w.selection.clear())});return b.cancelEvent(E)}if(1==b.rail.drag.pt)return b.onmousemove(E)};b.ontouchstartCursor=function(E,X){if(!b.rail.drag||3==b.rail.drag.pt){if(b.locked)return b.cancelEvent(E);b.cancelScroll();b.rail.drag={x:E.touches[0].clientX,y:E.touches[0].clientY,
67
+ sx:b.scroll.x,sy:b.scroll.y,pt:3,hr:!!X};X=b.getTarget(E);!b.ispage&&G.hasmousecapture&&X.setCapture();b.isiframe&&!G.hasmousecapture&&(b.saved.csspointerevents=b.doc.css("pointer-events"),b.css(b.doc,{"pointer-events":"none"}));return b.cancelEvent(E)}};b.ontouchendCursor=function(E){if(b.rail.drag&&(G.hasmousecapture&&w.releaseCapture(),b.isiframe&&!G.hasmousecapture&&b.doc.css("pointer-events",b.saved.csspointerevents),3==b.rail.drag.pt))return b.rail.drag=!1,b.cancelEvent(E)};b.ontouchmoveCursor=
68
+ function(E){if(b.rail.drag&&3==b.rail.drag.pt){b.cursorfreezed=!0;if(b.rail.drag.hr){b.scroll.x=b.rail.drag.sx+(E.touches[0].clientX-b.rail.drag.x);0>b.scroll.x&&(b.scroll.x=0);var X=b.scrollvaluemaxw;b.scroll.x>X&&(b.scroll.x=X)}else b.scroll.y=b.rail.drag.sy+(E.touches[0].clientY-b.rail.drag.y),0>b.scroll.y&&(b.scroll.y=0),X=b.scrollvaluemax,b.scroll.y>X&&(b.scroll.y=X);b.synched("touchmove",function(){b.rail.drag&&3==b.rail.drag.pt&&(b.showCursor(),b.rail.drag.hr?b.doScrollLeft(Math.round(b.scroll.x*
69
+ b.scrollratio.x),x.cursordragspeed):b.doScrollTop(Math.round(b.scroll.y*b.scrollratio.y),x.cursordragspeed))});return b.cancelEvent(E)}}}b.onmousedown=function(E,X){if(!b.rail.drag||1==b.rail.drag.pt){if(b.railslocked)return b.cancelEvent(E);b.cancelScroll();b.rail.drag={x:E.clientX,y:E.clientY,sx:b.scroll.x,sy:b.scroll.y,pt:1,hr:X||!1};X=b.getTarget(E);G.hasmousecapture&&X.setCapture();b.isiframe&&!G.hasmousecapture&&(b.saved.csspointerevents=b.doc.css("pointer-events"),b.css(b.doc,{"pointer-events":"none"}));
70
+ b.hasmoving=!1;return b.cancelEvent(E)}};b.onmouseup=function(E){if(b.rail.drag){if(1!=b.rail.drag.pt)return!0;G.hasmousecapture&&w.releaseCapture();b.isiframe&&!G.hasmousecapture&&b.doc.css("pointer-events",b.saved.csspointerevents);b.rail.drag=!1;b.cursorfreezed=!1;b.hasmoving&&b.triggerScrollEnd();return b.cancelEvent(E)}};b.onmousemove=function(E){if(b.rail.drag){if(1===b.rail.drag.pt){if(G.ischrome&&0===E.which)return b.onmouseup(E);b.cursorfreezed=!0;b.hasmoving||b.triggerScrollStart(E.clientX,
71
+ E.clientY,0,0,0);b.hasmoving=!0;if(b.rail.drag.hr){b.scroll.x=b.rail.drag.sx+(E.clientX-b.rail.drag.x);0>b.scroll.x&&(b.scroll.x=0);var X=b.scrollvaluemaxw;b.scroll.x>X&&(b.scroll.x=X)}else b.scroll.y=b.rail.drag.sy+(E.clientY-b.rail.drag.y),0>b.scroll.y&&(b.scroll.y=0),X=b.scrollvaluemax,b.scroll.y>X&&(b.scroll.y=X);b.synched("mousemove",function(){b.cursorfreezed&&(b.showCursor(),b.rail.drag.hr?b.scrollLeft(Math.round(b.scroll.x*b.scrollratio.x)):b.scrollTop(Math.round(b.scroll.y*b.scrollratio.y)))});
72
+ return b.cancelEvent(E)}}else b.checkarea=0};if(G.cantouch||x.emulatetouch)b.onpreventclick=function(E){if(b.preventclick)return b.preventclick.tg.onclick=b.preventclick.click,b.preventclick=!1,b.cancelEvent(E)},b.onclick=G.isios?!1:function(E){return b.lastmouseup?(b.lastmouseup=!1,b.cancelEvent(E)):!0},x.grabcursorenabled&&G.cursorgrabvalue&&(b.css(b.ispage?b.doc:b.win,{cursor:G.cursorgrabvalue}),b.css(b.rail,{cursor:G.cursorgrabvalue}));else{var ua=function(E){if(b.selectiondrag){if(E){var X=b.win.outerHeight();
73
+ E=E.pageY-b.selectiondrag.top;0<E&&E<X&&(E=0);E>=X&&(E-=X);b.selectiondrag.df=E}0!==b.selectiondrag.df&&(b.doScrollBy(-(2*b.selectiondrag.df/6)|0),b.debounced("doselectionscroll",function(){ua()},50))}};b.hasTextSelected="getSelection"in w?function(){return 0<w.getSelection().rangeCount}:"selection"in w?function(){return"None"!=w.selection.type}:function(){return!1};b.onselectionstart=function(E){b.ispage||(b.selectiondrag=b.win.offset())};b.onselectionend=function(E){b.selectiondrag=!1};b.onselectiondrag=
74
+ function(E){b.selectiondrag&&b.hasTextSelected()&&b.debounced("selectionscroll",function(){ua(E)},250)}}G.hasw3ctouch?(b.css(b.ispage?n("html"):b.win,{"touch-action":"none"}),b.css(b.rail,{"touch-action":"none"}),b.css(b.cursor,{"touch-action":"none"}),b.bind(b.win,"pointerdown",b.ontouchstart),b.bind(w,"pointerup",b.ontouchend),b.delegate(w,"pointermove",b.ontouchmove)):G.hasmstouch?(b.css(b.ispage?n("html"):b.win,{"-ms-touch-action":"none"}),b.css(b.rail,{"-ms-touch-action":"none"}),b.css(b.cursor,
75
+ {"-ms-touch-action":"none"}),b.bind(b.win,"MSPointerDown",b.ontouchstart),b.bind(w,"MSPointerUp",b.ontouchend),b.delegate(w,"MSPointerMove",b.ontouchmove),b.bind(b.cursor,"MSGestureHold",function(E){E.preventDefault()}),b.bind(b.cursor,"contextmenu",function(E){E.preventDefault()})):G.cantouch&&(b.bind(b.win,"touchstart",b.ontouchstart,!1,!0),b.bind(w,"touchend",b.ontouchend,!1,!0),b.bind(w,"touchcancel",b.ontouchend,!1,!0),b.delegate(w,"touchmove",b.ontouchmove,!1,!0));x.emulatetouch&&(b.bind(b.win,
76
+ "mousedown",b.ontouchstart,!1,!0),b.bind(w,"mouseup",b.ontouchend,!1,!0),b.bind(w,"mousemove",b.ontouchmove,!1,!0));if(x.cursordragontouch||!G.cantouch&&!x.emulatetouch)b.rail.css({cursor:"default"}),b.railh&&b.railh.css({cursor:"default"}),b.jqbind(b.rail,"mouseenter",function(){if(!b.ispage&&!b.win.is(":visible"))return!1;b.canshowonmouseevent&&b.showCursor();b.rail.active=!0}),b.jqbind(b.rail,"mouseleave",function(){b.rail.active=!1;b.rail.drag||b.hideCursor()}),x.sensitiverail&&(b.bind(b.rail,
77
+ "click",function(E){b.doRailClick(E,!1,!1)}),b.bind(b.rail,"dblclick",function(E){b.doRailClick(E,!0,!1)}),b.bind(b.cursor,"click",function(E){b.cancelEvent(E)}),b.bind(b.cursor,"dblclick",function(E){b.cancelEvent(E)})),b.railh&&(b.jqbind(b.railh,"mouseenter",function(){if(!b.ispage&&!b.win.is(":visible"))return!1;b.canshowonmouseevent&&b.showCursor();b.rail.active=!0}),b.jqbind(b.railh,"mouseleave",function(){b.rail.active=!1;b.rail.drag||b.hideCursor()}),x.sensitiverail&&(b.bind(b.railh,"click",
78
+ function(E){b.doRailClick(E,!1,!0)}),b.bind(b.railh,"dblclick",function(E){b.doRailClick(E,!0,!0)}),b.bind(b.cursorh,"click",function(E){b.cancelEvent(E)}),b.bind(b.cursorh,"dblclick",function(E){b.cancelEvent(E)})));x.cursordragontouch&&(this.istouchcapable||G.cantouch)&&(b.bind(b.cursor,"touchstart",b.ontouchstartCursor),b.bind(b.cursor,"touchmove",b.ontouchmoveCursor),b.bind(b.cursor,"touchend",b.ontouchendCursor),b.cursorh&&b.bind(b.cursorh,"touchstart",function(E){b.ontouchstartCursor(E,!0)}),
79
+ b.cursorh&&b.bind(b.cursorh,"touchmove",b.ontouchmoveCursor),b.cursorh&&b.bind(b.cursorh,"touchend",b.ontouchendCursor));x.emulatetouch||G.isandroid||G.isios?(b.bind(G.hasmousecapture?b.win:w,"mouseup",b.ontouchend),b.onclick&&b.bind(w,"click",b.onclick),x.cursordragontouch?(b.bind(b.cursor,"mousedown",b.onmousedown),b.bind(b.cursor,"mouseup",b.onmouseup),b.cursorh&&b.bind(b.cursorh,"mousedown",function(E){b.onmousedown(E,!0)}),b.cursorh&&b.bind(b.cursorh,"mouseup",b.onmouseup)):(b.bind(b.rail,"mousedown",
80
+ function(E){E.preventDefault()}),b.railh&&b.bind(b.railh,"mousedown",function(E){E.preventDefault()}))):(b.bind(G.hasmousecapture?b.win:w,"mouseup",b.onmouseup),b.bind(w,"mousemove",b.onmousemove),b.onclick&&b.bind(w,"click",b.onclick),b.bind(b.cursor,"mousedown",b.onmousedown),b.bind(b.cursor,"mouseup",b.onmouseup),b.railh&&(b.bind(b.cursorh,"mousedown",function(E){b.onmousedown(E,!0)}),b.bind(b.cursorh,"mouseup",b.onmouseup)),!b.ispage&&x.enablescrollonselection&&(b.bind(b.win[0],"mousedown",b.onselectionstart),
81
+ b.bind(w,"mouseup",b.onselectionend),b.bind(b.cursor,"mouseup",b.onselectionend),b.cursorh&&b.bind(b.cursorh,"mouseup",b.onselectionend),b.bind(w,"mousemove",b.onselectiondrag)),b.zoom&&(b.jqbind(b.zoom,"mouseenter",function(){b.canshowonmouseevent&&b.showCursor();b.rail.active=!0}),b.jqbind(b.zoom,"mouseleave",function(){b.rail.active=!1;b.rail.drag||b.hideCursor()})));x.enablemousewheel&&(b.isiframe||b.mousewheel(G.isie&&b.ispage?w:b.win,b.onmousewheel),b.mousewheel(b.rail,b.onmousewheel),b.railh&&
82
+ b.mousewheel(b.railh,b.onmousewheelhr));b.ispage||G.cantouch||/HTML|^BODY/.test(b.win[0].nodeName)||(b.win.attr("tabindex")||b.win.attr({tabindex:++y}),b.bind(b.win,"focus",function(E){B=b.getTarget(E).id||b.getTarget(E)||!1;b.hasfocus=!0;b.canshowonmouseevent&&b.noticeCursor()}),b.bind(b.win,"blur",function(E){B=!1;b.hasfocus=!1}),b.bind(b.win,"mouseenter",function(E){u=b.getTarget(E).id||b.getTarget(E)||!1;b.hasmousefocus=!0;b.canshowonmouseevent&&b.noticeCursor()}),b.bind(b.win,"mouseleave",function(E){u=
83
+ !1;b.hasmousefocus=!1;b.rail.drag||b.hideCursor()}));b.onkeypress=function(E){if(b.railslocked&&0===b.page.maxh)return!0;E=E||K.event;var X=b.getTarget(E);if(X&&/INPUT|TEXTAREA|SELECT|OPTION/.test(X.nodeName)&&(!X.getAttribute("type")&&!X.type||!/submit|button|cancel/i.tp)||n(X).attr("contenteditable"))return!0;if(b.hasfocus||b.hasmousefocus&&!B||b.ispage&&!B&&!u){X=E.keyCode;if(b.railslocked&&27!=X)return b.cancelEvent(E);var oa=E.ctrlKey||!1,ra=E.shiftKey||!1,sa=!1;switch(X){case 38:case 63233:b.doScrollBy(72);
84
+ sa=!0;break;case 40:case 63235:b.doScrollBy(-72);sa=!0;break;case 37:case 63232:b.railh&&(oa?b.doScrollLeft(0):b.doScrollLeftBy(72),sa=!0);break;case 39:case 63234:b.railh&&(oa?b.doScrollLeft(b.page.maxw):b.doScrollLeftBy(-72),sa=!0);break;case 33:case 63276:b.doScrollBy(b.view.h);sa=!0;break;case 34:case 63277:b.doScrollBy(-b.view.h);sa=!0;break;case 36:case 63273:b.railh&&oa?b.doScrollPos(0,0):b.doScrollTo(0);sa=!0;break;case 35:case 63275:b.railh&&oa?b.doScrollPos(b.page.maxw,b.page.maxh):b.doScrollTo(b.page.maxh);
85
+ sa=!0;break;case 32:x.spacebarenabled&&(ra?b.doScrollBy(b.view.h):b.doScrollBy(-b.view.h),sa=!0);break;case 27:b.zoomactive&&(b.doZoom(),sa=!0)}if(sa)return b.cancelEvent(E)}};x.enablekeyboard&&b.bind(w,G.isopera&&!G.isopera12?"keypress":"keydown",b.onkeypress);b.bind(w,"keydown",function(E){E.ctrlKey&&(b.wheelprevented=!0)});b.bind(w,"keyup",function(E){E.ctrlKey||(b.wheelprevented=!1)});b.bind(K,"blur",function(E){b.wheelprevented=!1});b.bind(K,"resize",b.onscreenresize);b.bind(K,"orientationchange",
86
+ b.onscreenresize);b.bind(K,"load",b.lazyResize);if(G.ischrome&&!b.ispage&&!b.haswrapper){var Aa=b.win.attr("style");f=parseFloat(b.win.css("width"))+1;b.win.css("width",f);b.synched("chromefix",function(){b.win.attr("style",Aa)})}b.onAttributeChange=function(E){b.lazyResize(b.isieold?250:30)};if(x.enableobserver&&(b.isie11||!1===ba||(b.observerbody=new ba(function(E){E.forEach(function(X){if("attributes"==X.type)return O.hasClass("modal-open")&&O.hasClass("modal-dialog")&&!n.contains(n(".modal-dialog")[0],
87
+ b.doc[0])?b.hide():b.show()});if(b.me.clientWidth!=b.page.width||b.me.clientHeight!=b.page.height)return b.lazyResize(30)}),b.observerbody.observe(w.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),!b.ispage&&!b.haswrapper)){var ya=b.win[0];!1!==ba?(b.observer=new ba(function(E){E.forEach(b.onAttributeChange)}),b.observer.observe(ya,{childList:!0,characterData:!1,attributes:!0,subtree:!1}),b.observerremover=new ba(function(E){E.forEach(function(X){if(0<X.removedNodes.length)for(var oa in X.removedNodes)if(b&&
88
+ X.removedNodes[oa]===ya)return b.remove()})}),b.observerremover.observe(ya.parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(b.bind(ya,G.isie&&!G.isie9?"propertychange":"DOMAttrModified",b.onAttributeChange),G.isie9&&ya.attachEvent("onpropertychange",b.onAttributeChange),b.bind(ya,"DOMNodeRemoved",function(E){E.target===ya&&b.remove()}))}!b.ispage&&x.boxzoom&&b.bind(K,"resize",b.resizeZoom);b.istextarea&&(b.bind(b.win,"keydown",b.lazyResize),b.bind(b.win,"mouseup",b.lazyResize));
89
+ b.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var za=function(){b.iframexd=!1;try{var E="contentDocument"in this?this.contentDocument:this.contentWindow._doc}catch(oa){b.iframexd=!0,E=!1}if(b.iframexd)return"console"in K&&console.log("NiceScroll error: policy restriced iframe"),!0;b.forcescreen=!0;b.isiframe&&(b.iframe={doc:n(E),html:b.doc.contents().find("html")[0],body:b.doc.contents().find("body")[0]},b.getContentSize=function(){return{w:Math.max(b.iframe.html.scrollWidth,b.iframe.body.scrollWidth),
90
+ h:Math.max(b.iframe.html.scrollHeight,b.iframe.body.scrollHeight)}},b.docscroll=n(b.iframe.body));if(!G.isios&&x.iframeautoresize&&!b.isiframe){b.win.scrollTop(0);b.doc.height("");var X=Math.max(E.getElementsByTagName("html")[0].scrollHeight,E.body.scrollHeight);b.doc.height(X)}b.lazyResize(30);b.css(n(b.iframe.body),g);G.isios&&b.haswrapper&&b.css(n(E.body),{"-webkit-transform":"translate3d(0,0,0)"});"contentWindow"in this?b.bind(this.contentWindow,"scroll",b.onscroll):b.bind(E,"scroll",b.onscroll);
91
+ x.enablemousewheel&&b.mousewheel(E,b.onmousewheel);x.enablekeyboard&&b.bind(E,G.isopera?"keypress":"keydown",b.onkeypress);G.cantouch?(b.bind(E,"touchstart",b.ontouchstart),b.bind(E,"touchmove",b.ontouchmove)):x.emulatetouch&&(b.bind(E,"mousedown",b.ontouchstart),b.bind(E,"mousemove",function(oa){return b.ontouchmove(oa,!0)}),x.grabcursorenabled&&G.cursorgrabvalue&&b.css(n(E.body),{cursor:G.cursorgrabvalue}));b.bind(E,"mouseup",b.ontouchend);b.zoom&&(x.dblclickzoom&&b.bind(E,"dblclick",b.doZoom),
92
+ b.ongesturezoom&&b.bind(E,"gestureend",b.ongesturezoom))};this.doc[0].readyState&&"complete"===this.doc[0].readyState&&setTimeout(function(){za.call(b.doc[0],!1)},500);b.bind(this.doc,"load",za)}};this.showCursor=function(g,r){b.cursortimeout&&(clearTimeout(b.cursortimeout),b.cursortimeout=0);b.rail&&(b.autohidedom&&(b.autohidedom.stop().css({opacity:x.cursoropacitymax}),b.cursoractive=!0),b.rail.drag&&1==b.rail.drag.pt||(void 0!==g&&!1!==g&&(b.scroll.y=g/b.scrollratio.y|0),void 0!==r&&(b.scroll.x=
93
+ r/b.scrollratio.x|0)),b.cursor.css({height:b.cursorheight,top:b.scroll.y}),b.cursorh&&(g=b.hasreversehr?b.scrollvaluemaxw-b.scroll.x:b.scroll.x,b.cursorh.css({width:b.cursorwidth,left:!b.rail.align&&b.rail.visibility?g+b.rail.width:g}),b.cursoractive=!0),b.zoom&&b.zoom.stop().css({opacity:x.cursoropacitymax}))};this.hideCursor=function(g){b.cursortimeout||!b.rail||!b.autohidedom||b.hasmousefocus&&"leave"===x.autohidemode||(b.cursortimeout=setTimeout(function(){b.rail.active&&b.showonmouseevent||(b.autohidedom.stop().animate({opacity:x.cursoropacitymin}),
94
+ b.zoom&&b.zoom.stop().animate({opacity:x.cursoropacitymin}),b.cursoractive=!1);b.cursortimeout=0},g||x.hidecursordelay))};this.noticeCursor=function(g,r,t){b.showCursor(r,t);b.rail.active||b.hideCursor(g)};this.getContentSize=b.ispage?function(){return{w:Math.max(w.body.scrollWidth,w.documentElement.scrollWidth),h:Math.max(w.body.scrollHeight,w.documentElement.scrollHeight)}}:b.haswrapper?function(){return{w:b.doc[0].offsetWidth,h:b.doc[0].offsetHeight}}:function(){return{w:b.docscroll[0].scrollWidth,
95
+ h:b.docscroll[0].scrollHeight}};this.onResize=function(g,r){if(!b||!b.win)return!1;g=b.page.maxh;var t=b.page.maxw,f=b.view.h,p=b.view.w;b.view={w:b.ispage?b.win.width():b.win[0].clientWidth,h:b.ispage?b.win.height():b.win[0].clientHeight};b.page=r?r:b.getContentSize();b.page.maxh=Math.max(0,b.page.h-b.view.h);b.page.maxw=Math.max(0,b.page.w-b.view.w);if(b.page.maxh==g&&b.page.maxw==t&&b.view.w==p&&b.view.h==f){if(b.ispage)return b;r=b.win.offset();if(b.lastposition&&(g=b.lastposition,g.top==r.top&&
96
+ g.left==r.left))return b;b.lastposition=r}0===b.page.maxh?(b.hideRail(),b.scrollvaluemax=0,b.scroll.y=0,b.scrollratio.y=0,b.cursorheight=0,b.setScrollTop(0),b.rail&&(b.rail.scrollable=!1)):(b.page.maxh-=x.railpadding.top+x.railpadding.bottom,b.rail.scrollable=!0);0===b.page.maxw?(b.hideRailHr(),b.scrollvaluemaxw=0,b.scroll.x=0,b.scrollratio.x=0,b.cursorwidth=0,b.setScrollLeft(0),b.railh&&(b.railh.scrollable=!1)):(b.page.maxw-=x.railpadding.left+x.railpadding.right,b.railh&&(b.railh.scrollable=x.horizrailenabled));
97
+ b.railslocked=b.locked||0===b.page.maxh&&0===b.page.maxw;if(b.railslocked)return b.ispage||b.updateScrollBar(b.view),!1;b.hidden||(b.rail.visibility||b.showRail(),b.railh&&!b.railh.visibility&&b.showRailHr());b.istextarea&&b.win.css("resize")&&"none"!=b.win.css("resize")&&(b.view.h-=20);b.cursorheight=Math.min(b.view.h,Math.round(b.view.h/b.page.h*b.view.h));b.cursorheight=x.cursorfixedheight?x.cursorfixedheight:Math.max(x.cursorminheight,b.cursorheight);b.cursorwidth=Math.min(b.view.w,Math.round(b.view.w/
98
+ b.page.w*b.view.w));b.cursorwidth=x.cursorfixedheight?x.cursorfixedheight:Math.max(x.cursorminheight,b.cursorwidth);b.scrollvaluemax=b.view.h-b.cursorheight-(x.railpadding.top+x.railpadding.bottom);b.hasborderbox||(b.scrollvaluemax-=b.cursor[0].offsetHeight-b.cursor[0].clientHeight);b.railh&&(b.railh.width=0<b.page.maxh?b.view.w-b.rail.width:b.view.w,b.scrollvaluemaxw=b.railh.width-b.cursorwidth-(x.railpadding.left+x.railpadding.right));b.ispage||b.updateScrollBar(b.view);b.scrollratio={x:b.page.maxw/
99
+ b.scrollvaluemaxw,y:b.page.maxh/b.scrollvaluemax};b.getScrollTop()>b.page.maxh?b.doScrollTop(b.page.maxh):(b.scroll.y=b.getScrollTop()/b.scrollratio.y|0,b.scroll.x=b.getScrollLeft()/b.scrollratio.x|0,b.cursoractive&&b.noticeCursor());b.scroll.y&&0===b.getScrollTop()&&b.doScrollTo(b.scroll.y*b.scrollratio.y|0);return b};this.resize=b.onResize;var h=0;this.onscreenresize=function(g){clearTimeout(h);var r=!b.ispage&&!b.haswrapper;r&&b.hideRails();h=setTimeout(function(){b&&(r&&b.showRails(),b.resize());
100
+ h=0},120)};this.lazyResize=function(g){clearTimeout(h);g=isNaN(g)?240:g;h=setTimeout(function(){b&&b.resize();h=0},g);return b};this.jqbind=function(g,r,t){b.events.push({e:g,n:r,f:t,q:!0});n(g).on(r,t)};this.mousewheel=function(g,r,t){g="jquery"in g?g[0]:g;if("onwheel"in w.createElement("div"))b._bind(g,"wheel",r,t||!1);else{var f=void 0!==w.onmousewheel?"mousewheel":"DOMMouseScroll";v(g,f,r,t||!1);"DOMMouseScroll"==f&&v(g,"MozMousePixelScroll",r,t||!1)}};var q=!1;if(G.haseventlistener){try{var C=
101
+ Object.defineProperty({},"passive",{get:function(){q=!0}});K.addEventListener("test",null,C)}catch(g){}this.stopPropagation=function(g){if(!g)return!1;g=g.original?g.original:g;g.stopPropagation();return!1};this.cancelEvent=function(g){g.cancelable&&g.preventDefault();g.stopImmediatePropagation();g.preventManipulation&&g.preventManipulation();return!1}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},K.constructor.prototype.addEventListener=
102
+ w.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(g,r,t){this.attachEvent("on"+g,r)},K.constructor.prototype.removeEventListener=w.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(g,r,t){this.detachEvent("on"+g,r)},this.cancelEvent=function(g){if(g=g||K.event)g.cancelBubble=!0,g.cancel=!0,g.returnValue=!1;return!1},this.stopPropagation=function(g){if(g=g||K.event)g.cancelBubble=!0;return!1};this.delegate=function(g,r,t,f,p){var D=
103
+ L[r]||!1;D?b.events.push({e:g,n:r,f:t,b:f,q:!1}):(D={a:[],l:[],f:function(R){for(var ea=D.l,da=!1,wa=ea.length-1;0<=wa;wa--)if(da=ea[wa].call(R.target,R),!1===da)return!1;return da}},b.bind(g,r,D.f,f,p),L[r]=D);b.ispage?(D.a=[b.id].concat(D.a),D.l=[t].concat(D.l)):(D.a.push(b.id),D.l.push(t))};this.undelegate=function(g,r,t,f,p){if((t=L[r]||!1)&&t.l)for(f=0,p=t.l.length;f<p;f++)t.a[f]===b.id&&(t.a.splice(f),t.l.splice(f),0===t.a.length&&(b._unbind(g,r,t.l.f),L[r]=null))};this.bind=function(g,r,t,
104
+ f,p){b._bind("jquery"in g?g[0]:g,r,t,f||!1,p||!1)};this._bind=function(g,r,t,f,p){b.events.push({e:g,n:r,f:t,b:f,q:!1});q&&(p||g==K.document||g==K.document.body||g==K)?g.addEventListener(r,t,{passive:!1,capture:f}):g.addEventListener(r,t,f||!1)};this._unbind=function(g,r,t,f){L[r]?b.undelegate(g,r,t,f):g.removeEventListener(r,t,f)};this.unbindAll=function(){for(var g=0;g<b.events.length;g++){var r=b.events[g];r.q?r.e.unbind(r.n,r.f):b._unbind(r.e,r.n,r.f,r.b)}};this.showRails=function(){return b.showRail().showRailHr()};
105
+ this.showRail=function(){0===b.page.maxh||!b.ispage&&"none"==b.win.css("display")||(b.rail.visibility=!0,b.rail.css("display","block"));return b};this.showRailHr=function(){b.railh&&0!==b.page.maxw&&(b.ispage||"none"!=b.win.css("display"))&&(b.railh.visibility=!0,b.railh.css("display","block"));return b};this.hideRails=function(){return b.hideRail().hideRailHr()};this.hideRail=function(){b.rail.visibility=!1;b.rail.css("display","none");return b};this.hideRailHr=function(){b.railh&&(b.railh.visibility=
106
+ !1,b.railh.css("display","none"));return b};this.show=function(){b.hidden=!1;b.railslocked=!1;return b.showRails()};this.hide=function(){b.hidden=!0;b.railslocked=!0;return b.hideRails()};this.toggle=function(){return b.hidden?b.show():b.hide()};this.remove=function(){b.stop();b.cursortimeout&&clearTimeout(b.cursortimeout);for(var g in b.delaylist)b.delaylist[g]&&Q(b.delaylist[g].h);b.doZoomOut();G.hasw3ctouch?b.undelegate(w,"pointermove",b.ontouchmove):G.hasmstouch?b.undelegate(w,"MSPointerMove",
107
+ b.ontouchmove):G.cantouch&&b.undelegate(w,"touchmove",b.ontouchmove,!1,!0);b.unbindAll();G.isie9&&b.win[0].detachEvent("onpropertychange",b.onAttributeChange);!1!==b.observer&&b.observer.disconnect();!1!==b.observerremover&&b.observerremover.disconnect();!1!==b.observerbody&&b.observerbody.disconnect();b.events=null;b.cursor&&b.cursor.remove();b.cursorh&&b.cursorh.remove();b.rail&&b.rail.remove();b.railh&&b.railh.remove();b.zoom&&b.zoom.remove();for(g=0;g<b.saved.css.length;g++){var r=b.saved.css[g];
108
+ r[0].css(r[1],void 0===r[2]?"":r[2])}b.saved=!1;b.me.data("__nicescroll","");var t=n.nicescroll;t.each(function(p){if(this&&this.id===b.id){delete t[p];for(var D=++p;D<t.length;D++,p++)t[p]=t[D];t.length--;t.length&&delete t[t.length]}});for(var f in b)b[f]=null,delete b[f];b=null};this.scrollstart=function(g){this.onscrollstart=g;return b};this.scrollend=function(g){this.onscrollend=g;return b};this.scrollcancel=function(g){this.onscrollcancel=g;return b};this.zoomin=function(g){this.onzoomin=g;
109
+ return b};this.zoomout=function(g){this.onzoomout=g;return b};this.isScrollable=function(g){g=g.target?g.target:g;if("OPTION"==g.nodeName)return!0;for(;g&&1==g.nodeType&&g!==this.me[0]&&!/^BODY|HTML/.test(g.nodeName);){var r=n(g);r=r.css("overflowY")||r.css("overflowX")||r.css("overflow")||"";if(/scroll|auto/.test(r))return g.clientHeight!=g.scrollHeight;g=g.parentNode?g.parentNode:!1}return!1};this.getViewport=function(g){for(g=g&&g.parentNode?g.parentNode:!1;g&&1==g.nodeType&&!/^BODY|HTML/.test(g.nodeName);){var r=
110
+ n(g);if(/fixed|absolute/.test(r.css("position")))return r;var t=r.css("overflowY")||r.css("overflowX")||r.css("overflow")||"";if(/scroll|auto/.test(t)&&g.clientHeight!=g.scrollHeight||0<r.getNiceScroll().length)return r;g=g.parentNode?g.parentNode:!1}return!1};this.triggerScrollStart=function(g,r,t,f,p){b.onscrollstart&&b.onscrollstart.call(b,{type:"scrollstart",current:{x:g,y:r},request:{x:t,y:f},end:{x:b.newscrollx,y:b.newscrolly},speed:p})};this.triggerScrollEnd=function(){if(b.onscrollend){var g=
111
+ b.getScrollLeft(),r=b.getScrollTop();b.onscrollend.call(b,{type:"scrollend",current:{x:g,y:r},end:{x:g,y:r}})}};var H=0,P=0,N=0,V=1,S=!1;this.onmousewheel=function(g){if(b.wheelprevented||b.locked)return!1;if(b.railslocked)return b.debounced("checkunlock",b.resize,250),!1;if(b.rail.drag)return b.cancelEvent(g);"auto"===x.oneaxismousemode&&0!==g.deltaX&&(x.oneaxismousemode=!1);if(x.oneaxismousemode&&0===g.deltaX&&!b.rail.scrollable)return b.railh&&b.railh.scrollable?b.onmousewheelhr(g):!0;var r=Z(),
112
+ t=!1;x.preservenativescrolling&&b.checkarea+600<r&&(b.nativescrollingarea=b.isScrollable(g),t=!0);b.checkarea=r;if(b.nativescrollingarea)return!0;if(g=A(g,!1,t))b.checkarea=0;return g};this.onmousewheelhr=function(g){if(!b.wheelprevented){if(b.railslocked||!b.railh.scrollable)return!0;if(b.rail.drag)return b.cancelEvent(g);var r=Z(),t=!1;x.preservenativescrolling&&b.checkarea+600<r&&(b.nativescrollingarea=b.isScrollable(g),t=!0);b.checkarea=r;return b.nativescrollingarea?!0:b.railslocked?b.cancelEvent(g):
113
+ A(g,!0,t)}};this.stop=function(){b.cancelScroll();b.scrollmon&&b.scrollmon.stop();b.cursorfreezed=!1;b.scroll.y=Math.round(b.getScrollTop()*(1/b.scrollratio.y));b.noticeCursor();return b};this.getTransitionSpeed=function(g){return 80+g/72*x.scrollspeed|0};if(x.smoothscroll)if(b.ishwscroll&&G.hastransition&&x.usetransition&&x.smoothscroll){var U="";this.resetTransition=function(){U="";b.doc.css(G.prefixstyle+"transition-duration","0ms")};this.prepareTransition=function(g,r){g=r?g:b.getTransitionSpeed(g);
114
+ r=g+"ms";U!==r&&(U=r,b.doc.css(G.prefixstyle+"transition-duration",r));return g};this.doScrollLeft=function(g,r){var t=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(g,t,r)};this.doScrollTop=function(g,r){var t=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(t,g,r)};this.cursorupdate={running:!1,start:function(){var g=this;if(!g.running){g.running=!0;var r=function(){g.running&&M(r);b.showCursor(b.getScrollTop(),b.getScrollLeft());b.notifyScrollEvent(b.win[0])};M(r)}},stop:function(){this.running=
115
+ !1}};this.doScrollPos=function(g,r,t){t=b.getScrollTop();var f=b.getScrollLeft();(0>(b.newscrolly-t)*(r-t)||0>(b.newscrollx-f)*(g-f))&&b.cancelScroll();x.bouncescroll?(0>r?r=r/2|0:r>b.page.maxh&&(r=b.page.maxh+(r-b.page.maxh)/2|0),0>g?g=g/2|0:g>b.page.maxw&&(g=b.page.maxw+(g-b.page.maxw)/2|0)):(0>r?r=0:r>b.page.maxh&&(r=b.page.maxh),0>g?g=0:g>b.page.maxw&&(g=b.page.maxw));if(b.scrollrunning&&g==b.newscrollx&&r==b.newscrolly)return!1;b.newscrolly=r;b.newscrollx=g;t=b.getScrollTop();f=b.getScrollLeft();
116
+ var p=g-f;var D=r-t;p=b.prepareTransition(Math.sqrt(p*p+D*D)|0);b.scrollrunning||(b.scrollrunning=!0,b.triggerScrollStart(f,t,g,r,p),b.cursorupdate.start());b.scrollendtrapped=!0;G.transitionend||(b.scrollendtrapped&&clearTimeout(b.scrollendtrapped),b.scrollendtrapped=setTimeout(b.onScrollTransitionEnd,p));b.setScrollTop(b.newscrolly);b.setScrollLeft(b.newscrollx)};this.cancelScroll=function(){if(!b.scrollendtrapped)return!0;var g=b.getScrollTop(),r=b.getScrollLeft();b.scrollrunning=!1;G.transitionend||
117
+ clearTimeout(G.transitionend);b.scrollendtrapped=!1;b.resetTransition();b.setScrollTop(g);b.railh&&b.setScrollLeft(r);b.timerscroll&&b.timerscroll.tm&&clearInterval(b.timerscroll.tm);b.timerscroll=!1;b.cursorfreezed=!1;b.cursorupdate.stop();b.showCursor(g,r);return b};this.onScrollTransitionEnd=function(){if(b.scrollendtrapped){var g=b.getScrollTop(),r=b.getScrollLeft();0>g?g=0:g>b.page.maxh&&(g=b.page.maxh);0>r?r=0:r>b.page.maxw&&(r=b.page.maxw);if(g!=b.newscrolly||r!=b.newscrollx)return b.doScrollPos(r,
118
+ g,x.snapbackspeed);b.scrollrunning&&b.triggerScrollEnd();b.scrollrunning=!1;b.scrollendtrapped=!1;b.resetTransition();b.timerscroll=!1;b.setScrollTop(g);b.railh&&b.setScrollLeft(r);b.cursorupdate.stop();b.noticeCursor(!1,g,r);b.cursorfreezed=!1}}}else this.doScrollLeft=function(g,r){var t=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(g,t,r)},this.doScrollTop=function(g,r){var t=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(t,g,r)},this.doScrollPos=function(g,r,t){t=b.getScrollTop();
119
+ var f=b.getScrollLeft();(0>(b.newscrolly-t)*(r-t)||0>(b.newscrollx-f)*(g-f))&&b.cancelScroll();var p=!1;b.bouncescroll&&b.rail.visibility||(0>r?(r=0,p=!0):r>b.page.maxh&&(r=b.page.maxh,p=!0));b.bouncescroll&&b.railh.visibility||(0>g?(g=0,p=!0):g>b.page.maxw&&(g=b.page.maxw,p=!0));if(b.scrollrunning&&b.newscrolly===r&&b.newscrollx===g)return!0;b.newscrolly=r;b.newscrollx=g;b.dst={};b.dst.x=g-f;b.dst.y=r-t;b.dst.px=f;b.dst.py=t;var D=b.getTransitionSpeed(Math.sqrt(b.dst.x*b.dst.x+b.dst.y*b.dst.y)|0);
120
+ b.bzscroll={};p=p?1:.58;b.bzscroll.x=new ja(f,b.newscrollx,D,0,0,p,1);b.bzscroll.y=new ja(t,b.newscrolly,D,0,0,p,1);Z();var R=function(){if(b.scrollrunning){var ea=b.bzscroll.y.getPos();b.setScrollLeft(b.bzscroll.x.getNow());b.setScrollTop(b.bzscroll.y.getNow());1>=ea?b.timer=M(R):(b.scrollrunning=!1,b.timer=0,b.triggerScrollEnd())}};b.scrollrunning||(b.triggerScrollStart(f,t,g,r,D),b.scrollrunning=!0,b.timer=M(R))},this.cancelScroll=function(){b.timer&&Q(b.timer);b.timer=0;b.bzscroll=!1;b.scrollrunning=
121
+ !1;return b};else this.doScrollLeft=function(g,r){var t=b.getScrollTop();b.doScrollPos(g,t,r)},this.doScrollTop=function(g,r){var t=b.getScrollLeft();b.doScrollPos(t,g,r)},this.doScrollPos=function(g,r,t){var f=g>b.page.maxw?b.page.maxw:g;0>f&&(f=0);var p=r>b.page.maxh?b.page.maxh:r;0>p&&(p=0);b.synched("scroll",function(){b.setScrollTop(p);b.setScrollLeft(f)})},this.cancelScroll=function(){};this.doScrollBy=function(g,r){z(0,g)};this.doScrollLeftBy=function(g,r){z(g,0)};this.doScrollTo=function(g,
122
+ r){b.cursorfreezed=!1;b.doScrollTop(g)};this.checkContentSize=function(){var g=b.getContentSize();g.h==b.page.h&&g.w==b.page.w||b.resize(!1,g)};b.onscroll=function(g){b.rail.drag||b.cursorfreezed||b.synched("scroll",function(){b.scroll.y=Math.round(b.getScrollTop()/b.scrollratio.y);b.railh&&(b.scroll.x=Math.round(b.getScrollLeft()/b.scrollratio.x));b.noticeCursor()})};b.bind(b.docscroll,"scroll",b.onscroll);this.doZoomIn=function(g){if(!b.zoomactive){b.zoomactive=!0;b.zoomrestore={style:{}};var r=
123
+ "position top left zIndex backgroundColor marginTop marginBottom marginLeft marginRight".split(" "),t=b.win[0].style,f;for(f in r){var p=r[f];b.zoomrestore.style[p]=void 0!==t[p]?t[p]:""}b.zoomrestore.style.width=b.win.css("width");b.zoomrestore.style.height=b.win.css("height");b.zoomrestore.padding={w:b.win.outerWidth()-b.win.width(),h:b.win.outerHeight()-b.win.height()};G.isios4&&(b.zoomrestore.scrollTop=I.scrollTop(),I.scrollTop(0));b.win.css({position:G.isios4?"absolute":"fixed",top:0,left:0,
124
+ zIndex:J+100,margin:0});r=b.win.css("backgroundColor");(""===r||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(r))&&b.win.css("backgroundColor","#fff");b.rail.css({zIndex:J+101});b.zoom.css({zIndex:J+102});b.zoom.css("backgroundPosition","0 -18px");b.resizeZoom();b.onzoomin&&b.onzoomin.call(b);return b.cancelEvent(g)}};this.doZoomOut=function(g){if(b.zoomactive)return b.zoomactive=!1,b.win.css("margin",""),b.win.css(b.zoomrestore.style),G.isios4&&I.scrollTop(b.zoomrestore.scrollTop),b.rail.css({"z-index":b.zindex}),
125
+ b.zoom.css({"z-index":b.zindex}),b.zoomrestore=!1,b.zoom.css("backgroundPosition","0 0"),b.onResize(),b.onzoomout&&b.onzoomout.call(b),b.cancelEvent(g)};this.doZoom=function(g){return b.zoomactive?b.doZoomOut(g):b.doZoomIn(g)};this.resizeZoom=function(){if(b.zoomactive){var g=b.getScrollTop();b.win.css({width:I.width()-b.zoomrestore.padding.w+"px",height:I.height()-b.zoomrestore.padding.h+"px"});b.onResize();b.setScrollTop(Math.min(b.page.maxh,g))}};this.init();n.nicescroll.push(this)},ia=function(T){var e=
126
+ this;this.nc=T;this.steptime=this.lasttime=this.speedy=this.speedx=this.lasty=this.lastx=0;this.snapy=this.snapx=!1;this.demuly=this.demulx=0;this.lastscrolly=this.lastscrollx=-1;this.timer=this.chky=this.chkx=0;this.reset=function(l,m){e.stop();e.steptime=0;e.lasttime=Z();e.speedx=0;e.speedy=0;e.lastx=l;e.lasty=m;e.lastscrollx=-1;e.lastscrolly=-1};this.update=function(l,m){var c=Z();e.steptime=c-e.lasttime;e.lasttime=c;c=m-e.lasty;var v=l-e.lastx,z=e.nc.getScrollTop(),A=e.nc.getScrollLeft();z+=c;
127
+ A+=v;e.snapx=0>A||A>e.nc.page.maxw;e.snapy=0>z||z>e.nc.page.maxh;e.speedx=v;e.speedy=c;e.lastx=l;e.lasty=m};this.stop=function(){e.nc.unsynched("domomentum2d");e.timer&&clearTimeout(e.timer);e.timer=0;e.lastscrollx=-1;e.lastscrolly=-1};this.doSnapy=function(l,m){var c=!1;0>m?(m=0,c=!0):m>e.nc.page.maxh&&(m=e.nc.page.maxh,c=!0);0>l?(l=0,c=!0):l>e.nc.page.maxw&&(l=e.nc.page.maxw,c=!0);c?e.nc.doScrollPos(l,m,e.nc.opt.snapbackspeed):e.nc.triggerScrollEnd()};this.doMomentum=function(l){var m=Z(),c=l?m+
128
+ l:e.lasttime;l=e.nc.getScrollLeft();var v=e.nc.getScrollTop(),z=e.nc.page.maxh,A=e.nc.page.maxw;e.speedx=0<A?Math.min(60,e.speedx):0;e.speedy=0<z?Math.min(60,e.speedy):0;c=c&&60>=m-c;if(0>v||v>z||0>l||l>A)c=!1;l=e.speedx&&c?e.speedx:!1;if(e.speedy&&c&&e.speedy||l){var b=Math.max(16,e.steptime);50<b&&(l=b/50,e.speedx*=l,e.speedy*=l,b=50);e.demulxy=0;e.lastscrollx=e.nc.getScrollLeft();e.chkx=e.lastscrollx;e.lastscrolly=e.nc.getScrollTop();e.chky=e.lastscrolly;var O=e.lastscrollx,x=e.lastscrolly,ca=
129
+ function(){var G=600<Z()-m?.04:.02;e.speedx&&(O=Math.floor(e.lastscrollx-e.speedx*(1-e.demulxy)),e.lastscrollx=O,0>O||O>A)&&(G=.1);e.speedy&&(x=Math.floor(e.lastscrolly-e.speedy*(1-e.demulxy)),e.lastscrolly=x,0>x||x>z)&&(G=.1);e.demulxy=Math.min(1,e.demulxy+G);e.nc.synched("domomentum2d",function(){e.speedx&&(e.nc.getScrollLeft(),e.chkx=O,e.nc.setScrollLeft(O));e.speedy&&(e.nc.getScrollTop(),e.chky=x,e.nc.setScrollTop(x));e.timer||(e.nc.hideCursor(),e.doSnapy(O,x))});1>e.demulxy?e.timer=setTimeout(ca,
130
+ b):(e.stop(),e.nc.hideCursor(),e.doSnapy(O,x))};ca()}else e.doSnapy(e.nc.getScrollLeft(),e.nc.getScrollTop())}},qa=n.fn.scrollTop;"object"===typeof n.cssHooks&&(n.cssHooks.pageYOffset={get:function(T,e,l){return(e=n.data(T,"__nicescroll")||!1)&&e.ishwscroll?e.getScrollTop():qa.call(T)},set:function(T,e){var l=n.data(T,"__nicescroll")||!1;l&&l.ishwscroll?l.setScrollTop(parseInt(e)):qa.call(T,e);return this}});n.fn.scrollTop=function(T){if(void 0===T){var e=this[0]?n.data(this[0],"__nicescroll")||!1:
131
+ !1;return e&&e.ishwscroll?e.getScrollTop():qa.call(this)}return this.each(function(){var l=n.data(this,"__nicescroll")||!1;l&&l.ishwscroll?l.setScrollTop(parseInt(T)):qa.call(n(this),T)})};var fa=n.fn.scrollLeft;"object"===typeof n.cssHooks&&(n.cssHooks.pageXOffset={get:function(T,e,l){return(e=n.data(T,"__nicescroll")||!1)&&e.ishwscroll?e.getScrollLeft():fa.call(T)},set:function(T,e){var l=n.data(T,"__nicescroll")||!1;l&&l.ishwscroll?l.setScrollLeft(parseInt(e)):fa.call(T,e);return this}});n.fn.scrollLeft=
132
+ function(T){if(void 0===T){var e=this[0]?n.data(this[0],"__nicescroll")||!1:!1;return e&&e.ishwscroll?e.getScrollLeft():fa.call(this)}return this.each(function(){var l=n.data(this,"__nicescroll")||!1;l&&l.ishwscroll?l.setScrollLeft(parseInt(T)):fa.call(n(this),T)})};var aa=function(T){var e=this;this.length=0;this.name="nicescrollarray";this.each=function(c){n.each(e,c);return e};this.push=function(c){e[e.length]=c;e.length++};this.eq=function(c){return e[c]};if(T)for(var l=0;l<T.length;l++){var m=
133
+ n.data(T[l],"__nicescroll")||!1;m&&(this[this.length]=m,this.length++)}return this};(function(T,e,l){for(var m=0,c=e.length;m<c;m++)l(T,e[m])})(aa.prototype,"show hide toggle onResize resize remove stop doScrollPos".split(" "),function(T,e){T[e]=function(){var l=arguments;return this.each(function(){this[e].apply(this,l)})}});n.fn.getNiceScroll=function(T){return void 0===T?new aa(this):this[T]&&n.data(this[T],"__nicescroll")||!1};if("object"===typeof n.expr){var na=n.expr.pseudos||n.expr[":"];na&&
134
+ (na.nicescroll=function(T){return void 0!==n.data(T,"__nicescroll")})}n.fn.niceScroll=function(T,e){void 0!==e||"object"!=typeof T||"jquery"in T||(e=T,T=!1);var l=new aa;this.each(function(){var m=n(this),c=n.extend({},e);if(T){var v=n(T);c.doc=1<v.length?n(T,m):v;c.win=m}"doc"in c&&!("win"in c)&&(c.win=m);v=m.data("__nicescroll")||!1;v||(c.doc=c.doc||m,v=new ka(c,m),m.data("__nicescroll",v));l.push(v)});return 1===l.length?l[0]:l};K.NiceScroll={getjQuery:function(){return n}};n.nicescroll||(n.nicescroll=
135
+ new aa,n.nicescroll.options=ha)})(function(n){var B=function(){function u(f){return null==f?String(f):H[P.call(f)]||"object"}function y(f){return"function"==u(f)}function F(f){return null!=f&&f==f.window}function J(f){return"object"==u(f)}function w(f){return J(f)&&!F(f)&&Object.getPrototypeOf(f)==Object.prototype}function I(f){var p=!!f&&"length"in f&&f.length,D=t.type(f);return"function"!=D&&!F(f)&&("array"==D||0===p||"number"==typeof p&&0<p&&p-1 in f)}function L(f){return l.call(f,function(p){return null!=
136
+ p})}function M(f){return f.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function Q(f){return f in z?z[f]:z[f]=new RegExp("(^|\\s)"+f+"(\\s|$)")}function Y(f,p){return"number"!=typeof p||A[M(f)]?p:p+"px"}function ba(f){return"children"in f?m.call(f.children):t.map(f.childNodes,function(p){if(1==p.nodeType)return p})}function Z(f,p){var D,R=f?f.length:0;for(D=0;D<R;D++)this[D]=f[D];this.length=R;this.selector=p||""}
137
+ function ha(f,p,D){for(aa in p)D&&(w(p[aa])||U(p[aa]))?(w(p[aa])&&!w(f[aa])&&(f[aa]={}),U(p[aa])&&!U(f[aa])&&(f[aa]=[]),ha(f[aa],p[aa],D)):p[aa]!==fa&&(f[aa]=p[aa])}function ma(f,p){return null==p?t(f):t(f).filter(p)}function W(f,p,D,R){return y(p)?p.call(f,D,R):p}function ka(f,p){var D=f.className||"",R=D&&D.baseVal!==fa;if(p===fa)return R?D.baseVal:D;R?D.baseVal=p:f.className=p}function ia(f){try{return f?"true"==f||("false"==f?!1:"null"==f?null:+f+""==f?+f:/^[\[\{]/.test(f)?t.parseJSON(f):f):f}catch(p){return f}}
138
+ function qa(f,p){p(f);for(var D=0,R=f.childNodes.length;D<R;D++)qa(f.childNodes[D],p)}var fa,aa,na,T=[],e=T.concat,l=T.filter,m=T.slice,c=n.document,v={},z={},A={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},b=/^\s*<(\w+|!)[^>]*>/,O=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,x=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,ca=/^(?:body|html)$/i,G=/([A-Z])/g,ja="val css html text data width height offset".split(" "),la=c.createElement("table"),
139
+ d=c.createElement("tr"),h={tr:c.createElement("tbody"),tbody:la,thead:la,tfoot:la,td:d,th:d,"*":c.createElement("div")},q=/complete|loaded|interactive/,C=/^[\w-]*$/,H={},P=H.toString,N={},V=c.createElement("div"),S={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},U=Array.isArray||function(f){return f instanceof
140
+ Array};N.matches=function(f,p){if(!p||!f||1!==f.nodeType)return!1;var D=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.matchesSelector;if(D)return D.call(f,p);var R=f.parentNode;(D=!R)&&(R=V).appendChild(f);p=~N.qsa(R,p).indexOf(f);D&&V.removeChild(f);return p};var g=function(f){return f.replace(/-+(.)?/g,function(p,D){return D?D.toUpperCase():""})};var r=function(f){return l.call(f,function(p,D){return f.indexOf(p)==D})};N.fragment=function(f,p,D){var R;O.test(f)&&
141
+ (R=t(c.createElement(RegExp.$1)));if(!R){f.replace&&(f=f.replace(x,"<$1></$2>"));p===fa&&(p=b.test(f)&&RegExp.$1);p in h||(p="*");var ea=h[p];ea.innerHTML=""+f;R=t.each(m.call(ea.childNodes),function(){ea.removeChild(this)})}if(w(D)){var da=t(R);t.each(D,function(wa,ta){if(-1<ja.indexOf(wa))da[wa](ta);else da.attr(wa,ta)})}return R};N.Z=function(f,p){return new Z(f,p)};N.isZ=function(f){return f instanceof N.Z};N.init=function(f,p){if(f)if("string"==typeof f)if(f=f.trim(),"<"==f[0]&&b.test(f))p=N.fragment(f,
142
+ RegExp.$1,p),f=null;else{if(p!==fa)return t(p).find(f);p=N.qsa(c,f)}else{if(y(f))return t(c).ready(f);if(N.isZ(f))return f;if(U(f))p=L(f);else if(J(f))p=[f],f=null;else if(b.test(f))p=N.fragment(f.trim(),RegExp.$1,p),f=null;else{if(p!==fa)return t(p).find(f);p=N.qsa(c,f)}}else return N.Z();return N.Z(p,f)};var t=function(f,p){return N.init(f,p)};t.extend=function(f){var p=m.call(arguments,1);if("boolean"==typeof f){var D=f;f=p.shift()}p.forEach(function(R){ha(f,R,D)});return f};N.qsa=function(f,p){var D,
143
+ R="#"==p[0],ea=!R&&"."==p[0],da=R||ea?p.slice(1):p,wa=C.test(da);return f.getElementById&&wa&&R?(D=f.getElementById(da))?[D]:[]:1!==f.nodeType&&9!==f.nodeType&&11!==f.nodeType?[]:m.call(wa&&!R&&f.getElementsByClassName?ea?f.getElementsByClassName(da):f.getElementsByTagName(p):f.querySelectorAll(p))};t.contains=c.documentElement.contains?function(f,p){return f!==p&&f.contains(p)}:function(f,p){for(;p&&=p.parentNode;)if(p===f)return!0;return!1};t.type=u;t.isFunction=y;t.isWindow=F;t.isArray=U;t.isPlainObject=
144
+ w;t.isEmptyObject=function(f){for(var p in f)return!1;return!0};t.isNumeric=function(f){var p=Number(f),D=typeof f;return null!=f&&"boolean"!=D&&("string"!=D||f.length)&&!isNaN(p)&&isFinite(p)||!1};t.inArray=function(f,p,D){return T.indexOf.call(p,f,D)};t.camelCase=g;t.trim=function(f){return null==f?"":String.prototype.trim.call(f)};t.uuid=0;t.support={};t.expr={};t.noop=function(){};t.map=function(f,p){var D=[],R;if(I(f))for(R=0;R<f.length;R++){var ea=p(f[R],R);null!=ea&&D.push(ea)}else for(R in f)ea=
145
+ p(f[R],R),null!=ea&&D.push(ea);return 0<D.length?t.fn.concat.apply([],D):D};t.each=function(f,p){var D;if(I(f))for(D=0;D<f.length&&!1!==p.call(f[D],D,f[D]);D++);else for(D in f)if(!1===p.call(f[D],D,f[D]))break;return f};t.grep=function(f,p){return l.call(f,p)};n.JSON&&(t.parseJSON=JSON.parse);t.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(f,p){H["[object "+p+"]"]=p.toLowerCase()});t.data=function(f,p,D){if(D===fa)return"undefined"!==typeof f[p]?f[p]:fa;
146
+ null===D?delete f[p]:f[p]=D};t.fn={jquery:"1.2.0",constructor:N.Z,length:0,forEach:T.forEach,reduce:T.reduce,push:T.push,sort:T.sort,splice:T.splice,indexOf:T.indexOf,concat:function(){var f,p=[];for(f=0;f<arguments.length;f++){var D=arguments[f];p[f]=N.isZ(D)?D.toArray():D}return e.apply(N.isZ(this)?this.toArray():this,p)},map:function(f){return t(t.map(this,function(p,D){return f.call(p,D,p)}))},slice:function(){return t(m.apply(this,arguments))},ready:function(f){q.test(c.readyState)&&c.body?f(t):
147
+ c.addEventListener("DOMContentLoaded",function(){f(t)},!1);return this},get:function(f){return f===fa?m.call(this):this[0<=f?f:f+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(f){T.every.call(this,function(p,D){return!1!==f.call(p,D,p)});return this},filter:function(f){return y(f)?this.not(this.not(f)):t(l.call(this,function(p){return N.matches(p,
148
+ f)}))},add:function(f,p){return t(r(this.concat(t(f,p))))},is:function(f){return":visible"===f?0<this.length?"none"!==this.css("display"):!1:J(f)?this[0]===f?!0:!1:0<this.length&&N.matches(this[0],f)},not:function(f){var p=[];if(y(f)&&f.call!==fa)this.each(function(R){f.call(this,R)||p.push(this)});else{var D="string"==typeof f?this.filter(f):I(f)&&y(f.item)?m.call(f):t(f);this.forEach(function(R){0>D.indexOf(R)&&p.push(R)})}return t(p)},has:function(f){return this.filter(function(){return J(f)?t.contains(this,
149
+ f):t(this).find(f).size()})},eq:function(f){return-1===f?this.slice(f):this.slice(f,+f+1)},first:function(){var f=this[0];return f&&!J(f)?f:t(f)},last:function(){var f=this[this.length-1];return f&&!J(f)?f:t(f)},find:function(f){var p=this;return f?"object"==typeof f?t(f).filter(function(){var D=this;return T.some.call(p,function(R){return t.contains(R,D)})}):1==this.length?t(N.qsa(this[0],f)):this.map(function(){return N.qsa(this,f)}):t()},closest:function(f,p){var D=[],R="object"==typeof f&&t(f);
150
+ this.each(function(ea,da){for(;da&&!(R?0<=R.indexOf(da):N.matches(da,f));)da=da!==p&&!(null!=da&&da.nodeType==da.DOCUMENT_NODE)&&da.parentNode;da&&0>D.indexOf(da)&&D.push(da)});return t(D)},parents:function(f){for(var p=[],D=this;0<D.length;)D=t.map(D,function(R){if((R=R.parentNode)&&(null==R||R.nodeType!=R.DOCUMENT_NODE)&&0>p.indexOf(R))return p.push(R),R});return ma(p,f)},parent:function(f){return ma(r(this.pluck("parentNode")),f)},children:function(f){return ma(this.map(function(){return ba(this)}),
151
+ f)},contents:function(){return this.map(function(){return this.contentDocument||m.call(this.childNodes)})},siblings:function(f){return ma(this.map(function(p,D){return l.call(ba(D.parentNode),function(R){return R!==D})}),f)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(f){return t.map(this,function(p){return p[f]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display="");if("none"==getComputedStyle(this,"").getPropertyValue("display")){var f=
152
+ this.style,p=this.nodeName;if(!v[p]){var D=c.createElement(p);c.body.appendChild(D);var R=getComputedStyle(D,"").getPropertyValue("display");D.parentNode.removeChild(D);"none"==R&&(R="block");v[p]=R}f.display=v[p]}})},replaceWith:function(f){return this.before(f).remove()},wrap:function(f){var p=y(f);if(this[0]&&!p)var D=t(f).get(0),R=D.parentNode||1<this.length;return this.each(function(ea){t(this).wrapAll(p?f.call(this,ea):R?D.cloneNode(!0):D)})},wrapAll:function(f){if(this[0]){t(this[0]).before(f=
153
+ t(f));for(var p;(p=f.children()).length;)f=p.first();t(f).append(this)}return this},wrapInner:function(f){var p=y(f);return this.each(function(D){var R=t(this),ea=R.contents();D=p?f.call(this,D):f;ea.length?ea.wrapAll(D):R.append(D)})},unwrap:function(){this.parent().each(function(){t(this).replaceWith(t(this).children())});return this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(f){return this.each(function(){var p=
154
+ t(this);(f===fa?"none"==p.css("display"):f)?p.show():p.hide()})},prev:function(f){return t(this.pluck("previousElementSibling")).filter(f||"*")},next:function(f){return t(this.pluck("nextElementSibling")).filter(f||"*")},html:function(f){return 0 in arguments?this.each(function(p){var D=this.innerHTML;t(this).empty().append(W(this,f,p,D))}):0 in this?this[0].innerHTML:null},text:function(f){return 0 in arguments?this.each(function(p){p=W(this,f,p,this.textContent);this.textContent=null==p?"":""+p}):
155
+ 0 in this?this.pluck("textContent").join(""):null},attr:function(f,p){var D;return"string"!=typeof f||1 in arguments?this.each(function(R){if(1===this.nodeType)if(J(f))for(aa in f){var ea=aa;R=f[aa];null==R?this.removeAttribute(ea):this.setAttribute(ea,R)}else ea=f,R=W(this,p,R,this.getAttribute(f)),null==R?this.removeAttribute(ea):this.setAttribute(ea,R)}):0 in this&&1==this[0].nodeType&&null!=(D=this[0].getAttribute(f))?D:fa},removeAttr:function(f){return this.each(function(){1===this.nodeType&&
156
+ f.split(" ").forEach(function(p){this.removeAttribute(p)},this)})},prop:function(f,p){f=S[f]||f;return 1 in arguments?this.each(function(D){this[f]=W(this,p,D,this[f])}):this[0]&&this[0][f]},removeProp:function(f){f=S[f]||f;return this.each(function(){delete this[f]})},data:function(f,p){if("object"===typeof p)this.length&&(this[0][f]=p);else{if("undefined"===typeof p){if(this.length&&"undefined"!==typeof this[0][f])return this[0][f]}else this.length&&("undefined"!==typeof this[0][f]&&delete this[0][f],
157
+ p&&(this[0][f]=p));var D="data-"+f.replace(G,"-$1").toLowerCase();D=1 in arguments?this.attr(D,p):this.attr(D);return null!==D?ia(D):fa}},val:function(f){return 0 in arguments?(null==f&&(f=""),this.each(function(p){this.value=W(this,f,p,this.value)})):this[0]&&(this[0].multiple?t(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(f){if(f)return this.each(function(D){var R=t(this);D=W(this,f,D,R.offset());var ea=R.offsetParent().offset();
158
+ D={top:D.top-ea.top,left:D.left-ea.left};"static"==R.css("position")&&(D.position="relative");R.css(D)});if(!this.length)return null;if(c.documentElement!==this[0]&&!t.contains(c.documentElement,this[0]))return{top:0,left:0};var p=this[0].getBoundingClientRect();return{left:p.left+n.pageXOffset,top:p.top+n.pageYOffset,width:Math.round(p.width),height:Math.round(p.height)}},css:function(f,p){if(2>arguments.length){var D=this[0];if("string"==typeof f)return D?D.style[g(f)]||getComputedStyle(D,"").getPropertyValue(f):
159
+ void 0;if(U(f)){if(!D)return;var R={},ea=getComputedStyle(D,"");t.each(f,function(wa,ta){R[ta]=D.style[g(ta)]||ea.getPropertyValue(ta)});return R}}var da="";if("string"==u(f))p||0===p?da=M(f)+":"+Y(f,p):this.each(function(){this.style.removeProperty(M(f))});else for(aa in f)f[aa]||0===f[aa]?da+=M(aa)+":"+Y(aa,f[aa])+";":this.each(function(){this.style.removeProperty(M(aa))});return this.each(function(){this.style.cssText+=";"+da})},index:function(f){return f?this.indexOf(t(f)[0]):this.parent().children().indexOf(this[0])},
160
+ hasClass:function(f){return f?T.some.call(this,function(p){return this.test(ka(p))},Q(f)):!1},addClass:function(f){return f?this.each(function(p){if("className"in this){na=[];var D=ka(this);W(this,f,p,D).split(/\s+/g).forEach(function(R){t(this).hasClass(R)||na.push(R)},this);na.length&&ka(this,D+(D?" ":"")+na.join(" "))}}):this},removeClass:function(f){return this.each(function(p){if("className"in this){if(f===fa)return ka(this,"");na=ka(this);W(this,f,p,na).split(/\s+/g).forEach(function(D){na=
161
+ na.replace(Q(D)," ")});ka(this,na.trim())}})},toggleClass:function(f,p){return f?this.each(function(D){var R=t(this);W(this,f,D,ka(this)).split(/\s+/g).forEach(function(ea){(p===fa?!R.hasClass(ea):p)?R.addClass(ea):R.removeClass(ea)})}):this},scrollTop:function(f){if(this.length){var p="scrollTop"in this[0];return f===fa?p?this[0].scrollTop:this[0].pageYOffset:this.each(p?function(){this.scrollTop=f}:function(){this.scrollTo(this.scrollX,f)})}},scrollLeft:function(f){if(this.length){var p="scrollLeft"in
162
+ this[0];return f===fa?p?this[0].scrollLeft:this[0].pageXOffset:this.each(p?function(){this.scrollLeft=f}:function(){this.scrollTo(f,this.scrollY)})}},position:function(){if(this.length){var f=this[0],p=this.offsetParent(),D=this.offset(),R=ca.test(p[0].nodeName)?{top:0,left:0}:p.offset();D.top-=parseFloat(t(f).css("margin-top"))||0;D.left-=parseFloat(t(f).css("margin-left"))||0;R.top+=parseFloat(t(p[0]).css("border-top-width"))||0;R.left+=parseFloat(t(p[0]).css("border-left-width"))||0;return{top:D.top-
163
+ R.top,left:D.left-R.left}}},offsetParent:function(){return this.map(function(){for(var f=this.offsetParent||c.body;f&&!ca.test(f.nodeName)&&"static"==t(f).css("position");)f=f.offsetParent;return f})}};t.fn.detach=t.fn.remove;["width","height"].forEach(function(f){var p=f.replace(/./,function(D){return D[0].toUpperCase()});t.fn[f]=function(D){var R,ea=this[0];return D===fa?F(ea)?ea["inner"+p]:null!=ea&&ea.nodeType==ea.DOCUMENT_NODE?ea.documentElement["scroll"+p]:(R=this.offset())&&R[f]:this.each(function(da){ea=
164
+ t(this);ea.css(f,W(this,D,da,ea[f]()))})}});t.fn.innerWidth=function(){return this.width()};t.fn.innerHeight=function(){return this.height()};["after","prepend","before","append"].forEach(function(f,p){var D=p%2;t.fn[f]=function(){var R,ea=t.map(arguments,function(ta){var ua=[];R=u(ta);return"array"==R?(ta.forEach(function(Aa){if(Aa.nodeType!==fa)return ua.push(Aa);if(t.zepto.isZ(Aa))return ua=ua.concat(Aa.get());ua=ua.concat(N.fragment(Aa))}),ua):"object"==R||null==ta?ta:N.fragment(ta)}),da,wa=1<
165
+ this.length;return 1>ea.length?this:this.each(function(ta,ua){da=D?ua:ua.parentNode;ua=0==p?ua.nextSibling:1==p?ua.firstChild:2==p?ua:null;var Aa=t.contains(c.documentElement,da);ea.forEach(function(ya){if(wa)ya=ya.cloneNode(!0);else if(!da)return t(ya).remove();da.insertBefore(ya,ua);Aa&&qa(ya,function(za){if(!(null==za.nodeName||"SCRIPT"!==za.nodeName.toUpperCase()||za.type&&"text/javascript"!==za.type||za.src)){var E=za.ownerDocument?za.ownerDocument.defaultView:n;E.eval.call(E,za.innerHTML)}})})})};
166
+ t.fn[D?f+"To":"insert"+(p?"Before":"After")]=function(R){t(R)[f](this);return this}});N.Z.prototype=Z.prototype=t.fn;N.uniq=r;N.deserializeValue=ia;t.zepto=N;return t}();n.mQuery=B;void 0===n.$$&&(n.$$=B);(function(u){function y(l){return l._zid||(l._zid=Y++)}function F(l,m,c,v){m=J(m);if(m.ns)var z=new RegExp("(?:^| )"+m.ns.replace(" "," .* ?")+"(?: |$)");return(W[y(l)]||[]).filter(function(A){return A&&(!m.e||A.e==m.e)&&(!m.ns||z.test(A.ns))&&(!c||y(A.fn)===y(c))&&(!v||A.sel==v)})}function J(l){l=
167
+ (""+l).split(".");return{e:l[0],ns:l.slice(1).sort().join(" ")}}function w(l){return fa[l]||ia&&qa[l]||l}function I(l,m,c,v,z,A,b){var O=y(l),x=W[O]||(W[O]=[]);m.split(/\s/).forEach(function(ca){if("ready"==ca)return u(document).ready(c);var G=J(ca);G.fn=c;G.sel=z;G.e in fa&&(c=function(la){var d=la.relatedTarget;if(!d||d!==this&&!u.contains(this,d))return G.fn.apply(this,arguments)});var ja=(G.del=A)||c;G.proxy=function(la){la=M(la);if(!la.isImmediatePropagationStopped()){la.data=v;var d=ja.apply(l,
168
+ la._args==ba?[la]:[la].concat(la._args));!1===d&&(la.preventDefault(),la.stopPropagation());return d}};G.i=x.length;x.push(G);"addEventListener"in l&&l.addEventListener(w(G.e),G.proxy,G.del&&!ia&&G.e in qa||!!b)})}function L(l,m,c,v,z){var A=y(l);(m||"").split(/\s/).forEach(function(b){F(l,b,c,v).forEach(function(O){delete W[A][O.i];"removeEventListener"in l&&l.removeEventListener(w(O.e),O.proxy,O.del&&!ia&&O.e in qa||!!z)})})}function M(l,m){if(m||!l.isDefaultPrevented)if(m||=l,u.each(e,function(c,
169
+ v){var z=m[c];l[c]=function(){this[v]=aa;return z&&z.apply(m,arguments)};l[v]=na}),l.timeStamp||(l.timeStamp=Date.now()),m.defaultPrevented!==ba?m.defaultPrevented:"returnValue"in m?!1===m.returnValue:m.getPreventDefault&&m.getPreventDefault())l.isDefaultPrevented=aa;return l}function Q(l){var m,c={originalEvent:l};for(m in l)T.test(m)||l[m]===ba||(c[m]=l[m]);return M(c,l)}var Y=1,ba,Z=Array.prototype.slice,ha=u.isFunction,ma=function(l){return"string"==typeof l},W={},ka={},ia="onfocusin"in n,qa=
170
+ {focus:"focusin",blur:"focusout"},fa={mouseenter:"mouseover",mouseleave:"mouseout"};ka.click=ka.mousedown=ka.mouseup=ka.mousemove="MouseEvents";u.event={add:I,remove:L};u.proxy=function(l,m){var c=2 in arguments&&Z.call(arguments,2);if(ha(l)){var v=function(){return l.apply(m,c?c.concat(Z.call(arguments)):arguments)};v._zid=y(l);return v}if(ma(m))return c?(c.unshift(l[m],l),u.proxy.apply(null,c)):u.proxy(l[m],l);throw new TypeError("expected function");};u.fn.bind=function(l,m,c){return this.on(l,
171
+ m,c)};u.fn.unbind=function(l,m){return this.off(l,m)};u.fn.one=function(l,m,c,v){return this.on(l,m,c,v,1)};var aa=function(){return!0},na=function(){return!1},T=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,e={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};u.fn.delegate=function(l,m,c){return this.on(m,l,c)};u.fn.undelegate=function(l,m,c){return this.off(m,l,c)};u.fn.live=function(l,m){u(document.body).delegate(this.selector,
172
+ l,m);return this};u.fn.die=function(l,m){u(document.body).undelegate(this.selector,l,m);return this};u.fn.on=function(l,m,c,v,z){var A,b,O=this;if(l&&!ma(l))return u.each(l,function(x,ca){O.on(x,m,c,ca,z)}),O;ma(m)||ha(v)||!1===v||(v=c,c=m,m=ba);if(v===ba||!1===c)v=c,c=ba;!1===v&&(v=na);return O.each(function(x,ca){z&&(A=function(G){L(ca,G.type,v);return v.apply(this,arguments)});m&&(b=function(G){var ja=u(G.target).closest(m,ca).get(0);if(ja&&ja!==ca){var la=u.extend(Q(G),{currentTarget:ja,liveFired:ca});
173
+ return(A||v).apply(ja,[la].concat(Z.call(arguments,1)))}});I(ca,l,v,c,m,b||A)})};u.fn.off=function(l,m,c){var v=this;if(l&&!ma(l))return u.each(l,function(z,A){v.off(z,m,A)}),v;ma(m)||ha(c)||!1===c||(c=m,m=ba);!1===c&&(c=na);return v.each(function(){L(this,l,c,m)})};u.fn.trigger=function(l,m){l=ma(l)||u.isPlainObject(l)?u.Event(l):M(l);l._args=m;return this.each(function(){if(l.type in qa&&"function"==typeof this[l.type])this[l.type]();else"dispatchEvent"in this?this.dispatchEvent(l):u(this).triggerHandler(l,
174
+ m)})};u.fn.triggerHandler=function(l,m){var c,v;this.each(function(z,A){c=Q(ma(l)?u.Event(l):l);c._args=m;c.target=A;u.each(F(A,l.type||l),function(b,O){v=O.proxy(c);if(c.isImmediatePropagationStopped())return!1})});return v};"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(l){u.fn[l]=function(m){return 0 in arguments?this.bind(l,m):this.trigger(l)}});
175
+ u.Event=function(l,m){ma(l)||(m=l,l=m.type);var c=document.createEvent(ka[l]||"Events"),v=!0;if(m)for(var z in m)"bubbles"==z?v=!!m[z]:c[z]=m[z];c.initEvent(l,v,!0);return M(c)}})(B);(function(u){["width","height"].forEach(function(y){var F=y.replace(/./,function(J){return J[0].toUpperCase()});u.fn["outer"+F]=function(J){var w=this;if(w){var I=w[y]();({width:["left","right"],height:["top","bottom"]})[y].forEach(function(L){J&&(I+=parseInt(w.css("margin-"+L),10))});return I}return null}})})(B);(function(u){function y(l,
176
+ m,c,v){if(l.global)return l=m||W,c=u.Event(c),u(l).trigger(c,v),!c.isDefaultPrevented()}function F(l){l.global&&0===u.active++&&y(l,null,"ajaxStart")}function J(l,m){var c=m.context;if(!1===m.beforeSend.call(c,l,m)||!1===y(m,c,"ajaxBeforeSend",[l,m]))return!1;y(m,c,"ajaxSend",[l,m])}function w(l,m,c,v){var z=c.context;c.success.call(z,l,"success",m);v&&v.resolveWith(z,[l,"success",m]);y(c,z,"ajaxSuccess",[m,c,l]);L("success",m,c)}function I(l,m,c,v,z){var A=v.context;v.error.call(A,c,m,l);z&&z.rejectWith(A,
177
+ [c,m,l]);y(v,A,"ajaxError",[c,v,l||m]);L(m,c,v)}function L(l,m,c){var v=c.context;c.complete.call(v,m,l);y(c,v,"ajaxComplete",[m,c]);c.global&&!--u.active&&y(c,null,"ajaxStop")}function M(){}function Q(l){l&&=l.split(";",2)[0];return l&&("text/html"==l?"html":"application/json"==l?"json":fa.test(l)?"script":aa.test(l)&&"xml")||"text"}function Y(l,m){return""==m?l:(l+"&"+m).replace(/[&?]{1,2}/,"?")}function ba(l){l.processData&&l.data&&"string"!=u.type(l.data)&&(l.data=u.param(l.data,l.traditional));
178
+ !l.data||l.type&&"GET"!=l.type.toUpperCase()&&"jsonp"!=l.dataType||(l.url=Y(l.url,l.data),l.data=void 0)}function Z(l,m,c,v){u.isFunction(m)&&(v=c,c=m,m=void 0);u.isFunction(c)||(v=c,c=void 0);return{url:l,data:m,success:c,dataType:v}}function ha(l,m,c,v){var z,A=u.isArray(m),b=u.isPlainObject(m);u.each(m,function(O,x){z=u.type(x);v&&(O=c?v:v+"["+(b||"object"==z||"array"==z?O:"")+"]");!v&&A?l.add(x.name,x.value):"array"==z||!c&&"object"==z?ha(l,x,c,O):l.add(O,x)})}var ma=+new Date,W=n.document,ka,
179
+ ia,qa=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,fa=/^(?:text|application)\/javascript/i,aa=/^(?:text|application)\/xml/i,na=/^\s*$/,T=W.createElement("a");T.href=n.location.href;u.active=0;u.ajaxJSONP=function(l,m){if(!("type"in l))return u.ajax(l);var c=l.jsonpCallback,v=(u.isFunction(c)?c():c)||"Zepto"+ma++,z=W.createElement("script"),A=n[v],b,O=function(G){u(z).triggerHandler("error",G||"abort")},x={abort:O},ca;m&&m.promise(x);u(z).on("load error",function(G,ja){clearTimeout(ca);u(z).off().remove();
180
+ "error"!=G.type&&b?w(b[0],x,l,m):I(null,ja||"error",x,l,m);n[v]=A;b&&u.isFunction(A)&&A(b[0]);A=b=void 0});if(!1===J(x,l))return O("abort"),x;n[v]=function(){b=arguments};z.src=l.url.replace(/\?(.+)=\?/,"?$1="+v);W.head.appendChild(z);0<l.timeout&&(ca=setTimeout(function(){O("timeout")},l.timeout));return x};u.ajaxSettings={type:"GET",beforeSend:M,success:M,error:M,complete:M,context:null,global:!0,xhr:function(){return new n.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",
181
+ json:"application/json",xml:"application/xml, text/xml",html:"text/html",text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:M};u.ajax=function(l){var m=u.extend({},l||{}),c=u.Deferred&&u.Deferred();for(ka in u.ajaxSettings)void 0===m[ka]&&(m[ka]=u.ajaxSettings[ka]);F(m);if(!m.crossDomain){var v=W.createElement("a");v.href=m.url;v.href=v.href;m.crossDomain=T.protocol+"//"+T.host!==v.protocol+"//"+v.host}m.url||(m.url=n.location.toString());-1<(v=m.url.indexOf("#"))&&(m.url=
182
+ m.url.slice(0,v));ba(m);var z=m.dataType;(v=/\?.+=\?/.test(m.url))&&(z="jsonp");!1!==m.cache&&(l&&!0===l.cache||"script"!=z&&"jsonp"!=z)||(m.url=Y(m.url,"_="+Date.now()));if("jsonp"==z)return v||(m.url=Y(m.url,m.jsonp?m.jsonp+"=?":!1===m.jsonp?"":"callback=?")),u.ajaxJSONP(m,c);l=m.accepts[z];var A={};v=function(G,ja){A[G.toLowerCase()]=[G,ja]};var b=/^([\w-]+:)\/\//.test(m.url)?RegExp.$1:n.location.protocol,O=m.xhr(),x=O.setRequestHeader,ca;c&&c.promise(O);m.crossDomain||v("X-Requested-With","XMLHttpRequest");
183
+ v("Accept",l||"*/*");if(l=m.mimeType||l)-1<l.indexOf(",")&&(l=l.split(",",2)[0]),O.overrideMimeType&&O.overrideMimeType(l);(m.contentType||!1!==m.contentType&&m.data&&"GET"!=m.type.toUpperCase())&&v("Content-Type",m.contentType||"application/x-www-form-urlencoded");if(m.headers)for(ia in m.headers)v(ia,m.headers[ia]);O.setRequestHeader=v;O.onreadystatechange=function(){if(4==O.readyState){O.onreadystatechange=M;clearTimeout(ca);var G=!1;if(200<=O.status&&300>O.status||304==O.status||0==O.status&&
184
+ "file:"==b){z=z||Q(m.mimeType||O.getResponseHeader("content-type"));if("arraybuffer"==O.responseType||"blob"==O.responseType)var ja=O.response;else{ja=O.responseText;try{ja=m.dataFilter==M?ja:m.dataFilter.call(m.context,ja,z),"script"==z?(0,eval)(ja):"xml"==z?ja=O.responseXML:"json"==z&&(ja=na.test(ja)?null:u.parseJSON(ja))}catch(la){G=la}if(G)return I(G,"parsererror",O,m,c)}w(ja,O,m,c)}else I(O.statusText||null,O.status?"error":"abort",O,m,c)}};if(!1===J(O,m))return O.abort(),I(null,"abort",O,m,
185
+ c),O;O.open(m.type,m.url,"async"in m?m.async:!0,m.username,m.password);if(m.xhrFields)for(ia in m.xhrFields)O[ia]=m.xhrFields[ia];for(ia in A)x.apply(O,A[ia]);0<m.timeout&&(ca=setTimeout(function(){O.onreadystatechange=M;O.abort();I(null,"timeout",O,m,c)},m.timeout));O.send(m.data?m.data:null);return O};u.get=function(){return u.ajax(Z.apply(null,arguments))};u.post=function(){var l=Z.apply(null,arguments);l.type="POST";return u.ajax(l)};u.getJSON=function(){var l=Z.apply(null,arguments);l.dataType=
186
+ "json";return u.ajax(l)};u.fn.load=function(l,m,c){if(!this.length)return this;var v=this,z=l.split(/\s/);l=Z(l,m,c);var A=l.success;if(1<z.length){l.url=z[0];var b=z[1]}l.success=function(O){v.html(b?u("<div>").html(O.replace(qa,"")).find(b):O);A&&A.apply(v,arguments)};u.ajax(l);return this};var e=encodeURIComponent;u.param=function(l,m){var c=[];c.add=function(v,z){u.isFunction(z)&&(z=z());null==z&&(z="");this.push(e(v)+"="+e(z))};ha(c,l,m);return c.join("&").replace(/%20/g,"+")}})(B);(function(u){u.fn.serializeArray=
187
+ function(){var y,F,J=[],w=function(I){if(I.forEach)return I.forEach(w);J.push({name:y,value:I})};this[0]&&u.each(this[0].elements,function(I,L){F=L.type;(y=L.name)&&"fieldset"!=L.nodeName.toLowerCase()&&!L.disabled&&"submit"!=F&&"reset"!=F&&"button"!=F&&"file"!=F&&("radio"!=F&&"checkbox"!=F||L.checked)&&w(u(L).val())});return J};u.fn.serialize=function(){var y=[];this.serializeArray().forEach(function(F){y.push(encodeURIComponent(F.name)+"="+encodeURIComponent(F.value))});return y.join("&")};u.fn.submit=
188
+ function(y){if(0 in arguments)this.bind("submit",y);else if(this.length){var F=u.Event("submit");this.eq(0).trigger(F);F.isDefaultPrevented()||this.get(0).submit()}return this}})(B);(function(u,y){function F(fa){return w?w+fa:fa.toLowerCase()}var J="",w,I={Webkit:"webkit",Moz:"",O:"o"},L=document.createElement("div"),M=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,Q,Y,ba,Z,ha,ma,W,ka,ia={};L.style.transform===y&&u.each(I,function(fa,aa){if(L.style[fa+"TransitionProperty"]!==
189
+ y)return J="-"+fa.toLowerCase()+"-",w=aa,!1});var qa=J+"transform";ia[Q=J+"transition-property"]=ia[Y=J+"transition-duration"]=ia[Z=J+"transition-delay"]=ia[ba=J+"transition-timing-function"]=ia[ha=J+"animation-name"]=ia[ma=J+"animation-duration"]=ia[ka=J+"animation-delay"]=ia[W=J+"animation-timing-function"]="";u.fx={off:w===y&&L.style.transitionProperty===y,speeds:{_default:400,fast:200,slow:600},cssPrefix:J,transitionEnd:F("TransitionEnd"),animationEnd:F("AnimationEnd")};u.fn.animate=function(fa,
190
+ aa,na,T,e){u.isFunction(aa)&&(T=aa,aa=na=y);u.isFunction(na)&&(T=na,na=y);u.isPlainObject(aa)&&(na=aa.easing,T=aa.complete,e=aa.delay,aa=aa.duration);aa&&=("number"==typeof aa?aa:u.fx.speeds[aa]||u.fx.speeds._default)/1E3;e&&=parseFloat(e)/1E3;return this.anim(fa,aa,na,T,e)};u.fn.anim=function(fa,aa,na,T,e){var l,m={},c="",v=this,z=u.fx.transitionEnd,A=!1;aa===y&&(aa=u.fx.speeds._default/1E3);e===y&&(e=0);u.fx.off&&(aa=0);if("string"==typeof fa)m[ha]=fa,m[ma]=aa+"s",m[ka]=e+"s",m[W]=na||"linear",
191
+ z=u.fx.animationEnd;else{var b=[];for(l in fa)M.test(l)?c+=l+"("+fa[l]+") ":(m[l]=fa[l],b.push(l.replace(/([A-Z])/g,"-$1").toLowerCase()));c&&(m[qa]=c,b.push(qa));0<aa&&"object"===typeof fa&&(m[Q]=b.join(", "),m[Y]=aa+"s",m[Z]=e+"s",m[ba]=na||"linear")}var O=function(x){if("undefined"!==typeof x){if(x.target!==x.currentTarget)return;u(x.target).unbind(z,O)}else u(this).unbind(z,O);A=!0;u(this).css(ia);T&&T.call(this)};0<aa&&(this.bind(z,O),setTimeout(function(){A||O.call(v)},1E3*(aa+e)+25));this.size()&&
192
+ this.get(0).clientLeft;this.css(m);0>=aa&&setTimeout(function(){v.each(function(){O.call(this)})},0);return this};u.fn.stop=function(fa,aa){return this};L=null})(B);(function(){try{getComputedStyle(void 0)}catch(y){var u=getComputedStyle;n.getComputedStyle=function(F,J){try{return u(F,J)}catch(w){return null}}}})();return B}(K));var Da=function(){if(document.currentScript)var n=document.currentScript.src;else{n=document.scripts;for(var B=n.length-1,u,y=B;0<y;y--)if("interactive"===n[y].readyState){u=
193
+ n[y].src;break}n=u||n[B].src}B=n.indexOf("v=");B=0<B?n.substr(B+2):2023;n=n.substring(0,n.lastIndexOf("/")+1);n.endsWith("zwplayer/")||(n+="js/");return{path:n,v:B}}(),Ia=Da.path+"plugins/",Ja=function(n,B,u){var y=document.getElementsByTagName("head");if(0==y.length){y=document.createElement("head");var F=document.getElementsByTagName("body");if(0<F.length)F=F[0],document.insertBefore(y,F);else return alert("Invalid html document: no HEAD tag"),!1}else{y=y[0];F=y.childNodes;for(var J=0;J<F.length;J++){var w=
194
+ F[J];if("SCRIPT"===w.nodeName.toUpperCase()&&w.id&&w.id==n){if("true"!=w.getAttribute("loadstate")){var I=function(){"true"!=w.getAttribute("loadstate")?setTimeout(I,50):"function"==typeof u&&u(n)};setTimeout(I,50);return!1}"function"==typeof u&&u(n);return!0}}}var L=document.createElement("script");L.type="text/javascript";L.readyState?L.onreadystatechange=function(){if("loaded"==L.readyState||"complete"==L.readyState)L.onreadystatechange=null,L.setAttribute("loadstate","true"),"function"==typeof u&&
195
+ u(n)}:L.onload=function(){L.setAttribute("loadstate","true");"function"==typeof u&&u(n)};L.id=n;L.src=B;y.appendChild(L);return!1};(function(n,B,u){var y=document.getElementsByTagName("head");if(0==y.length){y=document.createElement("head");var F=document.getElementsByTagName("body");if(0<F.length)F=F[0],document.insertBefore(y,F);else return alert("Invalid html document: no HEAD tag found"),!1}else{y=y[0];F=y.childNodes;for(var J=0;J<F.length;J++){var w=F[J];if("link"===w.nodeName.toUpperCase()&&
196
+ w.id&&w.id==n){if("true"!==w.getAttribute("loadstate")){var I=function(){"true"!==w.getAttribute("loadstate")?setTimeout(I,50):"function"===typeof u&&u(n)};setTimeout(I,50);return!1}"function"===typeof u&&u(n);return!0}}}var L=document.createElement("link");L.type="text/css";L.setAttribute("rel","stylesheet");L.readyState?L.onreadystatechange=function(){if("loaded"==L.readyState||"complete"==L.readyState)L.onreadystatechange=null,L.setAttribute("loadstate","true"),"function"==typeof u&&u(n)}:L.onload=
197
+ function(){L.setAttribute("loadstate","true");"function"==typeof u&&u(n)};L.id=n;L.href=B;y.appendChild(L);return!1})("zwplayer-css",Da.path+"css/zwplayer.css?v="+Da.v,function(n){console.log("zwplayer.css["+n+"] is loaded")});var Ua=function(n){return"object"===typeof HTMLElement?n instanceof HTMLElement:!(!n||"object"!==typeof n||1!==n.nodeType&&9!==n.nodeType||"string"!==typeof n.nodeName)};Array.isArray||(Array.isArray=function(n){return"[object Array]"===Object.prototype.toString.call(n)});var Va=
198
+ /iPhone|iPad|iPod/.test(navigator.userAgent);(function(n){n+="=";for(var B=document.cookie.split(";"),u=0;u<B.length;u++){var y=B[u].trim();if(0==y.indexOf(n))return y.substring(n.length,y.length)}return""})("ZWPlayer")||bb("ZWPlayer","V1.0",365);var ib=function(n){for(var B=navigator.languages&&navigator.languages.length?navigator.languages:[navigator.language],u=0;u<n.length;u++)for(var y=0;y<B.length;y++)if(n[u].lang&&B[y]&&-1<B[y].indexOf(n[u].lang))return n[u].text;return 1===n.length?n[0].text:
199
+ null};HUAYI={};HUAYI.Danmu=function(){var n={playerObj:null,opacity:70,onInit:null,onClose:null,onResize:null};return{create:function(B){var u={};for(k in n)u[k]=n[k];for(k in B)u[k]=B[k];"undefined"==typeof u.playerId&&(u.playerId="video-body");return new function(y){y=y.playerId;this.rows=[];this.timerId=this.rowCount=0;this.frameDuration=40;this.Danmulayer=null;this.danmuMargin=50;this.speedX=100;this.hasTransition=!0;this.rowHeight=28;this.topMargin=10;this.layerHeight=this.layerWidth=0;this.fontSize=
200
200
  "25px";if("string"==typeof y)this.vPlayer=document.getElementById(y);else if("object"==typeof y)this.vPlayer=y;else return;this.vPlayer||(this.vPlayer=document.getElementById("video-body"));if(this.vPlayer&&(y=this.vPlayer.childNodes,0<y.length))for(var F=0;F<y.length;F++){var J=y[F];if("DIV"==J.nodeName&&Qa(J.className,"danmuplayer")){this.wrapObj=J;break}}if(this.wrapObj){if(y=this.wrapObj.childNodes,0<y.length)for(F=0;F<y.length;F++)if(J=y[F],"DIV"==J.nodeName&&Qa(J.className,"danmu-layer")){this.Danmulayer=
201
201
  J;break}}else this.wrapObj=document.createElement("div"),this.wrapObj.className="danmuplayer",this.vPlayer.appendChild(this.wrapObj),this.Danmulayer=document.createElement("div"),this.Danmulayer.className="danmu-layer",this.wrapObj.appendChild(this.Danmulayer),Ka.ie&&9>Ka.ver&&(this.wrapObj.style.height=this.vPlayer.offsetHeight-45+"px");if(this.Danmulayer){this.hasTransition="undefined"!=typeof this.Danmulayer.style.transition;this.rowCount=Math.floor(Math.floor(2*(this.Danmulayer.offsetHeight-this.topMargin)/
202
- 3)/this.rowHeight);if(0<this.rowCount)for(F=0;F<this.rowCount;F++)this.rows.push({top:this.topMargin+this.rowHeight*F,count:0,last:null,idx:F});this.layerWidth=this.Danmulayer.offsetWidth;this.layerHeight=this.Danmulayer.offsetHeight;Ba.addElement(this.Danmulayer);this.Danmulayer.addEventListener("resize",function(w){this.reCalcLayout()}.bind(this))}this.start=function(w){this.timerId&&(clearInterval(this.timerId),this.timerId=0);if(!this.hasTransition){var H=this;this.timerId=setInterval(function(){var K=
203
- H.Danmulayer,O=K.childNodes;if(0<O.length){for(var P=[],Z=0;Z<O.length;Z++){var ba=O[Z];if("DIV"==ba.tagName){var aa=parseFloat(ba.style.left);0>aa+ba.offsetWidth?P.push(ba):ba.style.left=aa-4.5+"px"}}if(0<P.length){for(Z=0;Z<P.length;Z++)O=P[Z],O.rowIdx&&(H.rows[O.rowIdx].last==this&&(H.rows[O.rowIdx].last=null),H.rows[O.rowIdx].count--),K.removeChild(P[Z]);P.splice(0,P.length)}}},this.frameDuration)}};this.stop=function(){this.timerId&&(clearInterval(this.timerId),this.timerId=0);var w=this.Danmulayer.childNodes;
204
- if(0<w.length)for(var H=0;H<w.length;H++)w[H].style.display="none";this.Danmulayer.style.display="none"};this.destroy=function(){this.Danmulayer&&(Ba.removeElement(this.Danmulayer),delete this.Danmulayer);this.timerId&&(clearInterval(this.timerId),this.timerId=0);this.wrapObj&&this.vPlayer&&this.vPlayer.removeChild(this.wrapObj)};this.addDanmu=function(w,H){H||={};var K=document.createElement("div");K.className="danmu";"undefined"==typeof w.color||H.isFilterColorFont||(K.style.color=w.color);"undefined"!=
205
- typeof w.border&&(K.style.border="1px solid #666");K.style.fontSize=H.forcedFontSizeValue?parseInt(25*H.forcedFontSizeValue/100)+"px":"25px";this.fontSize!=K.style.fontSize&&(this.rowHeight=parseInt(K.style.fontSize)+3,this.layerHeight=0,this.reCalcLayout(),this.fontSize=K.style.fontSize);w.outlineColor&&(K.style.outlineStyle="solid",K.style.outlineWidth="2px",K.style.outlineColor=w.outlineColor);K.style.opacity=H.opacityValue?H.opacityValue/100:"0.9";K.innerHTML="function"==typeof L.replaceSmileDanmu?
206
- L.replaceSmileDanmu(w.text,this.rowHeight,H):w.text;var O=w=0,P=999999;this.rowCount>this.rows.length&&(this.rowCount=this.rows.length);for(;w<this.rowCount;w++)if(0==this.rows[w].count){O=w;P=this.layerWidth;break}else if(this.rows[w].last){var Z=this.rows[w].last;Z=Z.getBoundingClientRect().left+Z.offsetWidth+this.danmuMargin;if(Z<P&&(O=w,P=Z,P<this.layerWidth))break}P<this.layerWidth&&(P=this.layerWidth);K.style.fontFamily='SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif';K.style.textShadow=
207
- "rgb(0, 0, 0) 1px 0px 1px, rgb(0, 0, 0) 0px 1px 1px, rgb(0, 0, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px";K.style.cursor="pointer";K.style.left=P+"px";K.style.top=this.rows[O].top+"px";K.rowIdx=O;this.rows[O].last=K;this.rows[O].count++;this.Danmulayer.appendChild(K);var ba=this;K.onmouseover=function(aa){this.pause||(this.pause=!0)};K.onmouseout=function(aa){this.pause&&(this.pause=!1)};this.hasTransition&&(K.addEventListener("transitionend",function(){"number"==typeof this.rowIdx&&(ba.rows[this.rowIdx].last==
208
- this&&(ba.rows[this.rowIdx].last=null),ba.rows[this.rowIdx].count--);ba.Danmulayer.removeChild(this)}),w=P+K.offsetWidth,H.speedValue?(H=parseInt(this.speedX*parseFloat(H.speedValue)),0==H&&(H=1),H=w/H+4*Math.random()):H=w/this.speedX+4*Math.random(),K.style.transition="transform "+H+"s linear",K.style.transform="translateX(-"+w+"px)")};this.reCalcLayout=function(){if(this.Danmulayer){Ka.ie&&9>Ka.ver&&(this.wrapObj.style.height=this.vPlayer.offsetHeight-45+"px");var w=this.Danmulayer.offsetHeight;
209
- if(w!=this.layerHeight){this.rowCount=Math.floor(Math.floor(2*(w-this.topMargin)/3)/this.rowHeight);if(0<this.rowCount)if(this.rowCount>this.rows.length)for(var H=this.rows.length;H<this.rowCount;H++)this.rows.push({top:this.topMargin+this.rowHeight*H,count:0,last:null,idx:H});else for(H=0;H<this.rowCount;H++)this.rows[H].top=this.topMargin+this.rowHeight*H;this.layerHeight=w}if(this.Danmulayer.offsetWidth!=this.layerWidth){w=this.Danmulayer.childNodes;if(0<w.length)for(H=0;H<w.length;H++);this.layerWidth=
210
- this.Danmulayer.offsetWidth}}};this.hasTransition||this.start()}(u)}}}();var Ba={_onResize:function(p){var A=p.target||p.srcElement;if(A=A.__resizeTrigger__?A.__resizeTrigger__:A){var u=A.__z_resizeListeners;if(u)for(var y=u.length,F=0;F<y;F++){var J=u[F],w=J.handler;(J=J.context)||(J=A);if(w)w.apply(J,[p]);else if("resize"===p.type||"[object ResizeObserverEntry]"===Object.prototype.toString.call(p))w=document.createEvent("Event"),w.initEvent("resize",!1,!1),A.dispatchEvent(w)}}},addElement:function(p,
211
- A,u){var y=p.__z_resizeListeners;if(!y)if(y=[],p.__z_resizeListeners=y,"function"===typeof L.ResizeObserver)this.resizeObserver||(this.resizeObserver=new ResizeObserver(function(J){for(var w=0;w<J.length;w++)this._onResize(J[w])}.bind(this))),this.resizeObserver.observe(p);else{"static"===getComputedStyle(p,null).position&&(p.style.position="relative");var F=document.createElement("object");F.resizer=this;F.__resizeElement__=p;F.setAttribute("style","display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; opacity: 0; pointer-events: none; z-index: -9999;");
212
- F.type="text/html";F.data="about:blank";F.onload=function(J){this.contentDocument.defaultView.__resizeTrigger__=this.__resizeElement__;this.contentDocument.defaultView.addEventListener("resize",this.resizer._onResize)};p.appendChild(F);p.__resizeDetector__=F}y.push({handler:A,context:u})},removeElement:function(p,A,u){var y=p.__z_resizeListeners;if(y){for(var F=y.length,J=0;J<F;J++){var w=y[J];if(w.handler===A&&w.context===u){y.splice(J,1);break}}if(0===y.length){if(A=p.__resizeDetector__)A.contentDocument.defaultView.removeEventListener("resize",
213
- this._onResize),p.removeChild(A),delete p.__resizeDetector__;delete p.__z_resizeListeners;this.resizeObserver&&this.resizeObserver.unobserve(p)}}}},Ka=function(){var p,A,u,y,F,J,w=navigator.userAgent.toLowerCase(),H;(H=w.match(/chrome\/([\d.]+)/),H)?p=H[1]:(H=w.match(/firefox\/([\d.]+)/),H)?A=H[1]:(H=w.match(/edge\/([\d.]+)/),H)?u=H[1]:(H=w.match(/rv:([\d.]+)\) like gecko/),H)?y=H[1]:(H=w.match(/msie ([\d.]+)/),H)?y=H[1]:(H=w.match(/opera.([\d.]+)/),H)?F=H[1]:(H=w.match(/version\/([\d.]+).*safari/),
214
- H)?J=H[1]:J=!1;return p?{broswer:"Chrome",version:p,chrome:!0,ver:parseInt(p)}:A?{broswer:"Firefox",version:A,firefox:!0,ver:parseInt(A)}:J?{broswer:"Safari",version:J,ver:parseInt(J)}:u?{broswer:"Edge",version:u,edge:!0,ver:parseInt(u)}:y?{broswer:"IE",version:y,ie:!0,ver:parseInt(y)}:F?{broswer:"Opera",version:F,opera:!0,ver:parseInt(F)}:{broswer:"",version:"0",ver:0}}(),Fa={about:"\u5173\u4e8e",current:"\u5f53\u524d","qs-auto":"\u81ea\u52a8\u5207\u6362",enterFullScreen:"\u8fdb\u5165\u5168\u5c4f",
202
+ 3)/this.rowHeight);if(0<this.rowCount)for(F=0;F<this.rowCount;F++)this.rows.push({top:this.topMargin+this.rowHeight*F,count:0,last:null,idx:F});this.layerWidth=this.Danmulayer.offsetWidth;this.layerHeight=this.Danmulayer.offsetHeight;Ba.addElement(this.Danmulayer);this.Danmulayer.addEventListener("resize",function(w){this.reCalcLayout()}.bind(this))}this.start=function(w){this.timerId&&(clearInterval(this.timerId),this.timerId=0);if(!this.hasTransition){var I=this;this.timerId=setInterval(function(){var L=
203
+ I.Danmulayer,M=L.childNodes;if(0<M.length){for(var Q=[],Y=0;Y<M.length;Y++){var ba=M[Y];if("DIV"==ba.tagName){var Z=parseFloat(ba.style.left);0>Z+ba.offsetWidth?Q.push(ba):ba.style.left=Z-4.5+"px"}}if(0<Q.length){for(Y=0;Y<Q.length;Y++)M=Q[Y],M.rowIdx&&(I.rows[M.rowIdx].last==this&&(I.rows[M.rowIdx].last=null),I.rows[M.rowIdx].count--),L.removeChild(Q[Y]);Q.splice(0,Q.length)}}},this.frameDuration)}};this.stop=function(){this.timerId&&(clearInterval(this.timerId),this.timerId=0);var w=this.Danmulayer.childNodes;
204
+ if(0<w.length)for(var I=0;I<w.length;I++)w[I].style.display="none";this.Danmulayer.style.display="none"};this.destroy=function(){this.Danmulayer&&(Ba.removeElement(this.Danmulayer),delete this.Danmulayer);this.timerId&&(clearInterval(this.timerId),this.timerId=0);this.wrapObj&&this.vPlayer&&this.vPlayer.removeChild(this.wrapObj)};this.addDanmu=function(w,I){I||={};var L=document.createElement("div");L.className="danmu";"undefined"==typeof w.color||I.isFilterColorFont||(L.style.color=w.color);"undefined"!=
205
+ typeof w.border&&(L.style.border="1px solid #666");L.style.fontSize=I.forcedFontSizeValue?parseInt(25*I.forcedFontSizeValue/100)+"px":"25px";this.fontSize!=L.style.fontSize&&(this.rowHeight=parseInt(L.style.fontSize)+3,this.layerHeight=0,this.reCalcLayout(),this.fontSize=L.style.fontSize);w.outlineColor&&(L.style.outlineStyle="solid",L.style.outlineWidth="2px",L.style.outlineColor=w.outlineColor);L.style.opacity=I.opacityValue?I.opacityValue/100:"0.9";L.innerHTML="function"==typeof K.replaceSmileDanmu?
206
+ K.replaceSmileDanmu(w.text,this.rowHeight,I):w.text;var M=w=0,Q=999999;this.rowCount>this.rows.length&&(this.rowCount=this.rows.length);for(;w<this.rowCount;w++)if(0==this.rows[w].count){M=w;Q=this.layerWidth;break}else if(this.rows[w].last){var Y=this.rows[w].last;Y=Y.getBoundingClientRect().left+Y.offsetWidth+this.danmuMargin;if(Y<Q&&(M=w,Q=Y,Q<this.layerWidth))break}Q<this.layerWidth&&(Q=this.layerWidth);L.style.fontFamily='SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif';L.style.textShadow=
207
+ "rgb(0, 0, 0) 1px 0px 1px, rgb(0, 0, 0) 0px 1px 1px, rgb(0, 0, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px";L.style.cursor="pointer";L.style.left=Q+"px";L.style.top=this.rows[M].top+"px";L.rowIdx=M;this.rows[M].last=L;this.rows[M].count++;this.Danmulayer.appendChild(L);var ba=this;L.onmouseover=function(Z){this.pause||(this.pause=!0)};L.onmouseout=function(Z){this.pause&&(this.pause=!1)};this.hasTransition&&(L.addEventListener("transitionend",function(){"number"==typeof this.rowIdx&&(ba.rows[this.rowIdx].last==
208
+ this&&(ba.rows[this.rowIdx].last=null),ba.rows[this.rowIdx].count--);ba.Danmulayer.removeChild(this)}),w=Q+L.offsetWidth,I.speedValue?(I=parseInt(this.speedX*parseFloat(I.speedValue)),0==I&&(I=1),I=w/I+4*Math.random()):I=w/this.speedX+4*Math.random(),L.style.transition="transform "+I+"s linear",L.style.transform="translateX(-"+w+"px)")};this.reCalcLayout=function(){if(this.Danmulayer){Ka.ie&&9>Ka.ver&&(this.wrapObj.style.height=this.vPlayer.offsetHeight-45+"px");var w=this.Danmulayer.offsetHeight;
209
+ if(w!=this.layerHeight){this.rowCount=Math.floor(Math.floor(2*(w-this.topMargin)/3)/this.rowHeight);if(0<this.rowCount)if(this.rowCount>this.rows.length)for(var I=this.rows.length;I<this.rowCount;I++)this.rows.push({top:this.topMargin+this.rowHeight*I,count:0,last:null,idx:I});else for(I=0;I<this.rowCount;I++)this.rows[I].top=this.topMargin+this.rowHeight*I;this.layerHeight=w}if(this.Danmulayer.offsetWidth!=this.layerWidth){w=this.Danmulayer.childNodes;if(0<w.length)for(I=0;I<w.length;I++);this.layerWidth=
210
+ this.Danmulayer.offsetWidth}}};this.hasTransition||this.start()}(u)}}}();var Ba={_onResize:function(n){var B=n.target||n.srcElement;if(B=B.__resizeTrigger__?B.__resizeTrigger__:B){var u=B.__z_resizeListeners;if(u)for(var y=u.length,F=0;F<y;F++){var J=u[F],w=J.handler;(J=J.context)||(J=B);if(w)w.apply(J,[n]);else if("resize"===n.type||"[object ResizeObserverEntry]"===Object.prototype.toString.call(n))w=document.createEvent("Event"),w.initEvent("resize",!1,!1),B.dispatchEvent(w)}}},addElement:function(n,
211
+ B,u){var y=n.__z_resizeListeners;if(!y)if(y=[],n.__z_resizeListeners=y,"function"===typeof K.ResizeObserver)this.resizeObserver||(this.resizeObserver=new ResizeObserver(function(J){for(var w=0;w<J.length;w++)this._onResize(J[w])}.bind(this))),this.resizeObserver.observe(n);else{"static"===getComputedStyle(n,null).position&&(n.style.position="relative");var F=document.createElement("object");F.resizer=this;F.__resizeElement__=n;F.setAttribute("style","display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; opacity: 0; pointer-events: none; z-index: -9999;");
212
+ F.type="text/html";F.data="about:blank";F.onload=function(J){this.contentDocument.defaultView.__resizeTrigger__=this.__resizeElement__;this.contentDocument.defaultView.addEventListener("resize",this.resizer._onResize)};n.appendChild(F);n.__resizeDetector__=F}y.push({handler:B,context:u})},removeElement:function(n,B,u){var y=n.__z_resizeListeners;if(y){for(var F=y.length,J=0;J<F;J++){var w=y[J];if(w.handler===B&&w.context===u){y.splice(J,1);break}}if(0===y.length){if(B=n.__resizeDetector__)B.contentDocument.defaultView.removeEventListener("resize",
213
+ this._onResize),n.removeChild(B),delete n.__resizeDetector__;delete n.__z_resizeListeners;this.resizeObserver&&this.resizeObserver.unobserve(n)}}}},Ka=function(){var n,B,u,y,F,J,w=navigator.userAgent.toLowerCase(),I;(I=w.match(/chrome\/([\d.]+)/),I)?n=I[1]:(I=w.match(/firefox\/([\d.]+)/),I)?B=I[1]:(I=w.match(/edge\/([\d.]+)/),I)?u=I[1]:(I=w.match(/rv:([\d.]+)\) like gecko/),I)?y=I[1]:(I=w.match(/msie ([\d.]+)/),I)?y=I[1]:(I=w.match(/opera.([\d.]+)/),I)?F=I[1]:(I=w.match(/version\/([\d.]+).*safari/),
214
+ I)?J=I[1]:J=!1;return n?{broswer:"Chrome",version:n,chrome:!0,ver:parseInt(n)}:B?{broswer:"Firefox",version:B,firefox:!0,ver:parseInt(B)}:J?{broswer:"Safari",version:J,ver:parseInt(J)}:u?{broswer:"Edge",version:u,edge:!0,ver:parseInt(u)}:y?{broswer:"IE",version:y,ie:!0,ver:parseInt(y)}:F?{broswer:"Opera",version:F,opera:!0,ver:parseInt(F)}:{broswer:"",version:"0",ver:0}}(),Fa={about:"\u5173\u4e8e",current:"\u5f53\u524d","qs-auto":"\u81ea\u52a8\u5207\u6362",enterFullScreen:"\u8fdb\u5165\u5168\u5c4f",
215
215
  exitFullScreen:"\u9000\u51fa\u5168\u5c4f",subtitleOff:"\u5b57\u5e55\u5173\u95ed",FULL_HD1:"\u539f\u753b",allSubtitle:"\u5b57\u5e55\u603b\u5f00\u5173",closeSmallWindow:"\u5173\u95ed\u5c0f\u7a97\u53e3\u6a21\u5f0f",mainSubtitle:"\u9ed8\u8ba4\u5b57\u5e55",secondSubtitle:"\u7b2c\u4e8c\u5b57\u5e55",speed:"\u500d\u901f",muted:"\u9759\u97f3",unmuted:"\u53d6\u6d88\u9759\u97f3",level:"\u7ea7\u522b","media-prop":"\u5a92\u4f53\u6d41\u5c5e\u6027","player-help":"\u4f7f\u7528\u8bf4\u660e","version-update":"\u7248\u672c\u66f4\u65b0",
216
- HD1:"\u8d85\u6e05",SD1:"\u9ad8\u6e05",SD2:"\u6807\u6e05",HD:"\u9ad8\u6e05",FHD:"\u5168\u9ad8\u6e05",BD:"\u84dd\u5149","BD 4M":"\u84dd\u51494M","BD 8M":"\u84dd\u51498M"},Ha={},Wa={FULL_HD1:"RAW",HD1:"FHD",SD1:"HD",SD2:"SD"},Xa="en",jb={"zh-CN":Fa,zh:Fa,"zh-HK":Ha,"zh-TW":Ha,"en-US":Wa,en:Wa};Fa="en";L.navigator&&(Ha=(L.navigator.language||L.navigator.browserLanguage).toLowerCase(),-1!=Ha.indexOf("zh")?Fa="zh-CN":-1!=Ha.indexOf("zh-tw")&&(Fa="zh-Hant"));Xa=Fa;var qa=function(p,A){var u=jb[Xa]||A;return u?
217
- u[p]||A:A},kb=function(){for(var p='<div class="zwp-button zwp-speedButton"><button class="zwpbtn zwp-speedBtn" data-action="showSpeedMenu" data-name="speedbtn">'+qa("speed","Speed")+'</button><ul class="zwp-speedMenu">',A="2.0x 1.5x 1.25x 1.0x 0.75x 0.5x 0.25x".split(" "),u="",y=0;y<A.length;y++)u=3===y?u+('<li class="zwp-speed-item active">'+A[y]+"</li>"):u+('<li class="zwp-speed-item">'+A[y]+"</li>");return p+u+"</ul></div>"},Ya=function(){var p='<div class="zwp-option-item main"><label class="zwp-option-item-label">'+
218
- qa("allSubtitle","All subtitle")+'</label><div class="zwp-option-item-value">'+Ca("","subtitleOn")+"</div></div>";p+='<div class="zwp-option-item sub1" style="display: none;"><label class="zwp-option-item-label">'+qa("mainSubtitle","Main subtitle")+'</label><div class="zwp-option-item-value">'+Ca("","subtitleDefault")+"</div></div>";return p+='<div class="zwp-option-item sub2" style="display: none;"><label class="zwp-option-item-label">'+qa("secondSubtitle","Second subtitle")+'</label><div class="zwp-option-item-value">'+
219
- Ca("","subtitleSecond")+"</div></div>"},lb=function(p){var A='<li class="zwp-subtitles-item" data-id="-1">'+qa("subtitleOff","Captions off")+"</li>";for(var u=0;u<p.length;u++)A=0===u?A+('<li class="zwp-subtitles-item active" data-id="'+p[u].id+'">'+p[u].name+"</li>"):A+('<li class="zwp-subtitles-item" data-id="'+p[u].id+'">'+p[u].name+"</li>");return'<ul class="zwp-subtitlesMenu">'+A+"</ul>"},mb=function(){var p="",A=(new Date).getTime();p=p+'<div class="zwp-toolbox-ground-right zwp-dmform zwp_danmu-controlbar"> <div class="zwp_switch_group"> <div class="zwp_switch_text">\u5f39\u5e55</div> <div class="zwp_switch" id="danmuSwitch-'+
220
- (A+'"><i class="switch_inner"></i></div> </div> <div class="zwp_dmconfig zwp_dmicon" id="danmu-config-btn-')+(A+'" title="\u5f39\u5e55\u8bbe\u7f6e"><i class="xicon xicon-subtitles"></i></div> <div class="zwp-barrage_form" id="barrage_form-')+(A+'"> <div class="zwp-barrage_inp logined"> <input id="barrage_inp_text-')+(A+'" type="text" class="barrage_inp_text" maxlength="40" disabled="disabled" readonly="readonly"> <div class="barrage_login" href="#login"><span class="barrage_text">\u767b\u5f55</span>\u540e\u53ef\u4ee5\u53c2\u4e0e\u5f39\u5e55</div> </div>');
221
- p+=' <a class="btn_bubble disabled" href="javascript:void(0);" title="\u9009\u62e9\u8868\u60c5" data-viewid="smilesFaces-view-'+A+'"><i class="xicon xicon-smile"></i></a> <button type="submit" class="btn_submit vtb_disabled" title="\u767b\u5f55\u540e\u624d\u53ef\u4ee5\u53d1\u9001\u5f39\u5e55\u54e6" disabled="disabled">\u53d1\u9001</button> </div>';p+=' <div class="zwp-barrage-set hidden" data-barrage-panel="panel" data-render="0"></div>';return p+="</div>"},La=function(p){if("number"===typeof p)return p;
222
- p=p.split(":");return 2===p.length?60*parseInt(p[0])+parseInt(p[1]):3===p.length?3600*parseInt(p[0])+60*parseInt(p[1])+parseInt(p[2]):1===p.length?parseFloat(p[0]):3<p.length?9.999999999999999E8:0},nb=function y(A,u){var F=(y.canvas||(y.canvas=document.createElement("canvas"))).getContext("2d");F.font=u;return F.measureText(A).width},ob=function(A,u){var y="";if(!u||!Array.isArray(u))return"";for(var F=0;F<u.length;F++){var J=u[F],w=La(J.time);if(!(w>=A)){var H=100*w/A+"%",K=J.title||J.text||J.time+
223
- "";if("undefined"!==typeof J.duration){var O="red";J.style&&"undefined"!==typeof J.style.background&&(O=J.style.background);var P=La(J.duration);w+P>A&&(P=A-w);y+='<span class="zwp__chapter_dot zwp_bar" style="left: '+H+"; width: "+(100*P/A+"%; border-radius: 3px; background-color: ")+O+';" title="'+K+'" data-time="'+J.time+'" data-desc="'+J.desc+'">&nbsp;</span>'}else y+='<span class="zwp__chapter_dot" style="left: '+H+'" title="'+K+'" data-time="'+J.time+'" data-desc="'+J.desc+'">&nbsp;</span>'}}return y},
224
- Za=function(A){return A.replace(/[<>&"]/g,function(u){return{"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;"}[u]})},pb=function(A){if(!A||!Array.isArray(A)||0===A.length)return null;var u='<div class="zwp-button zwp-chapterButton"><button class="zwpbtn zwp-chapterBtn" data-action="showChapterListview" data-name="chapterbtn"><i class="xicon xicon-chapter"></i> \u7ae0\u8282</button><div class="zwp-chapterPanel zwp-popupwindow"><button class="closeBtn"><i class="xicon xicon-close"></i></button><div class="form-row form-title">\u7ae0\u8282\u5217\u8868</div><div class="zwp-list-inner"><ul class="zwp-chapterlist">';
225
- for(var y=0,F=0;F<A.length;F++){var J=A[F],w=J.title||J.text||J.time+"";w=Za(w);a:{var H=J.time;if("string"===typeof H){if(0<=H.indexOf(":")){var K=H;break a}H=parseInt(H)}K=parseInt(H/3600);var O=parseInt(H%3600/60);H=parseInt(H%60);var P="";0<K&&(P+=K+":");0<=O?(10<O||0<K&&(P+="0"),P+=O+":"):P+="0:";K=P=10<=H?P+H:P+("0"+H)}O='<li class="chapter-item" data-time="'+J.time+'">';O+='<div class="item-title"><span class="item-time">'+K+"</span>";O+='<span class="title" title="'+w+'">'+w+"</span></div>";
226
- J.desc&&(O+='<div class="item-content"><span class="desc">'+Za(J.desc)+"</span></div>");O+="</li>";u+=O;J=nb(w,'bold 16px "Microsoft YaHei", "Segoe UI","PingFang SC","Hiragino Sans GB","Helvetica Neue",Helvetica,Arial,sans-serif,-apple-system,BlinkMacSystemFont');J>y&&(y=J)}return{html:u+"</ul></div></div></div>",titleWidth:y}};L.insertSmile=function(A,u){A=$$(A).closest("div.zwp-smileview");if(0<A.length&&(A=A.get(0).inputbox))if(A.createTextRange&&(A.caretPos=document.selection.createRange().duplicate()),
227
- document.all)A.createTextRange&&A.caretPos?(A=A.caretPos,A.text=" "==A.text.charAt(A.text.length-1)?u+" ":u):A.value=u;else if(A.setSelectionRange){var y=A.selectionEnd,F=A.value.substring(0,A.selectionStart);y=A.value.substring(y);A.value=F+u+y}else alert("This version of Mozilla based browser does not support setSelectionRange")};L.replaceSmileDanmu=function(A,u,y){if("string"!=typeof A)return"";0<=A.indexOf("<")&&(A=A.replace(/</g,"&lt;").replace(/>/g,"&gt;"));var F=A.indexOf("[sm-");if(0>F)return A;
228
- var J=Da.path+"widgets/smiles/p",w="",H=A.substring(0,F);for(""!=H&&(w+=H);0<=F;){H=A.indexOf("]",F+4);if(0>H){H=A.substring(F);""!=H&&(w+=H);break}F=A.substring(F+4,H);""!=F&&(y.isFilterImage||(w+='<img style="opacity: 1;" src="'+J+F+'.png" height="'+u+'">'));F=A.indexOf("[sm-",H+1);0>F?(H=A.substring(H+1),""!=H&&(w+=H)):F>H+1&&(w+=A.substring(H+1,F))}return w};var Oa=function(A){hasClass(A,"switch_on")?removeClass(A,"switch_on"):addClass(A,"switch_on")},qb=function(A,u){var y=$$;A=y(u).closest("div.zwp-dmform").children(".zwp-barrage-set");
229
- if(0!=A.length){if("1"!=A.attr("data-render")){var F=u.zwplayer,J=A.get(0);y.get(Da.path+"widgets/danmu_setting.html?v="+Da.v,{},function(K){var O=y(J);O.html(K);O.find("a.barrage-tab-link").click(function(P){P.preventDefault();P=y(this).parent();P.hasClass("selected")||(P.addClass("selected").siblings().removeClass("selected"),P=y(P.attr("data-tab")),P.hasClass("hidden")&&(P.removeClass("hidden"),P.siblings().addClass("hidden")))});K=y("#fsBox_tab");K.find("div.color-box").children("a").click(function(P){P.preventDefault();
230
- P=y(this);P.hasClass("selected")||(P.siblings().removeClass("selected"),P.addClass("selected"),F&&(F.danmuSetting.color=P.attr("data-color")))});K.find("div.other-box").children("a.checkbox-wrap").click(function(P){P.preventDefault();var Z=y(this);Z.toggleClass("selected");P=Z.attr("data-content");Z=Z.hasClass("selected");F&&(F.danmuSetting[P]=Z)});y("#bfBox_tab").find("a.zwp-barrage-icons").mousedown(function(P){if(0==P.button){this.isMousePressed=!0;var Z=y(this).position().left,ba=P.clientX-Z,
231
- aa=this,fa=function(Y){Y=Y.clientX-ba;0>Y?Y=0:134<Y&&(Y=134);y(aa).css({left:Y+"px"});var ka=y(aa).siblings("div.bar-t");0<ka.length&&ka.width(Y+3);aa.valuePanel||(aa.valuePanel=y(aa).parent().siblings("div.set-rol-right").get(0));if("object"==typeof aa.valuePanel){ka=y(aa.valuePanel);var ia=ka.attr("data-barrage-content");"opacityValue"==ia?(Y=parseInt(100*Y/138),F&&(F.danmuSetting.opacityValue=Y),ka.html(Y+"%")):"forcedFontSizeValue"==ia?(Y=50+parseInt(150*Y/138),F&&(F.danmuSetting.forcedFontSizeValue=
232
- Y),ka.html(Y+"%")):"speedValue"==ia?(Y=(.5+parseFloat(Y/69)).toFixed(1),F&&(F.danmuSetting.speedValue=Y),ka.html(Y+"x")):"densityValue"==ia&&(Y=parseInt(100*Y/46),F&&(F.danmuSetting.densityValue=Y),ka.html(Y+"\u6761"))}return!1},ma=function(Y){y(document).unbind("mousemove",fa).unbind("mouseup",ma)};y(document).bind("mousemove",fa).bind("mouseup",ma)}return!1});y("#pbBox_tab").find("a.pb-link").click(function(P){P.preventDefault();var Z=y(this).parent();Z.toggleClass("selected");P=y(this).attr("data-content");
233
- Z=Z.hasClass("selected");F&&(F.danmuSetting[P]=Z)});y("#barrage-set-bot").children("a").click(function(P){P.preventDefault();if("reset"==y(this).attr("data-content")){if(F)for(a in F.danmuSetting)delete F.danmuSetting[a];y("#fsBox_tab").find(".color-box a").removeClass("selected").eq(0).addClass("selected");y("#fsBox_tab").find(".other-box a").removeClass("selected");var Z={opacityTrigger:[128,124,"90%"],forcedFontSizeTrigger:[50,46,"100%"],speedTrigger:[39,35,"1.0x"],densityTrigger:[18,14,"30\u6761"]};
234
- y("#bfBox_tab").find("a.zwp-barrage-icons").each(function(ba,aa){ba=y(aa).attr("data-barrage-content");if(Z[ba]){var fa=Z[ba];ba=fa[1];var ma=fa[0];fa=fa[2];aa=y(aa);aa.css({left:ba+"px"});aa.siblings(".bar-t").width(ma+"px");aa.parent().siblings(".set-rol-right").text(fa)}});y("#pbBox_tab").find("li.selected").removeClass("selected")}})},"html");A.attr("data-render","1")}if(A.hasClass("hidden")){J=A.get(0);var w=this,H=function(K){var O=y(J);if(K.target==w)w=null;else if(hasClass(K.target,"xicon-close")||
235
- !O.is(K.target)&&0===O.has(K.target).length)O.addClass("hidden"),y(document).off("click",H),delete u.zwplayer};A.removeClass("hidden");y(document).on("click",H)}}},$a=function(A){L.ctrlInitId||(L.ctrlInitId=(new Date).getTime());var u=L.ctrlInitId++;return A+u},Ca=function(A,u){return'<div class="zwp_switch action-item" id="'+(A||$a("switch-"))+'" data-action="'+(u||"none")+'"><i class="switch_inner"></i></div>'},ab=function(A){var u=A.parentNode;u&&(u=u.querySelector(".zwp-slider-value"))&&(u.innerHTML=
236
- A.value)},Ma=function(A,u){A=A||$a("zwp_slider-");return'<input type="range" id="'+A+'" name="slider'+A+'" data-action="'+u+'" class="zwp-slider" value="0" min="-100" max="100"/><span class="zwp-slider-value">0</span>'},rb=function(A){var u="";A.infoButton&&(u='<div class="zwp-button zwp-infoButton"><button class="zwpbtn zwp-infoBtn" data-action="showMediainfo" data-name="infobtn"><i class="xicon xicon-info"></i></button></div>');var y="",F="",J="",w="",H="",K="",O="",P=A.defVolume||61.25;A.speedButton&&
237
- !A.isLive&&(y="");A.optionButton&&(J='<div class="zwp-button zwp-optionButton"><button class="zwpbtn zwp-optionBtn" data-action="showConfigPanel" data-name="optionbtn" title="\u8bbe\u7f6e"><i class="xicon xicon-config"></i></button><div class="zwp-optionPanel"><div class="zwp-option-item"><label class="zwp-option-item-label">\u5de6\u53f3\u7ffb\u8f6c</label><div class="zwp-option-item-value">'+(Ca("","mirror")+'</div></div><div class="zwp-option-item"><label class="zwp-option-item-label">\u4e0a\u4e0b\u7ffb\u8f6c</label><div class="zwp-option-item-value">'+
216
+ HD1:"\u8d85\u6e05",SD1:"\u9ad8\u6e05",SD2:"\u6807\u6e05",HD:"\u9ad8\u6e05",FHD:"\u5168\u9ad8\u6e05",BD:"\u84dd\u5149","BD 4M":"\u84dd\u51494M","BD 8M":"\u84dd\u51498M",waitStreamToReady:"\u6b63\u5728\u7b49\u5f85\u8282\u76ee..."},Ha={},Wa={FULL_HD1:"RAW",HD1:"FHD",SD1:"HD",SD2:"SD"},Xa="en",jb={"zh-CN":Fa,zh:Fa,"zh-HK":Ha,"zh-TW":Ha,"en-US":Wa,en:Wa};Fa="en";K.navigator&&(Ha=(K.navigator.language||K.navigator.browserLanguage).toLowerCase(),-1!=Ha.indexOf("zh")?Fa="zh-CN":-1!=Ha.indexOf("zh-tw")&&(Fa=
217
+ "zh-Hant"));Xa=Fa;var pa=function(n,B){var u=jb[Xa]||B;return u?u[n]||B:B},kb=function(){for(var n='<div class="zwp-button zwp-speedButton"><button class="zwpbtn zwp-speedBtn" data-action="showSpeedMenu" data-name="speedbtn">'+pa("speed","Speed")+'</button><ul class="zwp-speedMenu">',B="2.0x 1.5x 1.25x 1.0x 0.75x 0.5x 0.25x".split(" "),u="",y=0;y<B.length;y++)u=3===y?u+('<li class="zwp-speed-item active">'+B[y]+"</li>"):u+('<li class="zwp-speed-item">'+B[y]+"</li>");return n+u+"</ul></div>"},Ya=function(){var n=
218
+ '<div class="zwp-option-item main"><label class="zwp-option-item-label">'+pa("allSubtitle","All subtitle")+'</label><div class="zwp-option-item-value">'+Ca("","subtitleOn")+"</div></div>";n+='<div class="zwp-option-item sub1" style="display: none;"><label class="zwp-option-item-label">'+pa("mainSubtitle","Main subtitle")+'</label><div class="zwp-option-item-value">'+Ca("","subtitleDefault")+"</div></div>";return n+='<div class="zwp-option-item sub2" style="display: none;"><label class="zwp-option-item-label">'+
219
+ pa("secondSubtitle","Second subtitle")+'</label><div class="zwp-option-item-value">'+Ca("","subtitleSecond")+"</div></div>"},lb=function(n){var B='<li class="zwp-subtitles-item" data-id="-1">'+pa("subtitleOff","Captions off")+"</li>";for(var u=0;u<n.length;u++)B=0===u?B+('<li class="zwp-subtitles-item active" data-id="'+n[u].id+'">'+n[u].name+"</li>"):B+('<li class="zwp-subtitles-item" data-id="'+n[u].id+'">'+n[u].name+"</li>");return'<ul class="zwp-subtitlesMenu">'+B+"</ul>"},mb=function(){var n=
220
+ "",B=(new Date).getTime();n=n+'<div class="zwp-toolbox-ground-right zwp-dmform zwp_danmu-controlbar"> <div class="zwp_switch_group"> <div class="zwp_switch_text">\u5f39\u5e55</div> <div class="zwp_switch" id="danmuSwitch-'+(B+'"><i class="switch_inner"></i></div> </div> <div class="zwp_dmconfig zwp_dmicon" id="danmu-config-btn-')+(B+'" title="\u5f39\u5e55\u8bbe\u7f6e"><i class="xicon xicon-subtitles"></i></div> <div class="zwp-barrage_form" id="barrage_form-')+(B+'"> <div class="zwp-barrage_inp logined"> <input id="barrage_inp_text-')+
221
+ (B+'" type="text" class="barrage_inp_text" maxlength="40" disabled="disabled" readonly="readonly"> <div class="barrage_login" href="#login"><span class="barrage_text">\u767b\u5f55</span>\u540e\u53ef\u4ee5\u53c2\u4e0e\u5f39\u5e55</div> </div>');n+=' <a class="btn_bubble disabled" href="javascript:void(0);" title="\u9009\u62e9\u8868\u60c5" data-viewid="smilesFaces-view-'+B+'"><i class="xicon xicon-smile"></i></a> <button type="submit" class="btn_submit vtb_disabled" title="\u767b\u5f55\u540e\u624d\u53ef\u4ee5\u53d1\u9001\u5f39\u5e55\u54e6" disabled="disabled">\u53d1\u9001</button> </div>';
222
+ n+=' <div class="zwp-barrage-set hidden" data-barrage-panel="panel" data-render="0"></div>';return n+="</div>"},La=function(n){if("number"===typeof n)return n;n=n.split(":");return 2===n.length?60*parseInt(n[0])+parseInt(n[1]):3===n.length?3600*parseInt(n[0])+60*parseInt(n[1])+parseInt(n[2]):1===n.length?parseFloat(n[0]):3<n.length?9.999999999999999E8:0},nb=function y(B,u){var F=(y.canvas||(y.canvas=document.createElement("canvas"))).getContext("2d");F.font=u;return F.measureText(B).width},ob=function(B,
223
+ u){var y="";if(!u||!Array.isArray(u))return"";for(var F=0;F<u.length;F++){var J=u[F],w=La(J.time);if(!(w>=B)){var I=100*w/B+"%",L=J.title||J.text||J.time+"";if("undefined"!==typeof J.duration){var M="red";J.style&&"undefined"!==typeof J.style.background&&(M=J.style.background);var Q=La(J.duration);w+Q>B&&(Q=B-w);y+='<span class="zwp__chapter_dot zwp_bar" style="left: '+I+"; width: "+(100*Q/B+"%; border-radius: 3px; background-color: ")+M+';" title="'+L+'" data-time="'+J.time+'" data-desc="'+J.desc+
224
+ '">&nbsp;</span>'}else y+='<span class="zwp__chapter_dot" style="left: '+I+'" title="'+L+'" data-time="'+J.time+'" data-desc="'+J.desc+'">&nbsp;</span>'}}return y},Za=function(B){return B.replace(/[<>&"]/g,function(u){return{"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;"}[u]})},pb=function(B){if(!B||!Array.isArray(B)||0===B.length)return null;var u='<div class="zwp-button zwp-chapterButton"><button class="zwpbtn zwp-chapterBtn" data-action="showChapterListview" data-name="chapterbtn"><i class="xicon xicon-chapter"></i> \u7ae0\u8282</button><div class="zwp-chapterPanel zwp-popupwindow"><button class="closeBtn"><i class="xicon xicon-close"></i></button><div class="form-row form-title">\u7ae0\u8282\u5217\u8868</div><div class="zwp-list-inner"><ul class="zwp-chapterlist">';
225
+ for(var y=0,F=0;F<B.length;F++){var J=B[F],w=J.title||J.text||J.time+"";w=Za(w);a:{var I=J.time;if("string"===typeof I){if(0<=I.indexOf(":")){var L=I;break a}I=parseInt(I)}L=parseInt(I/3600);var M=parseInt(I%3600/60);I=parseInt(I%60);var Q="";0<L&&(Q+=L+":");0<=M?(10<M||0<L&&(Q+="0"),Q+=M+":"):Q+="0:";L=Q=10<=I?Q+I:Q+("0"+I)}M='<li class="chapter-item" data-time="'+J.time+'">';M+='<div class="item-title"><span class="item-time">'+L+"</span>";M+='<span class="title" title="'+w+'">'+w+"</span></div>";
226
+ J.desc&&(M+='<div class="item-content"><span class="desc">'+Za(J.desc)+"</span></div>");M+="</li>";u+=M;J=nb(w,'bold 16px "Microsoft YaHei", "Segoe UI","PingFang SC","Hiragino Sans GB","Helvetica Neue",Helvetica,Arial,sans-serif,-apple-system,BlinkMacSystemFont');J>y&&(y=J)}return{html:u+"</ul></div></div></div>",titleWidth:y}};K.insertSmile=function(B,u){B=$$(B).closest("div.zwp-smileview");if(0<B.length&&(B=B.get(0).inputbox))if(B.createTextRange&&(B.caretPos=document.selection.createRange().duplicate()),
227
+ document.all)B.createTextRange&&B.caretPos?(B=B.caretPos,B.text=" "==B.text.charAt(B.text.length-1)?u+" ":u):B.value=u;else if(B.setSelectionRange){var y=B.selectionEnd,F=B.value.substring(0,B.selectionStart);y=B.value.substring(y);B.value=F+u+y}else alert("This version of Mozilla based browser does not support setSelectionRange")};K.replaceSmileDanmu=function(B,u,y){if("string"!=typeof B)return"";0<=B.indexOf("<")&&(B=B.replace(/</g,"&lt;").replace(/>/g,"&gt;"));var F=B.indexOf("[sm-");if(0>F)return B;
228
+ var J=Da.path+"widgets/smiles/p",w="",I=B.substring(0,F);for(""!=I&&(w+=I);0<=F;){I=B.indexOf("]",F+4);if(0>I){I=B.substring(F);""!=I&&(w+=I);break}F=B.substring(F+4,I);""!=F&&(y.isFilterImage||(w+='<img style="opacity: 1;" src="'+J+F+'.png" height="'+u+'">'));F=B.indexOf("[sm-",I+1);0>F?(I=B.substring(I+1),""!=I&&(w+=I)):F>I+1&&(w+=B.substring(I+1,F))}return w};var Oa=function(B){hasClass(B,"switch_on")?removeClass(B,"switch_on"):addClass(B,"switch_on")},qb=function(B,u){var y=$$;B=y(u).closest("div.zwp-dmform").children(".zwp-barrage-set");
229
+ if(0!=B.length){if("1"!=B.attr("data-render")){var F=u.zwplayer,J=B.get(0);y.get(Da.path+"widgets/danmu_setting.html?v="+Da.v,{},function(L){var M=y(J);M.html(L);M.find("a.barrage-tab-link").click(function(Q){Q.preventDefault();Q=y(this).parent();Q.hasClass("selected")||(Q.addClass("selected").siblings().removeClass("selected"),Q=y(Q.attr("data-tab")),Q.hasClass("hidden")&&(Q.removeClass("hidden"),Q.siblings().addClass("hidden")))});L=y("#fsBox_tab");L.find("div.color-box").children("a").click(function(Q){Q.preventDefault();
230
+ Q=y(this);Q.hasClass("selected")||(Q.siblings().removeClass("selected"),Q.addClass("selected"),F&&(F.danmuSetting.color=Q.attr("data-color")))});L.find("div.other-box").children("a.checkbox-wrap").click(function(Q){Q.preventDefault();var Y=y(this);Y.toggleClass("selected");Q=Y.attr("data-content");Y=Y.hasClass("selected");F&&(F.danmuSetting[Q]=Y)});y("#bfBox_tab").find("a.zwp-barrage-icons").mousedown(function(Q){if(0==Q.button){this.isMousePressed=!0;var Y=y(this).position().left,ba=Q.clientX-Y,
231
+ Z=this,ha=function(W){W=W.clientX-ba;0>W?W=0:134<W&&(W=134);y(Z).css({left:W+"px"});var ka=y(Z).siblings("div.bar-t");0<ka.length&&ka.width(W+3);Z.valuePanel||(Z.valuePanel=y(Z).parent().siblings("div.set-rol-right").get(0));if("object"==typeof Z.valuePanel){ka=y(Z.valuePanel);var ia=ka.attr("data-barrage-content");"opacityValue"==ia?(W=parseInt(100*W/138),F&&(F.danmuSetting.opacityValue=W),ka.html(W+"%")):"forcedFontSizeValue"==ia?(W=50+parseInt(150*W/138),F&&(F.danmuSetting.forcedFontSizeValue=
232
+ W),ka.html(W+"%")):"speedValue"==ia?(W=(.5+parseFloat(W/69)).toFixed(1),F&&(F.danmuSetting.speedValue=W),ka.html(W+"x")):"densityValue"==ia&&(W=parseInt(100*W/46),F&&(F.danmuSetting.densityValue=W),ka.html(W+"\u6761"))}return!1},ma=function(W){y(document).unbind("mousemove",ha).unbind("mouseup",ma)};y(document).bind("mousemove",ha).bind("mouseup",ma)}return!1});y("#pbBox_tab").find("a.pb-link").click(function(Q){Q.preventDefault();var Y=y(this).parent();Y.toggleClass("selected");Q=y(this).attr("data-content");
233
+ Y=Y.hasClass("selected");F&&(F.danmuSetting[Q]=Y)});y("#barrage-set-bot").children("a").click(function(Q){Q.preventDefault();if("reset"==y(this).attr("data-content")){if(F)for(a in F.danmuSetting)delete F.danmuSetting[a];y("#fsBox_tab").find(".color-box a").removeClass("selected").eq(0).addClass("selected");y("#fsBox_tab").find(".other-box a").removeClass("selected");var Y={opacityTrigger:[128,124,"90%"],forcedFontSizeTrigger:[50,46,"100%"],speedTrigger:[39,35,"1.0x"],densityTrigger:[18,14,"30\u6761"]};
234
+ y("#bfBox_tab").find("a.zwp-barrage-icons").each(function(ba,Z){ba=y(Z).attr("data-barrage-content");if(Y[ba]){var ha=Y[ba];ba=ha[1];var ma=ha[0];ha=ha[2];Z=y(Z);Z.css({left:ba+"px"});Z.siblings(".bar-t").width(ma+"px");Z.parent().siblings(".set-rol-right").text(ha)}});y("#pbBox_tab").find("li.selected").removeClass("selected")}})},"html");B.attr("data-render","1")}if(B.hasClass("hidden")){J=B.get(0);var w=this,I=function(L){var M=y(J);if(L.target==w)w=null;else if(hasClass(L.target,"xicon-close")||
235
+ !M.is(L.target)&&0===M.has(L.target).length)M.addClass("hidden"),y(document).off("click",I),delete u.zwplayer};B.removeClass("hidden");y(document).on("click",I)}}},$a=function(B){K.ctrlInitId||(K.ctrlInitId=(new Date).getTime());var u=K.ctrlInitId++;return B+u},Ca=function(B,u){return'<div class="zwp_switch action-item" id="'+(B||$a("switch-"))+'" data-action="'+(u||"none")+'"><i class="switch_inner"></i></div>'},ab=function(B){var u=B.parentNode;u&&(u=u.querySelector(".zwp-slider-value"))&&(u.innerHTML=
236
+ B.value)},Ma=function(B,u){B=B||$a("zwp_slider-");return'<input type="range" id="'+B+'" name="slider'+B+'" data-action="'+u+'" class="zwp-slider" value="0" min="-100" max="100"/><span class="zwp-slider-value">0</span>'},rb=function(B){var u="";B.infoButton&&(u='<div class="zwp-button zwp-infoButton"><button class="zwpbtn zwp-infoBtn" data-action="showMediainfo" data-name="infobtn"><i class="xicon xicon-info"></i></button></div>');var y="",F="",J="",w="",I="",L="",M="",Q=B.defVolume||61.25;B.speedButton&&
237
+ !B.isLive&&(y="");B.optionButton&&(J='<div class="zwp-button zwp-optionButton"><button class="zwpbtn zwp-optionBtn" data-action="showConfigPanel" data-name="optionbtn" title="\u8bbe\u7f6e"><i class="xicon xicon-config"></i></button><div class="zwp-optionPanel"><div class="zwp-option-item"><label class="zwp-option-item-label">\u5de6\u53f3\u7ffb\u8f6c</label><div class="zwp-option-item-value">'+(Ca("","mirror")+'</div></div><div class="zwp-option-item"><label class="zwp-option-item-label">\u4e0a\u4e0b\u7ffb\u8f6c</label><div class="zwp-option-item-value">'+
238
238
  Ca("","flip")+'</div></div><div class="zwp-option-item"><label class="zwp-option-item-label">\u987a90\u5ea6\u7ffb\u8f6c</label><div class="zwp-option-item-value">'+Ca("","rotated90")+'</div></div><div class="zwp-option-item"><label class="zwp-option-item-label">\u900690\u5ea6\u7ffb\u8f6c</label><div class="zwp-option-item-value">'+Ca("","rotated270")+'</div></div><div class="zwp-option-h-separator"><hr/></div><div class="zwp-option-item"><label class="zwp-option-item-label">\u5faa\u73af\u64ad\u653e</label><div class="zwp-option-item-value">'+
239
- Ca("","loop")+'</div></div><div class="zwp-option-item zwp-lefticon"><span class="zwp-liteicon"><i class="xicon xicon-hue"></i></span> <button class="zwp-option-button action-item" data-action="showColorConfig">\u89c6\u9891\u8272\u5ea6\u8c03\u8282...</button></div></div></div>'));A.disableVolumeControl||(O='<div class="zwp-button zwp-volume-docker"><button class="zwpbtn zwp-muteBtn" data-action="mute" data-name="mutebtn"><i class="xicon xicon-speaker"></i></button><div class="zwp-volume-slider"><div class="zwp-volume-total"><div class="zwp-volume-current" style="bottom: 0px; height: '+
240
- P+'%;"></div><div class="zwp-volume-handle" style="bottom: '+P+'%; margin-bottom: -7px;"></div></div></div></div>');A.disableFullscreenWin||(w='<div class="zwp-button zwp-fullscrWinButton"><button class="zwpbtn zwp-fullscrWinBtn" data-action="enterfullscreenWin" data-name="fullscrWinbtn" title="\u7f51\u9875\u5168\u5c4f"><i class="xicon xicon-fullScreen-win"></i></button></div>');A.snapshotButton&&(H='<div class="zwp-button zwp-snapshotButton"><button class="zwpbtn zwp-snapshotBtn" data-action="snapshot" data-name="snapshotbtn" title="\u6293\u53d6\u56fe\u50cf"><i class="xicon xicon-camera"></i></button></div>');
241
- A.disablePicInPic||document.pictureInPictureEnabled&&(K='<div class="zwp-button zwp-picInPicButton"><button class="zwpbtn zwp-picInPicBtn" data-action="pictureInPicture" data-name="picInPicbtn" title="\u753b\u4e2d\u753b\u6a21\u5f0f"><i class="xicon xicon-pic-in-pic"></i></button></div>');A.isLive||(F='<div class="zwp__time-rail"></div>');A='<div class="zwp-button zwp-subtitleButton" style="display: none;"><button class="zwpbtn zwp-subtitleBtn" data-action="showSubtitleMenu" data-name="subtitlebtn" title="\u5916\u6302\u5b57\u5e55"><i class="xicon xicon-cc"></i></button><div class="zwp-subtitleMenu">'+
242
- Ya()+"</div></div>";P=["1920","1280","720","480"];for(var Z="",ba=0;ba<P.length;ba++)Z=3===ba?Z+('<li class="zwp-quality-item active">'+P[ba]+"</li>"):Z+('<li class="zwp-quality-item">'+P[ba]+"</li>");return'<div class="zwp-button zwp_playbtn"><button class="zwpbtn zwp-playbtn" data-action="play" data-name="playbtn"><i class="xicon xicon-play"></i></button></div><div class="zwp__time zwp__currenttime-container" role="timer" aria-live="on"><span class="zwp__currenttime">00:00</span></div><div class="zwp__time zwp__duration-container" style="display: none;"><span class="zwp__time_divider">/</span> <span class="zwp__duration">0:00:00</span></div><div class="zwp__time-info "></div>'+
243
- H+A+('<div class="zwp-button zwp-qualityButton" style="display: none;"><button class="zwpbtn zwp-qualityBtn" data-action="showQualityMenu" data-name="qualitybtn" title="\u6e05\u6670\u5ea6\u9009\u62e9"><i class="xicon xicon-hd"></i></button><ul class="zwp-qualityMenu">'+Z+"</ul></div>")+y+u+J+O+K+w+'<div class="zwp-button"><button class="zwpbtn zwp-fullscrBtn" data-action="enterfullscreen" data-name="fullscrbtn" title="'+qa("enterFullScreen","\u8fdb\u5165\u5168\u5c4f")+'"><i class="xicon xicon-fullScreen"></i></button></div>'+
244
- F};(function(A,u){"function"===typeof L.define&&L.define.amd?L.define([],u):"object"===typeof exports?module.exports=u():A.ZWPlayer=u()})(L,function(){function A(e){e=e.getBoundingClientRect();return{top:e.top+(L.pageYOffset||document.documentElement.scrollTop),left:e.left+(L.pageXOffset||document.documentElement.scrollLeft)}}function u(e){var n=e.offsetTop;for(e=e.offsetParent;null!==e;)n+=e.offsetTop,e=e.offsetParent;return n}var y=function(){return(new Date).getTime()};"undefined"!=typeof performance&&
245
- performance.now&&(y=function(){return performance.now()});var F=y(),J=function(e){var n="";e.startsWith("webrtc://")&&(n="/rtc/v1/play/");var m=e.indexOf("://");if(-1==m)return!1;var c="";if(0<=e.indexOf("?")){var l=e.indexOf("?");c=e.substr(l+1);e=e.substr(0,l)}var v=e.indexOf("/",m+3);l=e.substr(0,m);m=e.substring(m+3,v);var B=e.substring(v),M=B.lastIndexOf("/");v="";var b=m.indexOf(":");0<b&&(v=m.substring(b+1),m=m.substring(0,b));b=B.substring(1,M);B=B.substring(M+1);M=B.lastIndexOf(".");0<M&&
246
- (B=B.substring(0,M));M="";0<c.indexOf("vhost=")&&(M=c.substr(c.indexOf("vhost=")+6),0<M.indexOf("&")&&(M=M.substr(0,M.indexOf("&"))));m===M&&/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.test(m)&&(M="_default_vhost_");e={url:e,schema:l,server:m,port:v,vhost:M,app:b,stream:B};e.user_query={};if(0!==c.length){0<=c.indexOf("?")&&(c=c.split("?")[1]);c=c.split("&");for(v=0;v<c.length;v++)M=c[v].split("="),e[M[0]]=M[1],e.user_query[M[0]]=M[1];e.domain&&(e.vhost=e.domain)}if("webrtc"===l||"rtc"===l)l="",e.port||("https"===
247
- e.user_query.schema?(e.port=443,l=e.user_query.schema||"https"):0===L.location.href.indexOf("https://")?(e.port=443,l=e.user_query.schema||"https"):e.port=1985);m="rtmp://"+m+"/"+b+"/"+B;l=l?l+":":L.location.protocol;(v=e.port)||(v="https:"===l?v||443:v||1985);n=n||"/live/webrtc/play/";n.lastIndexOf("/")!==n.length-1&&(n+="/");c=l+"//"+e.server+":"+v+n;for(var Q in e.user_query)"api"!==Q&&"play"!==Q&&(c+="&"+Q+"="+e.user_query[Q]);c=c.replace(n+"&",n+"?");Q={apiUrl:c,streamUrl:m,schema:l,urlObject:e,
248
- port:v};Q.tid=Number(parseInt((new Date).getTime()*Math.random()*100)).toString(16).slice(0,7);return Q},w=function(e,n,m,c){let l=null;l=L.XMLHttpRequest?new L.XMLHttpRequest:new L.ActiveXObject("Microsoft.XMLHTTP");l.addEventListener("error",function(v){c&&c("REQUEST:"+v.type)});l.onreadystatechange=function(){if(4===l.readyState)if(200===l.status){var v=JSON.parse(l.responseText);m&&m(v)}else c&&c("STATUS:"+l.status+":"+l.statusText)};l.open("POST",e,!0);l.setRequestHeader("Content-Type","application/json");
249
- l.send(n);return l},H=function(e){var n=e.lastIndexOf("/"),m=e.indexOf("?");n=e.indexOf(".",n+1);var c="";0<n&&(0<m?n>m||(c=e.substring(n,m).toLowerCase()):c=e.substring(n).toLowerCase(),n=c.lastIndexOf("."),0<n&&(c=c.substring(n)));return c},K=void 0,O=void 0,P=void 0;"classList"in document.documentElement?(K=function(e,n){return void 0!==e.classList&&e.classList.contains(n)},O=function(e,n){return e.classList.add(n)},P=function(e,n){return e.classList.remove(n)}):(K=function(e,n){return(new RegExp("\\b"+
250
- n+"\\b")).test(e.className)},O=function(e,n){K(e,n)||(e.className+=" "+n)},P=function(e,n){e.className=e.className.replace(new RegExp("\\b"+n+"\\b","g"),"")});L.hasClass=K;L.addClass=O;L.removeClass=P;/MSIE 8\.0/.test(navigator.userAgent);var Z=function(e){e=parseInt(e);var n=parseInt(e/3600),m=parseInt(e%3600/60);e=parseInt(e%60);var c="";0<n&&(c+=n+":");c=10<=m?c+(m+":"):0<m?c+("0"+m+":"):c+"00:";return 10<=e?c+e:c+("0"+e)},ba=function(e){var n=!1,m=!1,c=this;c._config=e||{};c.peer_conn=null;c.danmuSetting=
251
- {};"undefined"===typeof c._config.controlbar&&(c._config.controlbar=!0);c._config.hideControlbarTimeout||(c._config.hideControlbarTimeout=1E4);"undefined"===typeof c._config.defVolume&&(c._config.defVolume=61.25);c.setRtcstream=function(d){this.videoEl&&(this.videoEl.srcObject=d,this.videoEl.play(),this.setplaystate(!0),this.startHideControlbar(this))};c.onfullscrchange=function(d){Na()?(this.isFullscr=!0,this.setupFullscrBtn&&this.setupFullscrBtn.setAttribute("title",qa("exitFullScreen","Exit full screen"))):
252
- (this.setupFullscrBtn&&(P(this.playerElm,"zwp-fullscreen"),this.setupFullscrBtn.setAttribute("data-action","enterfullscreen"),this.setupFullscrBtn.setAttribute("title",qa("enterFullScreen","Enter full screen"))),this.isFullscr=!1);this.isFullscrWin||this.reposDanmuToolbar(this.isFullscr);console.log("fullscrchange:"+d.type)}.bind(c);c.on_btnclick=function(d){if(d.currentTarget&&this.btnBindZwp){d=d.currentTarget;var h=d.getAttribute("data-action");"play"===h?this._config.disablePlayBtn||(this.isPlaying?
239
+ Ca("","loop")+'</div></div><div class="zwp-option-item zwp-lefticon"><span class="zwp-liteicon"><i class="xicon xicon-hue"></i></span> <button class="zwp-option-button action-item" data-action="showColorConfig">\u89c6\u9891\u8272\u5ea6\u8c03\u8282...</button></div></div></div>'));B.disableVolumeControl||(M='<div class="zwp-button zwp-volume-docker"><button class="zwpbtn zwp-muteBtn" data-action="mute" data-name="mutebtn"><i class="xicon xicon-speaker"></i></button><div class="zwp-volume-slider"><div class="zwp-volume-total"><div class="zwp-volume-current" style="bottom: 0px; height: '+
240
+ Q+'%;"></div><div class="zwp-volume-handle" style="bottom: '+Q+'%; margin-bottom: -7px;"></div></div></div></div>');B.disableFullscreenWin||(w='<div class="zwp-button zwp-fullscrWinButton"><button class="zwpbtn zwp-fullscrWinBtn" data-action="enterfullscreenWin" data-name="fullscrWinbtn" title="\u7f51\u9875\u5168\u5c4f"><i class="xicon xicon-fullScreen-win"></i></button></div>');B.snapshotButton&&(I='<div class="zwp-button zwp-snapshotButton"><button class="zwpbtn zwp-snapshotBtn" data-action="snapshot" data-name="snapshotbtn" title="\u6293\u53d6\u56fe\u50cf"><i class="xicon xicon-camera"></i></button></div>');
241
+ B.disablePicInPic||document.pictureInPictureEnabled&&(L='<div class="zwp-button zwp-picInPicButton"><button class="zwpbtn zwp-picInPicBtn" data-action="pictureInPicture" data-name="picInPicbtn" title="\u753b\u4e2d\u753b\u6a21\u5f0f"><i class="xicon xicon-pic-in-pic"></i></button></div>');B.isLive||(F='<div class="zwp__time-rail"></div>');B='<div class="zwp-button zwp-subtitleButton" style="display: none;"><button class="zwpbtn zwp-subtitleBtn" data-action="showSubtitleMenu" data-name="subtitlebtn" title="\u5916\u6302\u5b57\u5e55"><i class="xicon xicon-cc"></i></button><div class="zwp-subtitleMenu">'+
242
+ Ya()+"</div></div>";Q=["1920","1280","720","480"];for(var Y="",ba=0;ba<Q.length;ba++)Y=3===ba?Y+('<li class="zwp-quality-item active">'+Q[ba]+"</li>"):Y+('<li class="zwp-quality-item">'+Q[ba]+"</li>");return'<div class="zwp-button zwp_playbtn"><button class="zwpbtn zwp-playbtn" data-action="play" data-name="playbtn"><i class="xicon xicon-play"></i></button></div><div class="zwp__time zwp__currenttime-container" role="timer" aria-live="on"><span class="zwp__currenttime">00:00</span></div><div class="zwp__time zwp__duration-container" style="display: none;"><span class="zwp__time_divider">/</span> <span class="zwp__duration">0:00:00</span></div><div class="zwp__time-info "></div>'+
243
+ I+B+('<div class="zwp-button zwp-qualityButton" style="display: none;"><button class="zwpbtn zwp-qualityBtn" data-action="showQualityMenu" data-name="qualitybtn" title="\u6e05\u6670\u5ea6\u9009\u62e9"><i class="xicon xicon-hd"></i></button><ul class="zwp-qualityMenu">'+Y+"</ul></div>")+y+u+J+M+L+w+'<div class="zwp-button"><button class="zwpbtn zwp-fullscrBtn" data-action="enterfullscreen" data-name="fullscrbtn" title="'+pa("enterFullScreen","\u8fdb\u5165\u5168\u5c4f")+'"><i class="xicon xicon-fullScreen"></i></button></div>'+
244
+ F};(function(B,u){"function"===typeof K.define&&K.define.amd?K.define([],u):"object"===typeof exports?module.exports=u():B.ZWPlayer=u()})(K,function(){function B(e){e=e.getBoundingClientRect();return{top:e.top+(K.pageYOffset||document.documentElement.scrollTop),left:e.left+(K.pageXOffset||document.documentElement.scrollLeft)}}function u(e){var l=e.offsetTop;for(e=e.offsetParent;null!==e;)l+=e.offsetTop,e=e.offsetParent;return l}var y=function(){return(new Date).getTime()};"undefined"!=typeof performance&&
245
+ performance.now&&(y=function(){return performance.now()});var F=y(),J=function(e){var l="";e.startsWith("webrtc://")&&(l="/rtc/v1/play/");var m=e.indexOf("://");if(-1==m)return!1;var c="";if(0<=e.indexOf("?")){var v=e.indexOf("?");c=e.substr(v+1);e=e.substr(0,v)}var z=e.indexOf("/",m+3);v=e.substr(0,m);m=e.substring(m+3,z);var A=e.substring(z),b=A.lastIndexOf("/");z="";var O=m.indexOf(":");0<O&&(z=m.substring(O+1),m=m.substring(0,O));O=A.substring(1,b);A=A.substring(b+1);b=A.lastIndexOf(".");0<b&&
246
+ (A=A.substring(0,b));b="";0<c.indexOf("vhost=")&&(b=c.substr(c.indexOf("vhost=")+6),0<b.indexOf("&")&&(b=b.substr(0,b.indexOf("&"))));m===b&&/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.test(m)&&(b="_default_vhost_");e={url:e,schema:v,server:m,port:z,vhost:b,app:O,stream:A};e.user_query={};if(0!==c.length){0<=c.indexOf("?")&&(c=c.split("?")[1]);c=c.split("&");for(z=0;z<c.length;z++)b=c[z].split("="),e[b[0]]=b[1],e.user_query[b[0]]=b[1];e.domain&&(e.vhost=e.domain)}if("webrtc"===v||"rtc"===v)v="",e.port||("https"===
247
+ e.user_query.schema?(e.port=443,v=e.user_query.schema||"https"):0===K.location.href.indexOf("https://")?(e.port=443,v=e.user_query.schema||"https"):e.port=1985);m="rtmp://"+m+"/"+O+"/"+A;v=v?v+":":K.location.protocol;(z=e.port)||(z="https:"===v?z||443:z||1985);l=l||"/live/webrtc/play/";l.lastIndexOf("/")!==l.length-1&&(l+="/");c=v+"//"+e.server+":"+z+l;for(var x in e.user_query)"api"!==x&&"play"!==x&&(c+="&"+x+"="+e.user_query[x]);c=c.replace(l+"&",l+"?");x={apiUrl:c,streamUrl:m,schema:v,urlObject:e,
248
+ port:z};x.tid=Number(parseInt((new Date).getTime()*Math.random()*100)).toString(16).slice(0,7);return x},w=function(e,l,m,c){let v=null;v=K.XMLHttpRequest?new K.XMLHttpRequest:new K.ActiveXObject("Microsoft.XMLHTTP");v.addEventListener("error",function(z){c&&c("REQUEST:"+z.type)});v.onreadystatechange=function(){if(4===v.readyState)if(200===v.status){var z=JSON.parse(v.responseText);m&&m(z)}else c&&c("STATUS:"+v.status+":"+v.statusText)};v.open("POST",e,!0);v.setRequestHeader("Content-Type","application/json");
249
+ v.send(l);return v},I=function(e){var l=e.lastIndexOf("/"),m=e.indexOf("?");l=e.indexOf(".",l+1);var c="";0<l&&(0<m?l>m||(c=e.substring(l,m).toLowerCase()):c=e.substring(l).toLowerCase(),l=c.lastIndexOf("."),0<l&&(c=c.substring(l)));return c},L=void 0,M=void 0,Q=void 0;"classList"in document.documentElement?(L=function(e,l){return void 0!==e.classList&&e.classList.contains(l)},M=function(e,l){return e.classList.add(l)},Q=function(e,l){return e.classList.remove(l)}):(L=function(e,l){return(new RegExp("\\b"+
250
+ l+"\\b")).test(e.className)},M=function(e,l){L(e,l)||(e.className+=" "+l)},Q=function(e,l){e.className=e.className.replace(new RegExp("\\b"+l+"\\b","g"),"")});K.hasClass=L;K.addClass=M;K.removeClass=Q;/MSIE 8\.0/.test(navigator.userAgent);var Y=function(e){e=parseInt(e);var l=parseInt(e/3600),m=parseInt(e%3600/60);e=parseInt(e%60);var c="";0<l&&(c+=l+":");c=10<=m?c+(m+":"):0<m?c+("0"+m+":"):c+"00:";return 10<=e?c+e:c+("0"+e)},ba=function(e){var l=!1,m=!1,c=this;c._config=e||{};c.peer_conn=null;c.danmuSetting=
251
+ {};"undefined"===typeof c._config.controlbar&&(c._config.controlbar=!0);c._config.hideControlbarTimeout||(c._config.hideControlbarTimeout=1E4);"undefined"===typeof c._config.defVolume&&(c._config.defVolume=61.25);c.setRtcstream=function(d){this.videoEl&&(this.videoEl.srcObject=d,this.videoEl.play(),this.setplaystate(!0),this.startHideControlbar(this))};c.onfullscrchange=function(d){Na()?(this.isFullscr=!0,this.setupFullscrBtn&&this.setupFullscrBtn.setAttribute("title",pa("exitFullScreen","Exit full screen"))):
252
+ (this.setupFullscrBtn&&(Q(this.playerElm,"zwp-fullscreen"),this.setupFullscrBtn.setAttribute("data-action","enterfullscreen"),this.setupFullscrBtn.setAttribute("title",pa("enterFullScreen","Enter full screen"))),this.isFullscr=!1);this.isFullscrWin||this.reposDanmuToolbar(this.isFullscr);console.log("fullscrchange:"+d.type)}.bind(c);c.on_btnclick=function(d){if(d.currentTarget&&this.btnBindZwp){d=d.currentTarget;var h=d.getAttribute("data-action");"play"===h?this._config.disablePlayBtn||(this.isPlaying?
253
253
  this.videoEl&&(this.videoEl.paused||this.videoEl.ended)&&(this.videoEl.play(),this.setplaystate(!0)):this._config.url&&this.play(this._config.url)):"pause"===h?this._config.disablePlayBtn||!this.videoEl||this.videoEl.paused||this.videoEl.ended||(this.videoEl.pause(),this.setplaystate(!1)):"mute"===h?this.videoEl&&(this.videoEl.muted||this.setMuted(!0)):"unmute"===h?this.videoEl&&this.videoEl.muted&&this.setMuted(!1):"enterfullscreen"===h?this.setFullscreen(!0,d):"exitfullscreen"===h?this.setFullscreen(!1,
254
254
  d):"enterfullscreenWin"===h?this.setFullscreenWin(!0,d):"exitfullscreenWin"===h?this.setFullscreenWin(!1,d):"showMediainfo"===h?this.showMediainfo():"snapshot"===h?this.doSnapshot():"pictureInPicture"===h&&this.togglePictureInPicture()}}.bind(c);c.setFullscreen=function(d,h){if(d){if(!Na()&&this.playerElm){d=this.playerElm;var q=this.videoEl;d.requestFullscreen?d.requestFullscreen():d.webkitRequestFullscreen?d.webkitRequestFullScreen():d.mozRequestFullScreen?d.mozRequestFullScreen():d.msRequestFullscreen?
255
255
  d.msRequestFullscreen():d.oRequestFullscreen?d.oRequestFullscreen():q.webkitEnterFullScreen?q.webkitEnterFullScreen():(q=document.documentElement,q.requestFullscreen?q.requestFullscreen():q.mozRequestFullScreen?q.mozRequestFullScreen():q.webkitRequestFullScreen?q.webkitRequestFullScreen():(q=document.body,document.documentElement.style.cssText="width:100%;height:100%;overflow:hidden;",q.style.cssText="width:100%;height:100%;overflow:hidden;",d.style.cssText="width:100%;height:100%;overflow:hidden;;margin:0px;padding:0px;",
256
- document.IsFullScreen=!0));O(this.playerElm,"zwp-fullscreen");h.setAttribute("data-action","exitfullscreen");if(!this.setupFullscrBtn){d=this.onfullscrchange;q=this.videoEl;var C=document.webkitExitFullscreen||document.webkitCancelFullScreen?"webkitfullscreenchange":document.mozCancelFullScreen?"mozfullscreenchange":document.msExitFullscreen?"MSFullscreenChange":"webkitfullscreenchange";document.addEventListener("fullscreenchange",d,!1);C&&document.addEventListener(C,d,!1);q&&Va&&(q.addEventListener("webkitbeginfullscreen",
256
+ document.IsFullScreen=!0));M(this.playerElm,"zwp-fullscreen");h.setAttribute("data-action","exitfullscreen");if(!this.setupFullscrBtn){d=this.onfullscrchange;q=this.videoEl;var C=document.webkitExitFullscreen||document.webkitCancelFullScreen?"webkitfullscreenchange":document.mozCancelFullScreen?"mozfullscreenchange":document.msExitFullscreen?"MSFullscreenChange":"webkitfullscreenchange";document.addEventListener("fullscreenchange",d,!1);C&&document.addEventListener(C,d,!1);q&&Va&&(q.addEventListener("webkitbeginfullscreen",
257
257
  d),q.addEventListener("webkitendfullscreen",d));this.setupFullscrBtn=h}}}else Na()&&this.playerElm&&(d=this.playerElm,q=document.documentElement,q.exitFullscreen?q.exitFullscreen():q.mozCancelFullScreen?q.mozCancelFullScreen():q.webkitCancelFullScreen?q.webkitCancelFullScreen():document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():
258
- document.oRequestFullscreen?document.oCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():(q=document.body,document.documentElement.style.cssText="",q.style.cssText="",d.style.cssText="",document.IsFullScreen=!1),P(this.playerElm,"zwp-fullscreen"),h.setAttribute("data-action","enterfullscreen"))}.bind(c);c.setFullscreenWin=function(d,h){this.playerElm&&(d?this.isFullscrWin||(O(this.playerElm,"zwp-fullscreen-win"),h.setAttribute("data-action","exitfullscreenWin"),this.isFullscrWin=
259
- !0,this.reposDanmuToolbar(!0),(d=this.playerElm.parentNode)&&"BODY"!==d.tagName&&(this.oldWrapZIndex=d.style.zIndex,d.style.zIndex=99999999)):this.isFullscrWin&&("undefined"!==typeof this.oldWrapZIndex&&(d=this.playerElm.parentNode,d.style.zIndex=this.oldWrapZIndex,delete this.oldWrapZIndex),P(this.playerElm,"zwp-fullscreen-win"),h.setAttribute("data-action","enterfullscreenWin"),delete this.isFullscrWin,this.reposDanmuToolbar(!1)))}.bind(c);c.setMuted=function(d){this.videoEl&&(this.videoEl.muted=
260
- d)&&(this.oldVolume=this.videoEl.volume);d?(O(this.playerElm,"zwp-muted"),this.muteBtn&&this.muteBtn.setAttribute("data-action","unmute")):(this.oldVolume&&(this.videoEl.volume=this.oldVolume,delete this.oldVolume),P(this.playerElm,"zwp-muted"),this.muteBtn&&this.muteBtn.setAttribute("data-action","mute"));this.mutedTipBox&&(this.popup_layers.removeChild(this.mutedTipBox),delete this.mutedTipBox)}.bind(c);c.setVolume=function(d){this.videoEl&&(this.videoEl.volume=d)}.bind(c);c.startHideControlbar=
261
- function(d){d.controlbar&&!d._config.fixedControlbar&&(d.hideControlbarTime=(new Date).getTime()+d._config.hideControlbarTimeout,d.hideControlbarTimer||(d.hideControlbarTimer=L.setInterval(function(){(new Date).getTime()>=d.hideControlbarTime&&(L.clearInterval(d.hideControlbarTimer),delete d.hideControlbarTimer,Ga(d.controlbar,1E3,function(h){h.style.display="none";O(d.playerElm,"hide-cursor");d.isControlbarhidden=!0;"function"==typeof d._config.onhideControlbar&&d._config.onhideControlbar.call(d)}))},
262
- 1E3)))}.bind(c);c.buildProgressBar=function(){var d={};if(this.controlbar){var h=this.controlbar;d.rail=h.querySelector(".zwp__time-rail");d.timeInfo=h.querySelector(".zwp__time-info");if(this._config.isLive)d.rail&&(P(d.rail,"has-duration"),O(d.rail,"zwp-hidden")),this.progressBar&&this.progressBar.streamtype||(d.timeInfo&&(d.timeInfo.innerHTML='<div class="zwp-streamtype zwp-label">Live</div>',d.streamtype=h.querySelector(".zwp-streamtype")),this.progressBar=d);else if(d.timeInfo&&(this.progressBar&&
263
- this.progressBar.streamtype?this.progressBar.streamtype.innerHTML="VOD":(d.timeInfo.innerHTML='<div class="zwp-streamtype zwp-label">VOD</div>',d.streamtype=h.querySelector(".zwp-streamtype"))),d.rail||(h.insertAdjacentHTML("beforeend",'<div class="zwp__time-rail"></div>'),d.rail=h.querySelector(".zwp__time-rail")),P(d.rail,"zwp-hidden"),O(d.rail,"has-duration"),this._config.disableSeek&&O(d.rail,"zwp_disabled"),this.progressBar&&this.progressBar.total)this.progressBar.rail&&this._config.useProgressTooltip&&
264
- (h=this.progressBar.rail.querySelector(".zwp__time-float"))&&(q=h.querySelector(".zwp__time-thumbnail"),q||(h.insertAdjacentHTML("afterbegin",'<div class="zwp__time-thumbnail"></div>'),q=h.querySelector(".zwp__time-thumbnail"),this.progressBar.thumbnails=q),this._config.thumbnails?(U=this._config.thumbnails,q&&(U.rowsize="number"==typeof U.row?U.row:Math.ceil(Math.sqrt(U.total)),q.style.width=U.width+"px",q.style.height=U.height+"px",q.style.backgroundImage="url("+U.url+")"),h.style.width=4+U.width+
265
- "px",h.style.height=4+U.height+"px",O(h,"zwp__thumbnail")):(h.style.width=null,h.style.height=null,q&&(q.style.width="0px",q.style.height="0px",q.style.backgroundImage=null),P(h,"zwp__thumbnail")));else{var q='<span class="zwp__time-total zwp__time-slider"><span class="zwp__bar zwp__time-buffering"></span><span class="zwp__bar zwp__time-loaded"></span><span class="zwp__bar zwp__time-current"></span><span class="zwp__time-chapter"></span><span class="zwp__time-hovered no-hover"></span><span class="zwp__time-thumb"><span class="zwp__time-thumb-content"></span></span>';
266
- if(this._config.useProgressTooltip){var C="",G="",N="";if("object"===typeof this._config.thumbnails&&null!=this._config.thumbnails){var U=this._config.thumbnails;"number"==typeof U.width&&"number"==typeof U.height&&"number"==typeof U.total&&(U.rowsize="number"==typeof U.row?U.row:Math.ceil(Math.sqrt(U.total)),N=' style="width: '+(4+U.width)+"px; height: "+(4+U.height)+'px;"',G=" zwp__thumbnail",C='<div class="zwp__time-thumbnail" style="width: '+U.width+"px;height: "+U.height+"px; background-image: url("+
267
- U.url+');"></div>')}q+='<div class="zwp__time-float'+G+'"'+N+">"+C+'<span class="zwp__time-float-current">0:00</span><span class="zwp__time-float-corner corner_external"></span><span class="zwp__time-float-corner corner_internal"></span></div>'}d.rail.innerHTML=q+"</span>";d.buffering=h.querySelector(".zwp__time-buffering");d.total=h.querySelector(".zwp__time-total");d.loaded=h.querySelector(".zwp__time-loaded");d.current=h.querySelector(".zwp__time-current");d.thumb=h.querySelector(".zwp__time-thumb");
268
- d.timefloat=h.querySelector(".zwp__time-float");d.timefloatcurrent=h.querySelector(".zwp__time-float-current");d.thumbnails=h.querySelector(".zwp__time-thumbnail");d.slider=h.querySelector(".zwp__time-slider");d.hovered=h.querySelector(".zwp__time-hovered");d.chapters=h.querySelector(".zwp__time-chapter");d.newTime=0;d.forcedHandlePause=!1;d.buffering.style.display="none";d.slider.addEventListener("dragstart",function(){return!1});this.progressBar=d;this.showTimefloat=function(T){if(this._config.useProgressTooltip){var V=
269
- T.originalEvent&&T.originalEvent.changedTouches?T.originalEvent.changedTouches[0].pageX:T.changedTouches?T.changedTouches[0].pageX:T.pageX;T=this.progressBar;var W=this.videoEl.duration;var g=A(T.total);var t=T.total.offsetWidth;V<g.left?V=g.left:V>t+g.left&&(V=t+g.left);V-=g.left;g=V/t;T=this.progressBar;T.timefloatcurrent.innerHTML=Z(W*g);T.thumbnails&&this._config.thumbnails?(W=this._config.thumbnails,g=Math.floor(g*W.total),g>=W.total&&(g=W.total-1),0!=W.rowsize&&(T.thumbnails.style.backgroundPosition=
270
- "-"+g%W.rowsize*W.width+"px -"+W.height*Math.floor(g/W.rowsize)+"px")):(W=7*T.timefloatcurrent.innerHTML.length+10,40>W&&(W=40),T.timefloat.style.width=W+"px");W=T.timefloat.offsetWidth/2;T.timefloat.style.left=(V<W?W:V>t-W?t-W:V)+"px";T.timefloat.style.display="block"}}.bind(this);d.slider.addEventListener("mouseenter",function(T){var V=this;if(V.videoEl){var W=V.videoEl.duration;isNaN(W)||Infinity===W||T.target!==d.slider||(d.bindMouseMoveEvent||(d.slider.addEventListener("mousemove",function(g){var t=
271
- g.target;(t===d.slider||t.closest(".zwp__time-slider"))&&V.showTimefloat(g)}),d.bindMouseMoveEvent=!0),d.timefloat&&(d.timefloat.style.display="block"))}}.bind(this));d.slider.addEventListener("mouseleave",function(){if(this.videoEl){var T=this.videoEl.duration;isNaN(T)||Infinity===T||n||!d.timefloat||(d.timefloat.style.display="none")}}.bind(this));var S=function(T,V){var W=this,g=d.slider.offsetWidth,t=A(d.slider);t=T.pageX-t.left;0>t?t=0:t>g&&(t=g);g=(100*t/g).toFixed(4);d.thumb.style.left=g+"%";
272
- V?(W.seekTimeProgress(g),W.lastSeekProgress=g):"undefined"!=typeof W.lastSeekProgress&&1<Math.abs(g-W.lastSeekProgress)&&(W.lastSeekProgress=g,W.seekTimer||(W.seekTimer=setTimeout(function(){W.seekTimeProgress(W.lastSeekProgress);delete W.seekTimer},1E3)));T.preventDefault();T.stopPropagation()}.bind(this);this.on_progressbar_mousemove=function(T){var V=T.target,W;if(W=n)a:if(W=d.slider,V===W)W=!0;else{for(;V.parentNode;){if(V.parentNode===W){W=!0;break a}V=V.parentNode}W=!1}W&&S(T)}.bind(this);this.on_progressbar_mouseup=
273
- function(T){if(n){document.removeEventListener("mousemove",this.on_progressbar_mousemove);document.removeEventListener("mouseup",this.on_progressbar_mouseup);n=!1;delete this.isTrackingProgress;this.seekTimer&&(clearTimeout(this.seekTimer),delete this.seekTimer);if(T.target&&(T.target.parentNode==d.thumb||T.target==d.thumb)){var V=d.slider.offsetWidth,W=A(d.slider);T=T.pageX-W.left;0>T?T=0:T>V&&(T=V);V=(100*T/V).toFixed(4);"undefined"!=typeof this.lastSeekProgress?1<Math.abs(V-this.lastSeekProgress)&&
274
- this.seekTimeProgress(V):this.seekTimeProgress(V)}delete this.lastSeekProgress}}.bind(this);this.on_progressbar_mousedown=function(T){n||this._config.disableSeek||(c.isTrackingProgress=!0,S(T,!0),document.addEventListener("mousemove",this.on_progressbar_mousemove),document.addEventListener("mouseup",this.on_progressbar_mouseup),n=!0,T.preventDefault(),T.stopPropagation())}.bind(this);d.slider.addEventListener("mousedown",this.on_progressbar_mousedown)}}}.bind(c);c.updateProgressBarType=function(){if(this.controlbar){var d=
275
- this.controlbar.querySelector(".zwp__time-rail");this._config.isLive?(d&&(P(d,"has-duration"),O(d,"zwp-hidden")),this.progressBar&&this.progressBar.streamtype&&(this.progressBar.streamtype.innerHTML="Live",this.progressBar.streamtype.style.display="block")):(d&&(P(d,"zwp-hidden"),O(d,"has-duration"),this._config.disableSeek&&O(d,"zwp_disabled")),this.progressBar&&this.progressBar.streamtype&&(this.progressBar.streamtype.innerHTML="VOD",this.progressBar.streamtype.style.display="block"))}}.bind(c);
276
- c.updateDuration=function(d){if(d.controlbar){var h=d.controlbar.querySelector(".zwp__duration-container"),q=d.videoEl.duration;if(isNaN(q)||Infinity===q)h.style.display="none",d._config.isLive=!0;else{h.style.display="block";h=h.querySelector(".zwp__duration");var C=parseInt(q/3600),G=parseInt(q%3600/60);q=parseInt(q%60);var N="";0<C&&(N+=C+":");N=10<=G?N+(G+":"):0<G?N+("0"+G+":"):N+"00:";h.innerHTML=10<=q?N+q:N+("0"+q);d.chapters&&setTimeout(function(){this.loadChapters()}.bind(d),1E3)}d.updateProgressBarType();
258
+ document.oRequestFullscreen?document.oCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():(q=document.body,document.documentElement.style.cssText="",q.style.cssText="",d.style.cssText="",document.IsFullScreen=!1),Q(this.playerElm,"zwp-fullscreen"),h.setAttribute("data-action","enterfullscreen"))}.bind(c);c.setFullscreenWin=function(d,h){this.playerElm&&(d?this.isFullscrWin||(M(this.playerElm,"zwp-fullscreen-win"),h.setAttribute("data-action","exitfullscreenWin"),this.isFullscrWin=
259
+ !0,this.reposDanmuToolbar(!0),(d=this.playerElm.parentNode)&&"BODY"!==d.tagName&&(this.oldWrapZIndex=d.style.zIndex,d.style.zIndex=99999999)):this.isFullscrWin&&("undefined"!==typeof this.oldWrapZIndex&&(d=this.playerElm.parentNode,d.style.zIndex=this.oldWrapZIndex,delete this.oldWrapZIndex),Q(this.playerElm,"zwp-fullscreen-win"),h.setAttribute("data-action","enterfullscreenWin"),delete this.isFullscrWin,this.reposDanmuToolbar(!1)))}.bind(c);c.setMuted=function(d){this.videoEl&&(this.videoEl.muted=
260
+ d)&&(this.oldVolume=this.videoEl.volume);d?(M(this.playerElm,"zwp-muted"),this.muteBtn&&this.muteBtn.setAttribute("data-action","unmute")):(this.oldVolume&&(this.videoEl.volume=this.oldVolume,delete this.oldVolume),Q(this.playerElm,"zwp-muted"),this.muteBtn&&this.muteBtn.setAttribute("data-action","mute"));this.mutedTipBox&&(this.popup_layers.removeChild(this.mutedTipBox),this.popup_layers.style.display=null,delete this.mutedTipBox)}.bind(c);c.setVolume=function(d){this.videoEl&&(this.videoEl.volume=
261
+ d)}.bind(c);c.startHideControlbar=function(d){d.controlbar&&!d._config.fixedControlbar&&(d.hideControlbarTime=(new Date).getTime()+d._config.hideControlbarTimeout,d.hideControlbarTimer||(d.hideControlbarTimer=K.setInterval(function(){(new Date).getTime()>=d.hideControlbarTime&&(K.clearInterval(d.hideControlbarTimer),delete d.hideControlbarTimer,Ga(d.controlbar,1E3,function(h){h.style.display="none";M(d.playerElm,"hide-cursor");d.isControlbarhidden=!0;"function"==typeof d._config.onhideControlbar&&
262
+ d._config.onhideControlbar.call(d)}))},1E3)))}.bind(c);c.buildProgressBar=function(){var d={};if(this.controlbar){var h=this.controlbar;d.rail=h.querySelector(".zwp__time-rail");d.timeInfo=h.querySelector(".zwp__time-info");if(this._config.isLive)d.rail&&(Q(d.rail,"has-duration"),M(d.rail,"zwp-hidden")),this.progressBar&&this.progressBar.streamtype||(d.timeInfo&&(d.timeInfo.innerHTML='<div class="zwp-streamtype zwp-label">Live</div>',d.streamtype=h.querySelector(".zwp-streamtype")),this.progressBar=
263
+ d);else if(d.timeInfo&&(this.progressBar&&this.progressBar.streamtype?this.progressBar.streamtype.innerHTML="VOD":(d.timeInfo.innerHTML='<div class="zwp-streamtype zwp-label">VOD</div>',d.streamtype=h.querySelector(".zwp-streamtype"))),d.rail||(h.insertAdjacentHTML("beforeend",'<div class="zwp__time-rail"></div>'),d.rail=h.querySelector(".zwp__time-rail")),Q(d.rail,"zwp-hidden"),M(d.rail,"has-duration"),this._config.disableSeek&&M(d.rail,"zwp_disabled"),this.progressBar&&this.progressBar.total)this.progressBar.rail&&
264
+ this._config.useProgressTooltip&&(h=this.progressBar.rail.querySelector(".zwp__time-float"))&&(q=h.querySelector(".zwp__time-thumbnail"),q||(h.insertAdjacentHTML("afterbegin",'<div class="zwp__time-thumbnail"></div>'),q=h.querySelector(".zwp__time-thumbnail"),this.progressBar.thumbnails=q),this._config.thumbnails?(N=this._config.thumbnails,q&&(N.rowsize="number"==typeof N.row?N.row:Math.ceil(Math.sqrt(N.total)),q.style.width=N.width+"px",q.style.height=N.height+"px",q.style.backgroundImage="url("+
265
+ N.url+")"),h.style.width=4+N.width+"px",h.style.height=4+N.height+"px",M(h,"zwp__thumbnail")):(h.style.width=null,h.style.height=null,q&&(q.style.width="0px",q.style.height="0px",q.style.backgroundImage=null),Q(h,"zwp__thumbnail")));else{var q='<span class="zwp__time-total zwp__time-slider"><span class="zwp__bar zwp__time-buffering"></span><span class="zwp__bar zwp__time-loaded"></span><span class="zwp__bar zwp__time-current"></span><span class="zwp__time-chapter"></span><span class="zwp__time-hovered no-hover"></span><span class="zwp__time-thumb"><span class="zwp__time-thumb-content"></span></span>';
266
+ if(this._config.useProgressTooltip){var C="",H="",P="";if("object"===typeof this._config.thumbnails&&null!=this._config.thumbnails){var N=this._config.thumbnails;"number"==typeof N.width&&"number"==typeof N.height&&"number"==typeof N.total&&(N.rowsize="number"==typeof N.row?N.row:Math.ceil(Math.sqrt(N.total)),P=' style="width: '+(4+N.width)+"px; height: "+(4+N.height)+'px;"',H=" zwp__thumbnail",C='<div class="zwp__time-thumbnail" style="width: '+N.width+"px;height: "+N.height+"px; background-image: url("+
267
+ N.url+');"></div>')}q+='<div class="zwp__time-float'+H+'"'+P+">"+C+'<span class="zwp__time-float-current">0:00</span><span class="zwp__time-float-corner corner_external"></span><span class="zwp__time-float-corner corner_internal"></span></div>'}d.rail.innerHTML=q+"</span>";d.buffering=h.querySelector(".zwp__time-buffering");d.total=h.querySelector(".zwp__time-total");d.loaded=h.querySelector(".zwp__time-loaded");d.current=h.querySelector(".zwp__time-current");d.thumb=h.querySelector(".zwp__time-thumb");
268
+ d.timefloat=h.querySelector(".zwp__time-float");d.timefloatcurrent=h.querySelector(".zwp__time-float-current");d.thumbnails=h.querySelector(".zwp__time-thumbnail");d.slider=h.querySelector(".zwp__time-slider");d.hovered=h.querySelector(".zwp__time-hovered");d.chapters=h.querySelector(".zwp__time-chapter");d.newTime=0;d.forcedHandlePause=!1;d.buffering.style.display="none";d.slider.addEventListener("dragstart",function(){return!1});this.progressBar=d;this.showTimefloat=function(S){if(this._config.useProgressTooltip){var U=
269
+ S.originalEvent&&S.originalEvent.changedTouches?S.originalEvent.changedTouches[0].pageX:S.changedTouches?S.changedTouches[0].pageX:S.pageX;S=this.progressBar;var g=this.videoEl.duration;var r=B(S.total);var t=S.total.offsetWidth;U<r.left?U=r.left:U>t+r.left&&(U=t+r.left);U-=r.left;r=U/t;S=this.progressBar;S.timefloatcurrent.innerHTML=Y(g*r);S.thumbnails&&this._config.thumbnails?(g=this._config.thumbnails,r=Math.floor(r*g.total),r>=g.total&&(r=g.total-1),0!=g.rowsize&&(S.thumbnails.style.backgroundPosition=
270
+ "-"+r%g.rowsize*g.width+"px -"+g.height*Math.floor(r/g.rowsize)+"px")):(g=7*S.timefloatcurrent.innerHTML.length+10,40>g&&(g=40),S.timefloat.style.width=g+"px");g=S.timefloat.offsetWidth/2;S.timefloat.style.left=(U<g?g:U>t-g?t-g:U)+"px";S.timefloat.style.display="block"}}.bind(this);d.slider.addEventListener("mouseenter",function(S){var U=this;if(U.videoEl){var g=U.videoEl.duration;isNaN(g)||Infinity===g||S.target!==d.slider||(d.bindMouseMoveEvent||(d.slider.addEventListener("mousemove",function(r){var t=
271
+ r.target;(t===d.slider||t.closest(".zwp__time-slider"))&&U.showTimefloat(r)}),d.bindMouseMoveEvent=!0),d.timefloat&&(d.timefloat.style.display="block"))}}.bind(this));d.slider.addEventListener("mouseleave",function(){if(this.videoEl){var S=this.videoEl.duration;isNaN(S)||Infinity===S||l||!d.timefloat||(d.timefloat.style.display="none")}}.bind(this));var V=function(S,U){var g=this,r=d.slider.offsetWidth,t=B(d.slider);t=S.pageX-t.left;0>t?t=0:t>r&&(t=r);r=(100*t/r).toFixed(4);d.thumb.style.left=r+"%";
272
+ U?(g.seekTimeProgress(r),g.lastSeekProgress=r):"undefined"!=typeof g.lastSeekProgress&&1<Math.abs(r-g.lastSeekProgress)&&(g.lastSeekProgress=r,g.seekTimer||(g.seekTimer=setTimeout(function(){g.seekTimeProgress(g.lastSeekProgress);delete g.seekTimer},1E3)));S.preventDefault();S.stopPropagation()}.bind(this);this.on_progressbar_mousemove=function(S){var U=S.target,g;if(g=l)a:if(g=d.slider,U===g)g=!0;else{for(;U.parentNode;){if(U.parentNode===g){g=!0;break a}U=U.parentNode}g=!1}g&&V(S)}.bind(this);this.on_progressbar_mouseup=
273
+ function(S){if(l){document.removeEventListener("mousemove",this.on_progressbar_mousemove);document.removeEventListener("mouseup",this.on_progressbar_mouseup);l=!1;delete this.isTrackingProgress;this.seekTimer&&(clearTimeout(this.seekTimer),delete this.seekTimer);if(S.target&&(S.target.parentNode==d.thumb||S.target==d.thumb)){var U=d.slider.offsetWidth,g=B(d.slider);S=S.pageX-g.left;0>S?S=0:S>U&&(S=U);U=(100*S/U).toFixed(4);"undefined"!=typeof this.lastSeekProgress?1<Math.abs(U-this.lastSeekProgress)&&
274
+ this.seekTimeProgress(U):this.seekTimeProgress(U)}delete this.lastSeekProgress}}.bind(this);this.on_progressbar_mousedown=function(S){l||this._config.disableSeek||(c.isTrackingProgress=!0,V(S,!0),document.addEventListener("mousemove",this.on_progressbar_mousemove),document.addEventListener("mouseup",this.on_progressbar_mouseup),l=!0,S.preventDefault(),S.stopPropagation())}.bind(this);d.slider.addEventListener("mousedown",this.on_progressbar_mousedown)}}}.bind(c);c.updateProgressBarType=function(){if(this.controlbar){var d=
275
+ this.controlbar.querySelector(".zwp__time-rail");this._config.isLive?(d&&(Q(d,"has-duration"),M(d,"zwp-hidden")),this.progressBar&&this.progressBar.streamtype&&(this.progressBar.streamtype.innerHTML="Live",this.progressBar.streamtype.style.display="block")):(d&&(Q(d,"zwp-hidden"),M(d,"has-duration"),this._config.disableSeek&&M(d,"zwp_disabled")),this.progressBar&&this.progressBar.streamtype&&(this.progressBar.streamtype.innerHTML="VOD",this.progressBar.streamtype.style.display="block"))}}.bind(c);
276
+ c.updateDuration=function(d){if(d.controlbar){var h=d.controlbar.querySelector(".zwp__duration-container"),q=d.videoEl.duration;if(isNaN(q)||Infinity===q)h.style.display="none",d._config.isLive=!0;else{h.style.display="block";h=h.querySelector(".zwp__duration");var C=parseInt(q/3600),H=parseInt(q%3600/60);q=parseInt(q%60);var P="";0<C&&(P+=C+":");P=10<=H?P+(H+":"):0<H?P+("0"+H+":"):P+"00:";h.innerHTML=10<=q?P+q:P+("0"+q);d.chapters&&setTimeout(function(){this.loadChapters()}.bind(d),1E3)}d.updateProgressBarType();
277
277
  d.syncUI()}}.bind(c);c.setProgressRail=function(d){var h=void 0!==d?d.target||d.detail.target:this.videoEl,q=null;h&&h.buffered&&0<h.buffered.length&&h.buffered.end&&this.videoEl.duration?q=h.buffered.end(h.buffered.length-1)/this.videoEl.duration:h&&void 0!==h.bytesTotal&&0<h.bytesTotal&&void 0!==h.bufferedBytes?q=h.bufferedBytes/h.bytesTotal:d&&d.lengthComputable&&0!==d.total&&(q=d.loaded/d.total);null!==q&&(q=Math.min(1,Math.max(0,q)),this.progressBar&&this.progressBar.loaded&&(this.progressBar.loaded.style.width=
278
278
  100*q+"%"))}.bind(c);c.updateProgress=function(d){if(!this.isTrackingProgress&&this.progressBar&&this.progressBar.thumb){var h=this.videoEl.duration;!isNaN(h)&&Infinity!==h&&0<h&&(d+.3>=h&&(d=h),d=d/h*100,this.progressBar.thumb.style.left=d+"%",this.progressBar.current&&(this.progressBar.current.style.width=d/100*100+"%"))}}.bind(c);c.seekTimeProgress=function(d){if(this.videoEl){var h=this.videoEl.duration;isNaN(h)||Infinity===h||(this.videoEl.currentTime=h*d/100,this.progressBar.current&&(this.progressBar.current.style.width=
279
- d+"%"))}}.bind(c);c.seekTimeProgressByTime=function(d){if(this.videoEl){var h=this.videoEl.duration;isNaN(h)||Infinity===h||(this.videoEl.currentTime=d,this.progressBar.current&&(this.progressBar.current.style.width=d/h*100+"%"))}}.bind(c);c.on_speedItemclick=function(d){d.stopPropagation();d=d.currentTarget;if(!K(d,"active")){var h=parseFloat(d.innerText),q=d.parentNode.querySelector(".active");q&&P(q,"active");O(d,"active");this.videoEl&&(this.videoEl.playbackRate=h);if(q=this.controlbar.querySelector(".zwp-speedBtn"))q.innerHTML=
280
- 1==h?qa("speed","Speed"):d.innerText}var C=d.parentNode;C.style.display="none";setTimeout(function(){C.style.display=null},1E3)}.bind(c);c.resetSpeedMenu=function(){if(this.controlbar){var d=this.controlbar.querySelector(".zwp-speed-item.active");if(d&&"1.0x"!==d.innerText){var h=this.controlbar.querySelector(".zwp-speedBtn");h&&(h.innerHTML=qa("speed","Speed"));P(d,"active");d=d.parentNode.querySelectorAll("li.zwp-speed-item");if(0<d.length)for(h=0;h<d.length;h++)if("1.0x"===d[h].innerText){O(d[h],
281
- "active");break}}}}.bind(c);c.syncUI=function(){if(this._config.isLive){var d=this.controlbar.querySelector(".zwp-speedButton");d&&this.controlbar.removeChild(d);P(this.controlbar,"zwp-vodplayer")}else{if(this._config.speedButton&&(d=this.controlbar.querySelector(".zwp-speedButton"),!d)){var h=this.controlbar.querySelector(".zwp-infoButton")||this.controlbar.querySelector(".zwp-optionButton")||this.controlbar.querySelector(".zwp-volume-docker");if(h){var q=kb();d=document.createElement("div");this.controlbar.insertBefore(d,
282
- h);d.outerHTML=q;d=this.controlbar.querySelectorAll(".zwp-speedMenu>li.zwp-speed-item");0<d.length&&d.forEach(function(C){C.addEventListener("click",c.on_speedItemclick)})}}O(this.controlbar,"zwp-vodplayer")}}.bind(c);c.onKeydown=function(d){if(d)if(27===d.keyCode)if(this.contextMenu)this.hideContextMenu(),d.stopPropagation(),d.preventDefault();else{if(this.isFullscrWin&&this.controlbar){var h=this.controlbar.querySelector(".zwp-fullscrWinBtn");h&&(this.setFullscreenWin(!1,h),d.stopPropagation(),
283
- d.preventDefault())}}else 13!==d.keyCode&&(38===d.keyCode?(d.preventDefault(),this.videoEl&&(d=this.videoEl.volume,d+=.05,1<d&&(d=1),this.setVolume(d),this.setMuted(!1),h=parseInt(100*d)+"%",h={icon:"speaker",text:h},this.toast(h,1200,!1),this.positionVolumeThumb&&this.positionVolumeThumb(d))):40===d.keyCode?(d.preventDefault(),this.videoEl&&(d=this.videoEl.volume,d-=.05,0>d&&(d=0),this.setVolume(d),this.setMuted(0===d),h=parseInt(100*d)+"%",0===d&&(h=qa("muted","Muted")),h={icon:"speaker",text:h},
284
- this.toast(h,1200,!1),this.positionVolumeThumb&&this.positionVolumeThumb(d))):32===d.keyCode?(d.preventDefault(),this._config.isLive||this._config.disablePlayBtn||!this.videoEl||(this.videoEl.paused||this.videoEl.ended?(this.videoEl.play(),this.setplaystate(!0)):(this.videoEl.pause(),this.setplaystate(!1)))):77!==d.keyCode&&109!==d.keyCode||!this.videoEl||(this.videoEl.muted?(this.toast(qa("unmuted","Unmuted"),1E3,!1,!0),this.setMuted(!1)):(this.toast(qa("muted","Muted"),1E3,!1,!0),this.setMuted(!0))))}.bind(c);
279
+ d+"%"))}}.bind(c);c.seekTimeProgressByTime=function(d){if(this.videoEl){var h=this.videoEl.duration;isNaN(h)||Infinity===h||(this.videoEl.currentTime=d,this.progressBar.current&&(this.progressBar.current.style.width=d/h*100+"%"))}}.bind(c);c.on_speedItemclick=function(d){d.stopPropagation();d=d.currentTarget;if(!L(d,"active")){var h=parseFloat(d.innerText),q=d.parentNode.querySelector(".active");q&&Q(q,"active");M(d,"active");this.videoEl&&(this.videoEl.playbackRate=h);if(q=this.controlbar.querySelector(".zwp-speedBtn"))q.innerHTML=
280
+ 1==h?pa("speed","Speed"):d.innerText}var C=d.parentNode;C.style.display="none";setTimeout(function(){C.style.display=null},1E3)}.bind(c);c.resetSpeedMenu=function(){if(this.controlbar){var d=this.controlbar.querySelector(".zwp-speed-item.active");if(d&&"1.0x"!==d.innerText){var h=this.controlbar.querySelector(".zwp-speedBtn");h&&(h.innerHTML=pa("speed","Speed"));Q(d,"active");d=d.parentNode.querySelectorAll("li.zwp-speed-item");if(0<d.length)for(h=0;h<d.length;h++)if("1.0x"===d[h].innerText){M(d[h],
281
+ "active");break}}}}.bind(c);c.syncUI=function(){if(this._config.isLive){var d=this.controlbar.querySelector(".zwp-speedButton");d&&this.controlbar.removeChild(d);Q(this.controlbar,"zwp-vodplayer")}else{if(this._config.speedButton&&(d=this.controlbar.querySelector(".zwp-speedButton"),!d)){var h=this.controlbar.querySelector(".zwp-infoButton")||this.controlbar.querySelector(".zwp-optionButton")||this.controlbar.querySelector(".zwp-volume-docker");if(h){var q=kb();d=document.createElement("div");this.controlbar.insertBefore(d,
282
+ h);d.outerHTML=q;d=this.controlbar.querySelectorAll(".zwp-speedMenu>li.zwp-speed-item");0<d.length&&d.forEach(function(C){C.addEventListener("click",c.on_speedItemclick)})}}M(this.controlbar,"zwp-vodplayer")}}.bind(c);c.onKeydown=function(d){if(d)if(27===d.keyCode)if(this.contextMenu)this.hideContextMenu(),d.stopPropagation(),d.preventDefault();else{if(this.isFullscrWin&&this.controlbar){var h=this.controlbar.querySelector(".zwp-fullscrWinBtn");h&&(this.setFullscreenWin(!1,h),d.stopPropagation(),
283
+ d.preventDefault())}}else 13!==d.keyCode&&(38===d.keyCode?(d.preventDefault(),this.videoEl&&(d=this.videoEl.volume,d+=.05,1<d&&(d=1),this.setVolume(d),this.setMuted(!1),h=parseInt(100*d)+"%",h={icon:"speaker",text:h},this.toast(h,1200,!1),this.positionVolumeThumb&&this.positionVolumeThumb(d))):40===d.keyCode?(d.preventDefault(),this.videoEl&&(d=this.videoEl.volume,d-=.05,0>d&&(d=0),this.setVolume(d),this.setMuted(0===d),h=parseInt(100*d)+"%",0===d&&(h=pa("muted","Muted")),h={icon:"speaker",text:h},
284
+ this.toast(h,1200,!1),this.positionVolumeThumb&&this.positionVolumeThumb(d))):32===d.keyCode?(d.preventDefault(),this._config.isLive||this._config.disablePlayBtn||!this.videoEl||(this.videoEl.paused||this.videoEl.ended?(this.videoEl.play(),this.setplaystate(!0)):(this.videoEl.pause(),this.setplaystate(!1)))):77!==d.keyCode&&109!==d.keyCode||!this.videoEl||(this.videoEl.muted?(this.toast(pa("unmuted","Unmuted"),1E3,!1,!0),this.setMuted(!1)):(this.toast(pa("muted","Muted"),1E3,!1,!0),this.setMuted(!0))))}.bind(c);
285
285
  c.on_colorSliderChange=function(d){var h=d.currentTarget;d=h.getAttribute("data-action");this.colors||(this.colors={brightness:0,contrast:0,saturation:0,hue:0});ab(h);if("undefined"!==typeof this.colors[d]&&(h=parseInt(h.value),"hue"===d?this.colors.hue=parseInt(180*h/100):this.colors[d]=h,this.videoEl)){d=null;h=this.colors;h.brightness&&(d="brightness("+(100+h.brightness)+"%)");if(h.contrast){var q=100+h.contrast;d=(d?d+" ":"")+("contrast("+q+"%)")}h.saturation&&(q=100+h.saturation,d=(d?d+" ":"")+
286
286
  ("saturate("+q+"%)"));h.hue&&(h=h.hue,d=(d?d+" ":"")+("hue-rotate("+h+"deg)"));this.videoEl.style.filter=d}}.bind(c);c.createColorSettingPanel=function(){var d=this,h='<div class="zwp-colorSettingPanel zwp-popupwindow"><button class="closeBtn"><i class="xicon xicon-close"></i></button><div class="form-row form-title">\u89c6\u9891\u8272\u5f69\u8c03\u6574</div><div class="form-row"><label class="row-label">\u4eae\u5ea6</label><div class="row-content">'+Ma("","brightness")+'</div></div><div class="form-row"><label class="row-label">\u5bf9\u6bd4\u5ea6</label><div class="row-content">'+
287
287
  Ma("","contrast")+'</div></div><div class="form-row"><label class="row-label">\u9971\u548c\u5ea6</label><div class="row-content">'+Ma("","saturation")+'</div></div><div class="form-row"><label class="row-label">\u8272\u8c03</label><div class="row-content">'+Ma("","hue")+'</div></div><div class="form-row form-bottombar"><button class="zwp-form-button action-item" data-action="resetcolors">\u91cd\u7f6e</button></div></div>';d.overlay_layers.insertAdjacentHTML("beforeend",h);h=d.overlay_layers.querySelector(":scope > .zwp-colorSettingPanel");
288
- var q=h.querySelector(".closeBtn");q&&q.addEventListener("click",function(C){C.stopPropagation();var G=C.currentTarget.closest(".zwp-colorSettingPanel");Ga(G,500,function(){G.remove()});delete d.colorSettingPanel});q=h.querySelectorAll('input[type="range"]');0<q.length&&q.forEach(function(C){C.addEventListener("input",c.on_colorSliderChange);if(d.colors){var G=C.getAttribute("data-action");"undefined"!==typeof d.colors[G]&&(C.value=d.colors[G],ab(C))}});h.addEventListener("mousedown",function(C){C.stopPropagation()});
289
- h.addEventListener("dblclick",function(C){C.stopPropagation()});h.addEventListener("click",function(C){C.stopPropagation()});(q=h.querySelector(".zwp-form-button"))&&q.addEventListener("click",function(C){C.preventDefault();C.stopPropagation();C=C.currentTarget.closest(".zwp-colorSettingPanel").querySelectorAll('input[type="range"]');0<C.length&&C.forEach(function(G){if(0!==parseInt(G.value))if(G.value=0,document.createEvent){const N=document.createEvent("HTMLEvents");N.initEvent("input",!0,!1);G.dispatchEvent(N)}else document.createEventObject&&
290
- G.fireEvent("input")})});return d.colorSettingPanel=h}.bind(c);var l=function(d,h){if(d=d.querySelector(".zwp-optionPanel"))d=d.querySelectorAll(".zwp_switch"),0<d.length&&d.forEach(function(q){var C=q.getAttribute("data-action");-1!==h.indexOf(C)&&K(q,"switch_on")&&P(q,"switch_on")})};c.on_optionItemclick=function(d){d.stopPropagation();d=d.currentTarget;K(d,"zwp_switch")&&Oa(d);var h=d.getAttribute("data-action");if("mirror"===h)this.videoEl&&(d=K(d,"switch_on"),this._config.video_mirror=d,this.flipMirrorVideo(),
291
- d&&(this._config.video_rotated=0,l(this.controlbar,["rotated270","rotated90"])));else if("flip"===h)this.videoEl&&(d=K(d,"switch_on"),this._config.video_flip=d,this.flipMirrorVideo(),d&&(this._config.video_rotated=0,l(this.controlbar,["rotated270","rotated90"])));else if("rotated90"===h)this.videoEl&&(d=K(d,"switch_on"),this._config.video_rotated=d?90:0,this.rotateVideo(),d&&(this._config.video_mirror=!1,this._config.video_flip=!1,l(this.controlbar,["mirror","flip","rotated270"])));else if("rotated270"===
292
- h)this.videoEl&&(d=K(d,"switch_on"),this._config.video_rotated=d?270:0,this.rotateVideo(),d&&(this._config.video_mirror=!1,this._config.video_flip=!1,l(this.controlbar,["mirror","flip","rotated90"])));else if("loop"===h)d=K(d,"switch_on"),this._config.loop=d;else if("showColorConfig"===h){var q=d.closest(".zwp-optionPanel");if(q&&q.closest(".zwp-optionButton")){d=this.overlay_layers.querySelector(":scope > .zwp-colorSettingPanel");if(!d&&(d=this.createColorSettingPanel(),!d))return;d.style.display=
288
+ var q=h.querySelector(".closeBtn");q&&q.addEventListener("click",function(C){C.stopPropagation();var H=C.currentTarget.closest(".zwp-colorSettingPanel");Ga(H,500,function(){H.remove()});delete d.colorSettingPanel});q=h.querySelectorAll('input[type="range"]');0<q.length&&q.forEach(function(C){C.addEventListener("input",c.on_colorSliderChange);if(d.colors){var H=C.getAttribute("data-action");"undefined"!==typeof d.colors[H]&&(C.value=d.colors[H],ab(C))}});h.addEventListener("mousedown",function(C){C.stopPropagation()});
289
+ h.addEventListener("dblclick",function(C){C.stopPropagation()});h.addEventListener("click",function(C){C.stopPropagation()});(q=h.querySelector(".zwp-form-button"))&&q.addEventListener("click",function(C){C.preventDefault();C.stopPropagation();C=C.currentTarget.closest(".zwp-colorSettingPanel").querySelectorAll('input[type="range"]');0<C.length&&C.forEach(function(H){if(0!==parseInt(H.value))if(H.value=0,document.createEvent){const P=document.createEvent("HTMLEvents");P.initEvent("input",!0,!1);H.dispatchEvent(P)}else document.createEventObject&&
290
+ H.fireEvent("input")})});return d.colorSettingPanel=h}.bind(c);var v=function(d,h){if(d=d.querySelector(".zwp-optionPanel"))d=d.querySelectorAll(".zwp_switch"),0<d.length&&d.forEach(function(q){var C=q.getAttribute("data-action");-1!==h.indexOf(C)&&L(q,"switch_on")&&Q(q,"switch_on")})};c.on_optionItemclick=function(d){d.stopPropagation();d=d.currentTarget;L(d,"zwp_switch")&&Oa(d);var h=d.getAttribute("data-action");if("mirror"===h)this.videoEl&&(d=L(d,"switch_on"),this._config.video_mirror=d,this.flipMirrorVideo(),
291
+ d&&(this._config.video_rotated=0,v(this.controlbar,["rotated270","rotated90"])));else if("flip"===h)this.videoEl&&(d=L(d,"switch_on"),this._config.video_flip=d,this.flipMirrorVideo(),d&&(this._config.video_rotated=0,v(this.controlbar,["rotated270","rotated90"])));else if("rotated90"===h)this.videoEl&&(d=L(d,"switch_on"),this._config.video_rotated=d?90:0,this.rotateVideo(),d&&(this._config.video_mirror=!1,this._config.video_flip=!1,v(this.controlbar,["mirror","flip","rotated270"])));else if("rotated270"===
292
+ h)this.videoEl&&(d=L(d,"switch_on"),this._config.video_rotated=d?270:0,this.rotateVideo(),d&&(this._config.video_mirror=!1,this._config.video_flip=!1,v(this.controlbar,["mirror","flip","rotated90"])));else if("loop"===h)d=L(d,"switch_on"),this._config.loop=d;else if("showColorConfig"===h){var q=d.closest(".zwp-optionPanel");if(q&&q.closest(".zwp-optionButton")){d=this.overlay_layers.querySelector(":scope > .zwp-colorSettingPanel");if(!d&&(d=this.createColorSettingPanel(),!d))return;d.style.display=
293
293
  "block";q.style.display="none";setTimeout(function(){q.style.display=null},1E3)}}}.bind(c);c.flipMirrorVideo=function(){var d=null;this._config.video_flip&&(d="rotateX(180.00deg)");this._config.video_mirror&&(d=d?d+" rotateY(180.00deg)":" rotateY(180.00deg)");this.videoEl.style.width="100%";this.videoEl.style.height="100%";this.videoEl.style.transform=d}.bind(c);c.rotateVideo=function(){var d=null,h=this.videoEl.parentNode;if(h&&h===this.videoWrapper)if(this._config.video_rotated){var q=h.offsetHeight;
294
294
  h=h.offsetWidth;var C=this.videoEl.videoHeight;this.videoEl.videoWidth&&C&&(this.videoEl.style.width=q+"px",this.videoEl.style.height=h+"px",this.videoEl.style.transformOrigin="center center",C=(h-q)/2,q=(q-h)/2,90===this._config.video_rotated?d="translate("+C+"px, "+q+"px) rotate(0.25turn)":270===this._config.video_rotated&&(d="translate("+C+"px, "+q+"px) rotate(0.75turn)"),this.videoEl.style.transform=d)}else this.videoEl.style.transform&&(this.videoEl.style.transform=null,this.videoEl.style.width=
295
- "100%",this.videoEl.style.height="100%")}.bind(c);c.setupEventsHandler=function(){var d=this,h=function(N){d.loadingOverlay&&(d.loadingOverlay.style.display="none");d.videoEl.play();d.setplaystate(!0);d.updateDuration(d);d._config.isLive&&d.controlbar&&(d.controlbar.querySelector(".zwp__duration-container").style.display="none");d._config.fluid&&(N=d.videoEl,O(d.playerElm,"zwp-fluid"),d.playerElm.style.maxWidth="100%",d.playerElm.style.width="100%",d.playerElm.style.height="0",d.playerElm.style.paddingTop=
296
- N.videoHeight&&N.videoWidth?100*N.videoHeight/N.videoWidth+"%":"64px");d.buildProgressBar()};d.videoEl.addEventListener("loadedmetadata",h);var q=d.videoEl,C=function(N){var U=!0;"ended"===N.type?!d._config.isLive&&d._config.loop?(L.setTimeout(function(){d.videoEl.currentTime=0;d.videoEl.play()},1E3),U=!1):(d.isEnded=!0,d.setplaystate(!1),d._config.reconnect&&d.mpegtsPlayer&&(setTimeout(function(){d.lastDecodedFrames=0;d.closecall(d);d.openMpegts()},1E3),U=!1)):"play"===N.type?(delete d.isEnded,"undefined"!==
297
- typeof d.postSeekTime&&(d.seekTimeProgressByTime(d.postSeekTime),delete d.postSeekTime)):"pause"===N.type?d.setplaystate(!1):"playing"===N.type&&d.setplaystate(!0);d.progressBar&&d.progressBar.buffering&&("play playing pause seeked ended error".split(" ").includes(N.type)?d.progressBar.buffering.style.display="none":["seeking","waiting","loadeddata"].includes(N.type)&&(d.progressBar.buffering.style.display=""));U&&"function"===typeof d._config.onmediaevent&&d._config.onmediaevent.call(d,N)},G=function(N){var U=
298
- this.currentTime;"undefined"!==typeof d.postSeekTime&&(U=d.postSeekTime);if("function"===typeof d._config.ontimeupdate)d._config.ontimeupdate(U);!d.timeSpan&&d.controlbar&&(d.timeSpan=d.controlbar.querySelector(".zwp__currenttime"));d.timeSpan&&(d.timeSpan.innerHTML=Z(U));d.updateProgress(U);d.setProgressRail(N);d.renderSubtitles(U)};q.addEventListener("play",C);q.addEventListener("playing",C);q.addEventListener("pause",C);q.addEventListener("seeked",C);q.addEventListener("ended",C);q.addEventListener("error",
299
- C);q.addEventListener("seeking",C);q.addEventListener("waiting",C);q.addEventListener("timeupdate",G);document.addEventListener("keydown",d.onKeydown);c.videoEventsSetuped=!0;c.removeVideoEventHandlers=function(){if(this.videoEventsSetuped){var N=this.videoEl;N.removeEventListener("loadedmetadata",h);N.removeEventListener("play",C);N.removeEventListener("playing",C);N.removeEventListener("pause",C);N.removeEventListener("seeked",C);N.removeEventListener("ended",C);N.removeEventListener("error",C);
300
- N.removeEventListener("seeking",C);N.removeEventListener("waiting",C);N.removeEventListener("timeupdate",G);document.removeEventListener("keydown",this.onKeydown);delete this.videoEventsSetuped}}}.bind(c);c.showMediainfo=function(d){var h=this;if(h.overlay_layers){var q=h.overlay_layers.querySelector(".zwp__mediainfo-viewer");if(q){if(!d){d=q.querySelector(".closeBtn");var C=document.createEvent("Event");C.initEvent("click",!0,!0);d.dispatchEvent(C)}}else{d='<button class="closeBtn"><i class="xicon xicon-close"></i></button><div class="form-row form-title">'+
301
- (qa("media-prop","Media properties")+"</div>");h.mediaInfo?(C=h.mediaInfo,C.hasVideo&&(d+='<div class="info-item"><span class="info-label">Video</span><span class="info-value">'+C.vCodec+"</span></div>",d+='<div class="info-item"><span class="info-label">Width</span><span class="info-value">'+C.width+"</span></div>",d+='<div class="info-item"><span class="info-label">Height</span><span class="info-value">'+C.height+"</span></div>",d+='<div class="info-item"><span class="info-label">FPS</span><span class="info-value">'+
295
+ "100%",this.videoEl.style.height="100%")}.bind(c);c.setupEventsHandler=function(){var d=this,h=function(P){d.loadingOverlay&&(d.loadingOverlay.style.display="none");d.videoEl.play();d.setplaystate(!0);d.updateDuration(d);d._config.isLive&&d.controlbar&&(d.controlbar.querySelector(".zwp__duration-container").style.display="none");d._config.fluid&&(P=d.videoEl,M(d.playerElm,"zwp-fluid"),d.playerElm.style.maxWidth="100%",d.playerElm.style.width="100%",d.playerElm.style.height="0",d.playerElm.style.paddingTop=
296
+ P.videoHeight&&P.videoWidth?100*P.videoHeight/P.videoWidth+"%":"64px");d.buildProgressBar()};d.videoEl.addEventListener("loadedmetadata",h);var q=d.videoEl,C=function(P){var N=!0;"ended"===P.type?!d._config.isLive&&d._config.loop?(K.setTimeout(function(){d.videoEl.currentTime=0;d.videoEl.play()},1E3),N=!1):(d.isEnded=!0,d.setplaystate(!1),d._config.reconnect&&d.mpegtsPlayer&&(setTimeout(function(){d.lastDecodedFrames=0;d.closecall(d);d.openMpegts()},1E3),N=!1)):"play"===P.type?(delete d.isEnded,"undefined"!==
297
+ typeof d.postSeekTime&&(d.seekTimeProgressByTime(d.postSeekTime),delete d.postSeekTime)):"pause"===P.type?d.setplaystate(!1):"playing"===P.type&&d.setplaystate(!0);d.progressBar&&d.progressBar.buffering&&("play playing pause seeked ended error".split(" ").includes(P.type)?d.progressBar.buffering.style.display="none":["seeking","waiting","loadeddata"].includes(P.type)&&(d.progressBar.buffering.style.display=""));N&&"function"===typeof d._config.onmediaevent&&d._config.onmediaevent.call(d,P)},H=function(P){var N=
298
+ this.currentTime;"undefined"!==typeof d.postSeekTime&&(N=d.postSeekTime);if("function"===typeof d._config.ontimeupdate)d._config.ontimeupdate(N);!d.timeSpan&&d.controlbar&&(d.timeSpan=d.controlbar.querySelector(".zwp__currenttime"));d.timeSpan&&(d.timeSpan.innerHTML=Y(N));d.updateProgress(N);d.setProgressRail(P);d.renderSubtitles(N)};q.addEventListener("play",C);q.addEventListener("playing",C);q.addEventListener("pause",C);q.addEventListener("seeked",C);q.addEventListener("ended",C);q.addEventListener("error",
299
+ C);q.addEventListener("seeking",C);q.addEventListener("waiting",C);q.addEventListener("timeupdate",H);document.addEventListener("keydown",d.onKeydown);c.videoEventsSetuped=!0;c.removeVideoEventHandlers=function(){if(this.videoEventsSetuped){var P=this.videoEl;P.removeEventListener("loadedmetadata",h);P.removeEventListener("play",C);P.removeEventListener("playing",C);P.removeEventListener("pause",C);P.removeEventListener("seeked",C);P.removeEventListener("ended",C);P.removeEventListener("error",C);
300
+ P.removeEventListener("seeking",C);P.removeEventListener("waiting",C);P.removeEventListener("timeupdate",H);document.removeEventListener("keydown",this.onKeydown);delete this.videoEventsSetuped}}}.bind(c);c.showMediainfo=function(d){var h=this;if(h.overlay_layers){var q=h.overlay_layers.querySelector(".zwp__mediainfo-viewer");if(q){if(!d){d=q.querySelector(".closeBtn");var C=document.createEvent("Event");C.initEvent("click",!0,!0);d.dispatchEvent(C)}}else{d='<button class="closeBtn"><i class="xicon xicon-close"></i></button><div class="form-row form-title">'+
301
+ (pa("media-prop","Media properties")+"</div>");h.mediaInfo?(C=h.mediaInfo,C.hasVideo&&(d+='<div class="info-item"><span class="info-label">Video</span><span class="info-value">'+C.vCodec+"</span></div>",d+='<div class="info-item"><span class="info-label">Width</span><span class="info-value">'+C.width+"</span></div>",d+='<div class="info-item"><span class="info-label">Height</span><span class="info-value">'+C.height+"</span></div>",d+='<div class="info-item"><span class="info-label">FPS</span><span class="info-value">'+
302
302
  C.fps+"</span></div>",d+='<div class="info-item"><span class="info-label">Profile</span><span class="info-value">'+C.profile+"</span></div>",d+='<div class="info-item"><span class="info-label">Level</span><span class="info-value">'+C.level+"</span></div>"),C.hasAudio&&(d+='<div class="info-item"><span class="info-label">Audio</span><span class="info-value">'+C.aCodec+"</span></div>",d+='<div class="info-item"><span class="info-label">SampRate</span><span class="info-value">'+C.sampleRate+"</span></div>",
303
303
  d+='<div class="info-item"><span class="info-label">Channel</span><span class="info-value">'+C.channels+"</span></div>")):h.videoEl?(C=h.videoEl,C.videoWidth&&(d+='<div class="info-item"><span class="info-label">Width</span><span class="info-value">'+C.videoWidth+"</span></div>",d+='<div class="info-item"><span class="info-label">Height</span><span class="info-value">'+C.videoHeight+"</span></div>"),C.duration&&(d+='<div class="info-item"><span class="info-label">Duration</span><span class="info-value">'+
304
- Z(C.duration)+"</span></div>")):d+='<div class="info-item"><div class="row-text">No More Media Info</div></div>';q=document.createElement("div");q.setAttribute("class","zwp__mediainfo-viewer zwp-popupwindow");q.innerHTML=d;h.overlay_layers.appendChild(q);q.addEventListener("click",function(N){N.stopPropagation()});var G=function(N){N.preventDefault();N.stopPropagation();Ga(q,500,function(){q.remove()});h.overlay_layers.removeEventListener("click",G);delete h.infoViewer};d=q.querySelector(".closeBtn");
305
- d.addEventListener("click",G);h.infoViewer=q}}}.bind(c);c.setMediainfo=function(d,h){d={engine:d,hasVideo:h.hasVideo,hasAudio:h.hasAudio};if(h.hasVideo){var q=h.videoCodec;q=0<=q.indexOf("avc1")?"H264/AVC":0<=q.indexOf("hvc")?"H265/HEVC":"Unknown";d.vCodec=q;d.width=h.width;d.height=h.height;d.fps=h.fps;"number"===typeof d.fps&&(d.fps=d.fps.toFixed(2));d.profile=h.profile;d.level=h.level}h.hasAudio&&(q=h.audioCodec,q=0<=q.indexOf("mp4a.40.2")?"AAC-LC":0<=q.indexOf("mp4a.40.5")?"HE-AAC":0<=q.indexOf("mp3")?
306
- "MP3":"Unknown",d.aCodec=q,d.sampleRate=h.audioSampleRate,d.channels=h.audioChannelCount);this.mediaInfo=d}.bind(c);c.loadChapters=function(){var d=this;if(d.chapters){if("string"===typeof d.chapters)if("["===d.chapters.charAt(0))d.chapters=JSON.parse(d.chapters);else{if("http"===d.chapters.substr(0,4))Ra(d.chapters,function(S){if("WEBVTT"===S.substr(0,6))d.chapters=S,d.loadChapters();else if(S=JSON.parse(S))d.chapters=S,d.loadChapters()},function(S){console.warn("get chapter list from "+d.chapters+
307
- " failed!")});else if("WEBVTT"===d.chapters.substr(0,6)){var h=Sa(d.chapters);if(h){for(var q=[],C=0;C<h.body.length;C++){var G=h.body[C];q.push({title:G.content,time:Z(G.from),desc:"no desc",image:null})}d.chapters=q;d.loadChapters()}else delete d.chapters}else delete d.chapters;return}else if(!Array.isArray(d.chapters))return;h=d.videoEl.duration;if(!isNaN(h)&&Infinity!==h){if(h=ob(h,d.chapters))if(q=d.controlbar.querySelector(".zwp__time-chapter"))q.innerHTML=h,h=q.querySelectorAll(".zwp__chapter_dot"),
308
- 0<h.length&&h.forEach(function(S){S.addEventListener("mousedown",function(T){T.stopPropagation();T=La(this.getAttribute("data-time"));d.seekTimeProgressByTime(T)})});if(d._config.chapterButton&&(h=d.controlbar.querySelector(".zwp__time-info"))){var N=h.querySelector(".zwp-chapterButton");N&&N.remove();var U=pb(d.chapters);U&&((q=h.querySelector(".zwp_danmuBarDock"))?q.insertAdjacentHTML("beforebegin",U.html):h.insertAdjacentHTML("beforeend",U.html),N=h.querySelector(".zwp-chapterButton"),h=N.querySelector(".zwp-chapterlist"),
309
- q=h.querySelectorAll(".chapter-item"),0<q.length&&q.forEach(function(S){S.addEventListener("click",function(T){T.stopPropagation();T=La(this.getAttribute("data-time"));d.seekTimeProgressByTime(T)})}),h.addEventListener("mousedown",function(S){S.stopPropagation()}),h.addEventListener("dblclick",function(S){S.stopPropagation()}),N.querySelector(".zwp-chapterBtn").addEventListener("click",function(S){S.stopPropagation();if(S=N.querySelector(".zwp-chapterPanel")){var T=d.overlay_layers.offsetHeight;if(!(100>
310
- T)){T-=100;400<T&&(T=400);var V=U.titleWidth;200<V&&(V=200);S.style.height=T+"px";S.style.width=80+V+10+"px";"block"!==S.style.display?(T=S.querySelector(".zwp-list-inner"),$$(T).niceScroll({cursorborder:"",cursorcolor:"rgb(179 178 178 / 67%)",boxzoom:!1,rightdock:4}),S.style.opacity=1,S.style.display="block"):S.style.display="none"}}}),(h=N.querySelector(".closeBtn"))&&h.addEventListener("click",function(S){S.stopPropagation();var T=S.currentTarget.closest(".zwp-chapterPanel");Ga(T,500,function(){T.style.display=
304
+ Y(C.duration)+"</span></div>")):d+='<div class="info-item"><div class="row-text">No More Media Info</div></div>';q=document.createElement("div");q.setAttribute("class","zwp__mediainfo-viewer zwp-popupwindow");q.innerHTML=d;h.overlay_layers.appendChild(q);q.addEventListener("click",function(P){P.stopPropagation()});var H=function(P){P.preventDefault();P.stopPropagation();Ga(q,500,function(){q.remove()});h.overlay_layers.removeEventListener("click",H);delete h.infoViewer};d=q.querySelector(".closeBtn");
305
+ d.addEventListener("click",H);h.infoViewer=q}}}.bind(c);c.setMediainfo=function(d,h){d={engine:d,hasVideo:h.hasVideo,hasAudio:h.hasAudio};if(h.hasVideo){var q=h.videoCodec;q=0<=q.indexOf("avc1")?"H264/AVC":0<=q.indexOf("hvc")?"H265/HEVC":"Unknown";d.vCodec=q;d.width=h.width;d.height=h.height;d.fps=h.fps;"number"===typeof d.fps&&(d.fps=d.fps.toFixed(2));d.profile=h.profile;d.level=h.level}h.hasAudio&&(q=h.audioCodec,q=0<=q.indexOf("mp4a.40.2")?"AAC-LC":0<=q.indexOf("mp4a.40.5")?"HE-AAC":0<=q.indexOf("mp3")?
306
+ "MP3":"Unknown",d.aCodec=q,d.sampleRate=h.audioSampleRate,d.channels=h.audioChannelCount);this.mediaInfo=d}.bind(c);c.loadChapters=function(){var d=this;if(d.chapters){if("string"===typeof d.chapters)if("["===d.chapters.charAt(0))d.chapters=JSON.parse(d.chapters);else{if("http"===d.chapters.substr(0,4))Ra(d.chapters,function(V){if("WEBVTT"===V.substr(0,6))d.chapters=V,d.loadChapters();else if(V=JSON.parse(V))d.chapters=V,d.loadChapters()},function(V){console.warn("get chapter list from "+d.chapters+
307
+ " failed!")});else if("WEBVTT"===d.chapters.substr(0,6)){var h=Sa(d.chapters);if(h){for(var q=[],C=0;C<h.body.length;C++){var H=h.body[C];q.push({title:H.content,time:Y(H.from),desc:"no desc",image:null})}d.chapters=q;d.loadChapters()}else delete d.chapters}else delete d.chapters;return}else if(!Array.isArray(d.chapters))return;h=d.videoEl.duration;if(!isNaN(h)&&Infinity!==h){if(h=ob(h,d.chapters))if(q=d.controlbar.querySelector(".zwp__time-chapter"))q.innerHTML=h,h=q.querySelectorAll(".zwp__chapter_dot"),
308
+ 0<h.length&&h.forEach(function(V){V.addEventListener("mousedown",function(S){S.stopPropagation();S=La(this.getAttribute("data-time"));d.seekTimeProgressByTime(S)})});if(d._config.chapterButton&&(h=d.controlbar.querySelector(".zwp__time-info"))){var P=h.querySelector(".zwp-chapterButton");P&&P.remove();var N=pb(d.chapters);N&&((q=h.querySelector(".zwp_danmuBarDock"))?q.insertAdjacentHTML("beforebegin",N.html):h.insertAdjacentHTML("beforeend",N.html),P=h.querySelector(".zwp-chapterButton"),h=P.querySelector(".zwp-chapterlist"),
309
+ q=h.querySelectorAll(".chapter-item"),0<q.length&&q.forEach(function(V){V.addEventListener("click",function(S){S.stopPropagation();S=La(this.getAttribute("data-time"));d.seekTimeProgressByTime(S)})}),h.addEventListener("mousedown",function(V){V.stopPropagation()}),h.addEventListener("dblclick",function(V){V.stopPropagation()}),P.querySelector(".zwp-chapterBtn").addEventListener("click",function(V){V.stopPropagation();if(V=P.querySelector(".zwp-chapterPanel")){var S=d.overlay_layers.offsetHeight;if(!(100>
310
+ S)){S-=100;400<S&&(S=400);var U=N.titleWidth;200<U&&(U=200);V.style.height=S+"px";V.style.width=80+U+10+"px";"block"!==V.style.display?(S=V.querySelector(".zwp-list-inner"),$$(S).niceScroll({cursorborder:"",cursorcolor:"rgb(179 178 178 / 67%)",boxzoom:!1,rightdock:4}),V.style.opacity=1,V.style.display="block"):V.style.display="none"}}}),(h=P.querySelector(".closeBtn"))&&h.addEventListener("click",function(V){V.stopPropagation();var S=V.currentTarget.closest(".zwp-chapterPanel");Ga(S,500,function(){S.style.display=
311
311
  "none"})}))}}}}.bind(c);c.removeChapters=function(){if(this.chapters){if(this.controlbar){var d=this.controlbar.querySelector(".zwp__time-chapter");d&&(d.innerHTML="")}(d=this.controlbar.querySelector(".zwp__time-info"))&&(d=d.querySelector(".zwp-chapterButton"))&&d.remove();delete this.chapters}}.bind(c);c.doSnapshot=function(){if(this.videoEl&&this.videoEl.videoWidth){if(!this.snapCanvas&&(this.snapCanvas=document.createElement("canvas"),!this.snapCanvas))return;var d=this.videoEl,h=this.snapCanvas;
312
- h.width=this.videoEl.videoWidth;h.height=this.videoEl.videoHeight;var q=h.getContext("2d");q.fillStyle="#000000";q.beginPath();q.fillRect(0,0,d.videoWidth,d.videoHeight);q.closePath();q.drawImage(d,0,0,d.videoWidth,d.videoHeight);if("function"==typeof h.toBlob){var C="SNAP-"+eb();try{h.toBlob(function(G){const N=document.createElement("a");N.download=`${C}.jpg`;N.href=URL.createObjectURL(G);N.click();db(G)},"image/jpg",.99)}catch(G){console.error("\u89c6\u9891\u6e90\u53d7CORS\u6807\u8bc6\u9650\u5236\uff0c\u65e0\u6cd5\u76f4\u63a5\u4e0b\u8f7d\u622a\u56fe\uff0c\u89c1\uff1a\n https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS")}}else console.error("\u6d4f\u89c8\u5668\u529f\u80fd\u9650\u5236\uff0c\u65e0\u6cd5\u622a\u53d6\u56fe\u50cf")}}.bind(c);
313
- c.togglePictureInPicture=function(){var d=this;if(d.videoEl)if(document.pictureInPictureElement)document.exitPictureInPicture();else{var h=d.videoEl;d.smallWindowMode||(h.bindPicInPicEvent||(h.addEventListener("enterpictureinpicture",function(q){console.log(q.width,q.height);O(d.playerElm,"zwp-picInPic");d.overlay_layers.insertAdjacentHTML("beforeEnd",'<div class="zwp-pipPlaceHolder">\t<div class="zwp-pipControl">\t\t<div class="zwp-pipTiptext">\u6b63\u5728\u300c\u753b\u4e2d\u753b\u300d\u6a21\u5f0f\u4e0b\u64ad\u653e</div>\t\t<div class="zwp-pipExitButton">\u9000\u51fa\u753b\u4e2d\u753b</div>\t</div></div>');
314
- (q=d.overlay_layers.querySelector(".zwp-pipExitButton"))&&q.addEventListener("click",function(C){C.stopPropagation();document.pictureInPictureElement&&document.exitPictureInPicture()});d.isInPicInPic=!0}),h.addEventListener("leavepictureinpicture",function(){P(d.playerElm,"zwp-picInPic");var q=d.overlay_layers.querySelector(".zwp-pipPlaceHolder");q&&d.overlay_layers.removeChild(q);setTimeout(function(){},500);delete d.isInPicInPic}),h.bindPicInPicEvent=!0),h.requestPictureInPicture())}}.bind(c);c.showSubtitle=
312
+ h.width=this.videoEl.videoWidth;h.height=this.videoEl.videoHeight;var q=h.getContext("2d");q.fillStyle="#000000";q.beginPath();q.fillRect(0,0,d.videoWidth,d.videoHeight);q.closePath();q.drawImage(d,0,0,d.videoWidth,d.videoHeight);if("function"==typeof h.toBlob){var C="SNAP-"+eb();try{h.toBlob(function(H){const P=document.createElement("a");P.download=`${C}.jpg`;P.href=URL.createObjectURL(H);P.click();db(H)},"image/jpg",.99)}catch(H){console.error("\u89c6\u9891\u6e90\u53d7CORS\u6807\u8bc6\u9650\u5236\uff0c\u65e0\u6cd5\u76f4\u63a5\u4e0b\u8f7d\u622a\u56fe\uff0c\u89c1\uff1a\n https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS")}}else console.error("\u6d4f\u89c8\u5668\u529f\u80fd\u9650\u5236\uff0c\u65e0\u6cd5\u622a\u53d6\u56fe\u50cf")}}.bind(c);
313
+ c.togglePictureInPicture=function(){var d=this;if(d.videoEl)if(document.pictureInPictureElement)document.exitPictureInPicture();else{var h=d.videoEl;d.smallWindowMode||(h.bindPicInPicEvent||(h.addEventListener("enterpictureinpicture",function(q){console.log(q.width,q.height);M(d.playerElm,"zwp-picInPic");d.overlay_layers.insertAdjacentHTML("beforeEnd",'<div class="zwp-pipPlaceHolder">\t<div class="zwp-pipControl">\t\t<div class="zwp-pipTiptext">\u6b63\u5728\u300c\u753b\u4e2d\u753b\u300d\u6a21\u5f0f\u4e0b\u64ad\u653e</div>\t\t<div class="zwp-pipExitButton">\u9000\u51fa\u753b\u4e2d\u753b</div>\t</div></div>');
314
+ (q=d.overlay_layers.querySelector(".zwp-pipExitButton"))&&q.addEventListener("click",function(C){C.stopPropagation();document.pictureInPictureElement&&document.exitPictureInPicture()});d.isInPicInPic=!0}),h.addEventListener("leavepictureinpicture",function(){Q(d.playerElm,"zwp-picInPic");var q=d.overlay_layers.querySelector(".zwp-pipPlaceHolder");q&&d.overlay_layers.removeChild(q);setTimeout(function(){},500);delete d.isInPicInPic}),h.bindPicInPicEvent=!0),h.requestPictureInPicture())}}.bind(c);c.showSubtitle=
315
315
  function(d){var h=this;if(h.overlay_layers){var q=h.overlay_layers.querySelector(".zwp-subtitles-show");if(q){if(d?"block"!==q.style.display&&(q.style.opacity=0,q.style.display="block",Pa(q,500,function(){})):Ga(q,500,function(){Ba.removeElement(q);q.remove();delete h.subtitleShow;delete h.subtitle1;delete h.subtitle2}),h.controlbar){var C=h.controlbar.querySelector(".zwp-subtitleButton");C&&(C.style.display=d?"block":"none")}}else if(d){q=document.createElement("div");q.setAttribute("class","zwp-subtitles-show");
316
- q.innerHTML='<div class="zwp-subtitles-viever"><div class="zwp-subtitle subtitle-1"><span class="subtitle-text"></span></div><div class="zwp-subtitle subtitle-2"><span class="subtitle-text"></span></div></div>';h.overlay_layers.appendChild(q);q.addEventListener("click",function(V){V.preventDefault();V.stopPropagation()});Ba.addElement(q);q.addEventListener("resize",function(V){this.updateSubtitlePosition()}.bind(h));h.subtitleShow=q;h.subtitle1=q.querySelector(".subtitle-1 > .subtitle-text");h.subtitle2=
317
- q.querySelector(".subtitle-2 > .subtitle-text");h.subtitle2.style.display="none";var G=q.querySelector(".zwp-subtitles-viever"),N=!1,U=0,S=0;d="onpointerout"in document;var T="ontouchstart"in document.documentElement||"ontouchstart"in L;h.on_subtitle_mousemove=function(V){var W=V.target;if(!N||W!==this.subtitle1&&W!==this.subtitle2)console.log("out subtitle");else{W=V.pageY;var g=!0;"touchmove"==V.type&&(V.changedTouches&&(W=V.changedTouches[0].pageY),g=!1);g&&V.preventDefault();V.stopPropagation();
318
- V=U-W;54>=G.offsetTop&&0<V||(V=S+V,54>V&&(console.log("mouse move 0"),V=54),G.style.bottom=V+"px",console.log("move x: ",V))}}.bind(h);h.on_subtitle_mouseup=function(V){N&&("onpointerout"in document?(document.removeEventListener("pointermove",this.on_subtitle_mousemove),document.removeEventListener("pointerup",this.on_subtitle_mouseup)):T?(document.removeEventListener("touchmove",this.on_subtitle_mousemove),document.removeEventListener("touchend",this.on_subtitle_mouseup)):(document.removeEventListener("mousemove",
319
- this.on_subtitle_mousemove),document.removeEventListener("mouseup",this.on_subtitle_mouseup)),N=!1)}.bind(h);h.on_subtitle_mousedown=function(V){"onpointerout"in document?(document.addEventListener("pointermove",this.on_subtitle_mousemove),document.addEventListener("pointerup",this.on_subtitle_mouseup)):T?(document.addEventListener("touchmove",this.on_subtitle_mousemove),document.addEventListener("touchend",this.on_subtitle_mouseup)):(document.addEventListener("mousemove",this.on_subtitle_mousemove),
320
- document.addEventListener("mouseup",this.on_subtitle_mouseup));N=!0;U=V.pageY;var W=parseInt(G.offsetTop+G.offsetHeight);S=this.subtitleShow.offsetHeight-W;V.stopPropagation();V.preventDefault()}.bind(h);h.on_subtitleItemclick=function(V){V.stopPropagation();var W=V.currentTarget;K(W,"zwp_switch")&&Oa(W);V=W.getAttribute("data-action");W=K(W,"switch_on");"subtitleOn"===V?this.subtitleShow&&(this.subtitleShow.style.display=W?"block":"none"):"subtitleDefault"===V?this.subtitles["1"]&&(W?this.subtitles["1"].hidden&&
321
- (delete this.subtitles["1"].hidden,this.subtitle1.style.display="block"):(this.subtitles["1"].hidden=!0,this.subtitle1.style.display="none")):"subtitleSecond"===V&&this.subtitles["2"]&&(W?this.subtitles["2"].hidden&&(delete this.subtitles["2"].hidden,this.subtitle2.style.display="block"):(this.subtitles["2"].hidden=!0,this.subtitle2.style.display="none"))}.bind(h);d?G.addEventListener("pointerdown",h.on_subtitle_mousedown):canTouch?G.addEventListener("touchstart",h.on_subtitle_mousedown):G.addEventListener("mousedown",
322
- h.on_subtitle_mousedown);if(h.controlbar){if(C=h.controlbar.querySelector(".zwp-subtitleButton"))C.style.display="block";(d=Q.querySelector(".zwp-subtitleMenu"))&&!d.bindSwitchEvent&&(C=d.querySelectorAll(".action-item"),0<C.length&&C.forEach(function(V){V.addEventListener("click",h.on_subtitleItemclick);var W=V.getAttribute("data-action");"subtitleOn"!==W&&"subtitleDefault"!==W||O(V,"switch_on")}),d.bindSwitchEvent=!0)}}}}.bind(c);c.getSimpleSubtitleRenderer=function(){if(!this.overlay_layers)return null;
316
+ q.innerHTML='<div class="zwp-subtitles-viever"><div class="zwp-subtitle subtitle-1"><span class="subtitle-text"></span></div><div class="zwp-subtitle subtitle-2"><span class="subtitle-text"></span></div></div>';h.overlay_layers.appendChild(q);q.addEventListener("click",function(U){U.preventDefault();U.stopPropagation()});Ba.addElement(q);q.addEventListener("resize",function(U){this.updateSubtitlePosition()}.bind(h));h.subtitleShow=q;h.subtitle1=q.querySelector(".subtitle-1 > .subtitle-text");h.subtitle2=
317
+ q.querySelector(".subtitle-2 > .subtitle-text");h.subtitle2.style.display="none";var H=q.querySelector(".zwp-subtitles-viever"),P=!1,N=0,V=0;d="onpointerout"in document;var S="ontouchstart"in document.documentElement||"ontouchstart"in K;h.on_subtitle_mousemove=function(U){var g=U.target;if(!P||g!==this.subtitle1&&g!==this.subtitle2)console.log("out subtitle");else{g=U.pageY;var r=!0;"touchmove"==U.type&&(U.changedTouches&&(g=U.changedTouches[0].pageY),r=!1);r&&U.preventDefault();U.stopPropagation();
318
+ U=N-g;54>=H.offsetTop&&0<U||(U=V+U,54>U&&(console.log("mouse move 0"),U=54),H.style.bottom=U+"px",console.log("move x: ",U))}}.bind(h);h.on_subtitle_mouseup=function(U){P&&("onpointerout"in document?(document.removeEventListener("pointermove",this.on_subtitle_mousemove),document.removeEventListener("pointerup",this.on_subtitle_mouseup)):S?(document.removeEventListener("touchmove",this.on_subtitle_mousemove),document.removeEventListener("touchend",this.on_subtitle_mouseup)):(document.removeEventListener("mousemove",
319
+ this.on_subtitle_mousemove),document.removeEventListener("mouseup",this.on_subtitle_mouseup)),P=!1)}.bind(h);h.on_subtitle_mousedown=function(U){"onpointerout"in document?(document.addEventListener("pointermove",this.on_subtitle_mousemove),document.addEventListener("pointerup",this.on_subtitle_mouseup)):S?(document.addEventListener("touchmove",this.on_subtitle_mousemove),document.addEventListener("touchend",this.on_subtitle_mouseup)):(document.addEventListener("mousemove",this.on_subtitle_mousemove),
320
+ document.addEventListener("mouseup",this.on_subtitle_mouseup));P=!0;N=U.pageY;var g=parseInt(H.offsetTop+H.offsetHeight);V=this.subtitleShow.offsetHeight-g;U.stopPropagation();U.preventDefault()}.bind(h);h.on_subtitleItemclick=function(U){U.stopPropagation();var g=U.currentTarget;L(g,"zwp_switch")&&Oa(g);U=g.getAttribute("data-action");g=L(g,"switch_on");"subtitleOn"===U?this.subtitleShow&&(this.subtitleShow.style.display=g?"block":"none"):"subtitleDefault"===U?this.subtitles["1"]&&(g?this.subtitles["1"].hidden&&
321
+ (delete this.subtitles["1"].hidden,this.subtitle1.style.display="block"):(this.subtitles["1"].hidden=!0,this.subtitle1.style.display="none")):"subtitleSecond"===U&&this.subtitles["2"]&&(g?this.subtitles["2"].hidden&&(delete this.subtitles["2"].hidden,this.subtitle2.style.display="block"):(this.subtitles["2"].hidden=!0,this.subtitle2.style.display="none"))}.bind(h);d?H.addEventListener("pointerdown",h.on_subtitle_mousedown):canTouch?H.addEventListener("touchstart",h.on_subtitle_mousedown):H.addEventListener("mousedown",
322
+ h.on_subtitle_mousedown);if(h.controlbar){if(C=h.controlbar.querySelector(".zwp-subtitleButton"))C.style.display="block";(d=x.querySelector(".zwp-subtitleMenu"))&&!d.bindSwitchEvent&&(C=d.querySelectorAll(".action-item"),0<C.length&&C.forEach(function(U){U.addEventListener("click",h.on_subtitleItemclick);var g=U.getAttribute("data-action");"subtitleOn"!==g&&"subtitleDefault"!==g||M(U,"switch_on")}),d.bindSwitchEvent=!0)}}}}.bind(c);c.getSimpleSubtitleRenderer=function(){if(!this.overlay_layers)return null;
323
323
  var d=this.overlay_layers.querySelector(".zwp-subtitles-show");if(d){var h=d.querySelector(".zwp-simple-subtitles-viever");h||(d.innerHTML='<div class="zwp-simple-subtitles-viever"></div>',h=d.querySelector(".zwp-simple-subtitles-viever"));return h}d=document.createElement("div");d.setAttribute("class","zwp-subtitles-show");d.innerHTML='<div class="zwp-simple-subtitles-viever"></div>';this.overlay_layers.appendChild(d);d.addEventListener("click",function(q){q.preventDefault();q.stopPropagation()});
324
- Ba.addElement(d);d.addEventListener("resize",function(q){this.updateSubtitlePosition()}.bind(this));this.subtitleShow=d;return d.querySelector(".zwp-simple-subtitles-viever")}.bind(c);c.loadSubtitle=function(d,h,q){var C=this;"1"!==h&&"2"!==h||Ra(d,function(G){var N=H(d);if(".srt"===N)var U=fb(G);else if(".vtt"===N)U=Sa(G);else if(".json"===N||".bcc"===N)U=JSON.parse(G);if(U){C.subtitles||(C.subtitles={});q&&(U.title=q);"2"===h&&C._config.secondSubtitleHidden&&(U.hidden=!0);if(C.controlbar&&(N=C.controlbar.querySelector(".zwp-subtitleMenu"))){N.querySelector(".main")||
325
- (N.innerHTML=Ya(),P(N,"zwp-autosize"));if("1"===h&&(G=N.querySelector(".sub1"))){q||=qa("mainSubtitle","Main subtitle");var S=G.querySelector(".zwp-option-item-label");S&&(S.innerHTML=q);G.style.display="block"}if("2"===h&&(G=N.querySelector(".sub2"))){q||=qa("secondSubtitle","Second subtitle");if(S=G.querySelector(".zwp-option-item-label"))S.innerHTML=q;U.hidden||(N=G.querySelector(".zwp_switch"))&&O(N,"switch_on");G.style.display="block"}}C.subtitles[h]=U;C.showSubtitleTimer||(C.showSubtitleTimer=
326
- setTimeout(function(){this.showSubtitle(!0);delete this.showSubtitleTimer}.bind(C),300))}else console.warn("Invalid subtitle file from "+d)},function(G){console.warn("get subtitle from "+d+" failed!")})}.bind(c);c.renderSubtitles=function(d){if(this.subtitleShow&&this.subtitles&&"none"!==this.subtitleShow.style.display)for(var h=["1","2"],q=0;q<h.length;q++){var C=h[q];if(this.subtitles[C]){var G="subtitle"+C;C=this.subtitles[C];var N=!1;if(!C.hidden){if(C.current){if(d<C.current.from)N=!0;else if(d<
327
- C.current.to)continue;this[G]&&(this[G].innerHTML="",this[G].style.display="none");C.current=null}var U=C.nextSubtitleIdx||0,S=!0;if(N){var T=U-4;0>T&&(T=0);for(var V=U-2;V>=T;V--)if(N=C.body[V],d<=N.to){if(d>=N.from){C.current=N;C.nextSubtitleIdx=V+1;S=!1;break}}else{C.nextSubtitleIdx=U;S=!1;break}if(S&&0<T){U=0;for(V=T-1;U<=V;)if(T=parseInt((U+V)/2),N=C.body[T],d<N.from)V=T-1;else if(d>N.to)U=T+1;else{C.current=N;C.nextSubtitleIdx=T+1;S=!1;break}S&&(C.nextSubtitleIdx=U)}}else{T=U+2;T>C.body.length&&
328
- (T=C.body.length);for(V=U;V<T;V++)if(N=C.body[V],d>=N.from){if(d<=N.to){C.current=N;C.nextSubtitleIdx=V+1;S=!1;break}}else{C.nextSubtitleIdx=U;S=!1;break}if(S){U=T;V=C.body.length-1;for(T>=C.body.length?d<C.body[C.body.length-1].from&&(U=0):d<C.body[T].from&&(U=0);U<=V;)if(T=parseInt((U+V)/2),N=C.body[T],d<N.from)V=T-1;else if(d>N.to)U=T+1;else{C.current=N;C.nextSubtitleIdx=T+1;S=!1;break}S&&(C.nextSubtitleIdx=U)}}C.current&&this[G]&&(this[G].innerHTML=C.current.content,this[G].style.display="block")}}}}.bind(c);
324
+ Ba.addElement(d);d.addEventListener("resize",function(q){this.updateSubtitlePosition()}.bind(this));this.subtitleShow=d;return d.querySelector(".zwp-simple-subtitles-viever")}.bind(c);c.loadSubtitle=function(d,h,q){var C=this;"1"!==h&&"2"!==h||Ra(d,function(H){var P=I(d);if(".srt"===P)var N=fb(H);else if(".vtt"===P)N=Sa(H);else if(".json"===P||".bcc"===P)N=JSON.parse(H);if(N){C.subtitles||(C.subtitles={});q&&(N.title=q);"2"===h&&C._config.secondSubtitleHidden&&(N.hidden=!0);if(C.controlbar&&(P=C.controlbar.querySelector(".zwp-subtitleMenu"))){P.querySelector(".main")||
325
+ (P.innerHTML=Ya(),Q(P,"zwp-autosize"));if("1"===h&&(H=P.querySelector(".sub1"))){q||=pa("mainSubtitle","Main subtitle");var V=H.querySelector(".zwp-option-item-label");V&&(V.innerHTML=q);H.style.display="block"}if("2"===h&&(H=P.querySelector(".sub2"))){q||=pa("secondSubtitle","Second subtitle");if(V=H.querySelector(".zwp-option-item-label"))V.innerHTML=q;N.hidden||(P=H.querySelector(".zwp_switch"))&&M(P,"switch_on");H.style.display="block"}}C.subtitles[h]=N;C.showSubtitleTimer||(C.showSubtitleTimer=
326
+ setTimeout(function(){this.showSubtitle(!0);delete this.showSubtitleTimer}.bind(C),300))}else console.warn("Invalid subtitle file from "+d)},function(H){console.warn("get subtitle from "+d+" failed!")})}.bind(c);c.renderSubtitles=function(d){if(this.subtitleShow&&this.subtitles&&"none"!==this.subtitleShow.style.display)for(var h=["1","2"],q=0;q<h.length;q++){var C=h[q];if(this.subtitles[C]){var H="subtitle"+C;C=this.subtitles[C];var P=!1;if(!C.hidden){if(C.current){if(d<C.current.from)P=!0;else if(d<
327
+ C.current.to)continue;this[H]&&(this[H].innerHTML="",this[H].style.display="none");C.current=null}var N=C.nextSubtitleIdx||0,V=!0;if(P){var S=N-4;0>S&&(S=0);for(var U=N-2;U>=S;U--)if(P=C.body[U],d<=P.to){if(d>=P.from){C.current=P;C.nextSubtitleIdx=U+1;V=!1;break}}else{C.nextSubtitleIdx=N;V=!1;break}if(V&&0<S){N=0;for(U=S-1;N<=U;)if(S=parseInt((N+U)/2),P=C.body[S],d<P.from)U=S-1;else if(d>P.to)N=S+1;else{C.current=P;C.nextSubtitleIdx=S+1;V=!1;break}V&&(C.nextSubtitleIdx=N)}}else{S=N+2;S>C.body.length&&
328
+ (S=C.body.length);for(U=N;U<S;U++)if(P=C.body[U],d>=P.from){if(d<=P.to){C.current=P;C.nextSubtitleIdx=U+1;V=!1;break}}else{C.nextSubtitleIdx=N;V=!1;break}if(V){N=S;U=C.body.length-1;for(S>=C.body.length?d<C.body[C.body.length-1].from&&(N=0):d<C.body[S].from&&(N=0);N<=U;)if(S=parseInt((N+U)/2),P=C.body[S],d<P.from)U=S-1;else if(d>P.to)N=S+1;else{C.current=P;C.nextSubtitleIdx=S+1;V=!1;break}V&&(C.nextSubtitleIdx=N)}}C.current&&this[H]&&(this[H].innerHTML=C.current.content,this[H].style.display="block")}}}}.bind(c);
329
329
  c.updateSubtitlePosition=function(){if(this.subtitleShow&&this.subtitles){var d=["1","2"],h=this.subtitleShow.offsetWidth,q=this.subtitleShow.offsetHeight;if(h&&q)for(h/=1024,q/=576,q=32*(h>q?q:h),h=0;h<d.length;h++){var C=d[h];this.subtitles[C]&&(C="subtitle"+C,this[C]&&(this[C].style.fontSize=q.toFixed(2)+"px"))}}}.bind(c);c.resetQualitiesMenu=function(){if(this&&!this.multiStreams&&this.controlbar){var d=this.controlbar.querySelector(".zwp-qualityButton");if(d){var h=d.querySelector(".zwp-qualityMenu");
330
- h&&(h.innerHTML='<li class="zwp-quality-item zwp-disabled" data-index="-1">No quality</li>');d.style.display="none"}}}.bind(c);c.createQualitiesMenu=function(d){var h=this;if(1>=d.length)h.resetQualitiesMenu();else{var q=h.controlbar.querySelector(".zwp-qualityButton");if(q){var C="",G=qa("level","Level")+" ";C+='<li class="zwp-quality-item active" data-idx="-1">'+qa("qs-auto","AUTO SWITCH")+"</li>";for(var N=0;N<d.length;N++){var U="";"undefined"!==typeof d[N]&&(U=d[N].width&&d[N].height?d[N].width+
331
- "x"+d[N].height:G+(N+1));"undefined"!==typeof d[N].bitrate&&(U+=" ("+parseInt(d[N].bitrate/1E3)+"kbps)");C+='<li class="zwp-quality-item" data-br="'+d[N].bitrate+'" data-idx="'+d[N].qualityIndex+'" data-vh="'+d[N].height+'">'+U+"</li>"}if(d=q.querySelector(".zwp-qualityMenu"))d.innerHTML=C,L.mQuery(d).find(".zwp-quality-item").click(function(S){S.preventDefault();S.stopPropagation();S=L.mQuery(this);S.hasClass("active")||(S.siblings().removeClass("active"),S.addClass("active"),S=this.getAttribute("data-idx"),
332
- "function"===typeof h.switchQualityLevel&&h.switchQualityLevel(S))});q.style.display="block"}}}.bind(c);c.updateQualityLevel=function(d,h){if(this&&this.controlbar){var q=this.controlbar.querySelector(".zwp-qualityButton");q&&(q=q.querySelector(".zwp-qualityMenu"))&&L.mQuery(q).children(".zwp-quality-item").each(function(C,G){C=parseInt(G.getAttribute("data-idx"));G=L.mQuery(G);-1===C?h&&!G.hasClass("active")&&(G.siblings(".active").removeClass("active"),G.addClass("active")):d===C?(h||G.hasClass("active")||
333
- (G.siblings(".active").removeClass("active"),G.addClass("active")),G.hasClass("current")||(G.siblings(".current").removeClass("current"),G.addClass("current"))):G.hasClass("current")&&G.removeClass("current")})}}.bind(c);c.buildStreamSelector=function(){var d=this;if(d.multiStreams){var h=d.controlbar.querySelector(".zwp-qualityButton");if(h){var q="",C=d.multiStreams.murls;if(!Array.isArray(C)||1!==C.length){for(var G in C){var N=C[G];N="object"===typeof N?N.name:G;q+='<li class="zwp-quality-item" data-stream="'+
334
- N+'">'+qa(N,N)+"</li>"}if(C=h.querySelector(".zwp-qualityMenu"))C.innerHTML=q,q=L.mQuery(C).find(".zwp-quality-item"),q.click(function(U){U.preventDefault();U.stopPropagation();U=this.getAttribute("data-stream");if(d.multiStreams.curStream!==U){var S=d.multiStreams.murls;if(Array.isArray(S))for(var T in S){var V=S[T];if(V.name===U){var W=V.url;break}}else W=S[U];d.__switchStream(W);d.multiStreams.curStream=U;W=L.mQuery(this);W.hasClass("active")||(W.siblings(".active").removeClass("active"),W.addClass("active"));
335
- U=qa(U,U);d.toast("\u5df2\u7ecf\u4e3a\u60a8\u5207\u6362\u5230"+U+"\u753b\u8d28")}}),q.each(function(U,S){U=this.getAttribute("data-stream");if(d.multiStreams.curStream===U&&(U=L.mQuery(this),!U.hasClass("active")))return U.siblings(".active").removeClass("active"),U.addClass("active"),!1});h.style.display="block"}}}}.bind(c);c.createSubtitlesMenu=function(d,h){var q=this;q.controlbar&&(h=q.controlbar.querySelector(".zwp-subtitleMenu"),d=lb(d),h.innerHTML=d,delete h.bindSwitchEvent,O(h,"zwp-autosize"),
336
- L.mQuery(h).find(".zwp-subtitles-item").click(function(C){C.preventDefault();C.stopPropagation();C=L.mQuery(this);C.hasClass("active")||(C.siblings().removeClass("active"),C.addClass("active"),C=this.getAttribute("data-id"),"function"===typeof q.switchSubtitleTrack&&q.switchSubtitleTrack(C))}),d=q.controlbar.querySelector(".zwp-subtitleButton"))&&(d.style.display="block")}.bind(c);c.updateSubtitleTrack=function(d){}.bind(c);c.resetSubtitleMenu=function(){if(this.controlbar){var d=this.controlbar.querySelector(".zwp-subtitleButton");
337
- d&&(d.style.display="none")}}.bind(c);c.__getDanmuBarDock=function(){var d=this.progressBar.timeInfo.querySelector(".zwp_danmuBarDock");d||(d=document.createElement("DIV"),d.setAttribute("class","zwp_danmuBarDock"),this.progressBar.timeInfo.appendChild(d),Ba.addElement(d),d.addEventListener("resize",function(h){var q=this;q.resizeTimer||(q.resizeTimer=L.setTimeout(function(){console.log("danmuBarDock resize");350>d.clientWidth?O(d,"zwp-mini"):P(d,"zwp-mini");delete q.resizeTimer},50))}.bind(this)));
338
- return d}.bind(c);c.buildDanmuToolbar=function(d,h){var q=this,C;if(!q.danmuToolbar){d&&(C=document.querySelector("#"+d));if(!C){if(!q.overlay_layers)return;h=null;C=q.progressBar&&q.progressBar.timeInfo?q.__getDanmuBarDock():q.overlay_layers}d=mb();C.insertAdjacentHTML("beforeend",d);q.danmuToolbar=C.querySelector(".zwp_danmu-controlbar");h&&O(q.danmuToolbar,h);C.appendChild(q.danmuToolbar);(h=q.danmuToolbar.querySelector(".zwp_switch"))&&h.addEventListener("click",function(G){G.stopPropagation();
339
- G=G.currentTarget;if(K(G,"zwp_switch")){Oa(G);var N=K(G,"switch_on");G=L.$$(this.danmuToolbar);if(N){var U=G.find("button.btn_submit");U.removeClass("vtb_disabled").removeAttr("disabled");this.setEnableDanmu(!0);N=G.find(".barrage_inp_text");N.removeAttr("readonly").removeAttr("disabled").removeClass("disabled");"on"!=N.attr("keydown")&&(N.keydown(function(S){13==S.which&&0<U.length&&U.trigger("click")}),N.attr("keydown","on"));G.find(".zwp-barrage_form").css("background-color","#28303db3").children("a.btn_bubble").toggleClass("disabled")}else G.find("button.btn_submit").addClass("vtb_disabled").attr({disabled:"disabled"}),
340
- this.setEnableDanmu(!1),G.find(".barrage_inp_text").attr("readonly","readonly").attr("disabled","disabled").addClass("disabled"),G.find(".zwp-barrage_form").css("background-color","#202020b3").children("a.btn_bubble").toggleClass("disabled")}}.bind(q));(h=q.danmuToolbar.querySelector(".barrage_login"))&&h.addEventListener("click",function(G){G.preventDefault();G.stopPropagation();alert("login")});(h=q.danmuToolbar.querySelector(".zwp_dmconfig"))&&h.addEventListener("click",function(G){G.preventDefault();
341
- G.stopPropagation();this.zwplayer=q;qb(G,this)});(h=q.danmuToolbar.querySelector(".btn_bubble"))&&h.addEventListener("click",function(G){G.preventDefault();G.stopPropagation();gb(this,G)});(h=q.danmuToolbar.querySelector(".btn_submit"))&&h.addEventListener("click",function(G){G.preventDefault();G.stopPropagation();a:{if(!this.inpbox){$inpbox=$$(this).parent().children("DIV.zwp-barrage_inp").children(".barrage_inp_text");if(!$inpbox)break a;this.inpbox=$inpbox}if(q){G=this.inpbox.val();if(""==G)break a;
342
- -1!=G.indexOf("&")&&(G=G.replace(/&/g,"&amp;"));-1!=G.indexOf("<")&&(G=G.replace(/</g,"&lt;"));-1!=G.indexOf(">")&&(G=G.replace(/>/g,"&gt;"));-1!=G.indexOf('"')&&(G=G.replace(/"/g,"&quot;"));-1!=G.indexOf("'")&&(G=G.replace(/'/g,"&#039;"));if(!q.sendDanmu(G))break a}this.inpbox.val("")}})}}.bind(c);c.reposDanmuToolbar=function(d){if(this.danmuToolbar&&this.progressBar&&this.progressBar.timeInfo){var h=this.__getDanmuBarDock(),q=this.danmuToolbar.parentNode;q&&(d?q!==h&&(q.removeChild(this.danmuToolbar),
330
+ h&&(h.innerHTML='<li class="zwp-quality-item zwp-disabled" data-index="-1">No quality</li>');d.style.display="none"}}}.bind(c);c.createQualitiesMenu=function(d){var h=this;if(1>=d.length)h.resetQualitiesMenu();else{var q=h.controlbar.querySelector(".zwp-qualityButton");if(q){var C="",H=pa("level","Level")+" ";C+='<li class="zwp-quality-item active" data-idx="-1">'+pa("qs-auto","AUTO SWITCH")+"</li>";for(var P=0;P<d.length;P++){var N="";"undefined"!==typeof d[P]&&(N=d[P].width&&d[P].height?d[P].width+
331
+ "x"+d[P].height:H+(P+1));"undefined"!==typeof d[P].bitrate&&(N+=" ("+parseInt(d[P].bitrate/1E3)+"kbps)");C+='<li class="zwp-quality-item" data-br="'+d[P].bitrate+'" data-idx="'+d[P].qualityIndex+'" data-vh="'+d[P].height+'">'+N+"</li>"}if(d=q.querySelector(".zwp-qualityMenu"))d.innerHTML=C,K.mQuery(d).find(".zwp-quality-item").click(function(V){V.preventDefault();V.stopPropagation();V=K.mQuery(this);V.hasClass("active")||(V.siblings().removeClass("active"),V.addClass("active"),V=this.getAttribute("data-idx"),
332
+ "function"===typeof h.switchQualityLevel&&h.switchQualityLevel(V))});q.style.display="block"}}}.bind(c);c.updateQualityLevel=function(d,h){if(this&&this.controlbar){var q=this.controlbar.querySelector(".zwp-qualityButton");q&&(q=q.querySelector(".zwp-qualityMenu"))&&K.mQuery(q).children(".zwp-quality-item").each(function(C,H){C=parseInt(H.getAttribute("data-idx"));H=K.mQuery(H);-1===C?h&&!H.hasClass("active")&&(H.siblings(".active").removeClass("active"),H.addClass("active")):d===C?(h||H.hasClass("active")||
333
+ (H.siblings(".active").removeClass("active"),H.addClass("active")),H.hasClass("current")||(H.siblings(".current").removeClass("current"),H.addClass("current"))):H.hasClass("current")&&H.removeClass("current")})}}.bind(c);c.buildStreamSelector=function(){var d=this;if(d.multiStreams&&d.controlbar){var h=d.controlbar.querySelector(".zwp-qualityButton");if(h){var q="",C=d.multiStreams.murls;if(!Array.isArray(C)||1!==C.length){for(var H in C){var P=C[H];P="object"===typeof P?P.name:H;q+='<li class="zwp-quality-item" data-stream="'+
334
+ P+'">'+pa(P,P)+"</li>"}if(C=h.querySelector(".zwp-qualityMenu"))C.innerHTML=q,q=K.mQuery(C).find(".zwp-quality-item"),q.click(function(N){N.preventDefault();N.stopPropagation();N=this.getAttribute("data-stream");if(d.multiStreams.curStream!==N){var V=d.multiStreams.murls;if(Array.isArray(V))for(var S in V){var U=V[S];if(U.name===N){var g=U.url;break}}else g=V[N];d.__switchStream(g);d.multiStreams.curStream=N;g=K.mQuery(this);g.hasClass("active")||(g.siblings(".active").removeClass("active"),g.addClass("active"));
335
+ N=pa(N,N);d.toast("\u5df2\u7ecf\u4e3a\u60a8\u5207\u6362\u5230"+N+"\u753b\u8d28")}}),q.each(function(N,V){N=this.getAttribute("data-stream");if(d.multiStreams.curStream===N&&(N=K.mQuery(this),!N.hasClass("active")))return N.siblings(".active").removeClass("active"),N.addClass("active"),!1});h.style.display="block"}}}}.bind(c);c.createSubtitlesMenu=function(d,h){var q=this;q.controlbar&&(h=q.controlbar.querySelector(".zwp-subtitleMenu"),d=lb(d),h.innerHTML=d,delete h.bindSwitchEvent,M(h,"zwp-autosize"),
336
+ K.mQuery(h).find(".zwp-subtitles-item").click(function(C){C.preventDefault();C.stopPropagation();C=K.mQuery(this);C.hasClass("active")||(C.siblings().removeClass("active"),C.addClass("active"),C=this.getAttribute("data-id"),"function"===typeof q.switchSubtitleTrack&&q.switchSubtitleTrack(C))}),d=q.controlbar.querySelector(".zwp-subtitleButton"))&&(d.style.display="block")}.bind(c);c.updateSubtitleTrack=function(d){}.bind(c);c.resetSubtitleMenu=function(){if(this.controlbar){var d=this.controlbar.querySelector(".zwp-subtitleButton");
337
+ d&&(d.style.display="none")}}.bind(c);c.__getDanmuBarDock=function(){var d=this.progressBar.timeInfo.querySelector(".zwp_danmuBarDock");d||(d=document.createElement("DIV"),d.setAttribute("class","zwp_danmuBarDock"),this.progressBar.timeInfo.appendChild(d),Ba.addElement(d),d.addEventListener("resize",function(h){var q=this;q.resizeTimer||(q.resizeTimer=K.setTimeout(function(){console.log("danmuBarDock resize");350>d.clientWidth?M(d,"zwp-mini"):Q(d,"zwp-mini");delete q.resizeTimer},50))}.bind(this)));
338
+ return d}.bind(c);c.buildDanmuToolbar=function(d,h){var q=this,C;if(!q.danmuToolbar){d&&(C=document.querySelector("#"+d));if(!C){if(!q.overlay_layers)return;h=null;C=q.progressBar&&q.progressBar.timeInfo?q.__getDanmuBarDock():q.overlay_layers}d=mb();C.insertAdjacentHTML("beforeend",d);q.danmuToolbar=C.querySelector(".zwp_danmu-controlbar");h&&M(q.danmuToolbar,h);C.appendChild(q.danmuToolbar);(h=q.danmuToolbar.querySelector(".zwp_switch"))&&h.addEventListener("click",function(H){H.stopPropagation();
339
+ H=H.currentTarget;if(L(H,"zwp_switch")){Oa(H);var P=L(H,"switch_on");H=K.$$(this.danmuToolbar);if(P){var N=H.find("button.btn_submit");N.removeClass("vtb_disabled").removeAttr("disabled");this.setEnableDanmu(!0);P=H.find(".barrage_inp_text");P.removeAttr("readonly").removeAttr("disabled").removeClass("disabled");"on"!=P.attr("keydown")&&(P.keydown(function(V){13==V.which&&0<N.length&&N.trigger("click")}),P.attr("keydown","on"));H.find(".zwp-barrage_form").css("background-color","#28303db3").children("a.btn_bubble").toggleClass("disabled")}else H.find("button.btn_submit").addClass("vtb_disabled").attr({disabled:"disabled"}),
340
+ this.setEnableDanmu(!1),H.find(".barrage_inp_text").attr("readonly","readonly").attr("disabled","disabled").addClass("disabled"),H.find(".zwp-barrage_form").css("background-color","#202020b3").children("a.btn_bubble").toggleClass("disabled")}}.bind(q));(h=q.danmuToolbar.querySelector(".barrage_login"))&&h.addEventListener("click",function(H){H.preventDefault();H.stopPropagation();alert("login")});(h=q.danmuToolbar.querySelector(".zwp_dmconfig"))&&h.addEventListener("click",function(H){H.preventDefault();
341
+ H.stopPropagation();this.zwplayer=q;qb(H,this)});(h=q.danmuToolbar.querySelector(".btn_bubble"))&&h.addEventListener("click",function(H){H.preventDefault();H.stopPropagation();gb(this,H)});(h=q.danmuToolbar.querySelector(".btn_submit"))&&h.addEventListener("click",function(H){H.preventDefault();H.stopPropagation();a:{if(!this.inpbox){$inpbox=$$(this).parent().children("DIV.zwp-barrage_inp").children(".barrage_inp_text");if(!$inpbox)break a;this.inpbox=$inpbox}if(q){H=this.inpbox.val();if(""==H)break a;
342
+ -1!=H.indexOf("&")&&(H=H.replace(/&/g,"&amp;"));-1!=H.indexOf("<")&&(H=H.replace(/</g,"&lt;"));-1!=H.indexOf(">")&&(H=H.replace(/>/g,"&gt;"));-1!=H.indexOf('"')&&(H=H.replace(/"/g,"&quot;"));-1!=H.indexOf("'")&&(H=H.replace(/'/g,"&#039;"));if(!q.sendDanmu(H))break a}this.inpbox.val("")}})}}.bind(c);c.reposDanmuToolbar=function(d){if(this.danmuToolbar&&this.progressBar&&this.progressBar.timeInfo){var h=this.__getDanmuBarDock(),q=this.danmuToolbar.parentNode;q&&(d?q!==h&&(q.removeChild(this.danmuToolbar),
343
343
  h.appendChild(this.danmuToolbar),this.oldDanmuParentNode=q):this.oldDanmuParentNode&&(h.removeChild(this.danmuToolbar),this.oldDanmuParentNode.appendChild(this.danmuToolbar),delete this.oldDanmuParentNode))}}.bind(c);c.sendDanmu=function(d){if("function"===typeof this._config.sendDanmu){var h="";this.danmuSetting.border&&(h+=',"border":"1"');this.danmuSetting.color&&(h+=',"color":"#'+this.danmuSetting.color+'"');this._config.sendDanmu('{"type":"danmu","text":"'+d+'"'+h+"}");return!0}alert("No danmu send function is setup");
344
- return!1}.bind(c);c.showContextMenu=function(d){var h=this,q=d.offsetX;d=d.offsetY;var C=h.playerContainer.getBoundingClientRect(),G=C.width;C=C.height;var N="left",U="top",S=q,T=d;q+180>G&&(N="right",S=G-q);d+148>C&&(U="bottom",T=C-d);if(h.contextMenu)h.contextMenu.style["left"===N?"right":"left"]=null,h.contextMenu.style["top"===U?"bottom":"top"]=null,h.contextMenu.style[N]=S+"px",h.contextMenu.style[U]=T+"px";else{q='<div class="zwp-popupmenu" style="'+N+": "+S+"px; "+U+":"+T+'px;"><a class="zwp-menuitem" data-action="document" href="https://www.zwplayer.com/docment" target="zwplayer-doc"><span class="zwp-menucaption">'+
345
- (qa("player-help","Help and document")+"</span></a>");q+='<a class="zwp-menuitem" data-action="version" href="https://www.zwplayer.com/version?v=3.1.2" title="Build: 20240507" target="zwplayer-version"><span class="zwp-menucaption">'+qa("version-update","Version update")+' (<span class="zwp-version">'+qa("current")+": v3.1.2</span>) </span></a>";q=q+'<span class="zwp-menuseperator" action="version"></span><a class="zwp-menuitem" data-action="about" href="https://www.zwplayer.com/about"><span class="zwp-menucaption">'+
346
- (qa("about","About")+" zwplayer</span></a>");h.playerContainer.insertAdjacentHTML("beforeEnd",q+"</div>");h.contextMenu=h.playerContainer.querySelector(".zwp-popupmenu");var V=function(W){W.stopPropagation();W.preventDefault();var g=this.getAttribute("data-action");this.getAttribute("target");var t=this.getAttribute("href");h.hideContextMenu();setTimeout(function(){"about"===g?L.open(t,"zwplayer-about"):"version"===g?L.open(t,"zwplayer-version"):"document"===g&&L.open(t,"zwplayer-doc")},10)};h.contextMenu.querySelectorAll("a.zwp-menuitem").forEach(function(W){W.addEventListener("click",
347
- V,!1)});document.addEventListener("click",h.hideContextMenu)}}.bind(c);c.hideContextMenu=function(){this.contextMenu&&(this.playerContainer.removeChild(this.contextMenu),delete this.contextMenu,document.removeEventListener("click",this.hideContextMenu))}.bind(c);c.toast=function(d,h,q,C){var G=this;h=h||2E3;G.toastTimerId&&(clearTimeout(G.toastTimerId),G.toastBox&&(G.overlay_layers.removeChild(G.toastBox),delete G.toastBox));if("object"===typeof d){if("icon"in d)var N=d.icon;d=d.text}var U=document.createElement("div"),
348
- S="",T="zwp-toast zwp-center";N&&(T+=" zwp-toast-icon",S='<i class="xicon xicon-'+N+'"></i>');q&&(S+='<a href="javascript:void(0)" class="zwp-toast-closebtn"><i class="xicon xicon-close"></i></a>',T+=" zwp-use-close");C&&(T+=" zwp-lite");S+='<span class="zwp-toast-text">'+d+"</span>";U.setAttribute("class",T);U.innerHTML=S;G.overlay_layers.appendChild(U);G.toastBox=U;var V=function(W){if(G.toastBox){var g=G.toastBox.querySelector(".zwp-toast-closebtn");g&&g.removeEventListener("click",V);G.overlay_layers.removeChild(G.toastBox);
349
- delete G.toastBox}G.toastTimerId&&(W&&"click"===W.type&&clearTimeout(G.toastTimerId),delete G.toastTimerId)};G.toastTimerId=L.setTimeout(V,h);q&&(q=U.querySelector(".zwp-toast-closebtn"))&&q.addEventListener("click",V)}.bind(c);c.mutedConfirmBox=function(){var d=this;d.popup_layers||(d.popup_layers=document.createElement("div"),d.popup_layers.setAttribute("class","zwp__popup_layers"),d.playerContainer.appendChild(d.popup_layers));var h=document.createElement("div");h.setAttribute("class","zwp-toast zwp-confirm zwp-center");
350
- h.innerHTML='<span class="zwp-toast-text">\u56e0<a href="#mutemore" class="mutemore">\u6d4f\u89c8\u5668\u9650\u5236</a>\uff0c\u9700\u8981\u70b9\u51fb<a href="#openaudio" class="openaudio">\u6253\u5f00\u58f0\u97f3</a><button class="closeBtn" title="\u5173\u95ed\u63d0\u793a"><i class="xicon xicon-close"></i></button></span>';d.popup_layers.appendChild(h);d.mutedTipBox=h;var q=h.querySelector(".closeBtn");q&&q.addEventListener("click",function(C){C.preventDefault();d.mutedTipBox&&(d.popup_layers.removeChild(d.mutedTipBox),
351
- d.popup_layers.style.display=null,delete d.mutedTipBox);L.allowAutoAudioPlay=!0});(q=h.querySelector(".openaudio"))&&q.addEventListener("click",function(C){C.preventDefault();C.stopPropagation();d.mutedTipBox&&(d.popup_layers.removeChild(d.mutedTipBox),d.popup_layers.style.display=null,delete d.mutedTipBox);d.setMuted(!1);L.allowAutoAudioPlay=!0});(q=h.querySelector(".mutemore"))&&q.addEventListener("click",function(C){C.preventDefault();C.stopPropagation();var G=h.querySelector(".moreInfoBox");G||
352
- (h.insertAdjacentHTML("beforeend",'<div class="moreInfoBox"><div class="info-text">\u5f53\u4f60\u8bbf\u95ee\u672c\u7f51\u7ad9\u7684\u6b21\u6570\u8f83\u5c11\uff0c\u6216\u7ecf\u5e38\u9759\u97f3\u64ad\u653e\u65f6\uff0c\u6d4f\u89c8\u5668\u53ef\u80fd\u4f1a\u9650\u5236\u7f51\u7ad9\u97f3\u91cf\uff0c\u4f7f\u7f51\u7ad9\u65e0\u6cd5\u81ea\u52a8\u6267\u884c\u6709\u58f0\u64ad\u653e</div><div class="info-control"><button class="info-btn">\u6211\u77e5\u9053\u4e86</button></div></div>'),G=h.querySelector(".moreInfoBox"),
353
- G.querySelector(".info-btn").addEventListener("click",function(N){N.preventDefault();N.stopPropagation();G.style.display="none"}));G&&(G.style.display="block");L.allowAutoAudioPlay=!0});d.popup_layers.style.display="block"}.bind(c);"string"==typeof c._config.playerElm?(e=c._config.playerElm,"#"!=e.charAt(0)&&(e="#"+e),c.playerElm=document.querySelector(e)):Ua(c._config.playerElm)&&(c.playerElm=c._config.playerElm);c.playerElm?K(c.playerElm,"zwp-wrap")||(c.playerElmOldClass=c.playerElm.getAttribute("class"),
354
- O(c.playerElm,"zwp-wrap"),c.doRemovePlayerClass=!0):(e="","string"==typeof c._config.playerElm?(e=c._config.playerElm,"#"==e.charAt(0)&&(e=e.substr(1))):e="ZWP-"+(new Date).getTime(),c.playerElm=document.createElement("DIV"),c.playerElm.id=e,c.playerElm.style.position="absolute",c.playerElm.style.left=0,c.playerElm.style.top=0,c.playerElm.style.width="640px",c.playerElm.style.height="360px",document.body.appendChild(c.playerElm),c.playerElm.setAttribute("class","zwp-wrap"),c.doDeletePlayerElm=!0);
355
- c.playerContainer=document.createElement("DIV");c.playerContainer.setAttribute("class","zwp-container");c.playerElm.appendChild(c.playerContainer);"string"==typeof c._config.videoElm?(e=c._config.videoElm,"#"!=e.charAt(0)&&(e="#"+e),c.videoEl=document.querySelector(e)):Ua(c._config.videoElm)&&(c.videoEl=c._config.videoElm);if(!c.videoEl){var v=document.createElement("DIV");v.setAttribute("class","zwp-videoWrapper");c.playerContainer.appendChild(v);Ba.addElement(v);v.addEventListener("resize",function(d){this._config.video_rotated&&
356
- this.rotateVideo()}.bind(c));c.videoWrapper=v;c.videoEl=document.createElement("VIDEO");"string"==typeof c._config.videostyle&&c.videoEl.setAttribute("style",c._config.videostyle);"string"==typeof c._config.videoclass&&c.videoEl.setAttribute("class",c._config.videoclass);c._config.videostyle||c._config.videoclass||c.videoEl.setAttribute("style","width:100%;height:100%;");"string"==typeof c._config.videoElm&&(e=c._config.videoElm,"#"==e.charAt(0)&&(e=e.substr(1)),c.videoEl.id=e);c.videoEl.setAttribute("playsinline",
357
- "");c.videoEl.setAttribute("webkit-playsinline","");c.videoEl.setAttribute("autoplay","");v.appendChild(c.videoEl);c.videoRemoveWhenClose=!0}c.videoEl.volume=c._config.defVolume/100;c._config.poster&&c.videoEl.setAttribute("poster",c._config.poster);if(!c._config.disableOverlayLayer&&(e=document.createElement("div"),e.setAttribute("class","zwp__layers"),e.innerHTML='<div class="zwp__overlay zwp__layer zwp_loadingicon" style="width: 100%; height: 100%; display: none;"><div class="zwp__overlay-loading"><span class="zwp__overlay-loading-bg-img"><svg width="80px" height="80px" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg" stroke="#fff"><g fill="none" fill-rule="evenodd"><g transform="translate(1 1)" stroke-width="2"><circle stroke-opacity=".5" cx="18" cy="18" r="18"/><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="1s" repeatCount="indefinite"/></path></g></g></svg></span></div></div><div class="zwp__overlay zwp__layer zwp__overlay-play" style="width: 100%; height: 100%; display: none;"><div class="zwp__overlay-button" role="button" tabindex="0" aria-label="play" aria-pressed="false" data-action="play"><svg class="icon" width="96px" height="96px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#c2c2c2" d="M512.61025 48.820024a463.790226 463.790226 0 1 0 463.790227 463.790226A463.790226 463.790226 0 0 0 512.61025 48.820024z m0 854.350417a390.560191 390.560191 0 1 1 390.560191-390.560191 390.560191 390.560191 0 0 1-390.560191 390.560191z m166.720382-414.970203l-120.341359-70.300834-127.908463-74.694636a22.945411 22.945411 0 0 0-32.465315 24.410011v288.526341a22.945411 22.945411 0 0 0 32.465315 24.410012l127.908463-74.694636 120.341359-70.056734a28.559714 28.559714 0 0 0 0-47.599524z" /></svg></div></div>',
358
- c.playerContainer.appendChild(e),c.overlay_layers=e,c.bigPlayOverlay=e.querySelector(".zwp__overlay-play"),c.bigPlayBtn=c.bigPlayOverlay.querySelector(".zwp__overlay-button"),c.loadingOverlay=e.querySelector(".zwp_loadingicon"),c._config.disablePlayBtn?O(c.bigPlayBtn,"zwp_disabled"):c.bigPlayBtn.addEventListener("click",function(d){d.preventDefault();d.stopPropagation();this.on_btnclick(d)}.bind(c)),c._config.enableDanmu&&(c.danmuPlayer=HUAYI.Danmu.create({playerId:e})),e.addEventListener("contextmenu",
359
- function(d){d.preventDefault();d.stopPropagation();Va||this.showContextMenu(d)}.bind(c)),e.addEventListener("click",function(d){var h=this;d=function(q){q=q.querySelector(".closeBtn");var C=document.createEvent("Event");C.initEvent("click",!0,!0);q.dispatchEvent(C)};h.infoViewer?d(h.infoViewer):h.colorSettingPanel?d(h.colorSettingPanel):h.contextMenu?h.hideContextMenu():h._config.disableClickPause||h._config.disablePlayBtn||h._config.isLive||(h.overlayLayerClickTimer&&(L.clearTimeout(h.overlayLayerClickTimer),
360
- delete h.overlayLayerClickTimer),h.videoEl&&(h.overlayLayerClickTimer=L.setTimeout(function(){h.videoEl.paused||h.videoEl.ended?(h.videoEl.play(),h.setplaystate(!0)):(h.videoEl.pause(),h.setplaystate(!1));delete h.overlayLayerClickTimer},300)))}.bind(c)),c._config.logo)){if("object"===typeof c._config.logo){if("string"===typeof c._config.logo.icon)var B=c._config.logo.icon}else"string"===typeof c._config.logo&&(B=c._config.logo);if(B){v='<div class="zwp-logo"';if("object"===typeof c._config.logo){var M=
361
- "";"dock"in c._config.logo?M+=("left"===c._config.logo.dock?"left":"right")+": "+(c._config.logo.x||"5%")+";":"x"in c._config.logo&&(M+="right: "+c._config.logo.x+";");"y"in c._config.logo&&(M+="top: "+c._config.logo.y+";");"width"in c._config.logo&&(M+="width: "+c._config.logo.width+";");if("opacity"in c._config.logo){var b=c._config.logo.opacity/100;1<b&&(b=1);M+="opacity: "+b+";"}M&&(v+=' style="'+M+'"')}e.insertAdjacentHTML("afterbegin",v+('><img src="'+B+'"></div>'))}}if(c._config.nativecontrols)c.videoEl.setAttribute("controls",
362
- "controls"),c.overlay_layers&&(c.overlay_layers.style.bottom="70px"),c.videoEl.addEventListener("fullscreenchange",function(d){return!1}.bind(c));else if(c._config.controlbar){var Q=document.createElement("div");Q.setAttribute("class","zwp-controlbar");c._config.isLive||O(Q,"zwp-vodplayer");Q.innerHTML=rb(c._config);c.playerContainer.appendChild(Q);c.controlbar=Q;if(c.controlbar){Q.addEventListener("dblclick",function(d){d.stopPropagation()});B=Q.querySelectorAll("button.zwpbtn");0<B.length&&(c.btnBindZwp=
363
- !0,B.forEach(function(d){d.addEventListener("click",c.on_btnclick)}));c._config.disablePlayBtn&&(B=Q.querySelector(".zwp_playbtn"),O(B,"zwp_disabled"),B.setAttribute("disabled","disabled"));B=Q.querySelectorAll(".zwp-speedMenu>li.zwp-speed-item");0<B.length&&B.forEach(function(d){d.addEventListener("click",c.on_speedItemclick)});var z=Q.querySelector(".zwp-volume-docker");if(z){c.muteBtn=z.querySelector("button.zwp-muteBtn");c.volslider=z.querySelector(".zwp-volume-slider");c.voltotal=z.querySelector(".zwp-volume-total");
364
- c.volcurrent=c.volslider.querySelector(".zwp-volume-current");c.volthumb=c.volslider.querySelector(".zwp-volume-handle");var la=function(d){if(null!==d&&!isNaN(d)&&void 0!==d){d=Math.max(0,d);d=Math.min(d,1);if(0===d){P(z,"zwp__mute");O(z,"zwp__unmute");var h=c.muteBtn;h.setAttribute("title","unmute");h.setAttribute("aria-label","unmute")}else P(z,"zwp__unmute"),O(z,"zwp__mute"),h=c.muteBtn,h.setAttribute("title","muted"),h.setAttribute("aria-label","muted");h=c.volthumb;var q=c.volcurrent;d=100*
365
- d+"%";var C=getComputedStyle(h);q.style.bottom=0;q.style.height=d;h.style.bottom=d;h.style.marginBottom=-parseFloat(C.height)/2+"px"}},I=function(d){var h=A(c.voltotal),q=getComputedStyle(c.voltotal),C=!0;"touchmove"==d.type&&(d.changedTouches&&(C=d.changedTouches[0],d.pageX=C.pageX,d.pageY=C.pageY),C=!1);q=parseFloat(q.height);q=(q-(d.pageY-h.top))/q;0!==h.top&&0!==h.left&&(q=Math.max(0,q),q=Math.min(q,1),la(q),c.setMuted(0===q),c.setVolume(q),C&&d.preventDefault(),d.stopPropagation())};c.positionVolumeThumb=
366
- la;c.on_volthumb_mousemove=function(d){var h=d.target;n&&(h===c.volslider||h.closest(".zwp-volume-slider"))&&I(d)}.bind(c);c.on_volthumb_mouseup=function(d){n&&("onpointerout"in document?(document.removeEventListener("pointermove",c.on_volthumb_mousemove),document.removeEventListener("pointerup",c.on_volthumb_mouseup),document.removeEventListener("touchmove",c.on_volthumb_mousemove),document.removeEventListener("touchend",c.on_volthumb_mouseup)):(document.removeEventListener("mousemove",c.on_volthumb_mousemove),
367
- document.removeEventListener("mouseup",c.on_volthumb_mouseup)),n=!1);m||(c.volslider.style.display="none");console.log("volthumb_mouseup:"+d.type)}.bind(c);c.on_volthumb_mousedown=function(d){I(d);"onpointerout"in document?(document.addEventListener("pointermove",c.on_volthumb_mousemove),document.addEventListener("pointerup",c.on_volthumb_mouseup),document.addEventListener("touchmove",c.on_volthumb_mousemove),document.addEventListener("touchend",c.on_volthumb_mouseup)):(document.addEventListener("mousemove",
368
- c.on_volthumb_mousemove),document.addEventListener("mouseup",c.on_volthumb_mouseup));n=!0;d.preventDefault();d.stopPropagation()}.bind(c);var ja=c.volslider;z.addEventListener("mouseenter",function(d){d.target===z&&(ja.style.display="block",m=!0,d.preventDefault(),d.stopPropagation())});z.addEventListener("focusin",function(){ja.style.display="block";m=!0});z.addEventListener("focusout",function(d){if(!d.relatedTarget||d.relatedTarget&&!d.relatedTarget.matches(".zwp-volume-slider"))ja.style.display=
369
- "none"});z.addEventListener("mouseleave",function(){m=!1;n||(ja.style.display="none")});z.addEventListener("focusout",function(){m=!1});z.addEventListener("keydown",function(d){var h=d.which||d.keyCode||0;d.preventDefault();d.stopPropagation();32==h&&(c.videoEl.muted?c.setMuted(!1):c.setMuted(!0))});ja.addEventListener("dragstart",function(){return!1});ja.addEventListener("mouseover",function(){m=!0});ja.addEventListener("focusin",function(){ja.style.display="block";m=!0});ja.addEventListener("focusout",
370
- function(){m=!1;n||(ja.style.display="none")});ja.addEventListener("mousedown",c.on_volthumb_mousedown)}if(B=Q.querySelector(".zwp-optionPanel"))B=B.querySelectorAll(".action-item"),0<B.length&&B.forEach(function(d){d.addEventListener("click",c.on_optionItemclick)})}}c._config.autoSmallWindow&&!c.windowScrollHandler&&(c.windowScrollHandler=function(d){if(!this.isFullscr&&!this.isFullscrWin&&this.videoEl&&this.playerElm&&this.isPlaying&&!this.isInPicInPic)if(d=u(this.playerElm),(document.documentElement.scrollTop||
371
- document.body.scrollTop)>=d+this.playerElm.offsetHeight-100){if(!this.smallWindowMode){var h=this.playerContainer;hb(h,function(){P(h,"zwp-smallwindow");h.style.left=null;h.style.top=null;h.style.width=null;h.style.height=null});O(h,"zwp-smallwindow");this.smallWindowMode=!0}}else this.smallWindowMode&&(h=this.playerContainer,P(h,"zwp-smallwindow"),h.style.left=null,h.style.top=null,h.style.width=null,h.style.height=null,delete this.smallWindowMode)}.bind(c),L.addEventListener("scroll",c.windowScrollHandler));
372
- c._config.clientip||(c._config.clientip="");c.videoEl&&(c._config.muted?c.setMuted(!0):"undefined"===typeof L.allowAutoAudioPlay?(c.setMuted(!0),cb(function(d){d?c.setMuted(!1):c.mutedConfirmBox();L.allowAutoAudioPlay=d})):L.allowAutoAudioPlay||(c.setMuted(!0),c.mutedConfirmBox()),(c._config.snapshotButton||c._config.allowSnapshot)&&c.videoEl.setAttribute("crossorigin","Anonymous"));B=function(d){var h=this;if(h.controlbar)if(h.isControlbarhidden){h.controlbar.style.display="flex";P(h.playerElm,"hide-cursor");
373
- d=d||L.event;if(d.srcElement!=h.controlbar&&h.overlay_layers){var q=h.overlay_layers.offsetHeight,C=0;"undefined"!==typeof d.offsetY?C=q-d.offsetY:"undefined"!==typeof d.layerY&&(C=q-d.layerY);if(80<C)return}Pa(h.controlbar,500,function(G){G&&h.startHideControlbar(h)});h.isControlbarhidden=!1}else h.startHideControlbar(h)}.bind(c);c.playerElm.addEventListener("mousemove",B);c.playerElm.addEventListener("touchmove",B);c.playerElm.addEventListener("dblclick",function(d){this.overlayLayerClickTimer&&
374
- (L.clearTimeout(this.overlayLayerClickTimer),delete this.overlayLayerClickTimer);if(this.controlbar&&(d={},d.currentTarget=this.controlbar.querySelector(".zwp-fullscrBtn"),d.currentTarget))this.on_btnclick(d)}.bind(c));"undefined"==typeof c._config.autoplay&&(c._config.autoplay=!0);c._config.url&&c._config.autoplay&&c.play(c._config.url);"function"==typeof c._config.onready&&c._config.onready.call(c);c._config.chapters&&(c.chapters=c._config.chapters);c._config.lostFocusPause&&"undefined"!==typeof document.visibilityState&&
375
- document.addEventListener("visibilitychange",function(){this._config.isLive||this.isInPicInPic||("visible"===document.visibilityState?this.focusPaused&&this.videoEl.paused&&!this.videoEl.ended&&(this.videoEl.play(),this.setplaystate(!0),delete this.focusPaused):this.focusPaused||this.videoEl.paused||this.videoEl.ended||(this.videoEl.pause(),this.setplaystate(!1),this.focusPaused=!0))}.bind(c))},aa=async function(e){if("undefined"==typeof L.RTCPeerConnection)return alert("This browser does not support the stream.\r\nPlease play this stream in chrome!"),
376
- !1;var n=J(e.murl);if(!n)return e.toast("Invalid url"),!1;e.peer_conn=new RTCPeerConnection("function"==typeof RTCPeerConnection.prototype.addTransceiver?{iceServers:[],iceTransportPolicy:"all",bundlePolicy:"max-bundle",rtcpMuxPolicy:"require",sdpSemantics:"unified-plan"}:null);e.mediaStream=new MediaStream;e.peer_conn.ontrack=function(c){if(!this.hasTracks){this.setRtcstream(e.mediaStream);var l=y();console.log("start usetime:"+(F-l))}this.hasTracks++;this.mediaStream.addTrack(c.track);e.baseTrack&&
377
- "video"!=c.track.kind||(e.baseTrack=c.track);e.rtcstatsTimerId||(e.packetsReceived=0,e.framesDecoded=0,e.emptyCount=0,e.rtcstatsTimerId=L.setInterval(function(){e.baseTrack&&e.peer_conn.getStats(e.baseTrack).then(v=>{v.forEach(B=>{"inbound-rtp"==B.type&&"video"==B.kind&&(B.framesDecoded!=e.framesDecoded?(e.framesDecoded=B.framesDecoded,e.packetsReceived=B.packetsReceived,e.emptyCount=0):0<e.framesDecoded&&(e.emptyCount++,3<e.emptyCount&&(console.warn("Rtp Data break for "+e.emptyCount),e.closecall(e),
378
- aa(e))))})})},1E3))}.bind(e);e.hasTracks=0;if("function"==typeof e.peer_conn.addTransceiver){("undefined"===typeof e._config.hasAudio||e._config.hasAudio)&&await e.peer_conn.addTransceiver("audio",{direction:"recvonly"});await e.peer_conn.addTransceiver("video",{direction:"recvonly"});var m=await e.peer_conn.createOffer()}else m=await e.peer_conn.createOffer({offerToReceiveAudio:"undefined"===typeof e._config.hasAudio||e._config.hasAudio,offerToReceiveVideo:!0});await e.peer_conn.setLocalDescription(m);
379
- (new Promise(function(c,l){var v={api:n.apiUrl,rtcstream:n.streamUrl,clientip:null,sdp:m.sdp};"webrtc"===n.urlObject.schema&&(delete v.rtcstream,v.streamurl=n.streamUrl);console.log("Generated offer: ",v);w(n.apiUrl,JSON.stringify(v),function(B){console.log("Got answer: ",B);B.code?l(B):c(B)},function(B){"REQUEST:error"==B&&(e.tryStartPlayTimer=L.setTimeout(function(){delete e.tryStartPlayTimer;e.closecall(e);aa(e)},1E3));l(B)})})).then(c=>{e.peer_conn.setRemoteDescription(new RTCSessionDescription({type:"answer",
380
- sdp:c.sdp}))}).catch(c=>{console.log(c);e.peer_conn.close();e.peer_conn=null});e.closecall=function(c){c.rtcstatsTimerId&&(L.clearInterval(c.rtcstatsTimerId),delete c.rtcstatsTimerId);c.tryStartPlayTimer&&(L.clearTimeout(c.tryStartPlayTimer),delete c.tryStartPlayTimer);"undefined"!=typeof c.baseTrack&&delete c.baseTrack;c.peer_conn&&(c.videoEl&&(c.videoEl.srcObject=null),c.mediaStream&&delete c.mediaStream,c.peer_conn.close(),c.peer_conn=null)};return!0},fa=async function(e){var n=e._config.xmc_url||
381
- L.xmc_url;if(!n)return e.toast("The rtsp protocol is not supported without setting XMC."),!1;n+="play";e.wsclient&&(e.wsclient.close(),delete e.wsclient);n=n.replace("http","ws");var m=new WebSocket(n);m.onopen=function(){var c="undefined"===typeof e._config.rtspOverTcp?1:e._config.rtspOverTcp,l="boolean"===typeof e._config.rtsp_bypass?e._config.rtsp_bypass:0,v="undefined"===typeof e._config.use_audio?0:e._config.use_audio,B="MediaSource"in L&&L.MediaSource.isTypeSupported("video/mp4;codecs=hvc1.1.1.L93.B0")?
382
- 1:0;c=JSON.stringify({msgtype:"playurl",data:{sourceurl:e.murl,rtsp_over_tcp:c,has_audio:v,has_hevc:B,rtsp_bypass:l}});m.send(c)};m.onmessage=function(c){console.log(c.data);c=JSON.parse(c.data);if("object"==typeof c&&"onresult"===c.type&&"playurl"===c.event&&"object"===typeof c.streaminfo)if(e.closecall2=function(v){v.waitSignTimer&&(L.clearTimeout(v.waitSignTimer),delete v.waitSignTimer);v.wsclient&&(v.wsclient.close(),v.wsclient=null,delete v.wsclient)},c.snapshot&&e.videoEl&&e.videoEl.setAttribute("poster",
383
- c.snapshot),e._config.useFlv||"string"!==typeof c.streaminfo.rtc_playurl)"string"===typeof c.streaminfo.http_playurl?(l=c.streaminfo.http_playurl+c.streaminfo.stream+".flv",e.murl=l,Y(e)):e.closecall2(e);else{var l=c.streaminfo.rtc_playurl+c.streaminfo.stream+".rtc";c.first?e.waitSignTimer=setTimeout(function(){e.murl=l;aa(e);delete e.waitSignTimer},1E3):(e.murl=l,aa(e))}};m.onclose=function(){e.wsclient&&delete e.wsclient};m.onerror=function(){};e.wsclient=m;return!0},ma=function(e){Ja("flv_js",
384
- Ia+"flv.min.js",function(n){console.log("js:"+n+" is load!");var m=L.flvjs;if(!m.isSupported())return!1;var c={type:"flv",isLive:!0,url:e.murl};var l={enableWorker:!1,enableStashBuffer:!1,stashInitialSize:0,lazyLoad:!1,autoCleanupSourceBuffer:!0,lazyLoadMaxDuration:0,isLive:!0};e.openFlv=function(){var v=m.createPlayer(c,l);v.on(m.Events.METADATA_ARRIVED,function(B){e.loadingOverlay&&(e.loadingOverlay.style.display="none");"object"==typeof B&&console.log("flvplayer:"+B.type)});v.on(m.Events.ERROR,
385
- function(B){"object"==typeof B?console.log("flvplayer:"+B.type):console.log("flvplayer:"+B)});v.attachMediaElement(e.videoEl);e.videoEl.playbackRate=1;e.onFlvStaticInfo=function(B){this.videoEl.paused||(this.lastDecodedFrames?this.lastDecodedFrames!=B.decodedFrames?this.lastDecodedFrames=B.decodedFrames:(this.lastDecodedFrames=0,this.flvPlayer&&(this.closecall(this),this.openFlv(),this.setplaystate(!0))):this.lastDecodedFrames=B.decodedFrames)}.bind(e);e.onFlvError=function(B){"NetworkError"!==B||
386
- e.reconnectTimer||(e.reconnectTimer=L.setTimeout(function(){e.flvPlayer&&(e.closecall(e),e.openFlv(),e.setplaystate(!0));delete e.reconnectTimer},1E3))}.bind(e);e.onMediainfoCb=function(B){B&&this.setMediainfo("flvjs",B)}.bind(e);v.on(m.Events.ERROR,e.onFlvError);v.on(m.Events.STATISTICS_INFO,e.onFlvStaticInfo);v.on(m.Events.MEDIA_INFO,e.onMediainfoCb);e.delayCheckTimerId=L.setInterval(function(){if(this.flvPlayer&&!this.videoEl.paused){var B=this.flvPlayer;if(B.buffered.length){let M=B.buffered.end(0)-
387
- B.currentTime;6<=M?B.currentTime=B.buffered.end(0)-.2:3<M&&(e.videoEl.playbackRate=1.5,e.fastForwardTimerId=setTimeout(function(){e.videoEl.playbackRate=1;delete e.fastForwardTimerId},2E3*M))}}}.bind(e),2E3);v.load();v.play();e.flvPlayer=v;e.closecall=function(B){if(B.flvPlayer){var M=B.flvPlayer;M.off(m.Events.ERROR,B.onFlvError);M.off(m.Events.STATISTICS_INFO,B.onFlvStaticInfo);M.off(m.Events.MEDIA_INFO,B.onMediainfoCb);delete B.onFlvError;delete B.onFlvStaticInfo;delete B.onMediainfoCb;B.delayCheckTimerId&&
388
- (L.clearInterval(B.delayCheckTimerId),delete B.delayCheckTimerId);B.fastForwardTimerId&&(L.clearTimeout(B.fastForwardTimerId),delete B.fastForwardTimerId);B.reconnectTimer&&(L.clearTimeout(B.reconnectTimer),delete B.reconnectTimer);M.pause();M.unload();M.detachMediaElement();M.destroy();delete B.flvPlayer}}};e.openFlv();e.setplaystate(!0)});return!0},Y=function(e){Ja("mpeg_js",Ia+"mpeg.min.js?v=2",function(n){console.log("js:"+n+" is load!");n=mpegts.getFeatureList();if(!mpegts.isSupported()||!n.mseLivePlayback)return!1;
389
- e.openMpegts=function(){var m=e.videoEl,c=void 0,l=void 0;"boolean"===typeof e._config.hasAudio&&(c=e._config.hasAudio);"boolean"===typeof e._config.hasVideo&&(l=e._config.hasVideo);c=mpegts.createPlayer({type:"mse",isLive:!0,hasAudio:c,hasVideo:l,url:e.murl},{autoCleanupSourceBuffer:!0,stashInitialSize:128,autoCleanupMaxBackwardDuration:20,autoCleanupMinBackwardDuration:10,enableWorker:!0,enableStashBuffer:!1});e.onErrorCb=function(v){var B=this;v!==mpegts.ErrorTypes.NETWORK_ERROR||B.reconnectTimer||
390
- (B.reconnectTimer=L.setTimeout(function(){B.mpegtsPlayer&&(B.closecall(B),B.openMpegts());delete B.reconnectTimer},1E3))}.bind(e);e.onEventCb=function(v){console.log(v)}.bind(e);e.onMetadataCb=function(v){console.log(v)}.bind(e);e.onMediaInfoCb=function(v){v&&this.setMediainfo("mpegts",v)}.bind(e);e.onStatisCb=function(v){this.videoEl.paused||(this.lastDecodedFrames?this.lastDecodedFrames!=v.decodedFrames?(this.lastDecodedFrames=v.decodedFrames,delete this.waitDecodedFrames):("undefined"===typeof this.waitDecodedFrames?
391
- this.waitDecodedFrames=0:this.waitDecodedFrames++,1<this.waitDecodedFrames&&(this.lastDecodedFrames=0,delete this.waitDecodedFrames,this.mpegtsPlayer&&(this.closecall(this),this.openMpegts()))):this.lastDecodedFrames=v.decodedFrames)}.bind(e);e.closecall=function(v){v.checkDelayTimerId&&(L.clearInterval(v.checkDelayTimerId),delete v.checkDelayTimerId);v.reconnectTimer||(L.clearTimeout(v.reconnectTimer),delete v.reconnectTimer);v.fastForwardTimerId&&(L.clearTimeout(v.fastForwardTimerId),delete v.fastForwardTimerId);
392
- if(v.mpegtsPlayer){var B=v.mpegtsPlayer;B.pause();B.off(mpegts.Events.ERROR,v.onErrorCb);B.off(mpegts.Events.MEDIA_INFO,v.onMediaInfoCb);B.off(mpegts.Events.METADATA_ARRIVED,v.onMetadataCb);B.off(mpegts.Events.STATISTICS_INFO,v.onStatisCb);B.unload();B.detachMediaElement();B.destroy();delete v.onErrorCb;delete v.onMediaInfoCb;delete v.onMetadataCb;delete v.onStatisCb;delete v.onEventCb;delete v.mpegtsPlayer}};e.checkDelayTimerId=L.setInterval(function(){var v=this;if(v.mpegtsPlayer&&!v.videoEl.paused&&
393
- v.mpegtsPlayer.buffered.length){var B=v.mpegtsPlayer.buffered.end(0)-v.mpegtsPlayer.currentTime;6<=B?v.mpegtsPlayer.currentTime=v.mpegtsPlayer.buffered.end(0)-.2:3<B&&(v.videoEl.playbackRate=1.5,v.fastForwardTimerId=setTimeout(function(){v.videoEl.playbackRate=1;delete v.fastForwardTimerId},2E3*B))}}.bind(e),2E3);c.on(mpegts.Events.ERROR,e.onErrorCb);c.on(mpegts.Events.MEDIA_INFO,e.onMediaInfoCb);c.on(mpegts.Events.METADATA_ARRIVED,e.onMetadataCb);c.on(mpegts.Events.STATISTICS_INFO,e.onStatisCb);
394
- c.attachMediaElement(m);c.load();c.play();e.mpegtsPlayer=c};e.openMpegts()});return!0},ka=function(e){Ja("hls_js",Ia+"hls.min.js",function(n){console.log("js:"+n+" is load!");var m=L.Hls;if(m.isSupported()){var c=e,l=new m;l.attachMedia(e.videoEl);l.on(m.Events.MEDIA_ATTACHED,function(){console.log("video and hlsPlayer are now bound together !");l.loadSource(e.murl);l.on(m.Events.MANIFEST_PARSED,function(M,b){console.log("HLSPlayer manifest loaded, found "+b.levels.length+" quality level");c.loadingOverlay&&
395
- (c.loadingOverlay.style.display="none");c.videoEl.play();c.setplaystate(!0)})});l.on(m.Events.ERROR,function(M,b){if(b.fatal)switch(b.type){case m.ErrorTypes.NETWORK_ERROR:console.log("fatal network error encountered, try to recover");l.startLoad();break;case m.ErrorTypes.MEDIA_ERROR:console.log("fatal media error encountered, try to recover");l.recoverMediaError();break;default:l.destroy(),delete e.hlsPlayer,c.setplaystate(!1)}});c.onHlsManifestParsed=function(M,b){var Q=this;if(1<b.levels.length){var z=
396
- [];for(M=0;M<b.levels.length;M++){var la={mediaType:"video",bitrate:b.levels[M].bitrate,height:b.levels[M].height,width:b.levels[M].width,qualityIndex:M,name:b.levels[M].name||"q"+M};z.push(la)}Q.switchQualityLevel=function(I){l.nextLevel=parseInt(I)}.bind(Q);Q.createQualitiesMenu(z);l.on(m.Events.LEVEL_SWITCHED,function(I,ja){Q.updateQualityLevel(l.currentLevel,l.autoLevelEnabled)},Q)}else Q.resetQualitiesMenu();if(b.subtitleTracks&&0<b.subtitleTracks.length){z=[];for(M=0;M<b.subtitleTracks.length;M++)la=
397
- b.subtitleTracks[M],la.forced||(la={"default":la.default,id:la.id,lang:la.lang,name:la.name,url:la.url},z.push(la));Q.switchSubtitleTrack=function(I){I=parseInt(I);-1===I?l.subtitleDisplay=!1:(l.subtitleDisplay=!0,l.subtitleTrack=I)};Q.createSubtitlesMenu(z);l.on(m.Events.SUBTITLE_TRACK_SWITCH,function(I,ja){Q.updateSubtitleTrack(ja.id)})}}.bind(c);l.on(m.Events.MANIFEST_PARSED,c.onHlsManifestParsed);c.hlsPlayer=l;c.closecall=function(M){M.hlsPlayer&&(M.hlsPlayer.off(m.Events.MANIFEST_PARSED,M.onHlsManifestParsed),
398
- M.hlsPlayer.detachMedia(),M.hlsPlayer.destroy(),delete M.hlsPlayer,delete M.onHlsManifestParsed)}}else if(e.videoEl.canPlayType("application/vnd.apple.mpegurl")){c=e;e.videoEl.zwplayer=e;var v=function(){"object"==typeof this.zwplayer&&(this.play(),this.zwplayer.setplaystate(!0))},B=function(){"object"==typeof this.zwplayer&&console.log("HLS fatal media error encountered, try to recover")};c.videoEl.addEventListener("loadedmetadata",v);c.videoEl.addEventListener("error",B);c.closecall=function(M){"object"===
399
- typeof M.videoEl&&(M.videoEl.pause(),M.videoEl.src="",M.videoEl.removeEventListener("loadedmetadata",v),M.videoEl.removeEventListener("error",B),"object"==typeof M.videoEl.zwplayer&&delete M.videoEl.zwplayer)};c.videoEl.src=c.murl}else return e.toast("player cannot play hls media"),!1});return!0},ia=function(e){Ja("dash_js",Ia+"dash.all.min.js",function(n){console.log("js:"+n+" is load!");var m=L.dashjs,c=m.MediaPlayer().create();c.initialize(e.videoEl,e.murl,!0);n=e.getSimpleSubtitleRenderer();c.attachTTMLRenderingDiv(n);
400
- e.dashTextTrackList={};e.onDashMetadata=function(l){l&&console.log(l);this.loadingOverlay&&(this.loadingOverlay.style.display="none");this.videoEl.play();this.setplaystate(!0)}.bind(e);e.onDashQualityChanged=function(l){l=c.getQualityFor("video");var v=c.getSettings().streaming.abr.autoSwitchBitrate.video||!1;e.updateQualityLevel(l,v)}.bind(e);e.onDashStreamInitialized=function(l){c.getBitrateInfoListFor("audio");l=c.getBitrateInfoListFor("video")||[];1<l.length?(this.switchQualityLevel=function(v){v=
401
- parseInt(v);var B={streaming:{abr:{autoSwitchBitrate:{}}}};0<=v?(B.streaming.abr.autoSwitchBitrate.video=!1,c.updateSettings(B),c.setQualityFor("video",v,!1)):(B.streaming.abr.autoSwitchBitrate.video=!0,c.updateSettings(B))}.bind(this),this.createQualitiesMenu(l),c.on(m.MediaPlayer.events.QUALITY_CHANGE_RENDERED,this.onDashQualityChanged,this)):this.resetQualitiesMenu()}.bind(e);e.onDashTracksAdded=function(l){var v=this.dashTextTrackList;v[l.streamId]||(v[l.streamId]=[]);v[l.streamId]=v[l.streamId].concat(l.tracks)};
402
- e.onDashStreamDeactivated=function(l){var v=this.dashTextTrackList;l.streamInfo&&v[l.streamInfo.id]&&delete v[l.streamInfo.id]}.bind(e);e.onDashStreamActivated=function(l){l=l.streamInfo.id||"none";var v=this.dashTextTrackList;if(v[l]&&(l=v[l],!(1>l.length))){v=[];for(var B=0;B<l.length;B++){var M=l[B],b=ib(M.labels);b?b+=" : "+M.type:(b=M.label||M.lang,b+=" : "+M.kind);v.push({"default":M.defaultTrack,id:B,lang:M.lang,name:b,url:M.url||""})}this.switchSubtitleTrack=function(Q){var z=this.dashPlayer||
403
- null;z&&(parseInt(Q),z.setTextTrack(Q))}.bind(this);this.createSubtitlesMenu(v)}}.bind(e);c.on(m.MediaPlayer.events.PLAYBACK_METADATA_LOADED,e.onDashMetadata,e);c.on(m.MediaPlayer.events.STREAM_INITIALIZED,e.onDashStreamInitialized,e);c.on(m.MediaPlayer.events.STREAM_ACTIVATED,e.onDashStreamActivated,e);c.on(m.MediaPlayer.events.STREAM_DEACTIVATED,e.onDashStreamDeactivated,e);c.on(m.MediaPlayer.events.TEXT_TRACKS_ADDED,e.onDashTracksAdded,e);e.dashPlayer=c;e.closecall=function(l){l.dashPlayer&&(l.dashPlayer.pause(),
404
- l.dashPlayer.off(m.MediaPlayer.events.PLAYBACK_METADATA_LOADED,l.onDashMetadata,l),l.dashPlayer.off(m.MediaPlayer.events.STREAM_INITIALIZED,l.onDashStreamInitialized,l),l.dashPlayer.off(m.MediaPlayer.events.STREAM_ACTIVATED,l.onDashStreamActivated,l),l.dashPlayer.off(m.MediaPlayer.events.STREAM_DEACTIVATED,l.onDashStreamDeactivated,l),l.dashPlayer.on(m.MediaPlayer.events.TEXT_TRACKS_ADDED,e.onDashTracksAdded,e),l.switchQualityLevel&&(l.dashPlayer.off(m.MediaPlayer.events.QUALITY_CHANGE_RENDERED,l.onDashQualityChanged,
405
- l),delete l.switchQualityLevel),l.dashPlayer.destroy(),delete l.dashPlayer,delete l.onDashMetadata,delete l.onDashStreamInitialized,delete l.onDashStreamActivated,delete l.onDashStreamDeactivated,delete l.onDashTracksAdded,delete l.switchSubtitleTrack)}});return!0},na=function(e){var n=e.videoEl;e.closecall=function(m){if(m.isPlayVideo){var c=m.videoEl;c.paused||c.pause();c.src="";delete m.isPlayVideo}};e.isPlayVideo=!0;n.src=e.murl;return!0},ha=function(e){var n=e.videoEl;e.closecall=function(m){if(m.isPlayAudio){var c=
406
- m.videoEl;c.paused||c.pause();c.src="";delete m.isPlayAudio}};e.isPlayAudio=!0;n.src=e.murl;return!0},ca=function(e){var n=e.murl;if("dvr"===(n.type||"")&&n.http)return e.murl=n.http,na(e);if(L.MediaSource&&L.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')){var m=L.RTCPeerConnection||L.webkitRTCPeerConnection||L.mozRTCPeerConnection||L.RTCIceGatherer;if(n.rtc&&m)return e.murl=n.rtc,aa(e);if(n["httpflv-n"])return e.murl=n["httpflv-n"],ma(e);if(n.httpflv)return e.murl=n.httpflv,
407
- ma(e);if(n["wsflv-n"])return e.murl=n["wsflv-n"],ma(e);if(n.wsflv)return e.murl=n.wsflv,ma(e);if(n.hls)return e.murl=n.hls,ka(e);if(n.dash)return e.murl=n.dash,ia(e);if(n.ts)return e.murl=n.ts,Y(e)}else if(e.murl.hls)return e.murl=e.murl.hls,ka(e);return!1},oa=function(e){var n=[];var m=String.fromCharCode(107)+"u"+String.fromCharCode(97)+"ishou";var c=String.fromCharCode(46)+"co"+String.fromCharCode(109)+"/",l=String.fromCharCode(100)+"ou"+String.fromCharCode(121)+"i"+String.fromCharCode(110);n.push("https://live."+
408
- m+c+"u/");n.push("https://live."+l+c);if("string"===typeof e&&23<e.length)for(c=0;c<n.length;c++)if(m=n[c],0===e.indexOf(m))return!0;return!1};ba.prototype={play:function(e,n,m){var c=this;if(e){c.murl&&c.stop();if("string"===typeof e&&(e.startsWith("wcdn://")||e.startsWith("wcdns://")))return!0;if("object"===typeof e){"object"===typeof e.thumbnails&&(c._config.thumbnails=JSON.parse(JSON.stringify(e.thumbnails)));if("object"===typeof e.murls){c.multiStreams=JSON.parse(JSON.stringify(e));var l=e.murls}else Array.isArray(e)?
409
- (c.multiStreams={},l=e):(c.multiStreams={},l=[e]),c.multiStreams.murls=l;var v=!0,B="",M=[],b;for(b in l){var Q,z=l[b];if("object"===typeof z)if(Array.isArray(z)){var la="";var I=z[0];if(2<z.length){var ja=z[2];la=z[1]}else ja=1<z.length?z[1]:b;M.push({url:I,name:ja,mime:la});v&&(e=I,B=ja,v=!1)}else{if(I=!1,"default"in z&&z["default"]&&(I=z["default"]),v||I)"url"in z&&(e=z.url),"name"in z&&(Q=z.name),B=Q,v=!1}else"string"===typeof z&&v&&(Q=b,e=z,B=Q,v=!1)}0<M.length&&(c.multiStreams.murls=M);c.multiStreams.curStream=
410
- B;console.log(e)}c.murl=e}if(!c.murl)return!1;c.force_stopped=!1;c.isPlaying=!0;c.loadingOverlay&&(c.loadingOverlay.style.display="flex");"undefined"!=typeof n&&(n?c._config.isLive=n:delete c._config.isLive);"undefined"!=typeof m&&(m?c._config.useOldFlv=m:delete c._config.useOldFlv);e=!1;if("object"==typeof c.murl)e=ca(c);else if("string"==typeof c.murl){e=H(c.murl);e||(n=c.murl.indexOf("mime_type="),0<n&&(n+=10,l=c.murl.indexOf("&",n),0>l&&(l=c.murl.length),n=c.murl.substring(n,l),"video_mp4"===
411
- n?e=".mp4":"video_flv"===n?e=".flv":"video_hls"===n?e=".m3u8":"video_rtc"===n?e=".rtc":"video_dash"===n&&(e=".mpd")));if(!e&&("string"===typeof c._config.streamtype&&("httpflv"===c._config.streamtype?e=".flv":"hls"===c._config.streamtype?e=".m3u8":"dash"===c._config.streamtype?e=".mpd":"mpegts"===c._config.streamtype?e=".ts":"webrtc"===c._config.streamtype&&(e=".rtc")),!e&&oa(c.murl))){var d=function(){setTimeout(function(){c.loadingOverlay&&(c.loadingOverlay.style.display="none")},1E3)};if(!c._config.url_proxy)return c.toast("Sorry, the player cannot play this media address",
412
- 5E3,!0),d(),!1;var h=h;w(c._config.url_proxy,JSON.stringify({roomUrl:c.murl,token:c._config.proxy_token||"12345678"}),function(q){if("object"===typeof q&&q.result){q={murls:q.flvStreams||q.hlsStreams,multistream:1};if(!q.murls)return c.toast("Sorry, missing valid address for this room.",5E3,!0),d(),!1;c.play(q,h,m)}else c.toast("Sorry, unable to obtain a valid address for this room.",5E3,!0),d()},function(q){c.toast("Sorry, failed to get address due to network!",5E3,!0);d()});return!1}e=0===c.murl.indexOf("rtsp")?
413
- fa(c):".rtc"===e||c.murl.startsWith("webrtc://")?aa(c):".flv"===e?c._config.useOldFlv?ma(c):Y(c):".m3u8"===e?ka(c):".mpd"===e?ia(c):".mp4"===e?na(c):".mp3"===e||".m4a"===e||".aac"===e||".mp4a"===e||".ogg"===e?ha(c):".ts"===e?Y(c):na(c)}e?(c.setupEventsHandler(),c.startHideControlbar(c),c.multiStreams&&L.setTimeout(function(){c.buildStreamSelector()},1E3)):(c.isPlaying=!1,c.loadingOverlay&&(c.loadingOverlay.style.display="none"),c.toast("Play media failed, unsupported media type",5E3,!0));return e},
414
- __switchStream:function(e){if("string"!==typeof e)this.toast("Switch stream methon does not support "+e);else{this.murl=e;e=H(this.murl);if(!e){var n=this.murl.indexOf("mime_type=");if(0<n){n+=10;var m=this.murl.indexOf("&",n);0>m&&(m=this.murl.length);n=this.murl.substring(n,m);"video_mp4"===n?e=".mp4":"video_flv"===n?e=".flv":"video_hls"===n?e=".m3u8":"video_rtc"===n?e=".rtc":"video_dash"===n&&(e=".mpd")}}e||"string"===typeof this._config.streamtype&&("httpflv"===this._config.streamtype?e=".flv":
415
- "hls"===this._config.streamtype?e=".m3u8":"dash"===this._config.streamtype?e=".mpd":"mpegts"===this._config.streamtype?e=".ts":"webrtc"===this._config.streamtype&&(e=".rtc"));!this._config.isLive&&this.videoEl&&(this.postSeekTime=this.videoEl.currentTime);this.closecall&&(this.closecall(this),delete this.closecall);this.closecall2&&(this.closecall2(this),delete this.closecall2);this.videoEl&&(this.videoEl.removeAttribute("src"),this.videoEl.load());(0===this.murl.indexOf("rtsp")?fa(this):".rtc"===
416
- e||this.murl.startsWith("webrtc://")?aa(this):".flv"===e?this._config.useOldFlv?ma(this):Y(this):".m3u8"===e?ka(this):".mpd"===e?ia(this):".mp4"===e?na(this):".mp3"===e||".m4a"===e||".aac"===e||".mp4a"===e||".ogg"===e?ha(this):".ts"===e?Y(this):na(this))||this.toast("Switch stream failed, unsupported media type")}},stop:function(){this.closecall&&(this.closecall(this),this.removeVideoEventHandlers(),delete this.closecall);this.closecall2&&(this.closecall2(this),delete this.closecall2);this.videoEl&&
417
- (this.videoEl.removeAttribute("src"),this.videoEl.load());this.isPlaying=!1;this.setplaystate(!1);this.bigPlayOverlay&&(this.bigPlayOverlay.style.display="none");this.updateProgress(0);this.timeSpan&&(this.timeSpan.innerHTML="");this.controlbar&&(this.controlbar.querySelector(".zwp__duration-container").style.display="none");this.progressBar&&this.progressBar.streamtype&&(this.progressBar.streamtype.style.display="none");this.progressBar&&this.progressBar.chapters&&(this.progressBar.chapters.innerHTML=
418
- "");this.subtitles&&delete this.subtitles;this.subtitleShow&&(this.subtitleShow.style.display="none");this.toastTimerId&&(clearTimeout(this.toastTimerId),delete this.toastTimerId);this.mutedTipBox&&(this.popup_layers.removeChild(player.mutedTipBox),delete this.mutedTipBox);this.overlayLayerClickTimer&&(L.clearTimeout(this.overlayLayerClickTimer),delete this.overlayLayerClickTimer);delete this.multiStreams;this.resetSpeedMenu();this.resetQualitiesMenu();this.removeChapters();this.resetSubtitleMenu()},
419
- pause:function(){this.isPlaying&&this.videoEl&&!this.videoEl.paused&&!this.videoEl.ended&&(this.videoEl.pause(),this.setplaystate(!1))},resume:function(){this.isPlaying?this.videoEl&&(this.videoEl.paused||this.videoEl.ended)&&(this.videoEl.play(),this.setplaystate(!0)):this._config.url&&this.play(this._config.url)},seekTime:function(e){if(this.isPlaying&&this.videoEl&&!(0>e)){var n=this.videoEl.duration;isNaN(n)||Infinity===n||(e>n&&(e=n),this.videoEl.currentTime=e)}},getDuration:function(){if(this.isPlaying&&
420
- this.videoEl)return this.videoEl.duration},destroy:function(){this.closecall&&(this.closecall(this),this.removeVideoEventHandlers(),delete this.closecall);this.closecall2&&(this.closecall2(this),delete this.closecall2);this.videoRemoveWhenClose&&(this.videoEl&&this.videoWrapper&&(this.videoWrapper.removeChild(this.videoEl),this.playerContainer.removeChild(this.videoWrapper),delete this.videoWrapper),delete this.videoRemoveWhenClose);this.videoEl&&(this.videoEl.removeAttribute("src"),this.videoEl.load(),
421
- this.videoEl=null,delete this.videoEl);this.snapCanvas&&delete this.snapCanvas;this.controlbar&&(this.progressBar&&this.progressBar.chapters&&(this.progressBar.chapters.innerHTML=""),this.playerContainer.removeChild(this.controlbar),delete this.controlbar);this.danmuToolbar&&(this.danmuToolbar.remove(),delete this.danmuToolbar);this.subtitles&&delete this.subtitles;this.toastTimerId&&(clearTimeout(this.toastTimerId),delete this.toastTimerId);this.overlayLayerClickTimer&&(L.clearTimeout(this.overlayLayerClickTimer),
422
- delete this.overlayLayerClickTimer);this.overlay_layers&&(this.subtitle1&&delete this.subtitle1,this.subtitle2&&delete this.subtitle2,this.subtitleShow&&(Ba.removeElement(this.subtitleShow),delete this.subtitleShow),this.danmuPlayer&&(this.danmuPlayer.destroy(),delete this.danmuPlayer),this.playerContainer.removeChild(this.overlay_layers),delete this.overlay_layers);this.popup_layers&&(this.playerContainer.removeChild(this.popup_layers),delete this.popup_layers);this.playerElm&&(delete this.playerContainer.zwpDragable,
423
- this.playerElm.removeChild(this.playerContainer),delete this.playerContainer,this.doDeletePlayerElm?(document.removeChild(this.playerElm),delete this.playerElm):this.doRemovePlayerClass&&(P(this.playerElm,"zwp-wrap"),this.playerElm.setAttribute("class",this.playerElmOldClass)));this.windowScrollHandler&&(L.removeEventListener("scroll",this.windowScrollHandler),delete this.windowScrollHandler)},setplaystate:function(e){this.controlbar&&(this.playbtn||(this.playbtn=this.controlbar.querySelector(".zwp-playbtn")),
424
- this.playbtn&&(e?(this.playbtn.setAttribute("data-action","pause"),this.bigPlayOverlay&&(this.bigPlayOverlay.style.display="none")):(this.playbtn.setAttribute("data-action","play"),this.bigPlayOverlay&&(this.bigPlayOverlay.style.display="flex"))),this.playerElm&&(e?(P(this.playerElm,"zwp-pause"),O(this.playerElm,"zwp-playing")):(P(this.playerElm,"zwp-playing"),O(this.playerElm,"zwp-pause"))),this.loadingOverlay&&(this.loadingOverlay.style.display="none"))},setEnableDanmu:function(e){e?this.overlay_layers&&
425
- !this.danmuPlayer&&(this.danmuPlayer=HUAYI.Danmu.create({playerId:this.overlay_layers})):this.danmuPlayer&&(this.danmuPlayer.destroy(),delete this.danmuPlayer)},appendDanmu:function(e,n){this.danmuPlayer&&(n||(n=this.danmuSetting),this.danmuPlayer.addDanmu(e,n))},setChapters:function(e){null===e?this.removeChapters():(this.chapters=e,this.videoEl&&setTimeout(function(){this.loadChapters()}.bind(this),1E3))},addSubtitle:function(e,n,m){this.loadSubtitle(e,n,m)},removeSubtitle:function(){this.showSubtitle(!1)},
426
- buildDanmuControlbar:function(e,n){this.buildDanmuToolbar(e,n)},notifyResize:function(e,n){this.playerElm&&("undefined"!==typeof e&&("number"===typeof e&&(e+="px"),this.playerElm.style.width=e),"undefined"!==typeof n&&("number"===typeof n&&(n+="px"),this.playerElm.style.height=n))},lightOff:function(){this.playerElm&&O(this.playerElm,"zwp-state-light-off")},lightOn:function(){this.playerElm&&P(this.playerElm,"zwp-state-light-off")},get CurrentTime(){return this.isPlaying&&this.videoEl?this.videoEl.currentTime:
427
- -1},set CurrentTime(e){if(this.isPlaying&&this.videoEl&&!(0>e)){var n=this.videoEl.duration;isNaN(n)||Infinity===n||(e>n&&(e=n),this.videoEl.currentTime=e)}}};return ba})})(window);
344
+ return!1}.bind(c);c.showContextMenu=function(d){var h=this,q=d.offsetX;d=d.offsetY;var C=h.playerContainer.getBoundingClientRect(),H=C.width;C=C.height;var P="left",N="top",V=q,S=d;q+180>H&&(P="right",V=H-q);d+148>C&&(N="bottom",S=C-d);if(h.contextMenu)h.contextMenu.style["left"===P?"right":"left"]=null,h.contextMenu.style["top"===N?"bottom":"top"]=null,h.contextMenu.style[P]=V+"px",h.contextMenu.style[N]=S+"px";else{q='<div class="zwp-popupmenu" style="'+P+": "+V+"px; "+N+":"+S+'px;"><a class="zwp-menuitem" data-action="document" href="https://www.zwplayer.com/docment" target="zwplayer-doc"><span class="zwp-menucaption">'+
345
+ (pa("player-help","Help and document")+"</span></a>");q+='<a class="zwp-menuitem" data-action="version" href="https://www.zwplayer.com/version?v=3.1.2" title="Build: 20240507" target="zwplayer-version"><span class="zwp-menucaption">'+pa("version-update","Version update")+' (<span class="zwp-version">'+pa("current")+": v3.1.2</span>) </span></a>";q=q+'<span class="zwp-menuseperator" action="version"></span><a class="zwp-menuitem" data-action="about" href="https://www.zwplayer.com/about"><span class="zwp-menucaption">'+
346
+ (pa("about","About")+" zwplayer</span></a>");h.playerContainer.insertAdjacentHTML("beforeEnd",q+"</div>");h.contextMenu=h.playerContainer.querySelector(".zwp-popupmenu");var U=function(g){g.stopPropagation();g.preventDefault();var r=this.getAttribute("data-action");this.getAttribute("target");var t=this.getAttribute("href");h.hideContextMenu();setTimeout(function(){"about"===r?K.open(t,"zwplayer-about"):"version"===r?K.open(t,"zwplayer-version"):"document"===r&&K.open(t,"zwplayer-doc")},10)};h.contextMenu.querySelectorAll("a.zwp-menuitem").forEach(function(g){g.addEventListener("click",
347
+ U,!1)});document.addEventListener("click",h.hideContextMenu)}}.bind(c);c.hideContextMenu=function(){this.contextMenu&&(this.playerContainer.removeChild(this.contextMenu),delete this.contextMenu,document.removeEventListener("click",this.hideContextMenu))}.bind(c);c.toast=function(d,h,q,C){var H=this;h=h||2E3;H.toastTimerId&&(clearTimeout(H.toastTimerId),H.toastBox&&(H.overlay_layers.removeChild(H.toastBox),delete H.toastBox));if("closetoast"!==d){if("object"===typeof d){if("icon"in d)var P=d.icon;
348
+ d=d.text}var N=document.createElement("div"),V="",S="zwp-toast zwp-center";P&&(S+=" zwp-toast-icon",V='<i class="xicon xicon-'+P+'"></i>');q&&(V+='<a href="javascript:void(0)" class="zwp-toast-closebtn"><i class="xicon xicon-close"></i></a>',S+=" zwp-use-close");C&&(S+=" zwp-lite");V+='<span class="zwp-toast-text">'+d+"</span>";N.setAttribute("class",S);N.innerHTML=V;H.overlay_layers.appendChild(N);H.toastBox=N;var U=function(g){if(H.toastBox){var r=H.toastBox.querySelector(".zwp-toast-closebtn");
349
+ r&&r.removeEventListener("click",U);H.overlay_layers.removeChild(H.toastBox);delete H.toastBox}H.toastTimerId&&(g&&"click"===g.type&&clearTimeout(H.toastTimerId),delete H.toastTimerId)};H.toastTimerId=K.setTimeout(U,h);q&&(q=N.querySelector(".zwp-toast-closebtn"))&&q.addEventListener("click",U)}}.bind(c);c.mutedConfirmBox=function(){var d=this;d.popup_layers||(d.popup_layers=document.createElement("div"),d.popup_layers.setAttribute("class","zwp__popup_layers"),d.playerContainer.appendChild(d.popup_layers));
350
+ var h=document.createElement("div");h.setAttribute("class","zwp-toast zwp-confirm zwp-center");h.innerHTML='<span class="zwp-toast-text">\u56e0<a href="#mutemore" class="mutemore">\u6d4f\u89c8\u5668\u9650\u5236</a>\uff0c\u9700\u8981\u70b9\u51fb<a href="#openaudio" class="openaudio">\u6253\u5f00\u58f0\u97f3</a><button class="closeBtn" title="\u5173\u95ed\u63d0\u793a"><i class="xicon xicon-close"></i></button></span>';d.popup_layers.appendChild(h);d.mutedTipBox=h;var q=h.querySelector(".closeBtn");
351
+ q&&q.addEventListener("click",function(C){C.preventDefault();d.mutedTipBox&&(d.popup_layers.removeChild(d.mutedTipBox),d.popup_layers.style.display=null,delete d.mutedTipBox);K.allowAutoAudioPlay=!0});(q=h.querySelector(".openaudio"))&&q.addEventListener("click",function(C){C.preventDefault();C.stopPropagation();d.mutedTipBox&&(d.popup_layers.removeChild(d.mutedTipBox),d.popup_layers.style.display=null,delete d.mutedTipBox);d.setMuted(!1);K.allowAutoAudioPlay=!0});(q=h.querySelector(".mutemore"))&&
352
+ q.addEventListener("click",function(C){C.preventDefault();C.stopPropagation();var H=h.querySelector(".moreInfoBox");H||(h.insertAdjacentHTML("beforeend",'<div class="moreInfoBox"><div class="info-text">\u5f53\u4f60\u8bbf\u95ee\u672c\u7f51\u7ad9\u7684\u6b21\u6570\u8f83\u5c11\uff0c\u6216\u7ecf\u5e38\u9759\u97f3\u64ad\u653e\u65f6\uff0c\u6d4f\u89c8\u5668\u53ef\u80fd\u4f1a\u9650\u5236\u7f51\u7ad9\u97f3\u91cf\uff0c\u4f7f\u7f51\u7ad9\u65e0\u6cd5\u81ea\u52a8\u6267\u884c\u6709\u58f0\u64ad\u653e</div><div class="info-control"><button class="info-btn">\u6211\u77e5\u9053\u4e86</button></div></div>'),
353
+ H=h.querySelector(".moreInfoBox"),H.querySelector(".info-btn").addEventListener("click",function(P){P.preventDefault();P.stopPropagation();H.style.display="none"}));H&&(H.style.display="block");K.allowAutoAudioPlay=!0});d.popup_layers.style.display="block"}.bind(c);"string"==typeof c._config.playerElm?(e=c._config.playerElm,"#"!=e.charAt(0)&&(e="#"+e),c.playerElm=document.querySelector(e)):Ua(c._config.playerElm)&&(c.playerElm=c._config.playerElm);c.playerElm?L(c.playerElm,"zwp-wrap")||(c.playerElmOldClass=
354
+ c.playerElm.getAttribute("class"),M(c.playerElm,"zwp-wrap"),c.doRemovePlayerClass=!0):(e="","string"==typeof c._config.playerElm?(e=c._config.playerElm,"#"==e.charAt(0)&&(e=e.substr(1))):e="ZWP-"+(new Date).getTime(),c.playerElm=document.createElement("DIV"),c.playerElm.id=e,c.playerElm.style.position="absolute",c.playerElm.style.left=0,c.playerElm.style.top=0,c.playerElm.style.width="640px",c.playerElm.style.height="360px",document.body.appendChild(c.playerElm),c.playerElm.setAttribute("class","zwp-wrap"),
355
+ c.doDeletePlayerElm=!0);c.playerContainer=document.createElement("DIV");c.playerContainer.setAttribute("class","zwp-container");c.playerElm.appendChild(c.playerContainer);"string"==typeof c._config.videoElm?(e=c._config.videoElm,"#"!=e.charAt(0)&&(e="#"+e),c.videoEl=document.querySelector(e)):Ua(c._config.videoElm)&&(c.videoEl=c._config.videoElm);if(!c.videoEl){var z=document.createElement("DIV");z.setAttribute("class","zwp-videoWrapper");c.playerContainer.appendChild(z);Ba.addElement(z);z.addEventListener("resize",
356
+ function(d){this._config.video_rotated&&this.rotateVideo()}.bind(c));c.videoWrapper=z;c.videoEl=document.createElement("VIDEO");"string"==typeof c._config.videostyle&&c.videoEl.setAttribute("style",c._config.videostyle);"string"==typeof c._config.videoclass&&c.videoEl.setAttribute("class",c._config.videoclass);c._config.videostyle||c._config.videoclass||c.videoEl.setAttribute("style","width:100%;height:100%;");"string"==typeof c._config.videoElm&&(e=c._config.videoElm,"#"==e.charAt(0)&&(e=e.substr(1)),
357
+ c.videoEl.id=e);c.videoEl.setAttribute("playsinline","");c.videoEl.setAttribute("webkit-playsinline","");c.videoEl.setAttribute("autoplay","");z.appendChild(c.videoEl);c.videoRemoveWhenClose=!0}c.videoEl.volume=c._config.defVolume/100;c._config.poster&&c.videoEl.setAttribute("poster",c._config.poster);if(!c._config.disableOverlayLayer&&(e=document.createElement("div"),e.setAttribute("class","zwp__layers"),e.innerHTML='<div class="zwp__overlay zwp__layer zwp_loadingicon" style="width: 100%; height: 100%; display: none;"><div class="zwp__overlay-loading"><span class="zwp__overlay-loading-bg-img"><svg width="80px" height="80px" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg" stroke="#fff"><g fill="none" fill-rule="evenodd"><g transform="translate(1 1)" stroke-width="2"><circle stroke-opacity=".5" cx="18" cy="18" r="18"/><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="1s" repeatCount="indefinite"/></path></g></g></svg></span></div></div><div class="zwp__overlay zwp__layer zwp__overlay-play" style="width: 100%; height: 100%; display: none;"><div class="zwp__overlay-button" role="button" tabindex="0" aria-label="play" aria-pressed="false" data-action="play"><svg class="icon" width="96px" height="96px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#c2c2c2" d="M512.61025 48.820024a463.790226 463.790226 0 1 0 463.790227 463.790226A463.790226 463.790226 0 0 0 512.61025 48.820024z m0 854.350417a390.560191 390.560191 0 1 1 390.560191-390.560191 390.560191 390.560191 0 0 1-390.560191 390.560191z m166.720382-414.970203l-120.341359-70.300834-127.908463-74.694636a22.945411 22.945411 0 0 0-32.465315 24.410011v288.526341a22.945411 22.945411 0 0 0 32.465315 24.410012l127.908463-74.694636 120.341359-70.056734a28.559714 28.559714 0 0 0 0-47.599524z" /></svg></div></div>',
358
+ c.playerContainer.appendChild(e),c.overlay_layers=e,c.bigPlayOverlay=e.querySelector(".zwp__overlay-play"),c.bigPlayBtn=c.bigPlayOverlay.querySelector(".zwp__overlay-button"),c.loadingOverlay=e.querySelector(".zwp_loadingicon"),c._config.disablePlayBtn?M(c.bigPlayBtn,"zwp_disabled"):c.bigPlayBtn.addEventListener("click",function(d){d.preventDefault();d.stopPropagation();this.on_btnclick(d)}.bind(c)),c._config.enableDanmu&&(c.danmuPlayer=HUAYI.Danmu.create({playerId:e})),e.addEventListener("contextmenu",
359
+ function(d){d.preventDefault();d.stopPropagation();Va||this.showContextMenu(d)}.bind(c)),e.addEventListener("click",function(d){var h=this;d=function(q){q=q.querySelector(".closeBtn");var C=document.createEvent("Event");C.initEvent("click",!0,!0);q.dispatchEvent(C)};h.infoViewer?d(h.infoViewer):h.colorSettingPanel?d(h.colorSettingPanel):h.contextMenu?h.hideContextMenu():h._config.disableClickPause||h._config.disablePlayBtn||h._config.isLive||(h.overlayLayerClickTimer&&(K.clearTimeout(h.overlayLayerClickTimer),
360
+ delete h.overlayLayerClickTimer),h.videoEl&&(h.overlayLayerClickTimer=K.setTimeout(function(){h.videoEl.paused||h.videoEl.ended?(h.videoEl.play(),h.setplaystate(!0)):(h.videoEl.pause(),h.setplaystate(!1));delete h.overlayLayerClickTimer},300)))}.bind(c)),c._config.logo)){if("object"===typeof c._config.logo){if("string"===typeof c._config.logo.icon)var A=c._config.logo.icon}else"string"===typeof c._config.logo&&(A=c._config.logo);if(A){z='<div class="zwp-logo"';if("object"===typeof c._config.logo){var b=
361
+ "";"dock"in c._config.logo?b+=("left"===c._config.logo.dock?"left":"right")+": "+(c._config.logo.x||"5%")+";":"x"in c._config.logo&&(b+="right: "+c._config.logo.x+";");"y"in c._config.logo&&(b+="top: "+c._config.logo.y+";");"width"in c._config.logo&&(b+="width: "+c._config.logo.width+";");if("opacity"in c._config.logo){var O=c._config.logo.opacity/100;1<O&&(O=1);b+="opacity: "+O+";"}b&&(z+=' style="'+b+'"')}e.insertAdjacentHTML("afterbegin",z+('><img src="'+A+'"></div>'))}}if(c._config.nativecontrols)c.videoEl.setAttribute("controls",
362
+ "controls"),c.overlay_layers&&(c.overlay_layers.style.bottom="70px"),c.videoEl.addEventListener("fullscreenchange",function(d){return!1}.bind(c));else if(c._config.controlbar){var x=document.createElement("div");x.setAttribute("class","zwp-controlbar");c._config.isLive||M(x,"zwp-vodplayer");x.innerHTML=rb(c._config);c.playerContainer.appendChild(x);c.controlbar=x;if(c.controlbar){x.addEventListener("dblclick",function(d){d.stopPropagation()});A=x.querySelectorAll("button.zwpbtn");0<A.length&&(c.btnBindZwp=
363
+ !0,A.forEach(function(d){d.addEventListener("click",c.on_btnclick)}));c._config.disablePlayBtn&&(A=x.querySelector(".zwp_playbtn"),M(A,"zwp_disabled"),A.setAttribute("disabled","disabled"));A=x.querySelectorAll(".zwp-speedMenu>li.zwp-speed-item");0<A.length&&A.forEach(function(d){d.addEventListener("click",c.on_speedItemclick)});var ca=x.querySelector(".zwp-volume-docker");if(ca){c.muteBtn=ca.querySelector("button.zwp-muteBtn");c.volslider=ca.querySelector(".zwp-volume-slider");c.voltotal=ca.querySelector(".zwp-volume-total");
364
+ c.volcurrent=c.volslider.querySelector(".zwp-volume-current");c.volthumb=c.volslider.querySelector(".zwp-volume-handle");var G=function(d){if(null!==d&&!isNaN(d)&&void 0!==d){d=Math.max(0,d);d=Math.min(d,1);if(0===d){Q(ca,"zwp__mute");M(ca,"zwp__unmute");var h=c.muteBtn;h.setAttribute("title","unmute");h.setAttribute("aria-label","unmute")}else Q(ca,"zwp__unmute"),M(ca,"zwp__mute"),h=c.muteBtn,h.setAttribute("title","muted"),h.setAttribute("aria-label","muted");h=c.volthumb;var q=c.volcurrent;d=100*
365
+ d+"%";var C=getComputedStyle(h);q.style.bottom=0;q.style.height=d;h.style.bottom=d;h.style.marginBottom=-parseFloat(C.height)/2+"px"}},ja=function(d){var h=B(c.voltotal),q=getComputedStyle(c.voltotal),C=!0;"touchmove"==d.type&&(d.changedTouches&&(C=d.changedTouches[0],d.pageX=C.pageX,d.pageY=C.pageY),C=!1);q=parseFloat(q.height);q=(q-(d.pageY-h.top))/q;0!==h.top&&0!==h.left&&(q=Math.max(0,q),q=Math.min(q,1),G(q),c.setMuted(0===q),c.setVolume(q),C&&d.preventDefault(),d.stopPropagation())};c.positionVolumeThumb=
366
+ G;c.on_volthumb_mousemove=function(d){var h=d.target;l&&(h===c.volslider||h.closest(".zwp-volume-slider"))&&ja(d)}.bind(c);c.on_volthumb_mouseup=function(d){l&&("onpointerout"in document?(document.removeEventListener("pointermove",c.on_volthumb_mousemove),document.removeEventListener("pointerup",c.on_volthumb_mouseup),document.removeEventListener("touchmove",c.on_volthumb_mousemove),document.removeEventListener("touchend",c.on_volthumb_mouseup)):(document.removeEventListener("mousemove",c.on_volthumb_mousemove),
367
+ document.removeEventListener("mouseup",c.on_volthumb_mouseup)),l=!1);m||(c.volslider.style.display="none");console.log("volthumb_mouseup:"+d.type)}.bind(c);c.on_volthumb_mousedown=function(d){ja(d);"onpointerout"in document?(document.addEventListener("pointermove",c.on_volthumb_mousemove),document.addEventListener("pointerup",c.on_volthumb_mouseup),document.addEventListener("touchmove",c.on_volthumb_mousemove),document.addEventListener("touchend",c.on_volthumb_mouseup)):(document.addEventListener("mousemove",
368
+ c.on_volthumb_mousemove),document.addEventListener("mouseup",c.on_volthumb_mouseup));l=!0;d.preventDefault();d.stopPropagation()}.bind(c);var la=c.volslider;ca.addEventListener("mouseenter",function(d){d.target===ca&&(la.style.display="block",m=!0,d.preventDefault(),d.stopPropagation())});ca.addEventListener("focusin",function(){la.style.display="block";m=!0});ca.addEventListener("focusout",function(d){if(!d.relatedTarget||d.relatedTarget&&!d.relatedTarget.matches(".zwp-volume-slider"))la.style.display=
369
+ "none"});ca.addEventListener("mouseleave",function(){m=!1;l||(la.style.display="none")});ca.addEventListener("focusout",function(){m=!1});ca.addEventListener("keydown",function(d){var h=d.which||d.keyCode||0;d.preventDefault();d.stopPropagation();32==h&&(c.videoEl.muted?c.setMuted(!1):c.setMuted(!0))});la.addEventListener("dragstart",function(){return!1});la.addEventListener("mouseover",function(){m=!0});la.addEventListener("focusin",function(){la.style.display="block";m=!0});la.addEventListener("focusout",
370
+ function(){m=!1;l||(la.style.display="none")});la.addEventListener("mousedown",c.on_volthumb_mousedown)}if(A=x.querySelector(".zwp-optionPanel"))A=A.querySelectorAll(".action-item"),0<A.length&&A.forEach(function(d){d.addEventListener("click",c.on_optionItemclick)})}}c._config.autoSmallWindow&&!c.windowScrollHandler&&(c.windowScrollHandler=function(d){if(!this.isFullscr&&!this.isFullscrWin&&this.videoEl&&this.playerElm&&this.isPlaying&&!this.isInPicInPic)if(d=u(this.playerElm),(document.documentElement.scrollTop||
371
+ document.body.scrollTop)>=d+this.playerElm.offsetHeight-100){if(!this.smallWindowMode){var h=this.playerContainer;hb(h,function(){Q(h,"zwp-smallwindow");h.style.left=null;h.style.top=null;h.style.width=null;h.style.height=null});M(h,"zwp-smallwindow");this.smallWindowMode=!0}}else this.smallWindowMode&&(h=this.playerContainer,Q(h,"zwp-smallwindow"),h.style.left=null,h.style.top=null,h.style.width=null,h.style.height=null,delete this.smallWindowMode)}.bind(c),K.addEventListener("scroll",c.windowScrollHandler));
372
+ c._config.clientip||(c._config.clientip="");c.videoEl&&(c._config.muted?c.setMuted(!0):"undefined"===typeof K.allowAutoAudioPlay?(c.setMuted(!0),cb(function(d){d?c.setMuted(!1):c.mutedConfirmBox();K.allowAutoAudioPlay=d})):K.allowAutoAudioPlay||(c.setMuted(!0),c.mutedConfirmBox()),(c._config.snapshotButton||c._config.allowSnapshot)&&c.videoEl.setAttribute("crossorigin","Anonymous"));A=function(d){var h=this;if(h.controlbar)if(h.isControlbarhidden){h.controlbar.style.display="flex";Q(h.playerElm,"hide-cursor");
373
+ d=d||K.event;if(d.srcElement!=h.controlbar&&h.overlay_layers){var q=h.overlay_layers.offsetHeight,C=0;"undefined"!==typeof d.offsetY?C=q-d.offsetY:"undefined"!==typeof d.layerY&&(C=q-d.layerY);if(80<C)return}Pa(h.controlbar,500,function(H){H&&h.startHideControlbar(h)});h.isControlbarhidden=!1}else h.startHideControlbar(h)}.bind(c);c.playerElm.addEventListener("mousemove",A);c.playerElm.addEventListener("touchmove",A);c.playerElm.addEventListener("dblclick",function(d){this.overlayLayerClickTimer&&
374
+ (K.clearTimeout(this.overlayLayerClickTimer),delete this.overlayLayerClickTimer);if(this.controlbar&&(d={},d.currentTarget=this.controlbar.querySelector(".zwp-fullscrBtn"),d.currentTarget))this.on_btnclick(d)}.bind(c));"undefined"==typeof c._config.autoplay&&(c._config.autoplay=!0);c._config.url&&c._config.autoplay&&c.play(c._config.url);"function"==typeof c._config.onready&&c._config.onready.call(c);c._config.chapters&&(c.chapters=c._config.chapters);c._config.lostFocusPause&&"undefined"!==typeof document.visibilityState&&
375
+ document.addEventListener("visibilitychange",function(){this._config.isLive||this.isInPicInPic||("visible"===document.visibilityState?this.focusPaused&&this.videoEl.paused&&!this.videoEl.ended&&(this.videoEl.play(),this.setplaystate(!0),delete this.focusPaused):this.focusPaused||this.videoEl.paused||this.videoEl.ended||(this.videoEl.pause(),this.setplaystate(!1),this.focusPaused=!0))}.bind(c));c._config.fluid?c._config.autoplay||(M(c.playerElm,"zwp-fluid"),c.playerElm.style.maxWidth="100%",c.playerElm.style.width=
376
+ "100%",c.playerElm.style.height="0",e=56.25,"number"===typeof c._config.ratio?e=100*c._config.ratio:"string"===typeof c._config.ratio?(A=c._config.ratio.split(":"),2===A.length&&(e=parseFloat(A[0]),A=parseFloat(A[1]),0===e&&(e=1),e=100*A/e)):"number"===typeof c._config.width&&"number"===typeof c._config.height&&(e=c._config.width,0===e&&(e=1),e=100*c._config.height/e),c.playerElm.style.paddingTop=e+"%"):c._config.width&&c._config.height&&(c.playerElm.style.width="number"===typeof c._config.width?
377
+ c._config.width+"px":c._config.width,c.playerElm.style.height="number"===typeof c._config.height?c._config.height+"px":c._config.height)},Z=async function(e){if("undefined"==typeof K.RTCPeerConnection)return alert("This browser does not support the stream.\r\nPlease play this stream in chrome!"),!1;var l=J(e.murl);if(!l)return e.toast("Invalid url"),!1;e.peer_conn=new RTCPeerConnection("function"==typeof RTCPeerConnection.prototype.addTransceiver?{iceServers:[],iceTransportPolicy:"all",bundlePolicy:"max-bundle",
378
+ rtcpMuxPolicy:"require",sdpSemantics:"unified-plan"}:null);e.mediaStream=new MediaStream;e.peer_conn.ontrack=function(c){if(!this.hasTracks){this.setRtcstream(e.mediaStream);var v=y();console.log("start usetime:"+(F-v))}this.hasTracks++;this.mediaStream.addTrack(c.track);e.baseTrack&&"video"!=c.track.kind||(e.baseTrack=c.track);e.rtcstatsTimerId||(e.packetsReceived=0,e.framesDecoded=0,e.emptyCount=0,e.rtcstatsTimerId=K.setInterval(function(){e.baseTrack&&e.peer_conn.getStats(e.baseTrack).then(z=>
379
+ {z.forEach(A=>{"inbound-rtp"==A.type&&"video"==A.kind&&(A.framesDecoded!=e.framesDecoded?(e.framesDecoded=A.framesDecoded,e.packetsReceived=A.packetsReceived,e.emptyCount=0):0<e.framesDecoded&&(e.emptyCount++,3<e.emptyCount&&(console.warn("Rtp Data break for "+e.emptyCount),e.closecall(e),Z(e))))})})},1E3))}.bind(e);e.hasTracks=0;if("function"==typeof e.peer_conn.addTransceiver){("undefined"===typeof e._config.hasAudio||e._config.hasAudio)&&await e.peer_conn.addTransceiver("audio",{direction:"recvonly"});
380
+ await e.peer_conn.addTransceiver("video",{direction:"recvonly"});var m=await e.peer_conn.createOffer()}else m=await e.peer_conn.createOffer({offerToReceiveAudio:"undefined"===typeof e._config.hasAudio||e._config.hasAudio,offerToReceiveVideo:!0});await e.peer_conn.setLocalDescription(m);(new Promise(function(c,v){var z={api:l.apiUrl,rtcstream:l.streamUrl,clientip:null,sdp:m.sdp};"webrtc"===l.urlObject.schema&&(delete z.rtcstream,z.streamurl=l.streamUrl);console.log("Generated offer: ",z);w(l.apiUrl,
381
+ JSON.stringify(z),function(A){console.log("Got answer: ",A);A.code?v(A):c(A)},function(A){"REQUEST:error"==A&&(e.tryStartPlayTimer=K.setTimeout(function(){delete e.tryStartPlayTimer;e.closecall(e);Z(e)},1E3));v(A)})})).then(c=>{e.peer_conn.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:c.sdp}))}).catch(c=>{console.log(c);e.peer_conn.close();e.peer_conn=null});e.closecall=function(c){c.rtcstatsTimerId&&(K.clearInterval(c.rtcstatsTimerId),delete c.rtcstatsTimerId);c.tryStartPlayTimer&&
382
+ (K.clearTimeout(c.tryStartPlayTimer),delete c.tryStartPlayTimer);"undefined"!=typeof c.baseTrack&&delete c.baseTrack;c.peer_conn&&(c.videoEl&&(c.videoEl.srcObject=null),c.mediaStream&&delete c.mediaStream,c.peer_conn.close(),c.peer_conn=null)};return!0},ha=async function(e){var l=e._config.xmc_url||K.xmc_url;if(!l)return e.toast("The rtsp protocol is not supported without setting XMC."),!1;l+="play";e.wsclient&&(e.wsclient.close(),delete e.wsclient);l=l.replace("http","ws");var m=new WebSocket(l);
383
+ m.onopen=function(){var c="undefined"===typeof e._config.rtspOverTcp?1:e._config.rtspOverTcp,v="boolean"===typeof e._config.rtsp_bypass?e._config.rtsp_bypass:0,z="undefined"===typeof e._config.use_audio?0:e._config.use_audio,A="MediaSource"in K&&K.MediaSource.isTypeSupported("video/mp4;codecs=hvc1.1.1.L93.B0")?1:0;c=JSON.stringify({msgtype:"playurl",data:{sourceurl:e.murl,rtsp_over_tcp:c,has_audio:z,has_hevc:A,rtsp_bypass:v}});m.send(c)};m.onmessage=function(c){console.log(c.data);c=JSON.parse(c.data);
384
+ if("object"==typeof c&&"onresult"===c.type&&"playurl"===c.event&&"object"===typeof c.streaminfo)if(e.closecall2=function(z){z.waitSignTimer&&(K.clearTimeout(z.waitSignTimer),delete z.waitSignTimer);z.wsclient&&(z.wsclient.close(),z.wsclient=null,delete z.wsclient)},c.snapshot&&e.videoEl&&e.videoEl.setAttribute("poster",c.snapshot),e._config.useFlv||"string"!==typeof c.streaminfo.rtc_playurl)"string"===typeof c.streaminfo.http_playurl?(v=c.streaminfo.http_playurl+c.streaminfo.stream+".flv",e.murl=
385
+ v,W(e)):e.closecall2(e);else{var v=c.streaminfo.rtc_playurl+c.streaminfo.stream+".rtc";c.first?e.waitSignTimer=setTimeout(function(){e.murl=v;Z(e);delete e.waitSignTimer},1E3):(e.murl=v,Z(e))}};m.onclose=function(){e.wsclient&&delete e.wsclient};m.onerror=function(){};e.wsclient=m;return!0},ma=function(e){Ja("flv_js",Ia+"flv.min.js",function(l){console.log("js:"+l+" is load!");var m=K.flvjs;if(!m.isSupported())return!1;var c={type:"flv",isLive:!0,url:e.murl};var v={enableWorker:!1,enableStashBuffer:!1,
386
+ stashInitialSize:0,lazyLoad:!1,autoCleanupSourceBuffer:!0,lazyLoadMaxDuration:0,isLive:!0};e.openFlv=function(){var z=m.createPlayer(c,v);z.on(m.Events.METADATA_ARRIVED,function(A){e.loadingOverlay&&(e.loadingOverlay.style.display="none");"object"==typeof A&&console.log("flvplayer:"+A.type)});z.on(m.Events.ERROR,function(A){"object"==typeof A?console.log("flvplayer:"+A.type):console.log("flvplayer:"+A)});z.attachMediaElement(e.videoEl);e.videoEl.playbackRate=1;e.onFlvStaticInfo=function(A){this.videoEl.paused||
387
+ (this.lastDecodedFrames?this.lastDecodedFrames!=A.decodedFrames?this.lastDecodedFrames=A.decodedFrames:(this.lastDecodedFrames=0,this.flvPlayer&&(this.closecall(this),this.openFlv(),this.setplaystate(!0))):this.lastDecodedFrames=A.decodedFrames)}.bind(e);e.onFlvError=function(A){"NetworkError"!==A||e.reconnectTimer||(e.reconnectTimer=K.setTimeout(function(){e.flvPlayer&&(e.closecall(e),e.openFlv(),e.setplaystate(!0));delete e.reconnectTimer},1E3))}.bind(e);e.onMediainfoCb=function(A){A&&this.setMediainfo("flvjs",
388
+ A)}.bind(e);z.on(m.Events.ERROR,e.onFlvError);z.on(m.Events.STATISTICS_INFO,e.onFlvStaticInfo);z.on(m.Events.MEDIA_INFO,e.onMediainfoCb);e.delayCheckTimerId=K.setInterval(function(){if(this.flvPlayer&&!this.videoEl.paused){var A=this.flvPlayer;if(A.buffered.length){let b=A.buffered.end(0)-A.currentTime;6<=b?A.currentTime=A.buffered.end(0)-.2:3<b&&(e.videoEl.playbackRate=1.5,e.fastForwardTimerId=setTimeout(function(){e.videoEl.playbackRate=1;delete e.fastForwardTimerId},2E3*b))}}}.bind(e),2E3);z.load();
389
+ z.play();e.flvPlayer=z;e.closecall=function(A){if(A.flvPlayer){var b=A.flvPlayer;b.off(m.Events.ERROR,A.onFlvError);b.off(m.Events.STATISTICS_INFO,A.onFlvStaticInfo);b.off(m.Events.MEDIA_INFO,A.onMediainfoCb);delete A.onFlvError;delete A.onFlvStaticInfo;delete A.onMediainfoCb;A.delayCheckTimerId&&(K.clearInterval(A.delayCheckTimerId),delete A.delayCheckTimerId);A.fastForwardTimerId&&(K.clearTimeout(A.fastForwardTimerId),delete A.fastForwardTimerId);A.reconnectTimer&&(K.clearTimeout(A.reconnectTimer),
390
+ delete A.reconnectTimer);b.pause();b.unload();b.detachMediaElement();b.destroy();delete A.flvPlayer}}};e.openFlv();e.setplaystate(!0)});return!0},W=function(e){Ja("mpeg_js",Ia+"mpeg.min.js?v=2",function(l){console.log("js:"+l+" is load!");l=mpegts.getFeatureList();if(!mpegts.isSupported()||!l.mseLivePlayback)return!1;e.openMpegts=function(){var m=e.videoEl,c=void 0,v=void 0;"boolean"===typeof e._config.hasAudio&&(c=e._config.hasAudio);"boolean"===typeof e._config.hasVideo&&(v=e._config.hasVideo);
391
+ c=mpegts.createPlayer({type:"mse",isLive:!0,hasAudio:c,hasVideo:v,url:e.murl},{autoCleanupSourceBuffer:!0,stashInitialSize:128,autoCleanupMaxBackwardDuration:20,autoCleanupMinBackwardDuration:10,enableWorker:!0,enableStashBuffer:!1});e.onErrorCb=function(z){var A=this;z!==mpegts.ErrorTypes.NETWORK_ERROR||A.reconnectTimer||(A.reconnectTimer=K.setTimeout(function(){A.mpegtsPlayer&&(A.closecall(A),A.openMpegts());delete A.reconnectTimer},1E3))}.bind(e);e.onEventCb=function(z){console.log(z)}.bind(e);
392
+ e.onMetadataCb=function(z){console.log(z)}.bind(e);e.onMediaInfoCb=function(z){z&&this.setMediainfo("mpegts",z)}.bind(e);e.onStatisCb=function(z){this.videoEl.paused||(this.lastDecodedFrames?this.lastDecodedFrames!=z.decodedFrames?(this.lastDecodedFrames=z.decodedFrames,delete this.waitDecodedFrames):("undefined"===typeof this.waitDecodedFrames?this.waitDecodedFrames=0:this.waitDecodedFrames++,1<this.waitDecodedFrames&&(this.lastDecodedFrames=0,delete this.waitDecodedFrames,this.mpegtsPlayer&&(this.closecall(this),
393
+ this.openMpegts()))):this.lastDecodedFrames=z.decodedFrames)}.bind(e);e.closecall=function(z){z.checkDelayTimerId&&(K.clearInterval(z.checkDelayTimerId),delete z.checkDelayTimerId);z.reconnectTimer||(K.clearTimeout(z.reconnectTimer),delete z.reconnectTimer);z.fastForwardTimerId&&(K.clearTimeout(z.fastForwardTimerId),delete z.fastForwardTimerId);if(z.mpegtsPlayer){var A=z.mpegtsPlayer;A.pause();A.off(mpegts.Events.ERROR,z.onErrorCb);A.off(mpegts.Events.MEDIA_INFO,z.onMediaInfoCb);A.off(mpegts.Events.METADATA_ARRIVED,
394
+ z.onMetadataCb);A.off(mpegts.Events.STATISTICS_INFO,z.onStatisCb);A.unload();A.detachMediaElement();A.destroy();delete z.onErrorCb;delete z.onMediaInfoCb;delete z.onMetadataCb;delete z.onStatisCb;delete z.onEventCb;delete z.mpegtsPlayer}};e.checkDelayTimerId=K.setInterval(function(){var z=this;if(z.mpegtsPlayer&&!z.videoEl.paused&&z.mpegtsPlayer.buffered.length){var A=z.mpegtsPlayer.buffered.end(0)-z.mpegtsPlayer.currentTime;6<=A?z.mpegtsPlayer.currentTime=z.mpegtsPlayer.buffered.end(0)-.2:3<A&&(z.videoEl.playbackRate=
395
+ 1.5,z.fastForwardTimerId=setTimeout(function(){z.videoEl.playbackRate=1;delete z.fastForwardTimerId},2E3*A))}}.bind(e),2E3);c.on(mpegts.Events.ERROR,e.onErrorCb);c.on(mpegts.Events.MEDIA_INFO,e.onMediaInfoCb);c.on(mpegts.Events.METADATA_ARRIVED,e.onMetadataCb);c.on(mpegts.Events.STATISTICS_INFO,e.onStatisCb);c.attachMediaElement(m);c.load();c.play();e.mpegtsPlayer=c};e.openMpegts()});return!0},ka=function(e){Ja("hls_js",Ia+"hls.min.js",function(l){console.log("js:"+l+" is load!");var m=K.Hls;if(m.isSupported()){var c=
396
+ e,v=new m;v.attachMedia(e.videoEl);v.on(m.Events.MEDIA_ATTACHED,function(){console.log("video and hlsPlayer are now bound together !");v.loadSource(e.murl);v.on(m.Events.MANIFEST_PARSED,function(b,O){console.log("HLSPlayer manifest loaded, found "+O.levels.length+" quality level");c.loadingOverlay&&(c.loadingOverlay.style.display="none");c.videoEl.play();c.setplaystate(!0)})});v.on(m.Events.ERROR,function(b,O){if(O.fatal)switch(O.type){case m.ErrorTypes.NETWORK_ERROR:console.log("fatal network error encountered, try to recover");
397
+ v.startLoad();break;case m.ErrorTypes.MEDIA_ERROR:console.log("fatal media error encountered, try to recover");v.recoverMediaError();break;default:v.destroy(),delete e.hlsPlayer,c.setplaystate(!1)}});c.onHlsManifestParsed=function(b,O){var x=this;if(1<O.levels.length){var ca=[];for(b=0;b<O.levels.length;b++){var G={mediaType:"video",bitrate:O.levels[b].bitrate,height:O.levels[b].height,width:O.levels[b].width,qualityIndex:b,name:O.levels[b].name||"q"+b};ca.push(G)}x.switchQualityLevel=function(ja){v.nextLevel=
398
+ parseInt(ja)}.bind(x);x.createQualitiesMenu(ca);v.on(m.Events.LEVEL_SWITCHED,function(ja,la){x.updateQualityLevel(v.currentLevel,v.autoLevelEnabled)},x)}else x.resetQualitiesMenu();if(O.subtitleTracks&&0<O.subtitleTracks.length){ca=[];for(b=0;b<O.subtitleTracks.length;b++)G=O.subtitleTracks[b],G.forced||(G={"default":G.default,id:G.id,lang:G.lang,name:G.name,url:G.url},ca.push(G));x.switchSubtitleTrack=function(ja){ja=parseInt(ja);-1===ja?v.subtitleDisplay=!1:(v.subtitleDisplay=!0,v.subtitleTrack=
399
+ ja)};x.createSubtitlesMenu(ca);v.on(m.Events.SUBTITLE_TRACK_SWITCH,function(ja,la){x.updateSubtitleTrack(la.id)})}}.bind(c);v.on(m.Events.MANIFEST_PARSED,c.onHlsManifestParsed);c.hlsPlayer=v;c.closecall=function(b){b.hlsPlayer&&(b.hlsPlayer.off(m.Events.MANIFEST_PARSED,b.onHlsManifestParsed),b.hlsPlayer.detachMedia(),b.hlsPlayer.destroy(),delete b.hlsPlayer,delete b.onHlsManifestParsed)}}else if(e.videoEl.canPlayType("application/vnd.apple.mpegurl")){c=e;e.videoEl.zwplayer=e;var z=function(){"object"==
400
+ typeof this.zwplayer&&(this.play(),this.zwplayer.setplaystate(!0))},A=function(){"object"==typeof this.zwplayer&&console.log("HLS fatal media error encountered, try to recover")};c.videoEl.addEventListener("loadedmetadata",z);c.videoEl.addEventListener("error",A);c.closecall=function(b){"object"===typeof b.videoEl&&(b.videoEl.pause(),b.videoEl.src="",b.videoEl.removeEventListener("loadedmetadata",z),b.videoEl.removeEventListener("error",A),"object"==typeof b.videoEl.zwplayer&&delete b.videoEl.zwplayer)};
401
+ c.videoEl.src=c.murl}else return e.toast("player cannot play hls media"),!1});return!0},ia=function(e){Ja("dash_js",Ia+"dash.all.min.js",function(l){console.log("js:"+l+" is load!");var m=K.dashjs,c=m.MediaPlayer().create();c.initialize(e.videoEl,e.murl,!0);l=e.getSimpleSubtitleRenderer();c.attachTTMLRenderingDiv(l);e.dashTextTrackList={};e.onDashMetadata=function(v){v&&console.log(v);this.loadingOverlay&&(this.loadingOverlay.style.display="none");this.videoEl.play();this.setplaystate(!0)}.bind(e);
402
+ e.onDashQualityChanged=function(v){v=c.getQualityFor("video");var z=c.getSettings().streaming.abr.autoSwitchBitrate.video||!1;e.updateQualityLevel(v,z)}.bind(e);e.onDashStreamInitialized=function(v){c.getBitrateInfoListFor("audio");v=c.getBitrateInfoListFor("video")||[];1<v.length?(this.switchQualityLevel=function(z){z=parseInt(z);var A={streaming:{abr:{autoSwitchBitrate:{}}}};0<=z?(A.streaming.abr.autoSwitchBitrate.video=!1,c.updateSettings(A),c.setQualityFor("video",z,!1)):(A.streaming.abr.autoSwitchBitrate.video=
403
+ !0,c.updateSettings(A))}.bind(this),this.createQualitiesMenu(v),c.on(m.MediaPlayer.events.QUALITY_CHANGE_RENDERED,this.onDashQualityChanged,this)):this.resetQualitiesMenu()}.bind(e);e.onDashTracksAdded=function(v){var z=this.dashTextTrackList;z[v.streamId]||(z[v.streamId]=[]);z[v.streamId]=z[v.streamId].concat(v.tracks)};e.onDashStreamDeactivated=function(v){var z=this.dashTextTrackList;v.streamInfo&&z[v.streamInfo.id]&&delete z[v.streamInfo.id]}.bind(e);e.onDashStreamActivated=function(v){v=v.streamInfo.id||
404
+ "none";var z=this.dashTextTrackList;if(z[v]&&(v=z[v],!(1>v.length))){z=[];for(var A=0;A<v.length;A++){var b=v[A],O=ib(b.labels);O?O+=" : "+b.type:(O=b.label||b.lang,O+=" : "+b.kind);z.push({"default":b.defaultTrack,id:A,lang:b.lang,name:O,url:b.url||""})}this.switchSubtitleTrack=function(x){var ca=this.dashPlayer||null;ca&&(parseInt(x),ca.setTextTrack(x))}.bind(this);this.createSubtitlesMenu(z)}}.bind(e);c.on(m.MediaPlayer.events.PLAYBACK_METADATA_LOADED,e.onDashMetadata,e);c.on(m.MediaPlayer.events.STREAM_INITIALIZED,
405
+ e.onDashStreamInitialized,e);c.on(m.MediaPlayer.events.STREAM_ACTIVATED,e.onDashStreamActivated,e);c.on(m.MediaPlayer.events.STREAM_DEACTIVATED,e.onDashStreamDeactivated,e);c.on(m.MediaPlayer.events.TEXT_TRACKS_ADDED,e.onDashTracksAdded,e);e.dashPlayer=c;e.closecall=function(v){v.dashPlayer&&(v.dashPlayer.pause(),v.dashPlayer.off(m.MediaPlayer.events.PLAYBACK_METADATA_LOADED,v.onDashMetadata,v),v.dashPlayer.off(m.MediaPlayer.events.STREAM_INITIALIZED,v.onDashStreamInitialized,v),v.dashPlayer.off(m.MediaPlayer.events.STREAM_ACTIVATED,
406
+ v.onDashStreamActivated,v),v.dashPlayer.off(m.MediaPlayer.events.STREAM_DEACTIVATED,v.onDashStreamDeactivated,v),v.dashPlayer.on(m.MediaPlayer.events.TEXT_TRACKS_ADDED,e.onDashTracksAdded,e),v.switchQualityLevel&&(v.dashPlayer.off(m.MediaPlayer.events.QUALITY_CHANGE_RENDERED,v.onDashQualityChanged,v),delete v.switchQualityLevel),v.dashPlayer.destroy(),delete v.dashPlayer,delete v.onDashMetadata,delete v.onDashStreamInitialized,delete v.onDashStreamActivated,delete v.onDashStreamDeactivated,delete v.onDashTracksAdded,
407
+ delete v.switchSubtitleTrack)}});return!0},qa=function(e,l){var m=e._config.cdn_addr||K.cdn_addr;if(!m)return e.toast("The webcdn protocol is not supported due without setting cdn server address url."),!1;m.endsWith("/")||(m+="/");m+="cdnplay";e.wcdnClient&&(e.wcdnClient.close(),delete e.wcdnClient);m=m.replace("http","ws");"https:"==K.location.protocol&&(m=m.replace("ws:","wss:"));var c=l.indexOf("://");if(0>c)return e.toast("Invalid wcdn url:"+l),!1;l=l.substr(c+3);(c=e._config.userInfo||K.userInfo)||
408
+ (c={userid:"0",username:"Visitor",nickname:"Visitor"});var v={msgtype:"startplay",data:{userid:c.userid||"0",username:c.username||"Visitor",nickname:c.nickname||"Visitor",avatar:c.avatar||"",streamurl:l}},z=function(A){var b=new WebSocket(m);b.onopen=function(O){O=JSON.stringify(v);b.send(O)};b.onmessage=function(O){if("string"===typeof O.data)try{var x=JSON.parse(O.data),ca=x.msgtype||"none",G=x.event||"none";if("onresult"===ca)if("startplay"===G){var ja=x.data||null;if(ja&&"object"===typeof ja){O=
409
+ void 0;"function"===typeof A.closecall2&&(O=A.closecall2,A.closecall2=null);x={msgtype:"playstatus",data:{status:"playing"}};A.play(ja,!0)||(x.data.status="error");var la=JSON.stringify(x);b.send(la);"function"===typeof O&&(A.closecall2=O)}else{var d=x.msg||"Unknown error";"StreamNotExist"===d?(A.toast(pa("waitStreamToReady","Waiting for stream")),A.errorHandleTimerId=K.setTimeout(function(){delete A.errorHandleTimerId;A.toast("closetoast");var h=JSON.stringify(v);b.send(h)},3E3)):(A.toast(G+" error:"+
410
+ d),A.errorHandleTimerId=K.setTimeout(function(){delete A.errorHandleTimerId;A.stop()},2E3))}}else"endplay"===G&&(console.log("Receive endplay result"),A.stop());else"error"===ca?A.toast(G+" error:"+x.msg||"Unknown error"):"command"===ca&&"stopplay"===(x.action||"none")&&(A.toast("Server is close, player is stop."),A.errorHandleTimerId=K.setTimeout(function(){delete A.errorHandleTimerId;A.stop()},100),A.wcdnClient&&(A.wcdnClient.ws.close(),A.wcdnClient=null))}catch(h){console.warn("JSON.parse failed:",
411
+ h)}};b.onerror=function(O){console.error("Web CDN websocket Error:",O)};b.onclose=function(O){this.wsVersionId===A.wsVersionId&&A.wcdnClient&&!A.cdnReconnectTimerId&&A.wcdnClient===this&&(A.cdnReconnectTimerId=setTimeout(function(){z(A)},1E3),delete A.wcdnClient)};b.wsVersionId=(new Date).getTime();A.wcdnClient=b;A.wsVersionId=b.wsVersionId;"undefined"!==typeof A.cdnReconnectTimerId&&delete A.cdnReconnectTimerId};e.closecall2=function(A){e.cdnReconnectTimerId&&(clearTimeout(e.cdnReconnectTimerId),
412
+ delete e.cdnReconnectTimerId);e.errorHandleTimerId&&(clearTimeout(e.errorHandleTimerId),delete e.errorHandleTimerId);e.wcdnClient?(A=e.wcdnClient,delete e.wcdnClient,A.close()):(e.toast("The wcdn connection has been passively closed."),console.log("Websocket connection is abnormally closed."))};z(e);return!0},fa=function(e){var l=e.videoEl;e.closecall=function(m){if(m.isPlayVideo){var c=m.videoEl;c.paused||c.pause();c.src="";delete m.isPlayVideo}};e.isPlayVideo=!0;l.src=e.murl;return!0},aa=function(e){var l=
413
+ e.videoEl;e.closecall=function(m){if(m.isPlayAudio){var c=m.videoEl;c.paused||c.pause();c.src="";delete m.isPlayAudio}};e.isPlayAudio=!0;l.src=e.murl;return!0},na=function(e){var l=e.murl;if("dvr"===(l.type||"")&&l.http)return e.murl=l.http,fa(e);if(K.MediaSource&&K.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')){var m=K.RTCPeerConnection||K.webkitRTCPeerConnection||K.mozRTCPeerConnection||K.RTCIceGatherer;if(l.rtc&&m)return e.murl=l.rtc,Z(e);if(l["httpflv-n"])return e.murl=
414
+ l["httpflv-n"],e._config.useOldFlv?ma(e):W(e);if(l.httpflv)return e.murl=l.httpflv,e._config.useOldFlv?ma(e):W(e);if(l["wsflv-n"])return e.murl=l["wsflv-n"],e._config.useOldFlv?ma(e):W(e);if(l.wsflv)return e.murl=l.wsflv,e._config.useOldFlv?ma(e):W(e);if(l.hls)return e.murl=l.hls,ka(e);if(l.dash)return e.murl=l.dash,ia(e);if(l.ts)return e.murl=l.ts,W(e)}else if(e.murl.hls)return e.murl=e.murl.hls,ka(e);return!1},T=function(e){var l=[];var m=String.fromCharCode(107)+"u"+String.fromCharCode(97)+"ishou";
415
+ var c=String.fromCharCode(46)+"co"+String.fromCharCode(109)+"/",v=String.fromCharCode(100)+"ou"+String.fromCharCode(121)+"i"+String.fromCharCode(110);l.push("https://live."+m+c+"u/");l.push("https://live."+v+c);if("string"===typeof e&&23<e.length)for(c=0;c<l.length;c++)if(m=l[c],0===e.indexOf(m))return!0;return!1};ba.prototype={play:function(e,l,m){var c=this;if(e){c.murl&&c.stop();if("string"===typeof e&&(e.startsWith("wcdn://")||e.startsWith("wcdns://")))return e=qa(c,e);if("object"===typeof e){"object"===
416
+ typeof e.thumbnails&&(c._config.thumbnails=JSON.parse(JSON.stringify(e.thumbnails)));if("object"===typeof e.murls){c.multiStreams=JSON.parse(JSON.stringify(e));var v=e.murls}else Array.isArray(e)?(c.multiStreams={},v=e):(c.multiStreams={},v=[e]),c.multiStreams.murls=v;var z=!0,A="",b=[],O;for(O in v){var x=v[O];if("object"===typeof x)if(Array.isArray(x)){var ca="";var G=x[0];if(2<x.length){var ja=x[2];ca=x[1]}else ja=1<x.length?x[1]:O;b.push({url:G,name:ja,mime:ca});z&&(e=G,A=ja,z=!1)}else{if(G=!1,
417
+ "default"in x&&x["default"]&&(G=x["default"]),z||G)"url"in x&&(e=x.url),A=z="name"in x?x.name:O,z=!1}else"string"===typeof x&&z&&(z=O,e=x,A=z,z=!1)}0<b.length&&(c.multiStreams.murls=b);c.multiStreams.curStream=A;console.log(e)}c.murl=e}if(!c.murl)return!1;c.force_stopped=!1;c.isPlaying=!0;c.loadingOverlay&&(c.loadingOverlay.style.display="flex");"undefined"!=typeof l&&(l?c._config.isLive=l:delete c._config.isLive);"undefined"!=typeof m&&(m?c._config.useOldFlv=m:delete c._config.useOldFlv);e=!1;if("object"==
418
+ typeof c.murl)e=na(c);else if("string"==typeof c.murl){e=I(c.murl);e||(l=c.murl.indexOf("mime_type="),0<l&&(l+=10,v=c.murl.indexOf("&",l),0>v&&(v=c.murl.length),l=c.murl.substring(l,v),"video_mp4"===l?e=".mp4":"video_flv"===l?e=".flv":"video_hls"===l?e=".m3u8":"video_rtc"===l?e=".rtc":"video_dash"===l&&(e=".mpd")));if(!e&&("string"===typeof c._config.streamtype&&("httpflv"===c._config.streamtype?e=".flv":"hls"===c._config.streamtype?e=".m3u8":"dash"===c._config.streamtype?e=".mpd":"mpegts"===c._config.streamtype?
419
+ e=".ts":"webrtc"===c._config.streamtype&&(e=".rtc")),!e&&T(c.murl))){var la=function(){setTimeout(function(){c.loadingOverlay&&(c.loadingOverlay.style.display="none")},1E3)};if(!c._config.url_proxy)return c.toast("Sorry, the player cannot play this media address",5E3,!0),la(),!1;var d=d;w(c._config.url_proxy,JSON.stringify({roomUrl:c.murl,token:c._config.proxy_token||"12345678"}),function(h){if("object"===typeof h&&h.result){h={murls:h.flvStreams||h.hlsStreams,multistream:1};if(!h.murls)return c.toast("Sorry, missing valid address for this room.",
420
+ 5E3,!0),la(),!1;c.play(h,d,m)}else c.toast("Sorry, unable to obtain a valid address for this room.",5E3,!0),la()},function(h){c.toast("Sorry, failed to get address due to network!",5E3,!0);la()});return!1}e=0===c.murl.indexOf("rtsp")?ha(c):".rtc"===e||c.murl.startsWith("webrtc://")?Z(c):".flv"===e?c._config.useOldFlv?ma(c):W(c):".m3u8"===e?ka(c):".mpd"===e?ia(c):".mp4"===e?fa(c):".mp3"===e||".m4a"===e||".aac"===e||".mp4a"===e||".ogg"===e?aa(c):".ts"===e?W(c):fa(c)}e?(c.setupEventsHandler(),c.startHideControlbar(c),
421
+ c.multiStreams&&K.setTimeout(function(){c.buildStreamSelector()},1E3)):(c.isPlaying=!1,c.loadingOverlay&&(c.loadingOverlay.style.display="none"),c.toast("Play media failed, unsupported media type",5E3,!0));return e},__switchStream:function(e){if("string"!==typeof e)this.toast("Switch stream methon does not support "+e);else{this.murl=e;e=I(this.murl);if(!e){var l=this.murl.indexOf("mime_type=");if(0<l){l+=10;var m=this.murl.indexOf("&",l);0>m&&(m=this.murl.length);l=this.murl.substring(l,m);"video_mp4"===
422
+ l?e=".mp4":"video_flv"===l?e=".flv":"video_hls"===l?e=".m3u8":"video_rtc"===l?e=".rtc":"video_dash"===l&&(e=".mpd")}}e||"string"===typeof this._config.streamtype&&("httpflv"===this._config.streamtype?e=".flv":"hls"===this._config.streamtype?e=".m3u8":"dash"===this._config.streamtype?e=".mpd":"mpegts"===this._config.streamtype?e=".ts":"webrtc"===this._config.streamtype&&(e=".rtc"));!this._config.isLive&&this.videoEl&&(this.postSeekTime=this.videoEl.currentTime);this.closecall&&(this.closecall(this),
423
+ delete this.closecall);this.closecall2&&(this.closecall2(this),delete this.closecall2);this.videoEl&&(this.videoEl.removeAttribute("src"),this.videoEl.load());(0===this.murl.indexOf("rtsp")?ha(this):".rtc"===e||this.murl.startsWith("webrtc://")?Z(this):".flv"===e?this._config.useOldFlv?ma(this):W(this):".m3u8"===e?ka(this):".mpd"===e?ia(this):".mp4"===e?fa(this):".mp3"===e||".m4a"===e||".aac"===e||".mp4a"===e||".ogg"===e?aa(this):".ts"===e?W(this):fa(this))||this.toast("Switch stream failed, unsupported media type")}},
424
+ stop:function(){this.closecall&&(this.closecall(this),this.removeVideoEventHandlers(),delete this.closecall);this.closecall2&&(this.closecall2(this),delete this.closecall2);this.videoEl&&(this.videoEl.removeAttribute("src"),this.videoEl.load());this.isPlaying=!1;this.setplaystate(!1);this.bigPlayOverlay&&(this.bigPlayOverlay.style.display="none");this.updateProgress(0);this.timeSpan&&(this.timeSpan.innerHTML="");this.controlbar&&(this.controlbar.querySelector(".zwp__duration-container").style.display=
425
+ "none");this.progressBar&&this.progressBar.streamtype&&(this.progressBar.streamtype.style.display="none");this.progressBar&&this.progressBar.chapters&&(this.progressBar.chapters.innerHTML="");this.subtitles&&delete this.subtitles;this.subtitleShow&&(this.subtitleShow.style.display="none");this.toastTimerId&&(clearTimeout(this.toastTimerId),delete this.toastTimerId,this.toastBox&&(this.overlay_layers.removeChild(this.toastBox),delete this.toastBox));this.mutedTipBox&&(this.popup_layers.removeChild(this.mutedTipBox),
426
+ this.popup_layers.style.display=null,delete this.mutedTipBox);this.overlayLayerClickTimer&&(K.clearTimeout(this.overlayLayerClickTimer),delete this.overlayLayerClickTimer);delete this.multiStreams;this.resetSpeedMenu();this.resetQualitiesMenu();this.removeChapters();this.resetSubtitleMenu()},pause:function(){this.isPlaying&&this.videoEl&&!this.videoEl.paused&&!this.videoEl.ended&&(this.videoEl.pause(),this.setplaystate(!1))},resume:function(){this.isPlaying?this.videoEl&&(this.videoEl.paused||this.videoEl.ended)&&
427
+ (this.videoEl.play(),this.setplaystate(!0)):this._config.url&&this.play(this._config.url)},seekTime:function(e){if(this.isPlaying&&this.videoEl&&!(0>e)){var l=this.videoEl.duration;isNaN(l)||Infinity===l||(e>l&&(e=l),this.videoEl.currentTime=e)}},getDuration:function(){if(this.isPlaying&&this.videoEl)return this.videoEl.duration},destroy:function(){this.closecall&&(this.closecall(this),this.removeVideoEventHandlers(),delete this.closecall);this.closecall2&&(this.closecall2(this),delete this.closecall2);
428
+ this.videoRemoveWhenClose&&(this.videoEl&&this.videoWrapper&&(this.videoWrapper.removeChild(this.videoEl),this.playerContainer.removeChild(this.videoWrapper),delete this.videoWrapper),delete this.videoRemoveWhenClose);this.videoEl&&(this.videoEl.removeAttribute("src"),this.videoEl.load(),this.videoEl=null,delete this.videoEl);this.snapCanvas&&delete this.snapCanvas;this.controlbar&&(this.progressBar&&this.progressBar.chapters&&(this.progressBar.chapters.innerHTML=""),this.playerContainer.removeChild(this.controlbar),
429
+ delete this.controlbar);this.danmuToolbar&&(this.danmuToolbar.remove(),delete this.danmuToolbar);this.subtitles&&delete this.subtitles;this.toastTimerId&&(clearTimeout(this.toastTimerId),delete this.toastTimerId,this.toastBox&&(this.overlay_layers.removeChild(this.toastBox),delete this.toastBox));this.overlayLayerClickTimer&&(K.clearTimeout(this.overlayLayerClickTimer),delete this.overlayLayerClickTimer);this.overlay_layers&&(this.subtitle1&&delete this.subtitle1,this.subtitle2&&delete this.subtitle2,
430
+ this.subtitleShow&&(Ba.removeElement(this.subtitleShow),delete this.subtitleShow),this.danmuPlayer&&(this.danmuPlayer.destroy(),delete this.danmuPlayer),this.playerContainer.removeChild(this.overlay_layers),delete this.overlay_layers);this.popup_layers&&(this.playerContainer.removeChild(this.popup_layers),delete this.popup_layers);this.playerElm&&(delete this.playerContainer.zwpDragable,this.playerElm.removeChild(this.playerContainer),delete this.playerContainer,this.doDeletePlayerElm?(document.removeChild(this.playerElm),
431
+ delete this.playerElm):this.doRemovePlayerClass&&(Q(this.playerElm,"zwp-wrap"),this.playerElm.setAttribute("class",this.playerElmOldClass)));this.windowScrollHandler&&(K.removeEventListener("scroll",this.windowScrollHandler),delete this.windowScrollHandler)},setplaystate:function(e){this.controlbar&&(this.playbtn||(this.playbtn=this.controlbar.querySelector(".zwp-playbtn")),this.playbtn&&(e?(this.playbtn.setAttribute("data-action","pause"),this.bigPlayOverlay&&(this.bigPlayOverlay.style.display="none")):
432
+ (this.playbtn.setAttribute("data-action","play"),this.bigPlayOverlay&&(this.bigPlayOverlay.style.display="flex"))),this.playerElm&&(e?(Q(this.playerElm,"zwp-pause"),M(this.playerElm,"zwp-playing")):(Q(this.playerElm,"zwp-playing"),M(this.playerElm,"zwp-pause"))),this.loadingOverlay&&(this.loadingOverlay.style.display="none"))},setEnableDanmu:function(e){e?this.overlay_layers&&!this.danmuPlayer&&(this.danmuPlayer=HUAYI.Danmu.create({playerId:this.overlay_layers})):this.danmuPlayer&&(this.danmuPlayer.destroy(),
433
+ delete this.danmuPlayer)},appendDanmu:function(e,l){this.danmuPlayer&&(l||(l=this.danmuSetting),this.danmuPlayer.addDanmu(e,l))},setChapters:function(e){null===e?this.removeChapters():(this.chapters=e,this.videoEl&&setTimeout(function(){this.loadChapters()}.bind(this),1E3))},addSubtitle:function(e,l,m){this.loadSubtitle(e,l,m)},removeSubtitle:function(){this.showSubtitle(!1)},buildDanmuControlbar:function(e,l){this.buildDanmuToolbar(e,l)},notifyResize:function(e,l){this.playerElm&&("undefined"!==
434
+ typeof e&&("number"===typeof e&&(e+="px"),this.playerElm.style.width=e),"undefined"!==typeof l&&("number"===typeof l&&(l+="px"),this.playerElm.style.height=l))},lightOff:function(){this.playerElm&&M(this.playerElm,"zwp-state-light-off")},lightOn:function(){this.playerElm&&Q(this.playerElm,"zwp-state-light-off")},get CurrentTime(){return this.isPlaying&&this.videoEl?this.videoEl.currentTime:-1},set CurrentTime(e){if(this.isPlaying&&this.videoEl&&!(0>e)){var l=this.videoEl.duration;isNaN(l)||Infinity===
435
+ l||(e>l&&(e=l),this.videoEl.currentTime=e)}}};return ba})})(window);