From 80e6fd668891ebf2f7a9f162c5605d93b00c2640 Mon Sep 17 00:00:00 2001 From: "woltlab.com" Date: Fri, 28 Nov 2014 20:31:49 +0100 Subject: [PATCH] Updating minified JavaScript files --- wcfsetup/install/files/js/WCF.Combined.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WCF.Combined.min.js b/wcfsetup/install/files/js/WCF.Combined.min.js index e9ed16f0d2..b2ddb9f8e9 100755 --- a/wcfsetup/install/files/js/WCF.Combined.min.js +++ b/wcfsetup/install/files/js/WCF.Combined.min.js @@ -75,7 +75,7 @@ window.matchMedia||(window.matchMedia=function(){var c=window.styleMedia||window !1,m.safari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,m.supported=m.chrome||m.ff||m.opera;var v=[];g=function(){},d=w=!1;var C=function(){r=n(b,e),r.bgColor=o(r.bgColor),r.textColor=o(r.textColor),r.position=r.position.toLowerCase(),r.animation=O.types[""+r.animation]?r.animation:b.animation;var t=r.position.indexOf("up")>-1,i=r.position.indexOf("left")>-1;if(t||i){for(var d=0;d0?f.height:32,s=f.width>0?f.width:32,c.height=h,c.width=s,l=c.getContext("2d"),M.ready()}):(f.setAttribute("src",""),h=32,s=32,f.height=h,f.width=s,c.height=h,c.width=s,l=c.getContext("2d"),M.ready())}catch(y){throw"Error initializing favico. Message: "+y.message}},M={};M.ready=function(){d=!0,M.reset(),g()},M.reset=function(){d&&(v=[],u=!1,l.clearRect(0,0,s,h),l.drawImage(f,0,0,s,h),L.setIcon(c),window.clearTimeout(x),window.clearTimeout(p))},M.start=function(){if(d&&!y){var e=function(){u=v[0],y=!1,v.length>0&&(v.shift(),M.start())};if(v.length>0){y=!0;var t=function(){["type","animation","bgColor","textColor","fontFamily","fontStyle"].forEach(function(e){e in v[0].options&&(r[e]=v[0].options[e])}),O.run(v[0].options,function(){e()},!1)};u?O.run(u.options,function(){t()},!0):t()}}};var I={},E=function(e){return e.n="number"==typeof e.n?Math.abs(0|e.n):e.n,e.x=s*e.x,e.y=h*e.y,e.w=s*e.w,e.h=h*e.h,e.len=(""+e.n).length,e};I.circle=function(e){e=E(e);var t=!1;2===e.len?(e.x=e.x-0.4*e.w,e.w=1.4*e.w,t=!0):e.len>=3&&(e.x=e.x-0.65*e.w,e.w=1.65*e.w,t=!0),l.clearRect(0,0,s,h),l.drawImage(f,0,0,s,h),l.beginPath(),l.font=r.fontStyle+" "+Math.floor(e.h*(e.n>99?0.85:1))+"px "+r.fontFamily,l.textAlign="center",t?(l.moveTo(e.x+e.w/2,e.y),l.lineTo(e.x+e.w-e.h/2,e.y),l.quadraticCurveTo(e.x+e.w,e.y,e.x+e.w,e.y+e.h/2),l.lineTo(e.x+e.w,e.y+e.h-e.h/2),l.quadraticCurveTo(e.x+e.w,e.y+e.h,e.x+e.w-e.h/2,e.y+e.h),l.lineTo(e.x+e.h/2,e.y+e.h),l.quadraticCurveTo(e.x,e.y+e.h,e.x,e.y+e.h-e.h/2),l.lineTo(e.x,e.y+e.h/2),l.quadraticCurveTo(e.x,e.y,e.x+e.h/2,e.y)):l.arc(e.x+e.w/2,e.y+e.h/2,e.h/2,0,2*Math.PI),l.fillStyle="rgba("+r.bgColor.r+","+r.bgColor.g+","+r.bgColor.b+","+e.o+")",l.fill(),l.closePath(),l.beginPath(),l.stroke(),l.fillStyle="rgba("+r.textColor.r+","+r.textColor.g+","+r.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?l.fillText((e.n>9999?9:Math.floor(e.n/1000))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-0.2*e.h)):l.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-0.15*e.h)),l.closePath()},I.rectangle=function(e){e=E(e);var t=!1;2===e.len?(e.x=e.x-0.4*e.w,e.w=1.4*e.w,t=!0):e.len>=3&&(e.x=e.x-0.65*e.w,e.w=1.65*e.w,t=!0),l.clearRect(0,0,s,h),l.drawImage(f,0,0,s,h),l.beginPath(),l.font=r.fontStyle+" "+Math.floor(e.h*(e.n>99?0.9:1))+"px "+r.fontFamily,l.textAlign="center",l.fillStyle="rgba("+r.bgColor.r+","+r.bgColor.g+","+r.bgColor.b+","+e.o+")",l.fillRect(e.x,e.y,e.w,e.h),l.fillStyle="rgba("+r.textColor.r+","+r.textColor.g+","+r.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?l.fillText((e.n>9999?9:Math.floor(e.n/1000))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-0.2*e.h)):l.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-0.15*e.h)),l.closePath()};var T=function(e,t){t=("string"==typeof t?{animation:t}:t)||{},g=function(){try{if("number"==typeof e?e>0:""!==e){var n={type:"badge",options:{n:e}};if("animation" in t&&O.types[""+t.animation]&&(n.options.animation=""+t.animation),"type" in t&&I[""+t.type]&&(n.options.type=""+t.type),["bgColor","textColor"].forEach(function(e){e in t&&(n.options[e]=o(t[e]))}),["fontStyle","fontFamily"].forEach(function(e){e in t&&(n.options[e]=t[e])}),v.push(n),v.length>100){throw"Too many badges requests in queue."}M.start()}else{M.reset()}}catch(i){throw"Error setting badge. Message: "+i.message}},d&&g()},A=function(e){g=function(){try{var t=e.width,o=e.height,n=document.createElement("img"),i=o/h>t/s?t/s:o/h;n.setAttribute("src",e.getAttribute("src")),n.height=o/i,n.width=t/i,l.clearRect(0,0,s,h),l.drawImage(n,0,0,s,h),L.setIcon(c)}catch(r){throw"Error setting image. Message: "+r.message}},d&&g()},U=function(e){g=function(){try{if("stop"===e){return w=!0,M.reset(),w=!1,void 0}e.addEventListener("play",function(){t(this)},!1)}catch(o){throw"Error setting video. Message: "+o.message}},d&&g()},R=function(e){if(window.URL&&window.URL.createObjectURL||(window.URL=window.URL||{},window.URL.createObjectURL=function(e){return e}),m.supported){var o=!1;navigator.getUserMedia=navigator.getUserMedia||navigator.oGetUserMedia||navigator.msGetUserMedia||navigator.mozGetUserMedia||navigator.webkitGetUserMedia,g=function(){try{if("stop"===e){return w=!0,M.reset(),w=!1,void 0}o=document.createElement("video"),o.width=s,o.height=h,navigator.getUserMedia({video:!0,audio:!1},function(e){o.src=URL.createObjectURL(e),o.play(),t(o)},function(){})}catch(n){throw"Error setting webcam. Message: "+n.message}},d&&g()}},L={};L.getIcon=function(){var e=!1,t="",o=function(){for(var e=document.getElementsByTagName("head")[0].getElementsByTagName("link"),t=e.length,o=t-1;o>=0;o--){if(/(^|\s)icon(\s|$)/i.test(e[o].getAttribute("rel"))){return e[o]}}return !1};if(r.elementId?(e=document.getElementById(r.elementId),e.setAttribute("href",e.getAttribute("src"))):(e=o(),e===!1&&(e=document.createElement("link"),e.setAttribute("rel","icon"),document.getElementsByTagName("head")[0].appendChild(e))),t=r.elementId?e.src:e.href,"data:"!==t.substr(0,5)&&-1===t.indexOf(document.location.hostname)){throw new Error("Error setting favicon. Favicon image is on different domain (Icon: "+t+", Domain: "+document.location.hostname+")")}return e.setAttribute("type","image/png"),e},L.setIcon=function(e){var t=e.toDataURL("image/png");if(r.elementId){document.getElementById(r.elementId).setAttribute("src",t)}else{if(m.ff||m.opera){var o=a;a=document.createElement("link"),m.opera&&a.setAttribute("rel","icon"),a.setAttribute("rel","icon"),a.setAttribute("type","image/png"),document.getElementsByTagName("head")[0].appendChild(a),a.setAttribute("href",t),o.parentNode&&o.parentNode.removeChild(o)}else{a.setAttribute("href",t)}}};var O={};return O.duration=40,O.types={},O.types.fade=[{x:0.4,y:0.4,w:0.6,h:0.6,o:0},{x:0.4,y:0.4,w:0.6,h:0.6,o:0.1},{x:0.4,y:0.4,w:0.6,h:0.6,o:0.2},{x:0.4,y:0.4,w:0.6,h:0.6,o:0.3},{x:0.4,y:0.4,w:0.6,h:0.6,o:0.4},{x:0.4,y:0.4,w:0.6,h:0.6,o:0.5},{x:0.4,y:0.4,w:0.6,h:0.6,o:0.6},{x:0.4,y:0.4,w:0.6,h:0.6,o:0.7},{x:0.4,y:0.4,w:0.6,h:0.6,o:0.8},{x:0.4,y:0.4,w:0.6,h:0.6,o:0.9},{x:0.4,y:0.4,w:0.6,h:0.6,o:1}],O.types.none=[{x:0.4,y:0.4,w:0.6,h:0.6,o:1}],O.types.pop=[{x:1,y:1,w:0,h:0,o:1},{x:0.9,y:0.9,w:0.1,h:0.1,o:1},{x:0.8,y:0.8,w:0.2,h:0.2,o:1},{x:0.7,y:0.7,w:0.3,h:0.3,o:1},{x:0.6,y:0.6,w:0.4,h:0.4,o:1},{x:0.5,y:0.5,w:0.5,h:0.5,o:1},{x:0.4,y:0.4,w:0.6,h:0.6,o:1}],O.types.popFade=[{x:0.75,y:0.75,w:0,h:0,o:0},{x:0.65,y:0.65,w:0.1,h:0.1,o:0.2},{x:0.6,y:0.6,w:0.2,h:0.2,o:0.4},{x:0.55,y:0.55,w:0.3,h:0.3,o:0.6},{x:0.5,y:0.5,w:0.4,h:0.4,o:0.8},{x:0.45,y:0.45,w:0.5,h:0.5,o:0.9},{x:0.4,y:0.4,w:0.6,h:0.6,o:1}],O.types.slide=[{x:0.4,y:1,w:0.6,h:0.6,o:1},{x:0.4,y:0.9,w:0.6,h:0.6,o:1},{x:0.4,y:0.9,w:0.6,h:0.6,o:1},{x:0.4,y:0.8,w:0.6,h:0.6,o:1},{x:0.4,y:0.7,w:0.6,h:0.6,o:1},{x:0.4,y:0.6,w:0.6,h:0.6,o:1},{x:0.4,y:0.5,w:0.6,h:0.6,o:1},{x:0.4,y:0.4,w:0.6,h:0.6,o:1}],O.run=function(e,t,o,a){var h=O.types[i()?"none":r.animation];return a=o===!0?"undefined"!=typeof a?a:h.length-1:"undefined"!=typeof a?a:0,t=t?t:function(){},a=0?(I[r.type](n(e,h[a])),x=setTimeout(function(){o?a-=1:a+=1,O.run(e,t,o,a)},O.duration),L.setIcon(c),void 0):(t(),void 0)},C(),{badge:T,video:U,image:A,webcam:R,reset:M.reset,browser:{supported:m.supported}}};"undefined"!=typeof define&&define.amd?define([],function(){return e}):"undefined"!=typeof module&&module.exports?module.exports=e:this.Favico=e}();(function(b){if(typeof define==="function"&&define.amd&&define.amd.jQuery){define(["jquery"],b)}else{b(jQuery)}}(function(ac){var S="left",T="right",ad="up",G="down",af="in",E="out",V="none",L="auto",W="swipe",K="pinch",R="tap",Y="doubletap",ag="longtap",F="hold",M="horizontal",J="vertical",Z="all",O=10,ab="start",X="move",aa="end",Q="cancel",ah="ontouchstart" in window,I=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,ae=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,P="TouchSwipe";var U={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:true,triggerOnTouchLeave:false,allowPageScroll:"auto",fallbackToMouseEvents:true,excludedElements:"label, button, input, select, textarea, a, .noSwipe"};ac.fn.swipe=function(a){var b=ac(this),c=b.data(P);if(c&&typeof a==="string"){if(c[a]){return c[a].apply(this,Array.prototype.slice.call(arguments,1))}else{ac.error("Method "+a+" does not exist on jQuery.swipe")}}else{if(!c&&(typeof a==="object"||!a)){return H.apply(this,arguments)}}return b};ac.fn.swipe.defaults=U;ac.fn.swipe.phases={PHASE_START:ab,PHASE_MOVE:X,PHASE_END:aa,PHASE_CANCEL:Q};ac.fn.swipe.directions={LEFT:S,RIGHT:T,UP:ad,DOWN:G,IN:af,OUT:E};ac.fn.swipe.pageScroll={NONE:V,HORIZONTAL:M,VERTICAL:J,AUTO:L};ac.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:Z};function H(a){if(a&&(a.allowPageScroll===undefined&&(a.swipe!==undefined||a.swipeStatus!==undefined))){a.allowPageScroll=V}if(a.click!==undefined&&a.tap===undefined){a.tap=a.click}if(!a){a={}}a=ac.extend({},ac.fn.swipe.defaults,a);return this.each(function(){var b=ac(this);var c=b.data(P);if(!c){c=new N(this,a);b.data(P,c)}})}function N(bR,C){var u=(ah||ae||!C.fallbackToMouseEvents),s=u?(ae?(I?"MSPointerDown":"pointerdown"):"touchstart"):"mousedown",w=u?(ae?(I?"MSPointerMove":"pointermove"):"touchmove"):"mousemove",g=u?(ae?(I?"MSPointerUp":"pointerup"):"touchend"):"mouseup",i=u?null:"mouseleave",bI=(ae?(I?"MSPointerCancel":"pointercancel"):"touchcancel");var bf=0,bw=null,bk=0,bU=0,bm=0,x=1,aw=0,bC=0,p=null;var bu=ac(bR);var b="start";var e=0;var bv=null;var h=0,bT=0,bQ=0,bi=0,o=0;var bp=null,bg=null;try{bu.bind(s,by);bu.bind(bI,bM)}catch(bb){ac.error("events not supported "+s+","+bI+" on jQuery.swipe")}this.enable=function(){bu.bind(s,by);bu.bind(bI,bM);return bu};this.disable=function(){bB();return bu};this.destroy=function(){bB();bu.data(P,null);return bu};this.option=function(ai,aj){if(C[ai]!==undefined){if(aj===undefined){return C[ai]}else{C[ai]=aj}}else{ac.error("Option "+ai+" does not exist on jQuery.swipe.options")}return null};function by(aj){if(bK()){return}if(ac(aj.target).closest(C.excludedElements,bu).length>0){return}var ai=aj.originalEvent?aj.originalEvent:aj;var ak,al=ah?ai.touches[0]:ai;b=ab;if(ah){e=ai.touches.length}else{aj.preventDefault()}bf=0;bw=null;bC=null;bk=0;bU=0;bm=0;x=1;aw=0;bv=bc();p=bl();j();if(!ah||(e===C.fingers||C.fingers===Z)||bo()){bd(0,al);h=au();if(e==2){bd(1,ai.touches[1]);bU=bm=D(bv[0].start,bv[1].start)}if(C.swipeStatus||C.pinchStatus){ak=n(ai,b)}}else{ak=false}if(ak===false){b=Q;n(ai,b);return ak}else{if(C.hold){bg=setTimeout(ac.proxy(function(){bu.trigger("hold",[ai.target]);if(C.hold){ak=C.hold.call(bu,ai,ai.target)}},this),C.longTapThreshold)}ay(true)}return null}function bS(al){var ai=al.originalEvent?al.originalEvent:al;if(b===aa||b===Q||a0()){return}var am,an=ah?ai.touches[0]:ai;var ak=bE(an);bT=au();if(ah){e=ai.touches.length}if(C.hold){clearTimeout(bg)}b=X;if(e==2){if(bU==0){bd(1,ai.touches[1]);bU=bm=D(bv[0].start,bv[1].start)}else{bE(ai.touches[1]);bm=D(bv[0].end,bv[1].end);bC=av(bv[0].end,bv[1].end)}x=bO(bU,bm);aw=Math.abs(bU-bm)}if((e===C.fingers||C.fingers===Z)||!ah||bo()){bw=bA(ak.start,ak.end);ba(al,bw);bf=bt(ak.start,ak.end);bk=bz();bD(bw,bf);if(C.swipeStatus||C.pinchStatus){am=n(ai,b)}if(!C.triggerOnTouchEnd||C.triggerOnTouchLeave){var ao=true;if(C.triggerOnTouchLeave){var aj=bn(this);ao=B(ak.end,aj)}if(!C.triggerOnTouchEnd&&ao){b=bJ(X)}else{if(C.triggerOnTouchLeave&&!ao){b=bJ(aa)}}if(b==Q||b==aa){n(ai,b)}}}else{b=Q;n(ai,b)}if(am===false){b=Q;n(ai,b)}}function q(aj){var ai=aj.originalEvent;if(ah){if(ai.touches.length>0){A();return true}}if(a0()){e=bi}bT=au();bk=bz();if(m()||!az()){b=Q;n(ai,b)}else{if(C.triggerOnTouchEnd||(C.triggerOnTouchEnd==false&&b===X)){aj.preventDefault();b=aa;n(ai,b)}else{if(!C.triggerOnTouchEnd&&bP()){b=aa;bG(ai,b,R)}else{if(b===X){b=Q;n(ai,b)}}}}ay(false);return null}function bM(){e=0;bT=0;h=0;bU=0;bm=0;x=1;j();ay(false)}function r(aj){var ai=aj.originalEvent;if(C.triggerOnTouchLeave){b=bJ(aa);n(ai,b)}}function bB(){bu.unbind(s,by);bu.unbind(bI,bM);bu.unbind(w,bS);bu.unbind(g,q);if(i){bu.unbind(i,r)}ay(false)}function bJ(ai){var aj=ai;var ak=bL();var al=az();var am=m();if(!ak||am){aj=Q}else{if(al&&ai==X&&(!C.triggerOnTouchEnd||C.triggerOnTouchLeave)){aj=aa}else{if(!al&&ai==aa&&C.triggerOnTouchLeave){aj=Q}}}return aj}function n(ai,ak){var aj=undefined;if(t()||f()){aj=bG(ai,ak,W)}else{if((l()||bo())&&aj!==false){aj=bG(ai,ak,K)}}if(bF()&&aj!==false){aj=bG(ai,ak,Y)}else{if(ax()&&aj!==false){aj=bG(ai,ak,ag)}else{if(be()&&aj!==false){aj=bG(ai,ak,R)}}}if(ak===Q){bM(ai)}if(ak===aa){if(ah){if(ai.touches.length==0){bM(ai)}}else{bM(ai)}}return aj}function bG(ai,al,aj){var ak=undefined;if(aj==W){bu.trigger("swipeStatus",[al,bw||null,bf||0,bk||0,e,bv]);if(C.swipeStatus){ak=C.swipeStatus.call(bu,ai,al,bw||null,bf||0,bk||0,e,bv);if(ak===false){return false}}if(al==aa&&bq()){bu.trigger("swipe",[bw,bf,bk,e,bv]);if(C.swipe){ak=C.swipe.call(bu,ai,bw,bf,bk,e,bv);if(ak===false){return false}}switch(bw){case S:bu.trigger("swipeLeft",[bw,bf,bk,e,bv]);if(C.swipeLeft){ak=C.swipeLeft.call(bu,ai,bw,bf,bk,e,bv)}break;case T:bu.trigger("swipeRight",[bw,bf,bk,e,bv]);if(C.swipeRight){ak=C.swipeRight.call(bu,ai,bw,bf,bk,e,bv)}break;case ad:bu.trigger("swipeUp",[bw,bf,bk,e,bv]);if(C.swipeUp){ak=C.swipeUp.call(bu,ai,bw,bf,bk,e,bv)}break;case G:bu.trigger("swipeDown",[bw,bf,bk,e,bv]);if(C.swipeDown){ak=C.swipeDown.call(bu,ai,bw,bf,bk,e,bv)}break}}}if(aj==K){bu.trigger("pinchStatus",[al,bC||null,aw||0,bk||0,e,x,bv]);if(C.pinchStatus){ak=C.pinchStatus.call(bu,ai,al,bC||null,aw||0,bk||0,e,x,bv);if(ak===false){return false}}if(al==aa&&bN()){switch(bC){case af:bu.trigger("pinchIn",[bC||null,aw||0,bk||0,e,x,bv]);if(C.pinchIn){ak=C.pinchIn.call(bu,ai,bC||null,aw||0,bk||0,e,x,bv)}break;case E:bu.trigger("pinchOut",[bC||null,aw||0,bk||0,e,x,bv]);if(C.pinchOut){ak=C.pinchOut.call(bu,ai,bC||null,aw||0,bk||0,e,x,bv)}break}}}if(aj==R){if(al===Q||al===aa){clearTimeout(bp);clearTimeout(bg);if(c()&&!v()){o=au();bp=setTimeout(ac.proxy(function(){o=null;bu.trigger("tap",[ai.target]);if(C.tap){ak=C.tap.call(bu,ai,ai.target)}},this),C.doubleTapThreshold)}else{o=null;bu.trigger("tap",[ai.target]);if(C.tap){ak=C.tap.call(bu,ai,ai.target)}}}}else{if(aj==Y){if(al===Q||al===aa){clearTimeout(bp);o=null;bu.trigger("doubletap",[ai.target]);if(C.doubleTap){ak=C.doubleTap.call(bu,ai,ai.target)}}}else{if(aj==ag){if(al===Q||al===aa){clearTimeout(bp);o=null;bu.trigger("longtap",[ai.target]);if(C.longTap){ak=C.longTap.call(bu,ai,ai.target)}}}}}return ak}function az(){var ai=true;if(C.threshold!==null){ai=bf>=C.threshold}return ai}function m(){var ai=false;if(C.cancelThreshold!==null&&bw!==null){ai=(bs(bw)-bf)>=C.cancelThreshold}return ai}function bh(){if(C.pinchThreshold!==null){return aw>=C.pinchThreshold}return true}function bL(){var ai;if(C.maxTimeThreshold){if(bk>=C.maxTimeThreshold){ai=false}else{ai=true}}else{ai=true}return ai}function ba(ak,aj){if(C.allowPageScroll===V||bo()){ak.preventDefault()}else{var ai=C.allowPageScroll===L;switch(aj){case S:if((C.swipeLeft&&ai)||(!ai&&C.allowPageScroll!=M)){ak.preventDefault()}break;case T:if((C.swipeRight&&ai)||(!ai&&C.allowPageScroll!=M)){ak.preventDefault()}break;case ad:if((C.swipeUp&&ai)||(!ai&&C.allowPageScroll!=J)){ak.preventDefault()}break;case G:if((C.swipeDown&&ai)||(!ai&&C.allowPageScroll!=J)){ak.preventDefault()}break}}}function bN(){var aj=bx();var ak=d();var ai=bh();return aj&&ak&&ai}function bo(){return !!(C.pinchStatus||C.pinchIn||C.pinchOut)}function l(){return !!(bN()&&bo())}function bq(){var ak=bL();var ai=az();var al=bx();var an=d();var am=m();var aj=!am&&an&&al&&ai&&ak;return aj}function f(){return !!(C.swipe||C.swipeStatus||C.swipeLeft||C.swipeRight||C.swipeUp||C.swipeDown)}function t(){return !!(bq()&&f())}function bx(){return((e===C.fingers||C.fingers===Z)||!ah)}function d(){return bv[0].end.x!==0}function bP(){return !!(C.tap)}function c(){return !!(C.doubleTap)}function br(){return !!(C.longTap)}function k(){if(o==null){return false}var ai=au();return(c()&&((ai-o)<=C.doubleTapThreshold))}function v(){return k()}function y(){return((e===1||!ah)&&(isNaN(bf)||bfC.longTapThreshold)&&(bf=0)){return S}else{if((ai<=360)&&(ai>=315)){return S}else{if((ai>=135)&&(ai<=225)){return T}else{if((ai>45)&&(ai<135)){return G}else{return ad}}}}}function au(){var ai=new Date();return ai.getTime()}function bn(ak){ak=ac(ak);var ai=ak.offset();var aj={left:ai.left,right:ai.left+ak.outerWidth(),top:ai.top,bottom:ai.top+ak.outerHeight()};return aj}function B(aj,ai){return(aj.x>ai.left&&aj.xai.top&&aj.y/g,">").replace(/&/g,"&").replace(/\n/g,"
");d.html(f+" ");m()}function m(){var l=d.height();var h="hidden";var f=w?l+t+e:l+t;if(f>j){f=j;h="auto"}else{if(f").css({position:"absolute",display:"none","word-wrap":"break-word","white-space":"pre-wrap","border-style":"solid"}).appendTo(document.body);k();var w=g.css("box-sizing")=="border-box"||g.css("-moz-box-sizing")=="border-box"||g.css("-webkit-box-sizing")=="border-box";var e=parseInt(g.css("border-top-width"))+parseInt(g.css("padding-top"))+parseInt(g.css("padding-bottom"))+parseInt(g.css("border-bottom-width"));var v=parseInt(g.css("height"),10);var t=parseInt(g.css("line-height"),10)||parseInt(g.css("font-size"),10);var p=t*2>v?t*2:v;var j=parseInt(g.css("max-height"),10)>-1?parseInt(g.css("max-height"),10):Number.MAX_VALUE;g.bind("keyup change cut paste",function(){q()});b(window).bind("resize",function(){var f=parseInt(g.width(),10);if(d.width()!==f){d.css({width:f+"px"});q()}});g.bind("blur",function(){m()});g.bind("updateHeight",function(){k();q()});b(function(){q()})})}};b.fn.flexible=function(c){if(a[c]){return a[c].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof c==="object"||!c){return a.init.apply(this,arguments)}else{b.error("Method "+c+" does not exist on jQuery.flexible")}}}})(jQuery); })(this); // WCF.js -(function (window, undefined) {"use strict";(function(){var c=jQuery.fn.data;jQuery.fn.data=function(f,h){if(f){switch(typeof f){case"object":for(var g in f){if(g.match(/ID$/)){var e=f[g];delete f[g];g=g.replace(/ID$/,"-id");f[g]=e}}arguments[0]=f;break;case"string":if(f.match(/ID$/)){arguments[0]=f.replace(/ID$/,"-id")}break}}var d=c.apply(this,arguments);if(f===undefined){for(var g in d){if(g.match(/Id$/)){d[g.replace(/Id$/,"ID")]=d[g];delete d[g]}}}return d};if(!window.console){window.console={}}var b=["log","info","warn","exception","assert","dir","dirxml","trace","group","groupEnd","groupCollapsed","profile","profileEnd","count","clear","time","timeEnd","timeStamp","table","error"];for(var a=0;a0));jQuery.browser.smartphone=($("html").css("caption-side")=="bottom");jQuery.browser.editor="redactor";jQuery.browser.ckeditor=false;jQuery.browser.redactor=true;if(jQuery.browser.mozilla&&d.match(/trident/)){jQuery.browser.mozilla=false;jQuery.browser.msie=true}})();window.WCF={};$.extend(true,{removeArrayValue:function(b,a){return $.grep(b,function(d,c){return a!==d})},wcfEscapeID:function(a){return a.replace(/(:|\.)/g,"\\$1")},wcfIsset:function(a){return !!$("#"+$.wcfEscapeID(a)).length},getLength:function(a){var c=0;for(var b in a){if(a.hasOwnProperty(b)){c++}}return c}});$.fn.extend({getTagName:function(){return(this.length)?this.get(0).tagName.toLowerCase():""},getDimensions:function(c){var b={};var d={};var a=false;if(this.is(":hidden")){b=WCF.getInlineCSS(this);a=true;this.css({display:"block",visibility:"hidden"})}switch(c){case"inner":d={height:this.innerHeight(),width:this.innerWidth()};break;case"outer":d={height:this.outerHeight(),width:this.outerWidth()};break;default:d={height:this.height(),width:this.width()};break}if(a){WCF.revertInlineCSS(this,b,["display","visibility"])}return d},getOffsets:function(c){var b={};var d={};var a=false;if(this.is(":hidden")){b=WCF.getInlineCSS(this);a=true;this.css({display:"block",visibility:"hidden"})}switch(c){case"offset":d=this.offset();break;case"position":default:d=this.position();break}if(a){WCF.revertInlineCSS(this,b,["display","visibility"])}return d},makePositioned:function(a,b){if(a!="absolute"&&a!="fixed"){a="absolute"}var c=this.getOffsets("position");this.css({position:a,left:c.left,margin:0,top:c.top});if(b){this.remove().appentTo("body")}return this},disable:function(){return this.attr("disabled","disabled")},enable:function(){return this.removeAttr("disabled")},wcfIdentify:function(){if(!this.attr("id")){this.attr("id",WCF.getRandomID())}return this.attr("id")},getCaret:function(){if(this.is("input")){if(this.attr("type")!="text"&&this.attr("type")!="password"){return -1}}else{if(!this.is("textarea")){return -1}}var c=0;var b=this.get(0);if(document.selection){this.focus();var a=document.selection.createRange();a.moveStart("character",-this.val().length);c=a.text.length}else{if(b.selectionStart||b.selectionStart=="0"){c=parseInt(b.selectionStart)}}return c},setCaret:function(b){if(this.is("input")){if(this.attr("type")!="text"&&this.attr("type")!="password"){return false}}else{if(!this.is("textarea")){return false}}var c=this.get(0);this.focus();if(document.selection){var a=document.selection.createRange();a.moveStart("character",b);a.moveEnd("character",0);a.select()}else{if(c.selectionStart||c.selectionStart=="0"){c.selectionStart=b;c.selectionEnd=b}}return true},wcfDropIn:function(b,c,a){if(!b){b="up"}if(!a||!parseInt(a)){a=200}return this.show(WCF.getEffect(this,"drop"),{direction:b},a,c)},wcfDropOut:function(b,c,a){if(!b){b="down"}if(!a||!parseInt(a)){a=200}return this.hide(WCF.getEffect(this,"drop"),{direction:b},a,c)},wcfBlindIn:function(b,c,a){if(!b){b="vertical"}if(!a||!parseInt(a)){a=200}return this.show(WCF.getEffect(this,"blind"),{direction:b},a,c)},wcfBlindOut:function(b,c,a){if(!b){b="vertical"}if(!a||!parseInt(a)){a=200}return this.hide(WCF.getEffect(this,"blind"),{direction:b},a,c)},wcfHighlight:function(a,b){return this.effect("highlight",a,600,b)},wcfFadeIn:function(b,a){if(!a||!parseInt(a)){a=200}return this.show(WCF.getEffect(this,"fade"),{},a,b)},wcfFadeOut:function(b,a){if(!a||!parseInt(a)){a=200}return this.hide(WCF.getEffect(this,"fade"),{},a,b)},cssAsNumber:function(b){if(this.length){var a=this.css(b);if(a!==undefined){return parseInt(a.replace(/px$/,""))}}return 0}});$.extend(WCF,{activeDialogs:0,_idCounter:0,getRandomID:function(){var a="";do{a="wcf"+this._idCounter++}while($.wcfIsset(a));return a},inArray:function(b,a){return($.inArray(b,a)!=-1)},getEffect:function(a,b){if(a.is("tr")){return"highlight"}return b},getInlineCSS:function(b){var c={};var a=b.attr("style");if(!a){return{}}a=a.split(";");for(var f=0,d=a.length;f').appendTo(document.body)}var a=this;$(".dropdownToggle:not(.jsDropdownEnabled)").each(function(b,c){a.initDropdown($(c),false)});if(!this._didInit){this._didInit=true;WCF.CloseOverlayHandler.addCallback("WCF.Dropdown",$.proxy(this._closeAll,this));WCF.DOMNodeInsertedHandler.addCallback("WCF.Dropdown",$.proxy(this.init,this));$(document).on("scroll",$.proxy(this._scroll,this))}},_dialogScroll:function(b){var a=$(b.currentTarget);a.find(".dropdown.dropdownOpen").each(function(d,f){var i=$(f);var e=i.wcfIdentify();var g=i.offset();var c=a.offset();var h=$(f).height()/2;if(g.top+h<=c.top){WCF.Dropdown.toggleDropdown(e)}else{if(g.top>=c.top+a.height()){WCF.Dropdown.toggleDropdown(e)}else{if(g.left<=c.left){WCF.Dropdown.toggleDropdown(e)}else{if(g.left>=c.left+a.width()){WCF.Dropdown.toggleDropdown(e)}else{WCF.Dropdown.setAlignmentByID(i.wcfIdentify())}}}}})},_scroll:function(b){for(var a in this._dropdowns){var c=this._dropdowns[a];if(c.data("isOverlayDropdownButton")&&c.hasClass("dropdownOpen")){this.setAlignmentByID(a)}}},initDropdown:function(b,d){if(b.hasClass("jsDropdownEnabled")||b.data("target")){return}var e=b.parents(".dropdown");if(!e.length){console.debug("[WCF.Dropdown] Invalid dropdown passed, button '"+b.wcfIdentify()+"' does not have a parent with .dropdown, aborting.");return}var a=b.next(".dropdownMenu");if(!a.length){console.debug("[WCF.Dropdown] Invalid dropdown passed, dropdown '"+e.wcfIdentify()+"' does not have a dropdown menu, aborting.");return}a.detach().appendTo(this._menuContainer);var c=e.wcfIdentify();if(!this._dropdowns[c]){b.addClass("jsDropdownEnabled").click($.proxy(this._toggle,this));this._dropdowns[c]=e;this._menus[c]=a;if(!c.match(/^wcf\d+$/)){a.attr("data-source",c)}}b.data("target",c);if(d){b.trigger("click")}},removeDropdown:function(a){if(this._menus[a]){$(this._menus[a]).remove();delete this._menus[a];delete this._dropdowns[a]}},initDropdownFragment:function(c,a){var b=c.wcfIdentify();if(this._dropdowns[b]){console.debug("[WCF.Dropdown] Cannot register dropdown identified by '"+b+"' as a fragement.");return}this._dropdowns[b]=c;this._menus[b]=a.detach().appendTo(this._menuContainer)},registerCallback:function(a,b){if(!$.isFunction(b)){console.debug("[WCF.Dropdown] Callback for '"+a+"' is invalid");return false}if(!this._callbacks[a]){this._callbacks[a]=[]}this._callbacks[a].push(b)},_toggle:function(g,e){var b=(g===null)?e:$(g.currentTarget).data("target");var a=this._dropdowns[b];if(a&&a.data("isOverlayDropdownButton")===undefined){var d=a.parents(".dialogContent");a.data("isOverlayDropdownButton",d.length>0);if(d.length){d.on("scroll",this._dialogScroll)}}for(var f in this._dropdowns){var h=this._dropdowns[f];var c=this._menus[f];if(h.hasClass("dropdownOpen")){h.removeClass("dropdownOpen");c.removeClass("dropdownOpen");this._notifyCallbacks(f,"close")}else{if(f===b&&c[0].children.length>0){h.addClass("dropdownOpen");c.addClass("dropdownOpen");this._notifyCallbacks(f,"open");this.setAlignment(h,c)}}}if(g!==null){g.stopPropagation();return false}},toggleDropdown:function(a){this._toggle(null,a)},getDropdown:function(a){if(this._dropdowns[a]){return this._dropdowns[a]}return null},getDropdownMenu:function(a){if(this._menus[a]){return this._menus[a]}return null},setAlignmentByID:function(a){var c=this.getDropdown(a);if(c===null){console.debug("[WCF.Dropdown] Unable to find dropdown identified by '"+a+"'")}var b=this.getDropdownMenu(a);if(b===null){console.debug("[WCF.Dropdown] Unable to find dropdown menu identified by '"+a+"'")}this.setAlignment(c,b)},setAlignment:function(t,u){if(!u.data("isInitialized")){u.data("isInitialized",true).css({left:0,top:0})}var p=t.getDimensions("outer");var g=t.getOffsets("offset");var s=u.getDimensions("outer");var i=$(window).width();var d=t.find(".dropdownToggle");if(d.hasClass("dropdownCaptionTextarea")){p=d.getDimensions("outer")}var f="left";if((g.left+s.width)>i){f="right"}var j="auto";var l="auto";if(f==="left"){u.removeClass("dropdownArrowRight");j=g.left}else{u.addClass("dropdownArrowRight");l=(i-(g.left+p.width))}if(WCF.Language.get("wcf.global.pageDirection")=="rtl"){var r=j;var n=l;if(j=="auto"){u.removeClass("dropdownArrowRight")}else{l=i-(g.left+p.width);j="auto";if(l+s.width>i){j=r;l=n;u.addClass("dropdownArrowRight")}}}if(j=="auto"){l+="px"}else{j+="px"}var q=true;if(u.hasClass("dropdownOpen")){q=false;u.removeClass("dropdownOpen")}var m="auto";var v=g.top+p.height+7;if($.browser.smartphone){var f="bottom";var c=false;var e=$(window).height();var h=v+s.height;if(h>e){var b=g.top+10-s.height;if(b>=0){f="top"}else{c=true;var a=Math.abs(b);var o=Math.abs(h-e);if(o<=a){f="bottom"}else{f="top"}}}if(f=="top"){m=$(window).height()-g.top+10;v="auto";if(c){v=0;u.children("ul.scrollableDropdownMenu").css("max-height",m)}u.addClass("dropdownArrowBottom")}else{if(c){m=0;var k=u.children("ul.scrollableDropdownMenu");k.css("max-height",Math.min(k.css("max-height").replace(/px$/,""),e-v))}u.removeClass("dropdownArrowBottom")}}else{if(v+s.height>$(window).height()+$(document).scrollTop()){m=$(window).height()-g.top+10;v="auto";u.addClass("dropdownArrowBottom")}else{u.removeClass("dropdownArrowBottom")}}if(!q){u.addClass("dropdownOpen")}u.css({bottom:m,left:j,right:l,top:v})},_closeAll:function(){for(var a in this._dropdowns){var b=this._dropdowns[a];if(b.hasClass("dropdownOpen")){b.removeClass("dropdownOpen");this._menus[a].removeClass("dropdownOpen");this._notifyCallbacks(a,"close")}}},close:function(a){if(!this._dropdowns[a]){return}this._dropdowns[a].removeClass("dropdownOpen");this._menus[a].removeClass("dropdownOpen")},_notifyCallbacks:function(a,b){if(!this._callbacks[a]){return}for(var d=0,c=this._callbacks[a].length;d0);this._pageObjectID=parseInt(c)||0;this._actionProxy=new WCF.Action.Proxy({success:$.proxy(this._actionSuccess,this),url:"index.php/ClipboardProxy/?t="+SECURITY_TOKEN+SID_ARG_2ND});this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),url:"index.php/Clipboard/?t="+SECURITY_TOKEN+SID_ARG_2ND});this._containers=$(".jsClipboardContainer").each($.proxy(function(g,f){this._initContainer(f)},this));if(this._hasMarkedItems&&this._containers.length){this._loadMarkedItems()}var a=this;WCF.DOMNodeInsertedHandler.addCallback("WCF.Clipboard",function(){a._containers=$(".jsClipboardContainer").each($.proxy(function(g,f){a._initContainer(f)},a))})},_loadMarkedItems:function(){new WCF.Action.Proxy({autoSend:true,data:{containerData:this._containerData,pageClassName:this._page,pageObjectID:this._pageObjectID},success:$.proxy(this._loadMarkedItemsSuccess,this),url:"index.php/ClipboardLoadMarkedItems/?t="+SECURITY_TOKEN+SID_ARG_2ND})},reload:function(){if(this._containers===null){return}this._loadMarkedItems()},_loadMarkedItemsSuccess:function(d,f,c){this._resetMarkings();for(var a in d.markedItems){if(!this._markedObjectIDs[a]){this._markedObjectIDs[a]=[]}var b=d.markedItems[a];for(var e in b){this._markedObjectIDs[a].push(b[e])}this._containers.each($.proxy(function(h,g){var i=$(g);if(i.data("type")!=a){return true}i.find("input.jsClipboardItem").each($.proxy(function(l,k){var j=$(k);if(WCF.inArray(j.data("objectID"),this._markedObjectIDs[a])){j.prop("checked",true);j.parents(".jsClipboardObject").addClass("jsMarked")}},this));i.find("input.jsClipboardMarkAll").each(function(l,k){var j=true;i.find("input.jsClipboardItem").each(function(n,o){var m=$(o);if(!m.prop("checked")){j=false}});if(j){$(k).prop("checked",true)}})},this))}this._success(d,f,c)},_resetMarkings:function(){this._containers.each($.proxy(function(b,a){var c=$(a);this._markedObjectIDs[c.data("type")]=[];c.find("input.jsClipboardItem, input.jsClipboardMarkAll").prop("checked",false);c.find(".jsClipboardObject").removeClass("jsMarked")},this))},_initContainer:function(a){var c=$(a);var b=c.wcfIdentify();if(!this._trackedElements[b]){c.find(".jsClipboardMarkAll").data("hasContainer",b).click($.proxy(this._markAll,this));this._markedObjectIDs[c.data("type")]=[];this._containerData[c.data("type")]={};$.each(c.data(),$.proxy(function(d,e){if(d.match(/^type(.+)/)){this._containerData[c.data("type")][WCF.String.lcfirst(d.replace(/^type/,""))]=e}},this));this._trackedElements[b]=[]}c.find("input.jsClipboardItem").each($.proxy(function(f,e){var g=$(e);var d=g.wcfIdentify();if(!WCF.inArray(d,this._trackedElements[b])){this._trackedElements[b].push(d);g.data("hasContainer",b).click($.proxy(this._click,this))}},this))},_click:function(f){var b=$(f.target);var e=b.data("objectID");var h=(b.prop("checked"))?true:false;var d=[e];if(b.data("hasContainer")){var g=$("#"+b.data("hasContainer"));var a=g.data("type")}else{var a=b.data("type")}if(h){this._markedObjectIDs[a].push(e);b.parents(".jsClipboardObject").addClass("jsMarked")}else{this._markedObjectIDs[a]=$.removeArrayValue(this._markedObjectIDs[a],e);b.parents(".jsClipboardObject").removeClass("jsMarked")}if(b.data("hasContainer")){var c=true;g.find("input.jsClipboardItem").each(function(j,i){var k=$(i);if(!k.prop("checked")){c=false}});g.find(".jsClipboardMarkAll").each(function(i,j){if(c){$(j).prop("checked",true)}else{$(j).prop("checked",false)}})}this._saveState(a,d,h)},_markAll:function(d){var b=$(d.target);var c=[];var f=true;if(b.is("input")){f=b.prop("checked")}if(b.data("hasContainer")){var e=$("#"+b.data("hasContainer"));var a=e.data("type")}else{var a=b.data("type")}if(b.data("hasContainer")){e.find("input.jsClipboardItem").each($.proxy(function(h,g){var j=$(g);var i=j.data("objectID");if(f){if(!j.prop("checked")){j.prop("checked",true);this._markedObjectIDs[a].push(i);c.push(i)}}else{if(j.prop("checked")){j.prop("checked",false);this._markedObjectIDs[a]=$.removeArrayValue(this._markedObjectIDs[a],i);c.push(i)}}},this));if(f){e.find(".jsClipboardObject").addClass("jsMarked")}else{e.find(".jsClipboardObject").removeClass("jsMarked")}}this._saveState(a,c,f)},_saveState:function(b,c,a){this._proxy.setOption("data",{action:(a)?"mark":"unmark",containerData:this._containerData,objectIDs:c,pageClassName:this._page,pageObjectID:this._pageObjectID,type:b});this._proxy.sendRequest()},_success:function(data,textStatus,jqXHR){var $containers={};$(".jsClipboardEditor").each(function(index,container){var $container=$(container);var $types=eval($container.data("types"));for(var $i=0,$length=$types.length;$i<$length;$i++){var $typeName=$types[$i];$containers[$typeName]=$container}var $containerID=$container.wcfIdentify();WCF.CloseOverlayHandler.removeCallback($containerID);$container.empty()});if(!data.items){return}for(var $typeName in data.items){if(!$containers[$typeName]){continue}var $container=$containers[$typeName];var $list=$container.children("ul");if($list.length==0){$list=$("
    ").appendTo($container)}var $editor=data.items[$typeName];var $label=$('").appendTo($list);var $itemList=$('').appendTo($label);for(var $itemIndex in $editor.items){var $item=$editor.items[$itemIndex];var $listItem=$("
  • "+$item.label+"
  • ").appendTo($itemList);$listItem.data("container",$container);$listItem.data("objectType",$typeName);$listItem.data("actionName",$item.actionName).data("parameters",$item.parameters);$listItem.data("internalData",$item.internalData).data("url",$item.url).data("type",$typeName);$listItem.click($.proxy(this._executeAction,this))}$('
  • "+WCF.Language.get("wcf.clipboard.item.unmarkAll")+"
  • ").data("typeName",$typeName).appendTo($itemList).click($.proxy(function(event){var $typeName=$(event.currentTarget).data("typeName");this._proxy.setOption("data",{action:"unmarkAll",type:$typeName});this._proxy.setOption("success",$.proxy(function(data,textStatus,jqXHR){this._containers.each($.proxy(function(index,container){var $container=$(container);if($container.data("type")==$typeName){$container.find(".jsClipboardMarkAll, .jsClipboardItem").prop("checked",false);$container.find(".jsClipboardObject").removeClass("jsMarked");return false}},this));this._success(data,textStatus,jqXHR);this._proxy.setOption("success",$.proxy(this._success,this));this._loadMarkedItems()},this));this._proxy.sendRequest()},this));WCF.Dropdown.initDropdown($label.children(".dropdownToggle"),false)}},_closeLists:function(){$(".jsClipboardEditor ul").removeClass("dropdownOpen")},_executeAction:function(f){var d=$(f.currentTarget);var e=d.data("url");if(e){window.location.href=e}var a=true;if(d.data("parameters").className&&d.data("parameters").actionName){if(d.data("parameters").actionName==="unmarkAll"||d.data("parameters").objectIDs){var c=d.data("internalData")["confirmMessage"];if(c){var b=d.data("internalData")["template"];if(b){b=$(b)}WCF.System.Confirmation.show(c,$.proxy(function(h){if(h==="confirm"){var g={};if(b&&b.length){$("#wcfSystemConfirmationContent").find("input, select, textarea").each(function(j,k){var i=$(k);g[i.prop("name")]=i.val()})}this._executeAJAXActions(d,g)}},this),"",b)}else{this._executeAJAXActions(d,{})}}}else{var c=d.data("internalData")["confirmMessage"];if(c){a=false;WCF.System.Confirmation.show(c,function(g){if(g==="confirm"){d.data("container").trigger("clipboardAction",[d.data("type"),d.data("actionName"),d.data("parameters")])}})}}if(a){d.data("container").trigger("clipboardAction",[d.data("type"),d.data("actionName"),d.data("parameters")])}},_executeAJAXActions:function(d,e){e=e||{};var a=[];if(d.data("parameters").actionName!=="unmarkAll"){$.each(d.data("parameters").objectIDs,function(g,h){a.push(parseInt(h))})}var b={data:e,containerData:this._containerData[d.data("type")]};var f=d.data("internalData")["parameters"];if(f!==undefined){for(var c in f){b[c]=f[c]}}new WCF.Action.Proxy({autoSend:true,data:{actionName:d.data("parameters").actionName,className:d.data("parameters").className,objectIDs:a,parameters:b},success:$.proxy(function(g){if(d.data("parameters").actionName!=="unmarkAll"){d.data("container").trigger("clipboardActionResponse",[g,d.data("type"),d.data("actionName"),d.data("parameters")])}this._loadMarkedItems()},this)});if(this._actionObjects[d.data("objectType")]&&this._actionObjects[d.data("objectType")][d.data("parameters").actionName]){this._actionObjects[d.data("objectType")][d.data("parameters").actionName].triggerEffect(a)}},sendRequest:function(b){var a=$(b);this._actionProxy.setOption("data",{parameters:a.data("parameters"),typeName:a.data("type")});this._actionProxy.sendRequest()}};WCF.PeriodicalExecuter=Class.extend({_callback:null,_delay:0,_intervalID:null,_isExecuting:false,init:function(b,a){if(!$.isFunction(b)){console.debug("[WCF.PeriodicalExecuter] Given callback is invalid, aborting.");return}this._callback=b;this._interval=a;this.resume()},_execute:function(){if(!this._isExecuting){try{this._isExecuting=true;this._callback(this);this._isExecuting=false}catch(a){this._isExecuting=false;throw a}}},stop:function(){if(!this._intervalID){return}clearInterval(this._intervalID)},resume:function(){if(this._intervalID){this.stop()}this._intervalID=setInterval($.proxy(this._execute,this),this._interval)}});WCF.LoadingOverlayHandler={_activeRequests:0,_loadingOverlay:null,_pending:null,show:function(){if(this._loadingOverlay===null){this._loadingOverlay=$('
    '+WCF.Language.get("wcf.global.loading")+"
    ").appendTo($("body"));var b=this._loadingOverlay.outerWidth();if(b<70){b=70}this._loadingOverlay.css({marginLeft:Math.ceil(-1*b/2),width:b}).hide()}this._activeRequests++;if(this._activeRequests==1){if(this._pending===null){var a=this;this._pending=new WCF.PeriodicalExecuter(function(c){if(a._activeRequests){a._loadingOverlay.stop(true,true).fadeIn(100)}c.stop();a._pending=null},250)}}},hide:function(){this._activeRequests--;if(this._activeRequests==0){if(this._pending!==null){this._pending.stop();this._pending=null}this._loadingOverlay.stop(true,true).fadeOut(100)}},updateIcon:function(b,c){var a=(c===undefined||c?"addClass":"removeClass");b.find(".icon")[a]("icon-spinner");if(b.hasClass("icon")){b[a]("icon-spinner")}}};WCF.Action={};WCF.Action.Proxy=Class.extend({_showLoadingOverlayOnce:false,_suppressErrors:false,_lastRequest:null,init:function(b){this.options=$.extend(true,{autoSend:false,data:{},dataType:"json",after:null,init:null,jsonp:"callback",async:true,failure:null,showLoadingOverlay:true,success:null,suppressErrors:false,type:"POST",url:"index.php/AJAXProxy/?t="+SECURITY_TOKEN+SID_ARG_2ND,aborted:null,autoAbortPrevious:false},b);if(!URL_LEGACY_MODE){this.options.url=this.options.url.replace(/^index\.php\/(.*?)\/\?/,"?$1/&")}this.confirmationDialog=null;this.loading=null;this._showLoadingOverlayOnce=false;this._suppressErrors=(this.options.suppressErrors===true);if(this.options.autoSend){this.sendRequest()}var a=this;$(window).on("beforeunload",function(){a._suppressErrors=true})},sendRequest:function(a){this._init();if(a||this.options.autoAbortPrevious){this.abortPrevious()}this._lastRequest=$.ajax({data:this.options.data,dataType:this.options.dataType,jsonp:this.options.jsonp,async:this.options.async,type:this.options.type,url:this.options.url,success:$.proxy(this._success,this),error:$.proxy(this._failure,this)});return this._lastRequest},abortPrevious:function(){if(this._lastRequest!==null){this._lastRequest.abort();this._lastRequest=null;if(this.options.showLoadingOverlay||this._showLoadingOverlayOnce){WCF.LoadingOverlayHandler.hide()}}},showLoadingOverlayOnce:function(){this._showLoadingOverlayOnce=true},suppressErrors:function(){this._suppressErrors=true},_init:function(){if($.isFunction(this.options.init)){this.options.init(this)}if(this.options.showLoadingOverlay||this._showLoadingOverlayOnce){WCF.LoadingOverlayHandler.show()}},_failure:function(d,i,h){if(i=="abort"){if($.isFunction(this.options.aborted)){this.options.aborted(d)}return}try{var c=$.parseJSON(d.responseText);var f=true;if($.isFunction(this.options.failure)){f=this.options.failure(c,d,i,h)}if(!this._suppressErrors&&f!==false){var a="";if(c.stacktrace){a="

    Stacktrace:

    "+c.stacktrace+"

    "}else{if(c.exceptionID){a="

    Exception ID: "+c.exceptionID+"

    "}}$('

    '+c.message+"

    "+a+"
    ").wcfDialog({title:WCF.Language.get("wcf.global.error.title")})}}catch(g){var f=true;if($.isFunction(this.options.failure)){f=this.options.failure(null,d,i,h)}if(!this._suppressErrors&&f!==false){var b=(i==="timeout")?WCF.Language.get("wcf.global.error.timeout"):d.responseText;if(b&&b!="undefined"){$('

    '+b+"

    ").wcfDialog({title:WCF.Language.get("wcf.global.error.title")})}}}this._after()},_success:function(b,c,a){if($.isFunction(this.options.success)){if(b&&b.returnValues&&b.returnValues.template!==undefined){b.returnValues.template=$.trim(b.returnValues.template)}this.options.success(b,c,a)}this._after()},_after:function(){this._lastRequest=null;if($.isFunction(this.options.after)){this.options.after()}if(this.options.showLoadingOverlay||this._showLoadingOverlayOnce){WCF.LoadingOverlayHandler.hide();if(this._showLoadingOverlayOnce){this._showLoadingOverlayOnce=false}}WCF.DOMNodeInsertedHandler.execute();$("a[href*=#]").each(function(c,e){var b=$(e);if(b.prop("href").indexOf("AJAXProxy")!=-1){var d=b.prop("href").substr(b.prop("href").indexOf("#"));var a=document.location.toString().replace(/#.*/,"");b.prop("href",a+d)}})},setOption:function(a,b){this.options[a]=b}});WCF.Action.SimpleProxy=Class.extend({init:function(a,b){this.options=$.extend(true,{action:"",className:"",elements:null,eventName:"click"},a);this.callbacks=$.extend(true,{after:null,failure:null,init:null,success:null},b);if(!this.options.elements){return}this.proxy=new WCF.Action.Proxy(this.callbacks);this.options.elements.each($.proxy(function(c,d){$(d).bind(this.options.eventName,$.proxy(this._handleEvent,this))},this))},_handleEvent:function(a){this.proxy.setOption("data",{actionName:this.options.action,className:this.options.className,objectIDs:[$(a.target).data("objectID")]});this.proxy.sendRequest()}});WCF.Action.Delete=Class.extend({_buttonSelector:"",_className:"",_containerSelector:"",_containers:[],init:function(c,a,b){this._containerSelector=a;this._className=c;this._buttonSelector=(b)?b:".jsDeleteButton";this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)});this._initElements();WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Delete"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){var a=this;$(this._containerSelector).each(function(c,b){var e=$(b);var d=e.wcfIdentify();if(!WCF.inArray(d,a._containers)){a._containers.push(d);e.find(a._buttonSelector).click($.proxy(a._click,a))}})},_click:function(b){var a=$(b.currentTarget);b.preventDefault();if(a.data("confirmMessage")){WCF.System.Confirmation.show(a.data("confirmMessage"),$.proxy(this._execute,this),{target:a})}else{WCF.LoadingOverlayHandler.updateIcon(a);this._sendRequest(a)}},_didTriggerEffect:function(a){},_execute:function(b,a){if(b==="cancel"){return}WCF.LoadingOverlayHandler.updateIcon(a.target);this._sendRequest(a.target)},_sendRequest:function(a){this.proxy.setOption("data",{actionName:"delete",className:this._className,interfaceName:"wcf\\data\\IDeleteAction",objectIDs:[$(a).data("objectID")]});this.proxy.sendRequest()},_success:function(b,c,a){this.triggerEffect(b.objectIDs)},triggerEffect:function(d){for(var a in this._containers){var e=$("#"+this._containers[a]);var c=e.find(this._buttonSelector);if(WCF.inArray(c.data("objectID"),d)){var b=this;e.wcfBlindOut("up",function(){var f=$(this).remove();b._containers.splice(b._containers.indexOf(f.wcfIdentify()),1);b._didTriggerEffect(f);if(c.data("eventName")){WCF.System.Event.fireEvent("com.woltlab.wcf.action.delete",c.data("eventName"),{button:c,container:f})}})}}}});WCF.Action.NestedDelete=WCF.Action.Delete.extend({triggerEffect:function(c){for(var a in this._containers){var d=$("#"+this._containers[a]);if(WCF.inArray(d.find(this._buttonSelector).data("objectID"),c)){if(d.has("ol").has("li").length){if(d.is(":only-child")){d.parent().replaceWith(d.find("> ol"))}else{d.replaceWith(d.find("> ol > li"))}this._containers.splice(this._containers.indexOf(d.wcfIdentify()),1);this._didTriggerEffect(d)}else{var b=this;d.wcfBlindOut("up",function(){$(this).remove();b._containers.splice(b._containers.indexOf($(this).wcfIdentify()),1);b._didTriggerEffect($(this))})}}}}});WCF.Action.Toggle=Class.extend({_buttonSelector:".jsToggleButton",_className:"",_containerSelector:"",_containers:[],init:function(d,a,c){this._containerSelector=a;this._className=d;this._buttonSelector=(c)?c:".jsToggleButton";this._containers=[];var b={success:$.proxy(this._success,this)};this.proxy=new WCF.Action.Proxy(b);this._initElements();WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Toggle"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each($.proxy(function(b,a){var d=$(a);var c=d.wcfIdentify();if(!WCF.inArray(c,this._containers)){this._containers.push(c);d.find(this._buttonSelector).click($.proxy(this._click,this))}},this))},_click:function(b){var a=$(b.currentTarget);b.preventDefault();if(a.data("confirmMessage")){WCF.System.Confirmation.show(a.data("confirmMessage"),$.proxy(this._execute,this),{target:a})}else{WCF.LoadingOverlayHandler.updateIcon(a);this._sendRequest(a)}},_execute:function(b,a){if(b==="cancel"){return}WCF.LoadingOverlayHandler.updateIcon(a.target);this._sendRequest(a.target)},_sendRequest:function(a){this.proxy.setOption("data",{actionName:"toggle",className:this._className,interfaceName:"wcf\\data\\IToggleAction",objectIDs:[$(a).data("objectID")]});this.proxy.sendRequest()},_success:function(b,c,a){this.triggerEffect(b.objectIDs)},triggerEffect:function(b){for(var a in this._containers){var d=$("#"+this._containers[a]);var c=d.find(this._buttonSelector);if(WCF.inArray(c.data("objectID"),b)){d.wcfHighlight();this._toggleButton(d,c)}}},_toggleButton:function(c,b){var a="";WCF.LoadingOverlayHandler.updateIcon(b,false);if(b.hasClass("icon-check-empty")){b.removeClass("icon-check-empty").addClass("icon-check");a=(b.data("disableTitle")?b.data("disableTitle"):WCF.Language.get("wcf.global.button.disable"));b.attr("title",a)}else{b.removeClass("icon-check").addClass("icon-check-empty");a=(b.data("enableTitle")?b.data("enableTitle"):WCF.Language.get("wcf.global.button.enable"));b.attr("title",a)}c.toggleClass("disabled")}});WCF.Action.Scroll=Class.extend({_callback:null,_reference:null,_target:null,_threshold:0,init:function(b,d,a,c){this._threshold=parseInt(b);if(this._threshold===0){console.debug("[WCF.Action.Scroll] Given threshold is invalid, aborting.");return}if($.isFunction(d)){this._callback=d}if(this._callback===null){console.debug("[WCF.Action.Scroll] Given callback is invalid, aborting.");return}this._reference=$((a)?a:window);this._target=$((c)?c:document);this.start();this._scroll()},_scroll:function(){var a=this._target.height();var b=this._reference.scrollTop();var c=this._reference.height();if((a-(c+b))');var f=i.attr("max")?new Date(i.attr("max").replace(" ","T")):null;var n=i.attr("min")?new Date(i.attr("min").replace(" ","T")):null;var c={altField:"#"+i.wcfIdentify()+"DatePicker",altFormat:"yy-mm-dd",beforeShow:function(q,p){setTimeout(function(){p.dpDiv.position({my:"left top",at:"left bottom",collision:"none",of:q})},1)},changeMonth:true,changeYear:true,dateFormat:this._dateFormat,dayNames:WCF.Language.get("__days"),dayNamesMin:WCF.Language.get("__daysShort"),dayNamesShort:WCF.Language.get("__daysShort"),firstDay:parseInt(WCF.Language.get("wcf.date.firstDayOfTheWeek"))||0,isRTL:WCF.Language.get("wcf.global.pageDirection")=="rtl",maxDate:f,minDate:n,monthNames:WCF.Language.get("__months"),monthNamesShort:WCF.Language.get("__monthsShort"),showButtonPanel:false,onClose:function(q,p){if(q==""){$(p.settings.altField).val(q)}},showOtherMonths:true,yearRange:(i.hasClass("birthday")?"-100:+0":"1900:2038")};if(b){if(/[0-9]{2}:[0-9]{2}:[0-9]{2}$/.test(m)){m=m.replace(/:[0-9]{2}$/,"");i.val(m)}m=m.replace(" ","T");if(i.data("timeOnly")){var e=m.split(":");var a=new Date();a.setHours(e[0]);a.setMinutes(e[1]);a.setSeconds(0);m=a.toString()}if(i.data("ignoreTimezone")){var l=new Date(m).getTimezoneOffset();var o=(l>0)?"-":"+";l=Math.abs(l);var h=(Math.floor(l/60)).toString();var k=(l%60).toString();o+=(h.length==2)?h:"0"+h;o+=":";o+=(k.length==2)?k:"0"+k;m=m.replace(/[+-][0-9]{2}:[0-9]{2}$/,o)}c=$.extend(c,{altFieldTimeOnly:false,altTimeFormat:"HH:mm",controlType:"select",hourText:WCF.Language.get("wcf.date.hour"),minuteText:WCF.Language.get("wcf.date.minute"),showTime:false,timeFormat:this._timeFormat,timeOnly:i.data("timeOnly")?true:false,yearRange:(i.hasClass("birthday")?"-100:+0":"1900:2038")})}if(b){i.datetimepicker(c)}else{i.datepicker(c)}if(m){m=new Date(m);if(!b){m.setMinutes(m.getMinutes()+m.getTimezoneOffset())}i.datepicker("setDate",m)}i.datepicker("widget").hide();if(i.data("timeOnly")){i.datepicker("widget").addClass("timeOnlyPicker")}},this))}};WCF.Date.Util={gmdate:function(a){var b=(a)?a:new Date();return Math.round(Date.UTC(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDay(),b.getUTCHours(),b.getUTCMinutes(),b.getUTCSeconds())/1000)},getTimezoneDate:function(b,c){var d=new Date(b);var a=d.getTimezoneOffset()*60000;return new Date((b+a+c))}};WCF.Date.Time=Class.extend({_date:0,_elements:null,_offset:null,_timestamp:0,init:function(){this._elements=$("time.datetime");this._offset=null;this._timestamp=0;this._refresh();new WCF.PeriodicalExecuter($.proxy(this._refresh,this),60000);WCF.DOMNodeInsertedHandler.addCallback("WCF.Date.Time",$.proxy(this._domNodeInserted,this))},_domNodeInserted:function(){this._elements=$("time.datetime");this._refresh()},_refresh:function(){this._date=new Date();this._timestamp=(this._date.getTime()-this._date.getMilliseconds())/1000;if(this._offset===null){this._offset=this._timestamp-TIME_NOW}this._elements.each($.proxy(this._refreshElement,this))},_refreshElement:function(i,f){var n=$(f);if(!n.attr("title")){n.attr("title",n.text())}var d=n.data("timestamp")+this._offset;var b=n.data("date");var c=n.data("time");var o=n.data("offset");if(n.data("isFutureDate")){return}if(d>=this._timestamp||this._timestamp<(d+60)){n.text(WCF.Language.get("wcf.date.relative.now"))}else{if(this._timestamp<(d+3540)){var m=Math.max(Math.round((this._timestamp-d)/60),1);n.text(WCF.Language.get("wcf.date.relative.minutes",{minutes:m}))}else{if(this._timestamp<(d+86400)){var k=Math.round((this._timestamp-d)/3600);n.text(WCF.Language.get("wcf.date.relative.hours",{hours:k}))}else{if(this._timestamp<(d+518400)){var j=new Date(this._date.getFullYear(),this._date.getMonth(),this._date.getDate());var l=Math.ceil((j/1000-d)/86400);var g=WCF.Date.Util.getTimezoneDate((d*1000),o*1000);var h=g.getDay();var e=WCF.Language.get("__days")[h];n.text(WCF.Language.get("wcf.date.relative.pastDays",{days:l,day:e,time:c}))}else{var a=WCF.Language.get("wcf.date.shortDateTimeFormat");n.text(a.replace(/\%date\%/,b).replace(/\%time\%/,c))}}}}}});WCF.Dictionary=Class.extend({_variables:{},init:function(){this._variables={}},add:function(a,b){this._variables[a]=b},addObject:function(a){for(var b in a){this.add(b,a[b])}},addDictionary:function(a){a.each($.proxy(function(b){this.add(b.key,b.value)},this))},get:function(a){if(this.isset(a)){return this._variables[a]}return null},isset:function(a){return this._variables.hasOwnProperty(a)},remove:function(a){delete this._variables[a]},each:function(d){if(!$.isFunction(d)){return}for(var c in this._variables){var a=this._variables[c];var b={key:c,value:a};d(b)}},count:function(){return $.getLength(this._variables)},isEmpty:function(){return !this.count()}});WCF.Language={_variables:new WCF.Dictionary(),add:function(a,b){this._variables.add(a,b)},addObject:function(a){this._variables.addObject(a)},get:function(a,b){if(b==null){var b={}}var c=this._variables.get(a);if(c===null){return a}else{if(typeof c==="string"){this.add(a,new WCF.Template(c));return this.get(a,b)}else{if(typeof c.fetch==="function"){c=c.fetch(b)}}}return c}};WCF.MultipleLanguageInput=Class.extend({_availableLanguages:{},_button:null,_didInit:false,_element:null,_insertedDataAfterInit:false,_isEnabled:false,_forceSelection:false,_languageID:0,_list:null,_values:null,init:function(c,b,d,f){this._button=null;this._element=$("#"+$.wcfEscapeID(c));this._forceSelection=b;this._values=d;this._availableLanguages=f;if($.getLength(this._values)){for(var e in this._values){this._values[e]=WCF.String.unescapeHTML(this._values[e])}}this._languageID=LANGUAGE_ID;if(this._element.length==0){console.debug("[WCF.MultipleLanguageInput] element id '"+c+"' is unknown");return}var a=($.getLength(this._values)>0)?true:false;this._insertedDataAfterInit=a;this._prepareElement(a);this._element.parents("form").submit($.proxy(this._submit,this));this._didInit=true},_prepareElement:function(a){this._element.wrap('