(function (window, undefined) {!function(){var e=!1,t=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){},Class.extend=function(n){function r(){!e&&this.init&&this.init.apply(this,arguments)}var i=this.prototype;e=!0;var o=new this;e=!1;for(var a in n)o[a]="function"==typeof n[a]&&"function"==typeof i[a]&&t.test(n[a])?function(e,t){return function(){var n=this._super;this._super=i[e];var r=t.apply(this,arguments);return this._super=n,r}}(a,n[a]):n[a];return r.prototype=o,r.prototype.constructor=r,r.extend=arguments.callee,r}}(),function(e,t){"use strict";function n(){}function r(e,t){if(e){"object"==typeof e&&(e=[].slice.call(e));for(var n=0,r=e.length;r>n;n++)t.call(e,e[n],n)}}function i(e,n){var r=Object.prototype.toString.call(n).slice(8,-1);return n!==t&&null!==n&&r===e}function o(e){return i("Function",e)}function a(e){return i("Array",e)}function l(e){var t=e.split("/"),n=t[t.length-1],r=n.indexOf("?");return-1!==r?n.substring(0,r):n}function u(e){e=e||n,e._done||(e(),e._done=1)}function s(e,t,r,i){var o="object"==typeof e?e:{test:e,success:t?a(t)?t:[t]:!1,failure:r?a(r)?r:[r]:!1,callback:i||n},l=!!o.test;return l&&o.success?(o.success.push(o.callback),N.load.apply(null,o.success)):l||!o.failure?i():(o.failure.push(o.callback),N.load.apply(null,o.failure)),N}function c(e){var t,n,r={};if("object"==typeof e)for(t in e)!e[t]||(r={name:t,url:e[t]});else r={name:l(e),url:e};return n=S[r.name],n&&n.url===r.url?n:(S[r.name]=r,r)}function d(e){e=e||S;for(var t in e)if(e.hasOwnProperty(t)&&e[t].state!==F)return!1;return!0}function p(e){e.state=P,r(e.onpreload,function(e){e.call()})}function f(e){e.state===t&&(e.state=I,e.onpreload=[],b({url:e.url,type:"cache"},function(){p(e)}))}function h(){var e=arguments,t=e[e.length-1],n=[].slice.call(e,1),i=n[0];return o(t)||(t=null),a(e[0])?(e[0].push(t),N.load.apply(null,e[0]),N):(i?(r(n,function(e){o(e)||!e||f(c(e))}),m(c(e[0]),o(i)?i:function(){N.load.apply(null,n)})):m(c(e[0])),N)}function g(){var e=arguments,t=e[e.length-1],n={};return o(t)||(t=null),a(e[0])?(e[0].push(t),N.load.apply(null,e[0]),N):(r(e,function(e){e!==t&&(e=c(e),n[e.name]=e)}),r(e,function(e){e!==t&&(e=c(e),m(e,function(){d(n)&&u(t)}))}),N)}function m(e,t){return t=t||n,e.state===F?void t():e.state===D?void N.ready(e.name,t):e.state===I?void e.onpreload.push(function(){m(e,t)}):(e.state=D,void b(e,function(){e.state=F,t(),r(k[e.name],function(e){u(e)}),O&&d()&&r(k.ALL,function(e){u(e)})}))}function v(e){e=e||"";var t=e.split("?")[0].split(".");return t[t.length-1].toLowerCase()}function b(t,r){function i(t){t=t||e.event,l.onload=l.onreadystatechange=l.onerror=null,r()}function o(n){n=n||e.event,("load"===n.type||/loaded|complete/.test(l.readyState)&&(!x.documentMode||x.documentMode<9))&&(e.clearTimeout(t.errorTimeout),e.clearTimeout(t.cssTimeout),l.onload=l.onreadystatechange=l.onerror=null,r())}function a(){if(t.state!==F&&t.cssRetries<=20){for(var n=0,r=x.styleSheets.length;r>n;n++)if(x.styleSheets[n].href===l.href)return void o({type:"load"});t.cssRetries++,t.cssTimeout=e.setTimeout(a,250)}}var l,u,s;r=r||n,u=v(t.url),"css"===u?(l=x.createElement("link"),l.type="text/"+(t.type||"css"),l.rel="stylesheet",l.href=t.url,t.cssRetries=0,t.cssTimeout=e.setTimeout(a,500)):(l=x.createElement("script"),l.type="text/"+(t.type||"javascript"),l.src=t.url),l.onload=l.onreadystatechange=o,l.onerror=i,l.async=!1,l.defer=!1,t.errorTimeout=e.setTimeout(function(){i({type:"timeout"})},7e3),s=x.head||x.getElementsByTagName("head")[0],s.insertBefore(l,s.lastChild)}function w(){for(var e,t=x.getElementsByTagName("script"),n=0,r=t.length;r>n;n++)if(e=t[n].getAttribute("data-headjs-load"),!!e)return void N.load(e)}function y(e,t){var n,i,l;return e===x?(O?u(t):L.push(t),N):(o(e)&&(t=e,e="ALL"),a(e)?(n={},r(e,function(e){n[e]=S[e],N.ready(e,function(){d(n)&&u(t)})}),N):"string"==typeof e&&o(t)?(i=S[e],i&&i.state===F||"ALL"===e&&d()&&O?(u(t),N):(l=k[e],l?l.push(t):l=k[e]=[t],N)):N)}function T(){return x.body?void(O||(O=!0,w(),r(L,function(e){u(e)}))):(e.clearTimeout(N.readyTimeout),void(N.readyTimeout=e.setTimeout(T,50)))}function E(){x.addEventListener?(x.removeEventListener("DOMContentLoaded",E,!1),T()):"complete"===x.readyState&&(x.detachEvent("onreadystatechange",E),T())}var O,A,x=e.document,L=[],k={},S={},C="async"in x.createElement("script")||"MozAppearance"in x.documentElement.style||e.opera,M=e.head_conf&&e.head_conf.head||"head",N=e[M]=e[M]||function(){N.ready.apply(null,arguments)},I=1,P=2,D=3,F=4;if("complete"===x.readyState)T();else if(x.addEventListener)x.addEventListener("DOMContentLoaded",E,!1),e.addEventListener("load",T,!1);else{x.attachEvent("onreadystatechange",E),e.attachEvent("onload",T),A=!1;try{A=!e.frameElement&&x.documentElement}catch(e){}A&&A.doScroll&&function t(){if(!O){try{A.doScroll("left")}catch(n){return e.clearTimeout(N.readyTimeout),void(N.readyTimeout=e.setTimeout(t,50))}T()}}()}N.load=N.js=C?g:h,N.test=s,N.ready=y,N.ready(x,function(){d()&&r(k.ALL,function(e){u(e)}),N.feature&&N.feature("domloaded",!0)})}(window),function(e){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}(function(e){function t(t){return!t||void 0!==t.allowPageScroll||void 0===t.swipe&&void 0===t.swipeStatus||(t.allowPageScroll=s),void 0!==t.click&&void 0===t.tap&&(t.tap=t.click),t||(t={}),t=e.extend({},e.fn.swipe.defaults,t),this.each(function(){var r=e(this),i=r.data(k);i||(i=new n(this,t),r.data(k,i))})}function n(t,n){function S(t){if(!(se()||e(t.target).closest(n.excludedElements,Xe).length>0)){var r,i=t.originalEvent?t.originalEvent:t,o=A?i.touches[0]:i;return Qe=y,A?Ye=i.touches.length:t.preventDefault(),Fe=0,ze=null,Ue=null,Re=0,_e=0,je=0,Ve=1,qe=0,Be=he(),He=ve(),le(),!A||Ye===n.fingers||n.fingers===b||H()?(de(0,o),We=Le(),2==Ye&&(de(1,i.touches[1]),_e=je=ye(Be[0].start,Be[1].start)),(n.swipeStatus||n.pinchStatus)&&(r=F(i,Qe))):r=!1,r===!1?(Qe=O,F(i,Qe),r):(n.hold&&(et=setTimeout(e.proxy(function(){Xe.trigger("hold",[i.target]),n.hold&&(r=n.hold.call(Xe,i,i.target))},this),n.longTapThreshold)),ce(!0),null)}}function C(e){var t=e.originalEvent?e.originalEvent:e;if(Qe!==E&&Qe!==O&&!ue()){var r,i=A?t.touches[0]:t,o=pe(i);if(Ze=Le(),A&&(Ye=t.touches.length),n.hold&&clearTimeout(et),Qe=T,2==Ye&&(0==_e?(de(1,t.touches[1]),_e=je=ye(Be[0].start,Be[1].start)):(pe(t.touches[1]),je=ye(Be[0].end,Be[1].end),Ue=Ee(Be[0].end,Be[1].end)),Ve=Te(_e,je),qe=Math.abs(_e-je)),Ye===n.fingers||n.fingers===b||!A||H()){if(ze=xe(o.start,o.end),q(e,ze),Fe=Oe(o.start,o.end),Re=we(),ge(ze,Fe),(n.swipeStatus||n.pinchStatus)&&(r=F(t,Qe)),!n.triggerOnTouchEnd||n.triggerOnTouchLeave){var a=!0;if(n.triggerOnTouchLeave){var l=ke(this);a=Se(o.end,l)}!n.triggerOnTouchEnd&&a?Qe=D(T):n.triggerOnTouchLeave&&!a&&(Qe=D(E)),(Qe==O||Qe==E)&&F(t,Qe)}}else Qe=O,F(t,Qe);r===!1&&(Qe=O,F(t,Qe))}}function M(e){var t=e.originalEvent;return A&&t.touches.length>0?(ae(),!0):(ue()&&(Ye=Ke),Ze=Le(),Re=we(),_()||!R()?(Qe=O,F(t,Qe)):n.triggerOnTouchEnd||0==n.triggerOnTouchEnd&&Qe===T?(e.preventDefault(),Qe=E,F(t,Qe)):!n.triggerOnTouchEnd&&G()?(Qe=E,z(t,Qe,f)):Qe===T&&(Qe=O,F(t,Qe)),ce(!1),null)}function N(){Ye=0,Ze=0,We=0,_e=0,je=0,Ve=1,le(),ce(!1)}function I(e){var t=e.originalEvent;n.triggerOnTouchLeave&&(Qe=D(E),F(t,Qe))}function P(){Xe.unbind(Me,S),Xe.unbind(De,N),Xe.unbind(Ne,C),Xe.unbind(Ie,M),Pe&&Xe.unbind(Pe,I),ce(!1)}function D(e){var t=e,r=V(),i=R(),o=_();return!r||o?t=O:!i||e!=T||n.triggerOnTouchEnd&&!n.triggerOnTouchLeave?!i&&e==E&&n.triggerOnTouchLeave&&(t=O):t=E,t}function F(e,t){var n=void 0;return B()||Y()?n=z(e,t,d):(X()||H())&&n!==!1&&(n=z(e,t,p)),ie()&&n!==!1?n=z(e,t,h):oe()&&n!==!1?n=z(e,t,g):re()&&n!==!1&&(n=z(e,t,f)),t===O&&N(e),t===E&&(A?0==e.touches.length&&N(e):N(e)),n}function z(t,s,c){var m=void 0;if(c==d){if(Xe.trigger("swipeStatus",[s,ze||null,Fe||0,Re||0,Ye,Be]),n.swipeStatus&&(m=n.swipeStatus.call(Xe,t,s,ze||null,Fe||0,Re||0,Ye,Be),m===!1))return!1;if(s==E&&Q()){if(Xe.trigger("swipe",[ze,Fe,Re,Ye,Be]),n.swipe&&(m=n.swipe.call(Xe,t,ze,Fe,Re,Ye,Be),m===!1))return!1;switch(ze){case r:Xe.trigger("swipeLeft",[ze,Fe,Re,Ye,Be]),n.swipeLeft&&(m=n.swipeLeft.call(Xe,t,ze,Fe,Re,Ye,Be));break;case i:Xe.trigger("swipeRight",[ze,Fe,Re,Ye,Be]),n.swipeRight&&(m=n.swipeRight.call(Xe,t,ze,Fe,Re,Ye,Be));break;case o:Xe.trigger("swipeUp",[ze,Fe,Re,Ye,Be]),n.swipeUp&&(m=n.swipeUp.call(Xe,t,ze,Fe,Re,Ye,Be));break;case a:Xe.trigger("swipeDown",[ze,Fe,Re,Ye,Be]),n.swipeDown&&(m=n.swipeDown.call(Xe,t,ze,Fe,Re,Ye,Be))}}}if(c==p){if(Xe.trigger("pinchStatus",[s,Ue||null,qe||0,Re||0,Ye,Ve,Be]),n.pinchStatus&&(m=n.pinchStatus.call(Xe,t,s,Ue||null,qe||0,Re||0,Ye,Ve,Be),m===!1))return!1;if(s==E&&U())switch(Ue){case l:Xe.trigger("pinchIn",[Ue||null,qe||0,Re||0,Ye,Ve,Be]),n.pinchIn&&(m=n.pinchIn.call(Xe,t,Ue||null,qe||0,Re||0,Ye,Ve,Be));break;case u:Xe.trigger("pinchOut",[Ue||null,qe||0,Re||0,Ye,Ve,Be]),n.pinchOut&&(m=n.pinchOut.call(Xe,t,Ue||null,qe||0,Re||0,Ye,Ve,Be))}}return c==f?(s===O||s===E)&&(clearTimeout(Je),clearTimeout(et),K()&&!ee()?($e=Le(),Je=setTimeout(e.proxy(function(){$e=null,Xe.trigger("tap",[t.target]),n.tap&&(m=n.tap.call(Xe,t,t.target))},this),n.doubleTapThreshold)):($e=null,Xe.trigger("tap",[t.target]),n.tap&&(m=n.tap.call(Xe,t,t.target)))):c==h?(s===O||s===E)&&(clearTimeout(Je),$e=null,Xe.trigger("doubletap",[t.target]),n.doubleTap&&(m=n.doubleTap.call(Xe,t,t.target))):c==g&&(s===O||s===E)&&(clearTimeout(Je),$e=null,Xe.trigger("longtap",[t.target]),n.longTap&&(m=n.longTap.call(Xe,t,t.target))),m}function R(){var e=!0;return null!==n.threshold&&(e=Fe>=n.threshold),e}function _(){var e=!1;return null!==n.cancelThreshold&&null!==ze&&(e=me(ze)-Fe>=n.cancelThreshold),e}function j(){return null!==n.pinchThreshold?qe>=n.pinchThreshold:!0}function V(){var e;return e=n.maxTimeThreshold&&Re>=n.maxTimeThreshold?!1:!0}function q(e,t){if(n.allowPageScroll===s||H())e.preventDefault();else{var l=n.allowPageScroll===c;switch(t){case r:(n.swipeLeft&&l||!l&&n.allowPageScroll!=m)&&e.preventDefault();break;case i:(n.swipeRight&&l||!l&&n.allowPageScroll!=m)&&e.preventDefault();break;case o:(n.swipeUp&&l||!l&&n.allowPageScroll!=v)&&e.preventDefault();break;case a:(n.swipeDown&&l||!l&&n.allowPageScroll!=v)&&e.preventDefault()}}}function U(){var e=W(),t=Z(),n=j();return e&&t&&n}function H(){return!!(n.pinchStatus||n.pinchIn||n.pinchOut)}function X(){return!(!U()||!H())}function Q(){var e=V(),t=R(),n=W(),r=Z(),i=_(),o=!i&&r&&n&&t&&e;return o}function Y(){return!!(n.swipe||n.swipeStatus||n.swipeLeft||n.swipeRight||n.swipeUp||n.swipeDown)}function B(){return!(!Q()||!Y())}function W(){return Ye===n.fingers||n.fingers===b||!A}function Z(){return 0!==Be[0].end.x}function G(){return!!n.tap}function K(){return!!n.doubleTap}function $(){return!!n.longTap}function J(){if(null==$e)return!1;var e=Le();return K()&&e-$e<=n.doubleTapThreshold}function ee(){return J()}function te(){return(1===Ye||!A)&&(isNaN(Fe)||Fe<n.threshold)}function ne(){return Re>n.longTapThreshold&&w>Fe}function re(){return!(!te()||!G())}function ie(){return!(!J()||!K())}function oe(){return!(!ne()||!$())}function ae(){Ge=Le(),Ke=event.touches.length+1}function le(){Ge=0,Ke=0}function ue(){var e=!1;if(Ge){var t=Le()-Ge;t<=n.fingerReleaseThreshold&&(e=!0)}return e}function se(){return!(Xe.data(k+"_intouch")!==!0)}function ce(e){e===!0?(Xe.bind(Ne,C),Xe.bind(Ie,M),Pe&&Xe.bind(Pe,I)):(Xe.unbind(Ne,C,!1),Xe.unbind(Ie,M,!1),Pe&&Xe.unbind(Pe,I,!1)),Xe.data(k+"_intouch",e===!0)}function de(e,t){var n=void 0!==t.identifier?t.identifier:0;return Be[e].identifier=n,Be[e].start.x=Be[e].end.x=t.pageX||t.clientX,Be[e].start.y=Be[e].end.y=t.pageY||t.clientY,Be[e]}function pe(e){var t=void 0!==e.identifier?e.identifier:0,n=fe(t);return n.end.x=e.pageX||e.clientX,n.end.y=e.pageY||e.clientY,n}function fe(e){for(var t=0;t<Be.length;t++)if(Be[t].identifier==e)return Be[t]}function he(){for(var e=[],t=0;5>=t;t++)e.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0});return e}function ge(e,t){t=Math.max(t,me(e)),He[e].distance=t}function me(e){return He[e]?He[e].distance:void 0}function ve(){var e={};return e[r]=be(r),e[i]=be(i),e[o]=be(o),e[a]=be(a),e}function be(e){return{direction:e,distance:0}}function we(){return Ze-We}function ye(e,t){var n=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);return Math.round(Math.sqrt(n*n+r*r))}function Te(e,t){var n=t/e*1;return n.toFixed(2)}function Ee(){return 1>Ve?u:l}function Oe(e,t){return Math.round(Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)))}function Ae(e,t){var n=e.x-t.x,r=t.y-e.y,i=Math.atan2(r,n),o=Math.round(180*i/Math.PI);return 0>o&&(o=360-Math.abs(o)),o}function xe(e,t){var n=Ae(e,t);return 45>=n&&n>=0?r:360>=n&&n>=315?r:n>=135&&225>=n?i:n>45&&135>n?a:o}function Le(){var e=new Date;return e.getTime()}function ke(t){t=e(t);var n=t.offset(),r={left:n.left,right:n.left+t.outerWidth(),top:n.top,bottom:n.top+t.outerHeight()};return r}function Se(e,t){return e.x>t.left&&e.x<t.right&&e.y>t.top&&e.y<t.bottom}var Ce=A||L||!n.fallbackToMouseEvents,Me=Ce?L?x?"MSPointerDown":"pointerdown":"touchstart":"mousedown",Ne=Ce?L?x?"MSPointerMove":"pointermove":"touchmove":"mousemove",Ie=Ce?L?x?"MSPointerUp":"pointerup":"touchend":"mouseup",Pe=Ce?null:"mouseleave",De=L?x?"MSPointerCancel":"pointercancel":"touchcancel",Fe=0,ze=null,Re=0,_e=0,je=0,Ve=1,qe=0,Ue=0,He=null,Xe=e(t),Qe="start",Ye=0,Be=null,We=0,Ze=0,Ge=0,Ke=0,$e=0,Je=null,et=null;try{Xe.bind(Me,S),Xe.bind(De,N)}catch(t){e.error("events not supported "+Me+","+De+" on jQuery.swipe")}this.enable=function(){return Xe.bind(Me,S),Xe.bind(De,N),Xe},this.disable=function(){return P(),Xe},this.destroy=function(){return P(),Xe.data(k,null),Xe},this.option=function(t,r){if(void 0!==n[t]){if(void 0===r)return n[t];n[t]=r}else e.error("Option "+t+" does not exist on jQuery.swipe.options");return null}}var r="left",i="right",o="up",a="down",l="in",u="out",s="none",c="auto",d="swipe",p="pinch",f="tap",h="doubletap",g="longtap",m="horizontal",v="vertical",b="all",w=10,y="start",T="move",E="end",O="cancel",A="ontouchstart"in window,x=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,L=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,k="TouchSwipe",S={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:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe"};e.fn.swipe=function(n){var r=e(this),i=r.data(k);if(i&&"string"==typeof n){if(i[n])return i[n].apply(this,Array.prototype.slice.call(arguments,1));e.error("Method "+n+" does not exist on jQuery.swipe")}else if(!(i||"object"!=typeof n&&n))return t.apply(this,arguments);return r},e.fn.swipe.defaults=S,e.fn.swipe.phases={PHASE_START:y,PHASE_MOVE:T,PHASE_END:E,PHASE_CANCEL:O},e.fn.swipe.directions={LEFT:r,RIGHT:i,UP:o,DOWN:a,IN:l,OUT:u},e.fn.swipe.pageScroll={NONE:s,HORIZONTAL:m,VERTICAL:v,AUTO:c},e.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:b}}),function(e){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))}(navigator.userAgent||navigator.vendor||window.opera),function(e){var t={init:function(){var t=["paddingTop","paddingRight","paddingBottom","paddingLeft","fontSize","lineHeight","fontFamily","width","fontWeight","border-top-width","border-right-width","border-bottom-width","border-left-width","-moz-box-sizing","-webkit-box-sizing","box-sizing"];return this.each(function(){function n(){for(var e=0;e<t.length;e++)a.css(t[e],o.css(t[e]))}function r(){var e=o.val().replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/\n/g,"<br/>");a.html(e+" "),i()}function i(){var e=a.height(),t="hidden",n=l?e+c+u:e+c;n>p?(n=p,t="auto"):d>n&&(n=d),o.height()!==n&&o.css({overflow:t,height:n+"px"})}if("textarea"!==this.type)return!1;var o=e(this).css({resize:"none",overflow:"hidden"}),a=e("<div></div>").css({position:"absolute",display:"none","word-wrap":"break-word","white-space":"pre-wrap","border-style":"solid"}).appendTo(document.body);n();var l="border-box"==o.css("box-sizing")||"border-box"==o.css("-moz-box-sizing")||"border-box"==o.css("-webkit-box-sizing"),u=parseInt(o.css("border-top-width"))+parseInt(o.css("padding-top"))+parseInt(o.css("padding-bottom"))+parseInt(o.css("border-bottom-width")),s=parseInt(o.css("height"),10),c=parseInt(o.css("line-height"),10)||parseInt(o.css("font-size"),10),d=2*c>s?2*c:s,p=parseInt(o.css("max-height"),10)>-1?parseInt(o.css("max-height"),10):Number.MAX_VALUE;o.bind("keyup change cut paste",function(){r()}),e(window).bind("resize",function(){var e=parseInt(o.width(),10);a.width()!==e&&(a.css({width:e+"px"}),r())}),o.bind("blur",function(){i()}),o.bind("updateHeight",function(){n(),r()}),e(function(){r()})})}};e.fn.flexible=function(n){return t[n]?t[n].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof n&&n?void e.error("Method "+n+" does not exist on jQuery.flexible"):t.init.apply(this,arguments)}}(jQuery),function(e,t,n,r){"use strict";function i(e,t){for(var n=0,r=e.length;r>n;n++)g(e[n],t)}function o(e){for(var t,n=0,r=e.length;r>n;n++)t=e[n],E(t,_[l(t)])}function a(e){return function(t){ne(t)&&(g(t,e),i(t.querySelectorAll(j),e))}}function l(e){var t=e.getAttribute("is"),n=e.nodeName.toUpperCase(),r=q.call(R,t?D+t.toUpperCase():P+n);return t&&r>-1&&!u(n,t)?-1:r}function u(e,t){return-1<j.indexOf(e+'[is="'+t+'"]')}function s(e){var t=e.currentTarget,n=e.attrChange,r=e.attrName,i=e.target;he&&(!i||i===t)&&t.attributeChangedCallback&&"style"!==r&&t.attributeChangedCallback(r,n===e[k]?null:e.prevValue,n===e[C]?null:e.newValue)}function c(e){var t=a(e);return function(e){m.push(t,e.target)}}function d(e){fe&&(fe=!1,e.currentTarget.removeEventListener(N,d)),i((e.target||t).querySelectorAll(j),e.detail===x?x:A),te&&h()}function p(e,t){var n=this;oe.call(n,e,t),v.call(n,{target:n})}function f(e,t){$(e,t),y?y.observe(e,ue):(pe&&(e.setAttribute=p,e[O]=w(e),e.addEventListener(I,v)),e.addEventListener(M,s)),e.createdCallback&&he&&(e.created=!0,e.createdCallback(),e.created=!1)}function h(){for(var e,t=0,n=re.length;n>t;t++)e=re[t],V.contains(e)||(re.splice(t,1),g(e,x))}function g(e,t){var n,r=l(e);r>-1&&(T(e,_[r]),r=0,t!==A||e[A]?t===x&&!e[x]&&(e[A]=!1,e[x]=!0,r=1):(e[x]=!1,e[A]=!0,r=1,te&&q.call(re,e)<0&&re.push(e)),r&&(n=e[t+"Callback"])&&n.call(e))}if(!(r in t)){var m,v,b,w,y,T,E,O="__"+r+(1e5*Math.random()>>0),A="attached",x="detached",L="extends",k="ADDITION",S="MODIFICATION",C="REMOVAL",M="DOMAttrModified",N="DOMContentLoaded",I="DOMSubtreeModified",P="<",D="=",F=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,z=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],R=[],_=[],j="",V=t.documentElement,q=R.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},U=n.prototype,H=U.hasOwnProperty,X=U.isPrototypeOf,Q=n.defineProperty,Y=n.getOwnPropertyDescriptor,B=n.getOwnPropertyNames,W=n.getPrototypeOf,Z=n.setPrototypeOf,G=!!n.__proto__,K=n.create||function e(t){return t?(e.prototype=t,new e):this},$=Z||(G?function(e,t){return e.__proto__=t,e}:B&&Y?function(){function e(e,t){for(var n,r=B(t),i=0,o=r.length;o>i;i++)n=r[i],H.call(e,n)||Q(e,n,Y(t,n))}return function(t,n){do e(t,n);while((n=W(n))&&!X.call(n,t));return t}}():function(e,t){for(var n in t)e[n]=t[n];return e}),J=e.MutationObserver||e.WebKitMutationObserver,ee=(e.HTMLElement||e.Element||e.Node).prototype,te=!X.call(ee,V),ne=te?function(e){return 1===e.nodeType}:function(e){return X.call(ee,e)},re=te&&[],ie=ee.cloneNode,oe=ee.setAttribute,ae=ee.removeAttribute,le=t.createElement,ue=J&&{attributes:!0,characterData:!0,attributeOldValue:!0},se=J||function(){pe=!1,V.removeEventListener(M,se)},ce=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,10)},de=!1,pe=!0,fe=!0,he=!0;Z||G?(T=function(e,t){X.call(t,e)||f(e,t)},E=f):(T=function(e,t){e[O]||(e[O]=n(!0),f(e,t))},E=T),te?(pe=!1,function(){var e=Y(ee,"addEventListener"),t=e.value,n=function(e){var t=new CustomEvent(M,{bubbles:!0});t.attrName=e,t.prevValue=this.getAttribute(e),t.newValue=null,t[C]=t.attrChange=2,ae.call(this,e),this.dispatchEvent(t)},r=function(e,t){var n=this.hasAttribute(e),r=n&&this.getAttribute(e),i=new CustomEvent(M,{bubbles:!0});oe.call(this,e,t),i.attrName=e,i.prevValue=n?r:null,i.newValue=t,n?i[S]=i.attrChange=1:i[k]=i.attrChange=0,this.dispatchEvent(i)},i=function(e){var t,n=e.currentTarget,r=n[O],i=e.propertyName;r.hasOwnProperty(i)&&(r=r[i],t=new CustomEvent(M,{bubbles:!0}),t.attrName=r.name,t.prevValue=r.value||null,t.newValue=r.value=n[i]||null,null==t.prevValue?t[k]=t.attrChange=0:t[S]=t.attrChange=1,n.dispatchEvent(t))};e.value=function(e,o,a){e===M&&this.attributeChangedCallback&&this.setAttribute!==r&&(this[O]={className:{name:"class",value:this.className}},this.setAttribute=r,this.removeAttribute=n,t.call(this,"propertychange",i)),t.call(this,e,o,a)},Q(ee,"addEventListener",e)}()):J||(V.addEventListener(M,se),V.setAttribute(O,1),V.removeAttribute(O),pe&&(v=function(e){var t,n,r,i=this;if(i===e.target){t=i[O],i[O]=n=w(i);for(r in n){if(!(r in t))return b(0,i,r,t[r],n[r],k);if(n[r]!==t[r])return b(1,i,r,t[r],n[r],S)}for(r in t)if(!(r in n))return b(2,i,r,t[r],n[r],C)}},b=function(e,t,n,r,i,o){var a={attrChange:e,currentTarget:t,attrName:n,prevValue:r,newValue:i};a[o]=e,s(a)},w=function(e){for(var t,n,r={},i=e.attributes,o=0,a=i.length;a>o;o++)t=i[o],n=t.name,"setAttribute"!==n&&(r[n]=t.value);return r})),t[r]=function(e,n){if(r=e.toUpperCase(),de||(de=!0,J?(y=function(e,t){function n(e,t){for(var n=0,r=e.length;r>n;t(e[n++]));}return new J(function(r){for(var i,o,a=0,l=r.length;l>a;a++)i=r[a],"childList"===i.type?(n(i.addedNodes,e),n(i.removedNodes,t)):(o=i.target,he&&o.attributeChangedCallback&&"style"!==i.attributeName&&o.attributeChangedCallback(i.attributeName,i.oldValue,o.getAttribute(i.attributeName)))})}(a(A),a(x)),y.observe(t,{childList:!0,subtree:!0})):(m=[],ce(function e(){for(;m.length;)m.shift().call(null,m.shift());ce(e)}),t.addEventListener("DOMNodeInserted",c(A)),t.addEventListener("DOMNodeRemoved",c(x))),t.addEventListener(N,d),t.addEventListener("readystatechange",d),t.createElement=function(e,n){var r=le.apply(t,arguments),i=""+e,o=q.call(R,(n?D:P)+(n||i).toUpperCase()),a=o>-1;return n&&(r.setAttribute("is",n=n.toLowerCase()),a&&(a=u(i.toUpperCase(),n))),he=!t.createElement.innerHTMLHelper,a&&E(r,_[o]),r},ee.cloneNode=function(e){var t=ie.call(this,!!e),n=l(t);return n>-1&&E(t,_[n]),e&&o(t.querySelectorAll(j)),t}),-2<q.call(R,D+r)+q.call(R,P+r))throw new Error("A "+e+" type is already registered");if(!F.test(r)||-1<q.call(z,r))throw new Error("The type "+e+" is invalid");var r,s=function(){return f?t.createElement(h,r):t.createElement(h)},p=n||U,f=H.call(p,L),h=f?n[L].toUpperCase():r,g=R.push((f?D:P)+r)-1;return j=j.concat(j.length?",":"",f?h+'[is="'+e.toLowerCase()+'"]':h),s.prototype=_[g]=H.call(p,"prototype")?p.prototype:K(ee),i(t.querySelectorAll(j),A),s}}}(window,document,Object,"registerElement"),!function(e,t,n){"use strict";function r(){return e.performance!==n&&e.performance.now!==n?e.performance.now():Date.now()}function i(e){return.5*(1-Math.cos(Math.PI*e))}function o(e){if("object"!=typeof e||e.behavior===n||"auto"===e.behavior||"instant"===e.behavior)return!0;if("smooth"===e.behavior)return!1;throw new TypeError(e.behavior+" is not a valid value for enumeration ScrollBehavior")}function a(e,t,n){e.scrollTop=n,e.scrollLeft=t}function l(t,o){function a(){var f,h,g,m=r(),v=(m-p)/c;return v=v>1?1:v,f=i(v),h=l+(t-l)*f,g=u+(o-u)*f,d(h,g),h===t&&g===o?(l=u=p=null,e.cancelAnimationFrame(s),n):(s=e.requestAnimationFrame(a),n)}var l=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,p=r();s&&e.cancelAnimationFrame(s),s=e.requestAnimationFrame(a)}function u(o,u){function d(){var t,l,u,v=r(),b=(v-m)/c;return b=b>1?1:b,t=i(b),l=p+(h-p)*t,u=f+(g-f)*t,a(o,l,u),l===h&&u===g?(p=f=m=null,e.cancelAnimationFrame(s),n):(s=e.requestAnimationFrame(d),n)}if(o===t.documentElement||o===t.body)return l(u.left,u.top),n;var p=o.scrollLeft,f=o.scrollTop,h=u.left,g=u.top,m=r();s&&e.cancelAnimationFrame(s),s=e.requestAnimationFrame(d)}if(!("scrollBehavior"in t.documentElement.style)){var s,c=768,d=e.scrollTo,p=e.scrollBy,f=e.Element.prototype.scrollIntoView;e.scroll=e.scrollTo=function(){return o(arguments[0])?d.call(e,arguments[0].left||arguments[0],arguments[0].top||arguments[1]):l.call(e,~~arguments[0].left,~~arguments[0].top)},e.scrollBy=function(){if(o(arguments[0]))return p.call(e,arguments[0].left||arguments[0],arguments[0].top||arguments[1]);var t=e.scrollX||e.pageXOffset,n=e.scrollY||e.pageYOffset;return l(~~arguments[0].left+t,~~arguments[0].top+n)},Element.prototype.scrollIntoView=function(){var n,r,i,a;return o(arguments[0])?f.call(this,arguments[0]||!0):(a=e.getComputedStyle(t.body,null),r=parseInt(a.getPropertyValue("padding-left"),10),i=parseInt(a.getPropertyValue("padding-top"),10),n={top:this.offsetTop-2*i,left:this.offsetLeft-2*r},u(t.body,n))}}}(window,document); })(this);
// WCF.js
-(function (window, undefined) {"use strict";function wcfEval(expression){return eval(expression)}!function(){var e=jQuery.fn.data;jQuery.fn.data=function(t){if(t)switch(typeof t){case"object":for(var i in t)if(i.match(/ID$/)){var n=t[i];delete t[i],i=i.replace(/ID$/,"-id"),t[i]=n}arguments[0]=t;break;case"string":t.match(/ID$/)&&(arguments[0]=t.replace(/ID$/,"-id"))}var s=e.apply(this,arguments);if(void 0===t)for(var i in s)i.match(/Id$/)&&(s[i.replace(/Id$/,"ID")]=s[i],delete s[i]);return s},window.console||(window.console={});for(var t=["log","info","warn","exception","assert","dir","dirxml","trace","group","groupEnd","groupCollapsed","profile","profileEnd","count","clear","time","timeEnd","timeStamp","table","error"],i=0;i<t.length;i++)"undefined"==typeof console[t[i]]&&(console[t[i]]=function(){});"undefined"==typeof console.debug&&(console.debug=function(e){console.log(e)})}(),String.prototype.hashCode=function(){var e,t=0;if(this.length)for(var i=0,n=this.length;n>i;i++)e=this.charCodeAt(i),t=(t<<5)-t+e,t&=t;return t},window.shuffle=function(e){for(var t,i,n=e.length;0!==n;)i=Math.floor(Math.random()*n),n-=1,t=e[n],e[n]=e[i],e[i]=t;return this},function(e){var t=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[],n={browser:i[1]||"",version:i[2]||"0"},s={};n.browser&&(s[n.browser]=!0,s.version=n.version),s.chrome?s.webkit=!0:s.webkit&&(s.safari=!0),e.browser=e.browser||{},e.browser=$.extend(e.browser,s),e.browser.touch=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&window.navigator.msMaxTouchPoints>0,e.browser.smartphone="bottom"==$("html").css("caption-side"),e.browser.mozilla&&t.match(/trident/)&&(e.browser.mozilla=!1,e.browser.msie=!0),e.browser.iOS=/\((ipad|iphone|ipod);/.test(t),e.browser.iOS&&$("html").addClass("iOS"),e.browser.android=-1!==t.indexOf("android"),e.browser.editor="redactor",e.browser.ckeditor=!1,e.browser.redactor=!0,e.browser.iOS&&(e.fn.focus=function(e,t){return arguments.length>0?this.on("focus",null,e,t):this.trigger("focus")})}(jQuery),null==window.WCF&&(window.WCF={}),$.extend(!0,{removeArrayValue:function(e,t){return $.grep(e,function(e){return t!==e})},wcfEscapeID:function(e){return e.replace(/(:|\.)/g,"\\$1")},wcfIsset:function(e){return!!$("#"+$.wcfEscapeID(e)).length},getLength:function(e){var t=0;for(var i in e)e.hasOwnProperty(i)&&t++;return t}}),$.fn.extend({getTagName:function(){return this.length?this.get(0).tagName.toLowerCase():""},getDimensions:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"inner":i={height:this.innerHeight(),width:this.innerWidth()};break;case"outer":i={height:this.outerHeight(),width:this.outerWidth()};break;default:i={height:this.height(),width:this.width()}}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},getOffsets:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"offset":i=this.offset();break;case"position":default:i=this.position()}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},makePositioned:function(e,t){"absolute"!=e&&"fixed"!=e&&(e="absolute");var i=this.getOffsets("position");return this.css({position:e,left:i.left,margin:0,top:i.top}),t&&this.remove().appentTo("body"),this},disable:function(){return this.attr("disabled","disabled")},enable:function(){return this.removeAttr("disabled")},wcfIdentify:function(){return window.bc_wcfDomUtil.identify(this[0])},getCaret:function(){if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return-1}else if(!this.is("textarea"))return-1;var e=0,t=this.get(0);if(document.selection){this.focus();var i=document.selection.createRange();i.moveStart("character",-this.val().length),e=i.text.length}else(t.selectionStart||"0"==t.selectionStart)&&(e=parseInt(t.selectionStart));return e},setCaret:function(e){if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return!1}else if(!this.is("textarea"))return!1;var t=this.get(0);if(this.focus(),document.selection){var i=document.selection.createRange();i.moveStart("character",e),i.moveEnd("character",0),i.select()}else(t.selectionStart||"0"==t.selectionStart)&&(t.selectionStart=e,t.selectionEnd=e);return!0},wcfDropIn:function(e,t,i){return e||(e="up"),i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfDropOut:function(e,t,i){return e||(e="down"),i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfBlindIn:function(e,t,i){return e||(e="vertical"),i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfBlindOut:function(e,t,i){return e||(e="vertical"),i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfHighlight:function(e,t){return this.effect("highlight",e,600,t)},wcfFadeIn:function(e,t){return t&&parseInt(t)||(t=200),this.show(WCF.getEffect(this,"fade"),{},t,e)},wcfFadeOut:function(e,t){return t&&parseInt(t)||(t=200),this.hide(WCF.getEffect(this,"fade"),{},t,e)},cssAsNumber:function(e){if(this.length){var t=this.css(e);if(void 0!==t)return parseInt(t.replace(/px$/,""))}return 0},perfectScrollbar:function(e){var t=require("perfect-scrollbar");return this.each(function(){if("object"==typeof e||"undefined"==typeof e){var i=e;$(this).data("psID")||t.initialize(this,i)}else{var n=e;"update"===n?t.update(this):"destroy"===n&&t.destroy(this)}return jQuery(this)})}}),$.extend(WCF,{activeDialogs:0,_idCounter:0,getRandomID:function(){return window.bc_wcfDomUtil.getUniqueId()},inArray:function(e,t){return-1!=$.inArray(e,t)},getEffect:function(e,t){return e.is("tr")?"highlight":t},getInlineCSS:function(e){var t={},i=e.attr("style");if(!i)return{};i=i.split(";");for(var n=0,s=i.length;s>n;n++){var a=$.trim(i[n]);""!=a&&(a=a.split(":"),t[$.trim(a[0])]=$.trim(a[1]))}return t},revertInlineCSS:function(e,t,i){for(var n=0,s=i.length;s>n;n++){var a=i[n];t[a]?e.css(a,t[a]):e.css(a,"")}},getUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,i="x"==e?t:3&t|8;return i.toString(16)})},base64toBlob:function(e,t,i){t=t||"",i=i||512;for(var n=atob(e),s=[],a=0;a<n.length;a+=i){for(var o=n.slice(a,a+i),r=new Array(o.length),l=0;l<o.length;l++)r[l]=o.charCodeAt(l);var c=new Uint8Array(r);s.push(c)}return new Blob(s,{type:t})},convertLegacyURL:function(e){return URL_LEGACY_MODE?e:e.replace(/^index\.php\/(.*?)\/\?/,function(e,t){for(var i=t.split(/([A-Z][a-z0-9]+)/),n="",s=0,a=i.length;a>s;s++){var o=i[s].trim();o.length&&(n.length&&(n+="-"),n+=o.toLowerCase())}return"index.php?"+n+"/&"})}}),WCF.Browser={_isChrome:null,isChrome:function(){return null===this._isChrome&&(this._isChrome=!1,/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&(this._isChrome=!0)),this._isChrome}},WCF.Dropdown={init:function(){window.bc_wcfSimpleDropdown.initAll()},initDropdown:function(e,t){window.bc_wcfSimpleDropdown.init(e[0],t)},removeDropdown:function(e){window.bc_wcfSimpleDropdown.remove(e)},initDropdownFragment:function(e,t){window.bc_wcfSimpleDropdown.initFragment(e[0],t[0])},registerCallback:function(e,t){window.bc_wcfSimpleDropdown.registerCallback(e,t)},_toggle:function(e,t){window.bc_wcfSimpleDropdown._toggle(e,t)},toggleDropdown:function(e){window.bc_wcfSimpleDropdown._toggle(null,e)},getDropdown:function(e){var t=window.bc_wcfSimpleDropdown.getDropdown(e);return t?$(t):null},getDropdownMenu:function(e){var t=window.bc_wcfSimpleDropdown.getDropdownMenu(e);return t?$(t):null},setAlignmentByID:function(e){window.bc_wcfSimpleDropdown.setAlignmentById(e)},setAlignment:function(e,t){window.bc_wcfSimpleDropdown.setAlignment(e[0],t[0])},_closeAll:function(){window.bc_wcfSimpleDropdown.closeAll()},close:function(e){window.bc_wcfSimpleDropdown.close(e)},destroy:function(e){window.bc_wcfSimpleDropdown.destroy(e)}},WCF.Dropdown.Interactive={},WCF.Dropdown.Interactive.Handler={_dropdownContainer:null,_dropdownMenus:{},create:function(e,t,i){null===this._dropdownContainer&&(this._dropdownContainer=$('<div class="dropdownMenuContainer" />').appendTo(document.body),WCF.CloseOverlayHandler.addCallback("WCF.Dropdown.Interactive.Handler",$.proxy(this.closeAll,this)));var n=new WCF.Dropdown.Interactive.Instance(this._dropdownContainer,e,t,i);return this._dropdownMenus[t]=n,n},open:function(e){return this._dropdownMenus[e]?(this._dropdownMenus[e].open(),!0):!1},close:function(e){return this._dropdownMenus[e]?(this._dropdownMenus[e].close(),!0):!1},closeAll:function(){for(var e in this._dropdownMenus)this._dropdownMenus.hasOwnProperty(e)&&this._dropdownMenus[e].close()},getOpenDropdown:function(){for(var e in this._dropdownMenus)if(this._dropdownMenus.hasOwnProperty(e)&&this._dropdownMenus[e].isOpen())return this._dropdownMenus[e];return null}},WCF.Dropdown.Interactive.Instance=Class.extend({_container:null,_itemList:null,_linkList:null,_options:{},_pointer:null,_triggerElement:null,init:function(e,t,i,n){this._options=n||{},this._triggerElement=t;var s=null;if(n.staticDropdown===!0)this._container=this._triggerElement.find(".interactiveDropdownStatic:eq(0)").data("source",i).click(function(e){e.stopPropagation()});else{this._container=$('<div class="interactiveDropdown" data-source="'+i+'" />').click(function(e){e.stopPropagation()});var a=$('<div class="interactiveDropdownHeader" />').appendTo(this._container);$('<span class="interactiveDropdownTitle">'+n.title+"</span>").appendTo(a),this._linkList=$('<ul class="interactiveDropdownLinks inlineList"></ul>').appendTo(a),s=$('<div class="interactiveDropdownItemsContainer" />').appendTo(this._container),this._itemList=$('<ul class="interactiveDropdownItems" />').appendTo(s),$('<a href="'+n.showAllLink+'" class="interactiveDropdownShowAll">'+WCF.Language.get("wcf.user.panel.showAll")+"</a>").appendTo(this._container)}this._pointer=$('<span class="elementPointer"><span /></span>').appendTo(this._container),require(["Environment"],function(e){"desktop"===e.platform()&&null!==s&&s.perfectScrollbar({suppressScrollX:!0})}.bind(this)),this._container.appendTo(e)},getContainer:function(){return this._container},getItemList:function(){return this._itemList},getLinkList:function(){return this._linkList},open:function(){WCF.Dropdown._closeAll(),this._triggerElement.addClass("open"),this._container.addClass("open"),WCF.System.Event.fireEvent("com.woltlab.wcf.Search","close"),this.render()},close:function(){this._triggerElement.removeClass("open"),this._container.removeClass("open")},isOpen:function(){return this._triggerElement.hasClass("open")},toggle:function(){return this._container.hasClass("open")?(this.close(),!1):(WCF.Dropdown.Interactive.Handler.closeAll(),this.open(),!0)},resetItems:function(){this._itemList.empty(),this.close()},render:function(){require(["Ui/Alignment","Ui/Screen"],function(e,t){t.is("screen-lg")?e.set(this._container[0],this._triggerElement[0],{horizontal:"right",pointer:!0}):this._container.css({bottom:"",left:"",right:"",top:elById("pageHeader").clientHeight+"px"})}.bind(this))},rebuildScrollbar:function(){require(["Environment"],function(e){if("desktop"===e.platform()){var t=this._itemList.parent();t.perfectScrollbar("destroy"),t.perfectScrollbar({suppressScrollX:!0})}}.bind(this))}}),WCF.Clipboard={init:function(e,t,i,n){require(["WoltLabSuite/Core/Controller/Clipboard"],function(i){i.setup({hasMarkedItems:t>0,pageClassName:e,pageObjectId:n})})},reload:function(){require(["WoltLabSuite/Core/Controller/Clipboard"],function(e){e.reload()})}},WCF.PeriodicalExecuter=Class.extend({_callback:null,_delay:0,_intervalID:null,_isExecuting:!1,init:function(e,t){return $.isFunction(e)?(this._callback=e,this._interval=t,void this.resume()):void console.debug("[WCF.PeriodicalExecuter] Given callback is invalid, aborting.")},_execute:function(){if(!this._isExecuting)try{this._isExecuting=!0,this._callback(this),this._isExecuting=!1}catch(e){throw this._isExecuting=!1,e}},stop:function(){this._intervalID&&clearInterval(this._intervalID)},resume:function(){this.restart()},restart:function(){this._intervalID&&this.stop(),this._intervalID=setInterval($.proxy(this._execute,this),this._interval)},setInterval:function(e){this._interval=e,this.restart()}}),WCF.LoadingOverlayHandler={show:function(){require(["WoltLabSuite/Core/Ajax/Status"],function(e){e.show()})},hide:function(){require(["WoltLabSuite/Core/Ajax/Status"],function(e){e.hide()})},updateIcon:function(e,t){var i=void 0===t||t?"addClass":"removeClass";e.find(".icon")[i]("fa-spinner"),e.hasClass("icon")&&e[i]("fa-spinner")}},WCF.Action={},WCF.Action.Proxy=Class.extend({_ajaxRequest:null,init:function(e){this._ajaxRequest=null,e=$.extend(!0,{autoSend:!1,data:{},dataType:"json",after:null,init:null,jsonp:"callback",async:!0,failure:null,showLoadingOverlay:!0,success:null,suppressErrors:!1,type:"POST",url:"index.php?ajax-proxy/&t="+SECURITY_TOKEN,aborted:null,autoAbortPrevious:!1},e),"jsonp"===e.dataType?require(["AjaxJsonp"],function(t){t.send(e.url,e.success,e.failure,{parameterName:e.jsonp})}):require(["AjaxRequest"],function(t){this._ajaxRequest=new t({data:e.data,type:e.type,url:e.url,responseType:"json"===e.dataType?"application/json":"",autoAbort:e.autoAbortPrevious,ignoreError:e.suppressErrors,silent:!e.showLoadingOverlay,failure:e.failure,finalize:e.after,success:e.success}),e.autoSend&&this._ajaxRequest.sendRequest()}.bind(this))},sendRequest:function(e){require(["AjaxRequest"],function(){null!==this._ajaxRequest&&this._ajaxRequest.sendRequest(e)}.bind(this))},abortPrevious:function(){require(["AjaxRequest"],function(){null!==this._ajaxRequest&&this._ajaxRequest.abortPrevious()}.bind(this))},setOption:function(e,t){require(["AjaxRequest"],function(){null!==this._ajaxRequest&&this._ajaxRequest.setOption(e,t)}.bind(this))},showLoadingOverlayOnce:function(){},suppressErrors:function(){},_failure:function(){},_success:function(){},_after:function(){}}),WCF.Action.SimpleProxy=Class.extend({init:function(e,t){this.options=$.extend(!0,{action:"",className:"",elements:null,eventName:"click"},e),this.callbacks=$.extend(!0,{after:null,failure:null,init:null,success:null},t),this.options.elements&&(this.proxy=new WCF.Action.Proxy(this.callbacks),this.options.elements.each($.proxy(function(e,t){$(t).bind(this.options.eventName,$.proxy(this._handleEvent,this))},this)))},_handleEvent:function(e){this.proxy.setOption("data",{actionName:this.options.action,className:this.options.className,objectIDs:[$(e.target).data("objectID")]}),this.proxy.sendRequest()}}),WCF.Action.Delete=Class.extend({_buttonSelector:"",_callback:null,_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i?i:".jsDeleteButton",this._callback=null,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(){$(this._containerSelector).each(function(e,t){var i=$(t),n=i.wcfIdentify();if(!WCF.inArray(n,this._containers)){var s=i.find(this._buttonSelector);s.length&&(this._containers.push(n),s.click($.proxy(this._click,this)))}}.bind(this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessageHtml")||t.data("confirmMessage")?WCF.System.Confirmation.show(t.data(t.data("confirmMessageHtml")?"confirmMessageHtml":"confirmMessage"),$.proxy(this._execute,this),{target:t},void 0,t.data("confirmMessageHtml")?!0:!1):(WCF.LoadingOverlayHandler.updateIcon(t),this._sendRequest(t))},_didTriggerEffect:function(){},_execute:function(e,t){"cancel"!==e&&(WCF.LoadingOverlayHandler.updateIcon(t.target),this._sendRequest(t.target))},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"delete",className:this._className,interfaceName:"wcf\\data\\IDeleteAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e){this._callback&&this._callback(e.objectIDs),this.triggerEffect(e.objectIDs)},setCallback:function(e){if("function"!=typeof e)throw new TypeError("[WCF.Action.Delete] Expected a valid callback for '"+this._className+"'.");this._callback=e},triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]),n=i.find(this._buttonSelector);if(WCF.inArray(n.data("objectID"),e)){var s=this;i.wcfBlindOut("up",function(){var e=$(this).remove();s._containers.splice(s._containers.indexOf(e.wcfIdentify()),1),s._didTriggerEffect(e),n.data("eventName")&&WCF.System.Event.fireEvent("com.woltlab.wcf.action.delete",n.data("eventName"),{button:n,container:e})})}}}}),WCF.Action.NestedDelete=WCF.Action.Delete.extend({triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]);if(WCF.inArray(i.find(this._buttonSelector).data("objectID"),e))if(i.has("ol").has("li").length)i.is(":only-child")?i.parent().replaceWith(i.find("> ol")):i.replaceWith(i.find("> ol > li")),this._containers.splice(this._containers.indexOf(i.wcfIdentify()),1),this._didTriggerEffect(i);else{var n=this;i.wcfBlindOut("up",function(){$(this).remove(),n._containers.splice(n._containers.indexOf($(this).wcfIdentify()),1),n._didTriggerEffect($(this))})}}}}),WCF.Action.Toggle=Class.extend({_buttonSelector:".jsToggleButton",_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i?i:".jsToggleButton",this._containers=[];var n={success:$.proxy(this._success,this)};this.proxy=new WCF.Action.Proxy(n),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Toggle"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each($.proxy(function(e,t){var i=$(t),n=i.wcfIdentify();WCF.inArray(n,this._containers)||(this._containers.push(n),i.find(this._buttonSelector).click($.proxy(this._click,this)))},this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessageHtml")||t.data("confirmMessage")?WCF.System.Confirmation.show(t.data(t.data("confirmMessageHtml")?"confirmMessageHtml":"confirmMessage"),$.proxy(this._execute,this),{target:t},void 0,t.data("confirmMessageHtml")?!0:!1):(WCF.LoadingOverlayHandler.updateIcon(t),this._sendRequest(t))},_execute:function(e,t){"cancel"!==e&&(WCF.LoadingOverlayHandler.updateIcon(t.target),this._sendRequest(t.target))},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"toggle",className:this._className,interfaceName:"wcf\\data\\IToggleAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e){this.triggerEffect(e.objectIDs)},triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]),n=i.find(this._buttonSelector);WCF.inArray(n.data("objectID"),e)&&(i.wcfHighlight(),this._toggleButton(i,n))}},_toggleButton:function(e,t){var i="";WCF.LoadingOverlayHandler.updateIcon(t,!1),t.hasClass("fa-square-o")?(t.removeClass("fa-square-o").addClass("fa-check-square-o"),i=t.data("disableTitle")?t.data("disableTitle"):WCF.Language.get("wcf.global.button.disable"),t.attr("title",i)):(t.removeClass("fa-check-square-o").addClass("fa-square-o"),i=t.data("enableTitle")?t.data("enableTitle"):WCF.Language.get("wcf.global.button.enable"),t.attr("title",i)),e.toggleClass("disabled")}}),WCF.Action.Scroll=Class.extend({_callback:null,_reference:null,_target:null,_threshold:0,init:function(e,t,i,n){return this._threshold=parseInt(e),0===this._threshold?void console.debug("[WCF.Action.Scroll] Given threshold is invalid, aborting."):($.isFunction(t)&&(this._callback=t),null===this._callback?void console.debug("[WCF.Action.Scroll] Given callback is invalid, aborting."):(this._reference=$(i?i:window),this._target=$(n?n:document),this.start(),void this._scroll()))},_scroll:function(){var e=this._target.height(),t=this._reference.scrollTop(),i=this._reference.height();e-(i+t)<this._threshold&&this._callback(this)},start:function(){this._reference.on("scroll",$.proxy(this._scroll,this))},stop:function(){this._reference.off("scroll")}}),WCF.Date={},WCF.Date.Picker={init:function(){}},WCF.Date.Util={gmdate:function(e){var t=e?e:new Date;return Math.round(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDay(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())/1e3)},getTimezoneDate:function(e,t){var i=new Date(e),n=6e4*i.getTimezoneOffset();return new Date(e+n+t)}},WCF.Dictionary=Class.extend({_variables:{},init:function(){this._variables={}},add:function(e,t){this._variables[e]=t},addObject:function(e){for(var t in e)this.add(t,e[t])},addDictionary:function(e){e.each($.proxy(function(e){this.add(e.key,e.value)},this))},get:function(e){return this.isset(e)?this._variables[e]:null},isset:function(e){return this._variables.hasOwnProperty(e)},remove:function(e){delete this._variables[e]},each:function(e){if($.isFunction(e))for(var t in this._variables){var i=this._variables[t],n={key:t,value:i};e(n)}},count:function(){return $.getLength(this._variables)},isEmpty:function(){return!this.count()}}),null==window.WCF.Language&&(WCF.Language={add:function(e,t){require(["Language"],function(i){i.add(e,t)})},addObject:function(e){require(["Language"],function(t){t.addObject(e)})},get:function(e){throw new Error('Call to deprecated WCF.Language.get("'+e+'")')}}),WCF.MultipleLanguageInput=Class.extend({_availableLanguages:{},_button:null,_didInit:!1,_element:null,_insertedDataAfterInit:!1,_isEnabled:!1,_forceSelection:!1,_languageID:0,_list:null,_values:null,init:function(e,t,i,n){if(this._button=null,this._element=$("#"+$.wcfEscapeID(e)),this._forceSelection=t,this._values=i,this._availableLanguages=n,$.getLength(this._values))for(var s in this._values)this._values[s]=WCF.String.unescapeHTML(this._values[s]);if(this._languageID=LANGUAGE_ID,0==this._element.length)return void console.debug("[WCF.MultipleLanguageInput] element id '"+e+"' is unknown");var a=$.getLength(this._values)>0?!0:!1;this._insertedDataAfterInit=a,this._prepareElement(a),this._element.parents("form").submit($.proxy(this._submit,this)),this._didInit=!0},_prepareElement:function(e){this._element.wrap('<div class="dropdown preInput" />');var t=this._element.parent();this._button=$('<p class="button dropdownToggle"><span>'+WCF.Language.get("wcf.global.button.disabledI18n")+"</span></p>").prependTo(t),this._list=$('<ul class="dropdownMenu"></ul>').insertAfter(this._button),this._button.addClass(this._button.nextAll("textarea").length?"dropdownCaptionTextarea":"dropdownCaption");for(var i in this._availableLanguages)$("<li><span>"+this._availableLanguages[i]+"</span></li>").data("languageID",i).click($.proxy(this._changeLanguage,this)).appendTo(this._list);this._forceSelection||($('<li class="dropdownDivider" />').appendTo(this._list),$("<li><span>"+WCF.Language.get("wcf.global.button.disabledI18n")+"</span></li>").click($.proxy(this._disable,this)).appendTo(this._list)),WCF.Dropdown.initDropdown(this._button,e),(e||this._forceSelection)&&(this._isEnabled=!0,this._list.children("li").each($.proxy(function(e,t){var i=$(t);i.data("languageID")==this._languageID&&i.trigger("click")},this))),WCF.Dropdown.registerCallback(t.wcfIdentify(),$.proxy(this._handleAction,this))},_handleAction:function(e,t){"open"===t?this._enable():this._closeSelection()},_enable:function(){if(!this._isEnabled){var e=this._button.is("p")?this._button.children("span:eq(0)"):this._button;e.addClass("active"),this._isEnabled=!0}this._list.is(":visible")&&this._showSelection()},_showSelection:function(){this._isEnabled&&this._list.children("li").each($.proxy(function(e,t){var i=$(t),n=i.data("languageID");n&&(this._values[n]&&""!=this._values[n]?i.removeClass("missingValue"):i.addClass("missingValue"))},this))},_closeSelection:function(){this._disable()},_changeLanguage:function(e){var t=$(e.currentTarget);this._insertedDataAfterInit=!0,this._didInit&&(this._values[this._languageID]=this._element.val()),this._languageID=t.data("languageID"),this._element.val(this._values[this._languageID]?this._values[this._languageID]:""),this._list.children("li").removeClass("active"),t.addClass("active"),this._button.children("span").addClass("active").text(this._availableLanguages[this._languageID]),this._didInit&&this._element.blur().focus()},_disable:function(e){void 0===e&&this._insertedDataAfterInit&&(e=null),!this._forceSelection&&this._list&&null!==e&&(this._button.children("span").removeClass("active").text(WCF.Language.get("wcf.global.button.disabledI18n")),this._values[LANGUAGE_ID]?this._element.val(this._values[LANGUAGE_ID]):this._element.val(),e&&(this._list.children("li").removeClass("active"),$(e.currentTarget).addClass("active")),this._element.blur().focus(),this._insertedDataAfterInit=!1,this._isEnabled=!1,this._values={})},_submit:function(){if(!this._isEnabled)return 3735928559;this._languageID&&(this._values[this._languageID]=this._element.val());var e=$(this._element.parents("form")[0]),t=this._element.wcfIdentify();for(var i in this._availableLanguages)void 0===this._values[i]&&(this._values[i]=""),$('<input type="hidden" name="'+t+"_i18n["+i+']" value="'+WCF.String.escapeHTML(this._values[i])+'" />').appendTo(e);this._element.removeAttr("name")}}),WCF.Number={round:function(e,t){return t=Math.pow(10,t||0),Math.round(e*t)/t}},WCF.String={addThousandsSeparator:function(e){return String(e).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g,"$1"+WCF.Language.get("wcf.global.thousandsSeparator"))},escapeHTML:function(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},escapeRegExp:function(e){return String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(e,t){e=String(WCF.Number.round(e,t||2));var i=e.split(".");return e=this.addThousandsSeparator(i[0]),i.length>1&&(e+=WCF.Language.get("wcf.global.decimalPoint")+i[1]),e=e.replace("-","−")},lcfirst:function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},ucfirst:function(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)},unescapeHTML:function(e){return String(e).replace(/&/g,"&").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")}},WCF.TabMenu={init:function(){require(["WoltLabSuite/Core/Ui/TabMenu"],function(e){e.setup()})},reload:function(){this.init()}},WCF.Template=Class.extend({init:function(e){var t=new WCF.Dictionary,i=0;e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n"),e=e.replace(/\{literal\}(.*?)\{\/literal\}/g,$.proxy(function(e){var i="@@@@@@@@@@@"+Math.random()+"@@@@@@@@@@@";return t.add(i,e.replace(/\{\/?literal\}/g,"")),i},this)),e=e.replace(/\{\*.*?\*\}/g,"");var n=function(e){for(var t=e.split(""),i={},n=!0,s="",a="",o=!1,r=!1,l=!1,c=0,u=t.length;u>c;c++){var h=t[c];n&&"="!=h&&" "!=h?s+=h:n&&"="==h?(n=!1,r=!1,o=!1,l=!1):n||r||o||" "!=h?n||!r||l||"'"!=h?n||r||o||"'"!=h?n||!o||l||'"'!=h?n||r||o||'"'!=h?n||!o&&!r||l||"\\"!=h?n||(l=!1,a+=h):(l=!0,a+=h):(o=!0,a+=h):(o=!1,a+=h):(r=!0,a+=h):(r=!1,a+=h):(n=!0,i[s]=a,a=s="")}if(i[s]=a,o||r||l)throw new Error('Syntax error in parameterList: "'+e+'"');return i},s=function(e){return e.replace(/\\n/g,"\n").replace(/\\\\/g,"\\").replace(/\\'/g,"'")};e=e.replace(/\{(\$[^\}]+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"' + WCF.String.escapeHTML("+t+") + '"}).replace(/\{#(\$[^\}]+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"' + WCF.String.formatNumeric("+t+") + '"}).replace(/\{@(\$[^\}]+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"' + "+t+" + '"}).replace(/\{lang\}(.+?)\{\/lang\}/g,function(e,t){return"' + WCF.Language.get('"+t+"', v) + '"}).replace(/\{include (.+?)\}/g,function(e,t){t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var i=n(t);if("undefined"==typeof i.file)throw new Error("Missing file attribute in include-tag");return i.file=i.file.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"' + "+i.file+".fetch(v) + '"}).replace(/\{if (.+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"';\nif ("+t+") {\n $output += '"}).replace(/\{else ?if (.+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"';\n}\nelse if ("+t+") {\n $output += '"}).replace(/\{implode (.+?)\}/g,function(e,t){i++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var s=n(t);if("undefined"==typeof s.from)throw new Error("Missing from attribute in implode-tag");if("undefined"==typeof s.item)throw new Error("Missing item attribute in implode-tag");return"undefined"==typeof s.glue&&(s.glue="', '"),s.from=s.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\nvar $implode_"+i+" = false;\nfor ($implodeKey_"+i+" in "+s.from+") {\n v["+s.item+"] = "+s.from+"[$implodeKey_"+i+"];\n"+("undefined"!=typeof s.key?" v["+s.key+"] = $implodeKey_"+i+";\n":"")+" if ($implode_"+i+") $output += "+s.glue+";\n $implode_"+i+" = true;\n $output += '"}).replace(/\{foreach (.+?)\}/g,function(e,t){i++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var s=n(t);if("undefined"==typeof s.from)throw new Error("Missing from attribute in foreach-tag");if("undefined"==typeof s.item)throw new Error("Missing item attribute in foreach-tag");return s.from=s.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\n$foreach_"+i+" = false;\nfor ($foreachKey_"+i+" in "+s.from+") {\n $foreach_"+i+" = true;\n break;\n}\nif ($foreach_"+i+") {\n for ($foreachKey_"+i+" in "+s.from+") {\n v["+s.item+"] = "+s.from+"[$foreachKey_"+i+"];\n"+("undefined"!=typeof s.key?" v["+s.key+"] = $foreachKey_"+i+";\n":"")+" $output += '"}).replace(/\{foreachelse\}/g,"';\n }\n}\nelse {\n {\n $output += '").replace(/\{\/foreach\}/g,"';\n }\n}\n$output += '").replace(/\{else\}/g,"';\n}\nelse {\n $output += '").replace(/\{\/(if|implode)\}/g,"';\n}\n$output += '");for(var a in WCF.Template.callbacks)e=WCF.Template.callbacks[a](e);e=e.replace("{ldelim}","{").replace("{rdelim}","}"),t.each(function(t){e=e.replace(t.key,t.value)}),e="$output += '"+e+"';";try{this.fetch=new Function("v","v = window.$.extend({}, v, { __wcf: window.WCF, __window: window }); var $output = ''; "+e+" return $output;")}catch(t){throw console.debug("var $output = ''; "+e+" return $output;"),t}},fetch:function(){}}),WCF.Template.callbacks=[],WCF.ToggleOptions=Class.extend({_element:null,_showItems:[],_hideItems:[],_callback:null,init:function(e,t,i,n){this._element=$("#"+e),this._showItems=t,this._hideItems=i,void 0!==n&&(this._callback=n),this._element.click($.proxy(this._toggle,this)),this._toggle()},_toggle:function(){if(this._element.prop("checked")){for(var e=0,t=this._showItems.length;t>e;e++){var i=this._showItems[e];$("#"+i).show()}for(var e=0,t=this._hideItems.length;t>e;e++){var i=this._hideItems[e];$("#"+i).hide()}null!==this._callback&&this._callback()}}}),WCF.Collapsible={},WCF.Collapsible.Simple={init:function(){$(".jsCollapsible").each($.proxy(function(e,t){this._initButton(t)},this))},_initButton:function(e){var t=$(e),i=t.data("isOpen");i||$("#"+t.data("collapsibleContainer")).hide(),t.click($.proxy(this._toggle,this))},_toggle:function(e){var t=$(e.currentTarget),i=t.data("isOpen"),n=$("#"+$.wcfEscapeID(t.data("collapsibleContainer")));return i?(n.stop().wcfBlindOut("vertical",$.proxy(function(){this._toggleImage(t)},this)),i=!1):(n.stop().wcfBlindIn("vertical",$.proxy(function(){this._toggleImage(t)},this)),i=!0),t.data("isOpen",i),e.stopPropagation(),!1},_toggleImage:function(e){var t=e.find("span.icon");e.data("isOpen")?t.removeClass("fa-chevron-right").addClass("fa-chevron-down"):t.removeClass("fa-chevron-down").addClass("fa-chevron-right")}},WCF.Collapsible.Remote=Class.extend({_className:"",_containers:{},_containerData:{},
-_proxy:null,init:function(e){this._className=e,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Collapsible.Remote",$.proxy(this._init,this))},_init:function(){this._getContainers().each($.proxy(function(e,t){var i=$(t),n=i.wcfIdentify();void 0===this._containers[n]&&(this._containers[n]=i,this._initContainer(n))},this))},_initContainer:function(e){var t=this._getTarget(e),i=this._getButtonContainer(e),n=this._createButton(e,i);this._containerData[e]={button:n,buttonContainer:i,isOpen:this._containers[e].data("isOpen"),target:t},this._containers[e].data("isOpen")||$("#"+e).addClass("jsCollapsed")},_getContainers:function(){},_getTarget:function(){},_getButtonContainer:function(){},_createButton:function(e,t){var i=(this._containers[e].data("isOpen"),$('<span class="collapsibleButton jsTooltip pointer icon icon16 fa-chevron-down" title="'+WCF.Language.get("wcf.global.button.collapsible")+'">').prependTo(t));return i.data("containerID",e).click($.proxy(this._toggleContainer,this)),i},_toggleContainer:function(e){var t=$(e.currentTarget),i=t.data("containerID"),n=this._containerData[i].isOpen,s=n?"open":"close",a=n?"close":"open";this._proxy.setOption("data",{actionName:"loadContainer",className:this._className,interfaceName:"wcf\\data\\ILoadableContainerAction",objectIDs:[this._getObjectID(i)],parameters:$.extend(!0,{containerID:i,currentState:s,newState:a},this._getAdditionalParameters(i))}),this._proxy.sendRequest(),$("#"+i).toggleClass("jsCollapsed")},_exchangeIcon:function(e,t){t=t||"spinner",e.removeClass("fa-chevron-down fa-chevron-right fa-spinner").addClass("fa-"+t)},_getObjectID:function(e){return $("#"+e).data("objectID")},_getAdditionalParameters:function(){return{}},_updateContent:function(e,t){this._containerData[e].target.html(t)},_success:function(e){if(e.returnValues.containerID){var t=e.returnValues.containerID;if(this._containers[t]){this._containerData[t].isOpen=e.returnValues.isOpen?!0:!1;var i=e.returnValues.isOpen?"open":"close";this._updateContent(t,$.trim(e.returnValues.content),i)}}}}),WCF.Collapsible.SimpleRemote=WCF.Collapsible.Remote.extend({init:function(e){this._super(e),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1})},_initContainer:function(e){this._super(e),this._containerData[e].isOpen||(this._containerData[e].target.hide(),this._exchangeIcon(this._containerData[e].button,"chevron-right"))},_toggleContainer:function(e){var t=$(e.currentTarget),i=t.data("containerID"),n=this._containerData[i].isOpen,s=n?"open":"close",a=n?"close":"open";this._proxy.setOption("data",{actionName:"toggleContainer",className:this._className,interfaceName:"wcf\\data\\IToggleContainerAction",objectIDs:[this._getObjectID(i)],parameters:$.extend(!0,{containerID:i,currentState:s,newState:a},this._getAdditionalParameters(i))}),this._proxy.sendRequest(),this._exchangeIcon(this._containerData[i].button,"open"===a?"chevron-down":"chevron-right"),"open"===a?this._containerData[i].target.show():this._containerData[i].target.hide(),$("#"+i).toggleClass("jsCollapsed"),this._containerData[i].isOpen="open"===a?!0:!1}}),WCF.User={userID:0,username:"",init:function(e,t){this.userID=e,this.username=t}},WCF.Effect={},WCF.Effect.Scroll=Class.extend({scrollTo:function(e,t,i){if(!e.length)return!0;var n=e.getOffsets("offset").top,s=$(document).height(),a=$(window).height();return n>s-a&&(n=s-a,0>n&&(n=0)),i===!0?$("html,body").scrollTop(n):$("html,body").animate({scrollTop:n},400,function(e,t,i,n,s){return-n*((t=t/s-1)*t*t*t-1)+i}),!1}}),WCF.CloseOverlayHandler={addCallback:function(e,t){require(["Ui/CloseOverlay"],function(i){i.add(e,t)})},removeCallback:function(e){require(["Ui/CloseOverlay"],function(t){t.remove(e)})},forceExecution:function(){require(["Ui/CloseOverlay"],function(e){e.execute()})}},WCF.DOMNodeInsertedHandler={addCallback:function(e,t){require(["WoltLabSuite/Core/Dom/Change/Listener"],function(e){e.add("__legacy__",t)})},_executeCallbacks:function(){require(["WoltLabSuite/Core/Dom/Change/Listener"],function(e){e.trigger()})},execute:function(){this._executeCallbacks()}},WCF.DOMNodeRemovedHandler={_callbacks:new WCF.Dictionary,_isExecuting:!1,_isListening:!1,addCallback:function(e,t){return this._bindListener(),this._callbacks.isset(e)?(console.debug("[WCF.DOMNodeRemovedHandler] identifier '"+e+"' is already bound to a callback"),!1):void this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){if(!this._isListening){if(window.MutationObserver){var e=new MutationObserver(function(e){var t=!1;e.forEach(function(e){e.removedNodes.length&&(t=!0)}.bind(this)),t&&this._executeCallbacks({})}.bind(this));e.observe(document.body,{childList:!0,subtree:!0})}else $(document).bind("DOMNodeRemoved",$.proxy(this._executeCallbacks,this));this._isListening=!0}},_executeCallbacks:function(e){this._isExecuting||(this._isExecuting=!0,this._callbacks.each(function(t){t.value(e)}),this._isExecuting=!1)}},WCF.Option={},WCF.Option.Handler=Class.extend({init:function(){this._initOptions(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Option.Handler",$.proxy(this._initOptions,this))},_initOptions:function(){$(".jsEnablesOptions").each($.proxy(this._initOption,this))},_initOption:function(e,t){this._change(t),$(t).change($.proxy(this._handleChange,this))},_handleChange:function(e){this._change($(e.target))},_change:function(option){option=$(option);var disableOptions=eval(option.data("disableOptions")),enableOptions=eval(option.data("enableOptions"));switch(option.getTagName()){case"input":switch(option.attr("type")){case"checkbox":this._execute(option.prop("checked"),disableOptions,enableOptions);break;case"radio":if(option.prop("checked")){var isActive=!0;option.data("isBoolean")&&1!=option.val()&&(isActive=!1),this._execute(isActive,disableOptions,enableOptions)}}break;case"select":var $value=option.val(),relevantDisableOptions=[],relevantEnableOptions=[];if(disableOptions.length>0)for(var $index in disableOptions){var $item=disableOptions[$index];$item.value==$value?relevantDisableOptions.push($item.option):relevantEnableOptions.push($item.option)}if(enableOptions.length>0)for(var $index in enableOptions){var $item=enableOptions[$index];$item.value==$value?relevantEnableOptions.push($item.option):relevantDisableOptions.push($item.option)}this._execute(!0,relevantDisableOptions,relevantEnableOptions)}},_execute:function(e,t,i){if(t.length>0)for(var n=0,s=t.length;s>n;n++){var a=t[n];if($.wcfIsset(a))this._enableOption(a,!e);else{var o=$("."+a+"Input");o.length&&this._enableOptions(o.children("dd").find("input, select, textarea"),!e)}}if(i.length>0)for(var n=0,s=i.length;s>n;n++){var a=i[n];if($.wcfIsset(a))this._enableOption(a,e);else{var o=$("."+a+"Input");o.length&&this._enableOptions(o.children("dd").find("input, select, textarea"),e)}}},_enableOption:function(e,t){this._enableOptionElement($("#"+$.wcfEscapeID(e)),t)},_enableOptionElement:function(e,t){e=$(e);var i=e.getTagName();if("select"==i||"input"==i&&("checkbox"==e.attr("type")||"file"==e.attr("type")||"radio"==e.attr("type"))){if(t?e.enable():e.disable(),e.parents(".optionTypeBoolean:eq(0)")){var n=$("#"+e.wcfIdentify()+"_no");t?n.enable():n.disable()}}else t?e.removeAttr("readonly"):e.attr("readonly",!0);t?e.closest("dl").removeClass("disabled"):e.closest("dl").addClass("disabled")},_enableOptions:function(e,t){for(var i=0,n=e.length;n>i;i++)this._enableOptionElement(e[i],t)}}),WCF.PageVisibilityHandler={_callbacks:new WCF.Dictionary,_isListening:!1,_hiddenFieldName:"",addCallback:function(e,t){return this._bindListener(),this._callbacks.isset(e)?(console.debug("[WCF.PageVisibilityHandler] identifier '"+e+"' is already bound to a callback"),!1):void this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){if(!this._isListening){var e=null;"undefined"!=typeof document.hidden?(this._hiddenFieldName="hidden",e="visibilitychange"):"undefined"!=typeof document.mozHidden?(this._hiddenFieldName="mozHidden",e="mozvisibilitychange"):"undefined"!=typeof document.msHidden?(this._hiddenFieldName="msHidden",e="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(this._hiddenFieldName="webkitHidden",e="webkitvisibilitychange"),null===e?console.debug("[WCF.PageVisibilityHandler] This browser does not support the page visibility API."):$(document).on(e,$.proxy(this._executeCallbacks,this)),this._isListening=!0}},_executeCallbacks:function(){if(!this._isExecuting){this._isExecuting=!0;var e=document[this._hiddenFieldName];this._callbacks.each(function(t){t.value(e)}),this._isExecuting=!1}}},WCF.Table={},WCF.Table.EmptyTableHandler=Class.extend({_options:{},_rowClassName:"",init:function(e,t,i){this._rowClassName=t,this._tableContainer=e,this._options=$.extend(!0,{emptyMessage:null,messageType:"info",refreshPage:!1,updatePageNumber:!1},i||{}),WCF.DOMNodeRemovedHandler.addCallback("WCF.Table.EmptyTableHandler."+t,$.proxy(this._remove,this))},_getRowCount:function(){return this._tableContainer.find("table tr."+this._rowClassName).length},_handleEmptyTable:function(){if(this._options.emptyMessage)this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).text(this._options.emptyMessage));else if(this._options.refreshPage)if(this._options.updatePageNumber){var e=window.location.href.match(/(\?|&)pageNo=(\d+)/g);if(e){var t=e[e.length-1].match(/\d+/g);this._options.updatePageNumber>0?t++:t--,window.location=window.location.href.replace(e[e.length-1],e[e.length-1][0]+"pageNo="+t)}}else window.location.reload();else this._tableContainer.remove()},_remove:function(e){if($.getLength(e)){var t=$(e.target);if(t.hasClass(this._rowClassName)){var i=t.parents("tbody:eq(0)");1==i.children("tr").length&&this._handleEmptyTable()}}else this._getRowCount()||this._handleEmptyTable()}}),WCF.Search={},WCF.Search.Base=Class.extend({_callback:null,_caretAt:-1,_className:"",_commaSeperated:!1,_delay:0,_excludedSearchValues:[],_itemCount:0,_itemIndex:-1,_list:null,_oldSearchString:[],_proxy:null,_searchInput:null,_triggerLength:3,_timer:null,init:function(e,t,i,n,s){return null===t||void 0===t||$.isFunction(t)?(this._callback=t?t:null,this._caretAt=-1,this._delay=0,this._excludedSearchValues=[],i&&(this._excludedSearchValues=i),this._searchInput=$(e),this._searchInput.length?(this._searchInput.keydown($.proxy(this._keyDown,this)).keyup($.proxy(this._keyUp,this)).wrap('<span class="dropdown" />'),$.browser.mozilla&&$.browser.touch&&this._searchInput.on("input",$.proxy(this._keyUp,this)),this._list=$('<ul class="dropdownMenu" />').insertAfter(this._searchInput),this._commaSeperated=n?!0:!1,this._oldSearchString=[],this._itemCount=0,this._itemIndex=-1,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:s!==!0?!1:!0,success:$.proxy(this._success,this),autoAbortPrevious:!0}),this._searchInput.is("input")&&this._searchInput.attr("autocomplete","off"),this._searchInput.blur($.proxy(this._blur,this)),void WCF.Dropdown.initDropdownFragment(this._searchInput.parent(),this._list)):void console.debug("[WCF.Search.Base] Selector '"+e+"' for search input is invalid, aborting.")):void console.debug("[WCF.Search.Base] The given callback is invalid, aborting.")},_blur:function(){var e=this;new WCF.PeriodicalExecuter(function(t){e._list.is(":visible")&&e._clearList(!1),t.stop()},250)},_keyDown:function(e){if(e.which===$.ui.keyCode.ENTER){var t=this._searchInput.parents(".dropdown");t.data("disableAutoFocus")?-1!==this._itemIndex&&e.preventDefault():(t.data("preventSubmit")||-1!==this._itemIndex)&&e.preventDefault()}},_keyUp:function(e){switch(e.which){case 37:case 39:return;case 38:return void this._selectPreviousItem();case 40:return void this._selectNextItem();case 13:return this._selectElement(e)}var t=this._getSearchString(e);if(""===t)this._clearList(!1);else if(t.length>=this._triggerLength){var i={data:{excludedSearchValues:this._excludedSearchValues,searchString:t}};if(this._delay){null!==this._timer&&this._timer.stop();var n=this;this._timer=new WCF.PeriodicalExecuter(function(){n._queryServer(i),n._timer.stop(),n._timer=null},this._delay)}else this._queryServer(i)}else this._clearList(!1)},_queryServer:function(e){this._searchInput.parents(".searchBar").addClass("loading"),this._proxy.setOption("data",{actionName:"getSearchResultList",className:this._className,interfaceName:"wcf\\data\\ISearchAction",parameters:this._getParameters(e)}),this._proxy.sendRequest()},setDelay:function(e){this._delay=e},_selectNextItem:function(){0!==this._itemCount&&(this._itemIndex++,this._itemIndex===this._itemCount&&(this._itemIndex=0),this._highlightSelectedElement())},_selectPreviousItem:function(){0!==this._itemCount&&(this._itemIndex--,-1===this._itemIndex&&(this._itemIndex=this._itemCount-1),this._highlightSelectedElement())},_highlightSelectedElement:function(){this._list.find("li").removeClass("dropdownNavigationItem"),this._list.find("li:eq("+this._itemIndex+")").addClass("dropdownNavigationItem")},_selectElement:function(){return 0===this._itemCount?!0:(this._list.find("li.dropdownNavigationItem").trigger("click"),!1)},_getSearchString:function(e){var t=$.trim(this._searchInput.val());if(this._commaSeperated){var i=e.keyCode||e.which;if(i==$.ui.keyCode.COMMA)return"";for(var n=t.split(","),s=n.length,a=0;s>a;a++)n[a]=$.trim(n[a]);for(var a=0;s>a;a++){var o=n[a];if(!this._oldSearchString[a]){t=o;break}if(o!=this._oldSearchString[a]){t=o,this._caretAt=a;break}}this._oldSearchString=n}return t},_getParameters:function(e){return e},_success:function(e){if(this._clearList(!1),this._searchInput.parents(".searchBar").removeClass("loading"),$.getLength(e.returnValues))for(var t in e.returnValues){var i=e.returnValues[t];this._createListItem(i)}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy(function(){this._clearList()},this));var n=this._searchInput.parents(".dropdown").wcfIdentify();WCF.Dropdown.getDropdownMenu(n).hasClass("dropdownOpen")||WCF.Dropdown.toggleDropdown(n),this._itemIndex=-1,WCF.Dropdown.getDropdown(n).data("disableAutoFocus")||this._selectNextItem()},_handleEmptyResult:function(){return!1},_createListItem:function(e){var t=$("<li><span>"+WCF.String.escapeHTML(e.label)+"</span></li>").appendTo(this._list);return t.data("objectID",e.objectID).data("label",e.label).click($.proxy(this._executeCallback,this)),this._itemCount++,t},_executeCallback:function(e){var t=!1,i=$(e.currentTarget);if(this._commaSeperated){var n=i.data("label");this._oldSearchString[this._caretAt]=n,this._searchInput.val(this._oldSearchString.join(", ")),$.browser.webkit&&this._searchInput.css({display:"block"});var s=this._searchInput.val().toLowerCase().indexOf(n.toLowerCase())+n.length;this._searchInput.focus().setCaret(s)}else null===this._callback?this._searchInput.val(i.data("label")):t=this._callback(i.data())===!0?!0:!1;this._clearList(t)},_clearList:function(e){e&&!this._commaSeperated&&this._searchInput.val(""),WCF.Dropdown.getDropdown(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),this._list.end().empty(),WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base"),this._itemCount=0,this._itemIndex=-1},addExcludedSearchValue:function(e){WCF.inArray(e,this._excludedSearchValues)||this._excludedSearchValues.push(e)},removeExcludedSearchValue:function(e){var t=$.inArray(e,this._excludedSearchValues);-1!=t&&this._excludedSearchValues.splice(t,1)}}),WCF.Search.User=WCF.Search.Base.extend({_className:"wcf\\data\\user\\UserAction",_includeUserGroups:!1,init:function(e,t,i,n,s){this._includeUserGroups=i,this._super(e,t,n,s)},_getParameters:function(e){return e.data.includeUserGroups=this._includeUserGroups?1:0,e},_createListItem:function(e){var t=this._super(e),i=null;if(e.icon?i=$(e.icon):this._includeUserGroups&&"group"===e.type&&(i=$('<span class="icon icon16 fa-users" />')),i){var n=t.find("span").detach(),s=$("<div />").addClass("box16").appendTo(t);s.append(i),s.append($("<div />").append(n))}return t.data("type",e.type),t}}),WCF.System={},WCF.System.Dependency={},WCF.System.Dependency.Manager={_callbacks:{},_loaded:[],_setupCallbacks:{},register:function(e,t){return $.isFunction(t)?void(WCF.inArray(e,this._loaded)?setTimeout(function(){t()},1):(this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t))):void console.debug("[WCF.System.Dependency.Manager] Callback for identifier '"+e+"' is invalid, aborting.")},setup:function(e,t){return $.isFunction(t)?(this._setupCallbacks[e]||(this._setupCallbacks[e]=[]),void this._setupCallbacks[e].push(t)):void console.debug("[WCF.System.Dependency.Manager] Setup callback for identifier '"+e+"' is invalid, aborting.")},invoke:function(e){if(this._setupCallbacks[e]){for(var t=0,i=this._setupCallbacks[e].length;i>t;t++)this._setupCallbacks[e][t]();delete this._setupCallbacks[e]}if(this._loaded.push(e),this._callbacks[e]){for(var t=0,i=this._callbacks[e].length;i>t;t++)this._callbacks[e][t]();delete this._callbacks[e]}},reset:function(e){var t=this._loaded.indexOf(e);-1!==t&&this._loaded.splice(t,1)}},WCF.System.FlexibleMenu={init:function(){},registerMenu:function(e){require(["WoltLabSuite/Core/Ui/FlexibleMenu"],function(t){t.register(e)})},rebuild:function(e){require(["WoltLabSuite/Core/Ui/FlexibleMenu"],function(t){t.rebuild(e)})}},WCF.System.Mobile={},WCF.System.ObjectStore={_objects:{},add:function(e,t){void 0===this._objects[e]&&(this._objects[e]=[]),this._objects[e].push(t)},invoke:function(e,t){if(this._objects[e])for(var i=0;i<this._objects[e].length;i++)t(this._objects[e][i])}},WCF.System.Captcha={addCallback:function(e,t){require(["WoltLabSuite/Core/Controller/Captcha"],function(i){try{i.add(e,t)}catch(e){if(e instanceof TypeError)return void console.debug("[WCF.System.Captcha] Given callback is no function")}})},getData:function(e){var t,i=require("WoltLabSuite/Core/Controller/Captcha");try{t=i.getData(e)}catch(t){console.debug('[WCF.System.Captcha] Unknow captcha id "'+e+'"')}return t},removeCallback:function(e){require(["WoltLabSuite/Core/Controller/Captcha"],function(t){try{t.delete(e)}catch(e){}})}},WCF.System.Page={},WCF.System.Notification=Class.extend({_cssClassNames:"",_message:"",init:function(e,t){this._cssClassNames=t||"",this._message=e||""},show:function(e,t,i,n){require(["Ui/Notification"],function(t){t.show(i||this._message,e,n||this._cssClassNames)}.bind(this))}}),WCF.System.Confirmation={show:function(e,t,i,n,s){if("object"==typeof n){var a=$("<div />");a.append(n),n=a.html()}require(["Ui/Confirmation"],function(a){a.show({legacyCallback:t,message:e,parameters:i,template:n||"",messageIsHtml:s===!0})})}},WCF.System.DisableScrolling={_depth:0,_oldOverflow:null,disable:function(){$.browser.touch||(0===this._depth&&(this._oldOverflow=$(document.body).css("overflow"),$(document.body).css("overflow","hidden")),this._depth++)},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$(document.body).css("overflow",this._oldOverflow))}},WCF.System.DisableZoom={_depth:0,_oldViewportSettings:null,disable:function(){if(0===this._depth){var e=$("meta[name=viewport]");this._oldViewportSettings=e.attr("content"),e.attr("content",this._oldViewportSettings+",maximum-scale=1")}this._depth++},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$("meta[name=viewport]").attr("content",this._oldViewportSettings))}},WCF.System.Fullscreen={enterFullscreen:function(e){e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)},toggleFullscreen:function(e){null===this.getFullscreenElement()?this.enterFullscreen(e):this.exitFullscreen()},getFullscreenElement:function(){return document.fullscreenElement?document.fullscreenElement:document.mozFullScreenElement?document.mozFullScreenElement:document.webkitFullscreenElement?document.webkitFullscreenElement:document.msFullscreenElement?document.msFullscreenElement:null},exitFullscreen:function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},isSupported:function(){return document.documentElement.requestFullscreen||document.documentElement.msRequestFullscreen||document.documentElement.mozRequestFullScreen||document.documentElement.webkitRequestFullscreen?!0:!1}},WCF.System.PageNavigation={init:function(e,t){require(["WoltLabSuite/Core/Ui/Page/JumpTo"],function(i){for(var n=elBySelAll(e),s=0,a=n.length;a>s;s++)i.init(n[s],t)})}},WCF.System.KeepAlive=Class.extend({init:function(e){new WCF.PeriodicalExecuter(function(e){new WCF.Action.Proxy({autoSend:!0,data:{actionName:"keepAlive",className:"wcf\\data\\session\\SessionAction"},failure:function(){e.stop()},showLoadingOverlay:!1,success:function(e){WCF.System.PushNotification.executeCallbacks(e)},suppressErrors:!0})},1e3*e)}}),WCF.System.PushNotification={_callbacks:{},addCallback:function(e,t){void 0===this._callbacks[e]&&(this._callbacks[e]=[]),this._callbacks[e].push(t)},executeCallbacks:function(e){for(var t in e.returnValues)if(void 0!==this._callbacks[t])for(var i=0;i<this._callbacks[t].length;i++)this._callbacks[t][i](e.returnValues[t])}},WCF.System.Event={addListener:function(e,t,i){return window.__wcf_bc_eventHandler.add(e,t,i)},removeListener:function(e,t,i){return window.__wcf_bc_eventHandler.remove(e,t,i)},removeAllListeners:function(e,t){return window.__wcf_bc_eventHandler.removeAll(e,t)},fireEvent:function(e,t,i){window.__wcf_bc_eventHandler.fire(e,t,i)}},WCF.System.Worker=Class.extend({_aborted:!1,_actionName:"",_callback:null,_className:"",_dialog:null,_proxy:null,_title:"",init:function(e,t,i,n,s){this._aborted=!1,this._actionName=e,this._callback=s||null,this._className=t,this._dialog=null,this._proxy=new WCF.Action.Proxy({autoSend:!0,data:{actionName:this._actionName,className:this._className,parameters:n||{}},showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._title=i},_success:function(e){if(null===this._dialog&&(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.wcfDialog({closeConfirmMessage:WCF.Language.get("wcf.worker.abort.confirmMessage"),closeViaModal:!1,onClose:$.proxy(function(){this._aborted=!0,this._proxy.abortPrevious(),window.location.reload()},this),title:this._title})),!this._aborted)if(e.returnValues.template&&this._dialog.html(e.returnValues.template),this._dialog.find("progress").attr("value",e.returnValues.progress).text(e.returnValues.progress+"%").next("span").text(e.returnValues.progress+"%"),e.returnValues.progress<100){var t=e.returnValues.parameters||{};t.loopCount=e.returnValues.loopCount,this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:t}),this._proxy.sendRequest()}else if(null!==this._callback)this._callback(this,e);else{this._dialog.find(".fa-spinner").removeClass("fa-spinner").addClass("fa-check green"),this._dialog.find(".contentHeader h1").text(WCF.Language.get("wcf.global.worker.completed"));var i=$('<div class="formSubmit" />').appendTo(this._dialog);$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(i).focus().click(function(){e.returnValues.redirectURL?window.location=e.returnValues.redirectURL:window.location.reload()}),this._dialog.wcfDialog("render")}}}),WCF.InlineEditor=Class.extend({_callbacks:[],_dropdowns:{},_elements:{},_notification:null,_options:[],_proxy:null,_triggerElements:{},_updateData:[],init:function(e){var t=$(e);if(t.length){this._setOptions();for(var i="",n=0,s=this._options.length;s>n;n++)if(this._options[n].isQuickOption){i=this._options[n].optionName;break}var a=this;t.each(function(e,t){var n=$(t),s=n.wcfIdentify(),o=a._getTriggerElement(n);null!==o&&1===o.length&&(o.on(WCF_CLICK_EVENT,$.proxy(a._show,a)).data("elementID",s),i&&o.disableSelection().data("optionName",i).dblclick($.proxy(a._click,a)),a._elements[s]=n)}),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),WCF.CloseOverlayHandler.addCallback("WCF.InlineEditor",$.proxy(this._closeAll,this)),this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success"),"success")}},_closeAll:function(){for(var e in this._elements)this._hide(e)},_setOptions:function(){this._options=[]},registerCallback:function(e){$.isFunction(e)&&this._callbacks.push(e)},_getTriggerElement:function(){return null},_show:function(e){e.preventDefault();var t=$(e.currentTarget).data("elementID"),i=null;if(!this._dropdowns[t]){this._triggerElements[t]=i=this._getTriggerElement(this._elements[t]).addClass("dropdownToggle");var n=i[0].parentNode;n&&"LI"===n.nodeName&&1===n.childElementCount?n.classList.add("dropdown"):i.wrap('<span class="dropdown" />'),this._dropdowns[t]=$('<ul class="dropdownMenu" />').insertAfter(i)}this._dropdowns[t].empty();for(var s=!1,a="",o=0,r=this._options.length;r>o;o++){var l=this._options[o];if("divider"===l.optionName)""!==a&&"divider"!==a&&($('<li class="dropdownDivider" />').appendTo(this._dropdowns[t]),a=l.optionName);else if(this._validate(t,l.optionName)||this._validateCallbacks(t,l.optionName)){var c=$("<li><span>"+l.label+"</span></li>").appendTo(this._dropdowns[t]);c.data("elementID",t).data("optionName",l.optionName).data("isQuickOption",l.isQuickOption?!0:!1).click($.proxy(this._click,this)),s=!0,a=l.optionName}}if(s){var u=this._dropdowns[t].children().last();u.hasClass("dropdownDivider")&&u.remove();var h=null,d=0;if(this._dropdowns[t].children().each(function(e,t){var i=$(t);i.hasClass("dropdownDivider")||(i.data("isQuickOption")?h=i:d++)}),!d)return h.trigger("click"),this._triggerElements[t]&&WCF.Dropdown.close(this._triggerElements[t].parents(".dropdown").wcfIdentify()),!1}return null!==i&&WCF.Dropdown.initDropdown(i,!0),!1},_validate:function(){return!1},_validateCallbacks:function(e,t){var i=this._callbacks.length;if(i)for(var n=0;i>n;n++)if(this._callbacks[n].validate(this._elements[e],t))return!0;return!1},_success:function(e){var t=this._updateData.length;t&&(this._updateState(e),this._updateData=[])},_updateState:function(){},_click:function(e){var t=$(e.currentTarget),i=t.data("elementID"),n=t.data("optionName");this._execute(i,n)||this._executeCallback(i,n),this._hide(i)},_execute:function(){return!1},_executeCallback:function(e,t){var i=this._callbacks.length;if(i)for(var n=0;i>n;n++)if(this._callbacks[n].execute(this._elements[e],t))return!0;return!1},_hide:function(e){this._dropdowns[e]&&this._dropdowns[e].empty().removeClass("dropdownOpen")}}),WCF.Upload=Class.extend({_name:"__files[]",_buttonSelector:null,_fileListSelector:null,_fileUpload:null,_className:"",_iframe:null,_internalFileID:0,_options:{},_uploadMatrix:[],_supportsAJAXUpload:!0,_overlay:null,init:function(e,t,i,n){this._buttonSelector=e,this._fileListSelector=t,this._className=i,this._internalFileID=0,this._options=$.extend(!0,{action:"upload",multiple:!1,url:"index.php?ajax-upload/&t="+SECURITY_TOKEN},n||{}),this._options.url=WCF.convertLegacyURL(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=WSC_API_URL+this._options.url);var s=new XMLHttpRequest;this._supportsAJAXUpload=s&&"upload"in s&&"onprogress"in s.upload,this._createButton()},_createButton:function(){if(this._supportsAJAXUpload){this._fileUpload=$('<input type="file" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/>"),this._fileUpload.change($.proxy(this._upload,this));var e=$('<p class="button uploadButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>");e.prepend(this._fileUpload)}else{var e=$('<p class="button uploadFallbackButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>");e.click($.proxy(this._showOverlay,this))}this._insertButton(e)},_insertButton:function(e){this._buttonSelector.prepend(e)},_removeButton:function(){var e=".uploadButton";this._supportsAJAXUpload||(e=".uploadFallbackButton"),this._buttonSelector.find(e).remove()},_upload:function(e,t,i){var n=null,s=[];if(t)s.push(t);else if(i){var a="";switch(i.type){case"image/png":a=".png";break;case"image/jpeg":a=".jpg";break;case"image/gif":a=".gif"}s.push({name:"pasted-from-clipboard"+a})}else s=this._fileUpload.prop("files");if(s.length){var o=new FormData;if(n=this._createUploadMatrix(s),!this._uploadMatrix[n].length)return null;for(var r=0,l=s.length;l>r;r++)if(this._uploadMatrix[n][r]){var c=this._uploadMatrix[n][r].data("internalFileID");i?o.append("__files["+c+"]",i,s[r].name):o.append("__files["+c+"]",s[r])}o.append("actionName",this._options.action),o.append("className",this._className);var u=this._getParameters();for(var h in u)o.append("parameters["+h+"]",u[h]);var d=this;$.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:o,contentType:!1,processData:!1,success:function(e){d._success(n,e)},error:$.proxy(this._error,this),xhr:function(){var e=$.ajaxSettings.xhr();return e&&e.upload.addEventListener("progress",function(e){d._progress(n,e)},!1),e}})}return n},_createUploadMatrix:function(e){if(e.length){var t=this._uploadMatrix.length;this._uploadMatrix[t]=[];for(var i=0,n=e.length;n>i;i++){var s=e[i],a=this._initFile(s);a.hasClass("uploadFailed")||(a.data("filename",s.name).data("internalFileID",this._internalFileID++),this._uploadMatrix[t][i]=a)}return t}return null},_success:function(){},_error:function(){},_progress:function(e,t){var i=Math.round(100*t.loaded/t.total);for(var n in this._uploadMatrix[e])this._uploadMatrix[e][n].find("progress").attr("value",i)},_getParameters:function(){return{}},_initFile:function(e){return $("<li>"+e.name+" ("+e.size+')<progress max="100" /></li>').appendTo(this._fileListSelector)},_showOverlay:function(){if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body);var e=this._overlay.find("form");$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e);var t=this._getParameters();for(var i in t)$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy(function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix([e]),i=this;this._iframe.data("loading",!0).off("load").load(function(){i._evaluateResponse(t)}),this._overlay.wcfDialog("close")},this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)},_getFilename:function(){return $("#__fileUpload").val().split("\\").pop()}}),WCF.Upload.Parallel=WCF.Upload.extend({init:function(e,t,i,n){n=$.extend(!0,n||{},{multiple:!0}),this._super(e,t,i,n)},_upload:function(){for(var e=this._fileUpload.prop("files"),t=0,i=e.length;i>t;t++){var n=e[t],s=new FormData,a=this._createUploadMatrix(n);if(this._uploadMatrix[a].length){s.append("__files["+a+"]",n),s.append("actionName",this._options.action),s.append("className",this._className);var o=this._getParameters();for(var r in o)s.append("parameters["+r+"]",o[r]);
-
-this._sendRequest(a,s)}}},_sendRequest:function(e,t){var i=this;$.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:t,contentType:!1,processData:!1,success:function(t){i._success(e,t)},error:$.proxy(this._error,this),xhr:function(){var t=$.ajaxSettings.xhr();return t&&t.upload.addEventListener("progress",function(t){i._progress(e,t)},!1),t}})},_createUploadMatrix:function(e){var t=this._initFile(e);return t.hasClass("uploadFailed")?null:(t.data("filename",e.name).data("internalFileID",this._internalFileID),this._uploadMatrix[this._internalFileID++]=t,this._internalFileID-1)},_success:function(){},_progress:function(e,t){var i=Math.round(100*t.loaded/t.total);this._uploadMatrix[e].find("progress").attr("value",i)},_showOverlay:function(){if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body);var e=this._overlay.find("form");$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e);var t=this._getParameters();for(var i in t)$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy(function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix(e),i=this;this._iframe.data("loading",!0).off("load").load(function(){i._evaluateResponse(t)}),this._overlay.wcfDialog("close")},this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)}}),WCF.Sortable={},WCF.Sortable.List=Class.extend({_additionalParameters:{},_className:"",_containerID:"",_container:null,_notification:null,_offset:0,_options:{},_proxy:null,_structure:{},init:function(e,t,i,n,s,a){this._additionalParameters=a||{},this._containerID=$.wcfEscapeID(e),this._container=$("#"+this._containerID),this._className=t,this._offset=i?i:0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._structure={},this._options=$.extend(!0,{axis:"y",connectWith:"#"+this._containerID+" .sortableList",disableNesting:"sortableNoNesting",doNotClear:!0,errorClass:"sortableInvalidTarget",forcePlaceholderSize:!0,helper:"clone",items:"li:not(.sortableNoSorting)",opacity:.6,placeholder:"sortablePlaceholder",tolerance:"pointer",toleranceElement:"> span"},n||{});var o=$("#"+this._containerID+" .sortableList");if(o.is("tbody")&&"clone"===this._options.helper){this._options.helper=this._tableRowHelper.bind(this);var r=o.prev("thead");r&&r.find("th").each(function(e,t){t=$(t),t.width(t.width())})}if(s?o.sortable(this._options):o.nestedSortable(this._options),this._className){var l=this._container.find(".formSubmit");if(!l.length&&(l=this._container.next(".formSubmit"),!l.length))return void console.debug("[WCF.Sortable.Simple] Unable to find form submit for saving, aborting.");l.children('button[data-type="submit"]').click($.proxy(this._submit,this))}},_tableRowHelper:function(e,t){return t.children("td").each(function(e,t){t=$(t),t.width(t.width())}),t},_submit:function(){this._structure={},this._container.find(".sortableList").each($.proxy(function(e,t){var i=$(t),n=i.data("objectID");void 0!==n&&i.children(this._options.items).each($.proxy(function(e,t){var i=$(t).data("objectID");this._structure[n]||(this._structure[n]=[]),this._structure[n].push(i)},this))},this));var e=$.extend(!0,{data:{offset:this._offset,structure:this._structure}},this._additionalParameters);this._proxy.setOption("data",{actionName:"updatePosition",className:this._className,interfaceName:"wcf\\data\\ISortableAction",parameters:e}),this._proxy.sendRequest()},_success:function(){null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._notification.show()}}),WCF.Popover=Class.extend({_activeElementID:"",_identifier:"",_popoverObj:null,init:function(e){var t=!1;require(["Environment"],function(e){"desktop"!==e.platform()&&(t=!0)}.bind(this)),t||(this._activeElementID="",this._identifier=e,require(["WoltLabSuite/Core/Controller/Popover"],function(t){t.init({attributeName:"legacy",className:e,identifier:this._identifier,legacy:!0,loadCallback:this._legacyLoad.bind(this)})}.bind(this)))},_initContainers:function(){},_legacyLoad:function(e,t){this._activeElementID=e,this._popoverObj=t,this._loadContent()},_insertContent:function(e,t){this._popoverObj.setContent(this._identifier,e,t)}}),WCF.EditableItemList=Class.extend({_allowCustomInput:!1,_className:"",_data:{},_form:null,_itemList:null,_objectID:0,_objectTypeID:0,_search:null,_searchInput:null,init:function(e,t){if(this._itemList=$(e),this._searchInput=$(t),this._data={},!this._itemList.length||!this._searchInput.length)return void console.debug("[WCF.EditableItemList] Item list and/or search input do not exist, aborting.");if(this._objectID=this._getObjectID(),this._objectTypeID=this._getObjectTypeID(),this._itemList.find(".jsEditableItem").click($.proxy(this._click,this)),this._itemList.children("ul").length||$("<ul />").appendTo(this._itemList),this._itemList=this._itemList.children("ul"),this._form=this._itemList.parents("form").submit($.proxy(this._submit,this)),this._allowCustomInput){var i=this;this._searchInput.keydown($.proxy(this._keyDown,this)).keypress($.proxy(this._keyPress,this)).on("paste",function(){setTimeout(function(){i._onPaste()},100)})}this._searchInput.parents(".dropdown").data("preventSubmit",!0)},_keyDown:function(e){return null===e?this._keyPress(null):!0},_keyPress:function(e){if(null===e||44===e.charCode||e.charCode===$.ui.keyCode.ENTER||$.browser.mozilla&&e.keyCode===$.ui.keyCode.ENTER){if(null!==e&&e.charCode===$.ui.keyCode.ENTER&&this._search&&-1!==this._search._itemIndex)return!1;var t=$.trim(this._searchInput.val());return e&&44===e.charCode&&(t=t.substring(0,this._searchInput.getCaret())),""===t?!0:(this.addItem({objectID:0,label:t}),this._searchInput.val(e&&44===e.charCode?$.trim(this._searchInput.val().substr(this._searchInput.getCaret())):""),null!==e&&e.stopPropagation(),!1)}return!0},_onPaste:function(){var e=$.trim(this._searchInput.val());e=e.split(",");for(var t=0,i=e.length;i>t;t++){var n=$.trim(e[t]);""!==n&&this.addItem({objectID:0,label:n})}this._searchInput.val("")},load:function(){},_click:function(e){var t=$(e.currentTarget),i=t.data("objectID"),n=t.data("label");return this._search&&this._search.removeExcludedSearchValue(n),this._removeItem(i,n),t.remove(),e.stopPropagation(),!1},_getObjectID:function(){return 0},_getObjectTypeID:function(){return 0},addItem:function(e){if(this._data[e.objectID]&&(0!==e.objectID||!this._allowCustomInput))return!0;var t=$('<li class="badge">'+WCF.String.escapeHTML(e.label)+"</li>").data("objectID",e.objectID).data("label",e.label).appendTo(this._itemList);return t.click($.proxy(this._click,this)),this._search&&this._search.addExcludedSearchValue(e.label),this._addItem(e.objectID,e.label),!0},clearList:function(){this._itemList.children("li").each($.proxy(function(e,t){var i=$(t);this._search&&this._search.removeExcludedSearchValue(i.data("label")),i.remove(),this._removeItem(i.data("objectID"),i.data("label"))},this))},_submit:function(){this._keyDown(null)},_addItem:function(e,t){this._data[e]=t},_removeItem:function(e){delete this._data[e]},getSearchInput:function(){return this._searchInput}}),WCF.Language.Chooser=Class.extend({init:function(e,t,i,n,s,a){require(["WoltLabSuite/Core/Language/Chooser"],function(o){o.init(e,t,i,n,s,a)})}}),WCF.Style={},WCF.UserPanel=Class.extend({_container:null,_didLoad:!1,_link:null,_noItems:"",_revertOnEmpty:!0,init:function(e){return this._container=$("#"+e),this._didLoad=!1,this._revertOnEmpty=!0,1!=this._container.length?void console.debug("[WCF.UserPanel] Unable to find container identfied by '"+e+"', aborting."):void this._convert()},_convert:function(){this._container.addClass("dropdown"),this._link=this._container.children("a").remove();var e=$('<a href="'+this._link.attr("href")+'" class="dropdownToggle">'+this._link.html()+"</a>").appendTo(this._container).click($.proxy(this._click,this)),t=$('<ul class="dropdownMenu" />').appendTo(this._container);$('<li class="jsDropdownPlaceholder"><span>'+WCF.Language.get("wcf.global.loading")+"</span></li>").appendTo(t),this._addDefaultItems(t),this._container.dblclick($.proxy(function(){return window.location=this._link.attr("href"),!1},this)),WCF.Dropdown.initDropdown(e,!1)},_addDefaultItems:function(){},_addDivider:function(e){$('<li class="dropdownDivider" />').appendTo(e)},_click:function(e){e.preventDefault(),this._didLoad||(new WCF.Action.Proxy({autoSend:!0,data:this._getParameters(),success:$.proxy(this._success,this)}),this._didLoad=!0)},_getParameters:function(){return{}},_success:function(e){var t=WCF.Dropdown.getDropdownMenu(this._container.wcfIdentify());t.children(".jsDropdownPlaceholder").remove(),e.returnValues&&e.returnValues.template?($(""+e.returnValues.template).prependTo(t),this._updateBadge(e.returnValues.totalCount),this._after(t)):($("<li><span>"+WCF.Language.get(this._noItems)+"</span></li>").prependTo(t),this._updateBadge(0))},_updateBadge:function(e){if(e=parseInt(e)||0){var t=this._container.find(".badge");t.length||(t=$('<span class="badge badgeUpdate" />').appendTo(this._container.children(".dropdownToggle")),t.before(" ")),t.html(e)}else this._container.find(".badge").remove()},_after:function(){}}),jQuery.fn.extend({wcfDialog:function(e){var t=arguments;return require(["Dom/Util","Ui/Dialog"],function(i,n){var s=i.identify(this[0]);"close"===e?n.close(s):"render"===e?n.rebuild(s):"option"===e?3===t.length&&"title"===t[1]&&"string"==typeof t[2]&&n.setTitle(s,t[2]):(this[0].parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&document.body.appendChild(this[0]),n.openStatic(s,null,1===t.length&&"object"==typeof t[0]?t[0]:{}))}.bind(this)),this}}),$.widget("ui.wcfSlideshow",{_buttonList:null,_count:0,_index:0,_itemList:null,_items:null,_timer:null,_width:0,options:{cycle:!0,cycleInterval:5,itemGap:50},_create:function(){this._itemList=this.element.children("ul"),this._items=this._itemList.children("li"),this._count=this._items.length,this._index=0,this._count>1&&this._initSlideshow()},_initSlideshow:function(){var e=$(this._items.get(0)).outerHeight();this._items.addClass("slideshowItem"),this._width=this.element.css("height",e).innerWidth(),this._itemList.addClass("slideshowItemList").css("left",0),this._items.each($.proxy(function(t,i){$(i).show().css({height:e,left:(this._width+this.options.itemGap)*t,width:this._width})},this)),this.element.css({height:e,width:this._width}).hover($.proxy(this._hoverIn,this),$.proxy(this._hoverOut,this)),this._buttonList=$('<ul class="slideshowButtonList" />').appendTo(this.element);for(var t=0;t<this._count;t++){var i=$('<li><a><span class="icon icon16 fa-circle" /></a></li>').data("index",t).click($.proxy(this._click,this)).appendTo(this._buttonList);0==t&&i.find(".icon").addClass("active")}this._resetTimer(),$(window).resize($.proxy(this._resize,this))},rebuildHeight:function(){var e=$(this._items.get(0)).css("height","auto"),t=e.outerHeight();this._items.css("height",t+"px"),this.element.css("height",t+"px")},_resize:function(){this._width=this.element.css("width","auto").innerWidth(),this._items.each($.proxy(function(e,t){$(t).css({left:(this._width+this.options.itemGap)*e,width:this._width})},this)),this._index--,this.moveTo(null)},_hoverIn:function(){null!==this._timer&&this._timer.stop()},_hoverOut:function(){this._resetTimer()},_resetTimer:function(){if(this.options.cycle){null!==this._timer&&this._timer.stop();var e=this;this._timer=new WCF.PeriodicalExecuter(function(){e.moveTo(null)},1e3*this.options.cycleInterval)}},_click:function(e){this.moveTo($(e.currentTarget).data("index")),this._resetTimer()},moveTo:function(e){this._index=null===e?this._index+1:e,this._index==this._count&&(this._index=0),$(this._buttonList.find(".icon").removeClass("active").get(this._index)).addClass("active"),this._itemList.css("left",this._index*(this._width+this.options.itemGap)*-1),this._trigger("moveTo",null,{index:this._index})},getItem:function(e){return this._items[e]?this._items[e]:null}}),jQuery.fn.extend({datepicker:function(e){var t=this[0],i=Array.prototype.slice.call(arguments,1);switch(e){case"destroy":window.__wcf_bc_datePicker.destroy(t);break;case"getDate":return window.__wcf_bc_datePicker.getDate(t);case"option":if("onClose"===i[0])return function(){};console.warn("datepicker('option') supports only 'onClose'.");break;case"setDate":window.__wcf_bc_datePicker.setDate(t,i[0]);break;case"setOption":"onClose"===i[0]?window.__wcf_bc_datePicker.setCloseCallback(t,i[1]):console.warn("datepicker('setOption') supports only 'onClose'.");break;default:console.debug("Unsupported method '"+e+"' for datepicker()")}return this}}),jQuery.fn.extend({wcfTabs:function(e){var t=this[0],i=Array.prototype.slice.call(arguments,1);require(["Dom/Util","WoltLabSuite/Core/Ui/TabMenu"],function(n,s){var a=s.getTabMenu(n.identify(t));null!==a&&a[e].apply(a,i)})}}),$.widget("ui.wcfPages",{_api:null,SHOW_LINKS:11,SHOW_SUB_LINKS:20,options:{activePage:1,maxPage:1},_create:function(){require(["WoltLabSuite/Core/Ui/Pagination"],function(e){this._api=new e(this.element[0],{activePage:this.options.activePage,maxPage:this.options.maxPage,callbackShouldSwitch:function(e){var t=this._trigger("shouldSwitch",void 0,{nextPage:e});return t!==!1}.bind(this),callbackSwitch:function(e){this._trigger("switched",void 0,{activePage:e})}.bind(this)})}.bind(this))},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this._api=null,this.element[0].innerHTML=""},_setOption:function(e,t){if("activePage"==e&&t!=this.options[e]&&t>0&&t<=this.options.maxPage){var i=this._trigger("shouldSwitch",void 0,{nextPage:t});i||void 0!==i?this._api.switchPage(t):this._trigger("notSwitched",void 0,{activePage:t})}return this}}),WCF.Category={},WCF.Category.NestedList=Class.extend({_categories:{},init:function(){var e=this;$(".jsCategory").each(function(t,i){var n=$(i).data("parentCategoryID",null).change($.proxy(e._updateSelection,e));e._categories[n.val()]=n;var s=[];n.parents("li").find(".jsChildCategory").each(function(t,i){var a=$(i).data("parentCategoryID",n.val()).change($.proxy(e._updateSelection,e));e._categories[a.val()]=a,s.push(a.val()),a.is(":checked")&&n.prop("checked","checked")}),n.data("childCategoryIDs",s)})},_updateSelection:function(e){var t=$(e.currentTarget),i=t.data("parentCategoryID");if(t.is(":checked"))null!==i&&this._categories[i].prop("checked","checked");else if(null===i)for(var n=t.data("childCategoryIDs"),s=0,a=n.length;a>s;s++)this._categories[n[s]].prop("checked",!1)}}),WCF.Category.FlexibleCategoryList=Class.extend({_list:null,_categories:{},init:function(e){return this._list=$("#"+e),this._buildStructure(),this._list.find("input:checked").each(function(){$(this).trigger("change")}),this._list.children("li").length<2?void this._list.addClass("flexibleCategoryListDisabled"):void 0},_buildStructure:function(){var e=this;this._list.find(".jsCategory").each(function(t,i){var n=$(i).change(e._updateSelection.bind(e)),s=parseInt(n.val()),a=[];n.parents("li:eq(0)").find(".jsChildCategory").each(function(t,i){var s=$(i);s.data("parentCategory",n).change(e._updateSelection.bind(e));var o=parseInt(s.val());a.push(s);var r=[];s.parents("li:eq(0)").find(".jsSubChildCategory").each(function(t,i){var n=$(i);n.data("parentCategory",s).change(e._updateSelection.bind(e)),r.push(n)}),e._categories[o]=r}),e._categories[s]=a})},_updateSelection:function(e){var t=$(e.currentTarget),i=parseInt(t.val()),n=t.data("parentCategory");if(t.is(":checked"))n&&(n.prop("checked","checked"),n=n.data("parentCategory"),n&&n.prop("checked","checked"));else{if(this._categories[i])for(var s=0,a=this._categories[i].length;a>s;s++){var o=this._categories[i][s];o.prop("checked",!1);var r=parseInt(o.val());if(this._categories[r])for(var l=0,c=this._categories[r].length;c>l;l++)this._categories[r][l].prop("checked",!1)}if(n){for(var u=parseInt(n.val()),s=0,a=this._categories[u].length;a>s;s++)if(this._categories[u][s].prop("checked"))return;if(n=n.data("parentCategory")){u=parseInt(n.val());for(var s=0,a=this._categories[u].length;a>s;s++)if(this._categories[u][s].prop("checked"))return}}}}}),WCF.Condition={},WCF.Notice={}; })(this);
+(function (window, undefined) {"use strict";function wcfEval(expression){return eval(expression)}!function(){var e=jQuery.fn.data;jQuery.fn.data=function(t){if(t)switch(typeof t){case"object":for(var i in t)if(i.match(/ID$/)){var n=t[i];delete t[i],i=i.replace(/ID$/,"-id"),t[i]=n}arguments[0]=t;break;case"string":t.match(/ID$/)&&(arguments[0]=t.replace(/ID$/,"-id"))}var s=e.apply(this,arguments);if(void 0===t)for(var i in s)i.match(/Id$/)&&(s[i.replace(/Id$/,"ID")]=s[i],delete s[i]);return s},window.console||(window.console={});for(var t=["log","info","warn","exception","assert","dir","dirxml","trace","group","groupEnd","groupCollapsed","profile","profileEnd","count","clear","time","timeEnd","timeStamp","table","error"],i=0;i<t.length;i++)"undefined"==typeof console[t[i]]&&(console[t[i]]=function(){});"undefined"==typeof console.debug&&(console.debug=function(e){console.log(e)})}(),String.prototype.hashCode=function(){var e,t=0;if(this.length)for(var i=0,n=this.length;n>i;i++)e=this.charCodeAt(i),t=(t<<5)-t+e,t&=t;return t},window.shuffle=function(e){for(var t,i,n=e.length;0!==n;)i=Math.floor(Math.random()*n),n-=1,t=e[n],e[n]=e[i],e[i]=t;return this},function(e){var t=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[],n={browser:i[1]||"",version:i[2]||"0"},s={};n.browser&&(s[n.browser]=!0,s.version=n.version),s.chrome?s.webkit=!0:s.webkit&&(s.safari=!0),e.browser=e.browser||{},e.browser=$.extend(e.browser,s),e.browser.touch=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&window.navigator.msMaxTouchPoints>0,e.browser.smartphone="bottom"==$("html").css("caption-side"),e.browser.mozilla&&t.match(/trident/)&&(e.browser.mozilla=!1,e.browser.msie=!0),e.browser.iOS=/\((ipad|iphone|ipod);/.test(t),e.browser.iOS&&$("html").addClass("iOS"),e.browser.android=-1!==t.indexOf("android"),e.browser.editor="redactor",e.browser.ckeditor=!1,e.browser.redactor=!0,e.browser.iOS&&(e.fn.focus=function(e,t){return arguments.length>0?this.on("focus",null,e,t):this.trigger("focus")})}(jQuery),null==window.WCF&&(window.WCF={}),$.extend(!0,{removeArrayValue:function(e,t){return $.grep(e,function(e){return t!==e})},wcfEscapeID:function(e){return e.replace(/(:|\.)/g,"\\$1")},wcfIsset:function(e){return!!$("#"+$.wcfEscapeID(e)).length},getLength:function(e){var t=0;for(var i in e)e.hasOwnProperty(i)&&t++;return t}}),$.fn.extend({getTagName:function(){return this.length?this.get(0).tagName.toLowerCase():""},getDimensions:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"inner":i={height:this.innerHeight(),width:this.innerWidth()};break;case"outer":i={height:this.outerHeight(),width:this.outerWidth()};break;default:i={height:this.height(),width:this.width()}}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},getOffsets:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"offset":i=this.offset();break;case"position":default:i=this.position()}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},makePositioned:function(e,t){"absolute"!=e&&"fixed"!=e&&(e="absolute");var i=this.getOffsets("position");return this.css({position:e,left:i.left,margin:0,top:i.top}),t&&this.remove().appentTo("body"),this},disable:function(){return this.attr("disabled","disabled")},enable:function(){return this.removeAttr("disabled")},wcfIdentify:function(){return window.bc_wcfDomUtil.identify(this[0])},getCaret:function(){if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return-1}else if(!this.is("textarea"))return-1;var e=0,t=this.get(0);if(document.selection){this.focus();var i=document.selection.createRange();i.moveStart("character",-this.val().length),e=i.text.length}else(t.selectionStart||"0"==t.selectionStart)&&(e=parseInt(t.selectionStart));return e},setCaret:function(e){if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return!1}else if(!this.is("textarea"))return!1;var t=this.get(0);if(this.focus(),document.selection){var i=document.selection.createRange();i.moveStart("character",e),i.moveEnd("character",0),i.select()}else(t.selectionStart||"0"==t.selectionStart)&&(t.selectionStart=e,t.selectionEnd=e);return!0},wcfDropIn:function(e,t,i){return e||(e="up"),i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfDropOut:function(e,t,i){return e||(e="down"),i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfBlindIn:function(e,t,i){return e||(e="vertical"),i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfBlindOut:function(e,t,i){return e||(e="vertical"),i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfHighlight:function(e,t){return this.effect("highlight",e,600,t)},wcfFadeIn:function(e,t){return t&&parseInt(t)||(t=200),this.show(WCF.getEffect(this,"fade"),{},t,e)},wcfFadeOut:function(e,t){return t&&parseInt(t)||(t=200),this.hide(WCF.getEffect(this,"fade"),{},t,e)},cssAsNumber:function(e){if(this.length){var t=this.css(e);if(void 0!==t)return parseInt(t.replace(/px$/,""))}return 0},perfectScrollbar:function(e){var t=require("perfect-scrollbar");return this.each(function(){if("object"==typeof e||"undefined"==typeof e){var i=e;$(this).data("psID")||t.initialize(this,i)}else{var n=e;"update"===n?t.update(this):"destroy"===n&&t.destroy(this)}return jQuery(this)})}}),$.extend(WCF,{activeDialogs:0,_idCounter:0,getRandomID:function(){return window.bc_wcfDomUtil.getUniqueId()},inArray:function(e,t){return-1!=$.inArray(e,t)},getEffect:function(e,t){return e.is("tr")?"highlight":t},getInlineCSS:function(e){var t={},i=e.attr("style");if(!i)return{};i=i.split(";");for(var n=0,s=i.length;s>n;n++){var a=$.trim(i[n]);""!=a&&(a=a.split(":"),t[$.trim(a[0])]=$.trim(a[1]))}return t},revertInlineCSS:function(e,t,i){for(var n=0,s=i.length;s>n;n++){var a=i[n];t[a]?e.css(a,t[a]):e.css(a,"")}},getUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,i="x"==e?t:3&t|8;return i.toString(16)})},base64toBlob:function(e,t,i){t=t||"",i=i||512;for(var n=atob(e),s=[],a=0;a<n.length;a+=i){for(var o=n.slice(a,a+i),r=new Array(o.length),l=0;l<o.length;l++)r[l]=o.charCodeAt(l);var c=new Uint8Array(r);s.push(c)}return new Blob(s,{type:t})},convertLegacyURL:function(e){return URL_LEGACY_MODE?e:e.replace(/^index\.php\/(.*?)\/\?/,function(e,t){for(var i=t.split(/([A-Z][a-z0-9]+)/),n="",s=0,a=i.length;a>s;s++){var o=i[s].trim();o.length&&(n.length&&(n+="-"),n+=o.toLowerCase())}return"index.php?"+n+"/&"})}}),WCF.Browser={_isChrome:null,isChrome:function(){return null===this._isChrome&&(this._isChrome=!1,/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&(this._isChrome=!0)),this._isChrome}},WCF.Dropdown={init:function(){window.bc_wcfSimpleDropdown.initAll()},initDropdown:function(e,t){window.bc_wcfSimpleDropdown.init(e[0],t)},removeDropdown:function(e){window.bc_wcfSimpleDropdown.remove(e)},initDropdownFragment:function(e,t){window.bc_wcfSimpleDropdown.initFragment(e[0],t[0])},registerCallback:function(e,t){window.bc_wcfSimpleDropdown.registerCallback(e,t)},_toggle:function(e,t){window.bc_wcfSimpleDropdown._toggle(e,t)},toggleDropdown:function(e){window.bc_wcfSimpleDropdown._toggle(null,e)},getDropdown:function(e){var t=window.bc_wcfSimpleDropdown.getDropdown(e);return t?$(t):null},getDropdownMenu:function(e){var t=window.bc_wcfSimpleDropdown.getDropdownMenu(e);return t?$(t):null},setAlignmentByID:function(e){window.bc_wcfSimpleDropdown.setAlignmentById(e)},setAlignment:function(e,t){window.bc_wcfSimpleDropdown.setAlignment(e[0],t[0])},_closeAll:function(){window.bc_wcfSimpleDropdown.closeAll()},close:function(e){window.bc_wcfSimpleDropdown.close(e)},destroy:function(e){window.bc_wcfSimpleDropdown.destroy(e)}},WCF.Dropdown.Interactive={},WCF.Dropdown.Interactive.Handler={_dropdownContainer:null,_dropdownMenus:{},create:function(e,t,i){null===this._dropdownContainer&&(this._dropdownContainer=$('<div class="dropdownMenuContainer" />').appendTo(document.body),WCF.CloseOverlayHandler.addCallback("WCF.Dropdown.Interactive.Handler",$.proxy(this.closeAll,this)));var n=new WCF.Dropdown.Interactive.Instance(this._dropdownContainer,e,t,i);return this._dropdownMenus[t]=n,n},open:function(e){return this._dropdownMenus[e]?(this._dropdownMenus[e].open(),!0):!1},close:function(e){return this._dropdownMenus[e]?(this._dropdownMenus[e].close(),!0):!1},closeAll:function(){for(var e in this._dropdownMenus)this._dropdownMenus.hasOwnProperty(e)&&this._dropdownMenus[e].close()},getOpenDropdown:function(){for(var e in this._dropdownMenus)if(this._dropdownMenus.hasOwnProperty(e)&&this._dropdownMenus[e].isOpen())return this._dropdownMenus[e];return null}},WCF.Dropdown.Interactive.Instance=Class.extend({_container:null,_itemList:null,_linkList:null,_options:{},_pointer:null,_triggerElement:null,init:function(e,t,i,n){this._options=n||{},this._triggerElement=t;var s=null;if(n.staticDropdown===!0)this._container=this._triggerElement.find(".interactiveDropdownStatic:eq(0)").data("source",i).click(function(e){e.stopPropagation()});else{this._container=$('<div class="interactiveDropdown" data-source="'+i+'" />').click(function(e){e.stopPropagation()});var a=$('<div class="interactiveDropdownHeader" />').appendTo(this._container);$('<span class="interactiveDropdownTitle">'+n.title+"</span>").appendTo(a),this._linkList=$('<ul class="interactiveDropdownLinks inlineList"></ul>').appendTo(a),s=$('<div class="interactiveDropdownItemsContainer" />').appendTo(this._container),this._itemList=$('<ul class="interactiveDropdownItems" />').appendTo(s),$('<a href="'+n.showAllLink+'" class="interactiveDropdownShowAll">'+WCF.Language.get("wcf.user.panel.showAll")+"</a>").appendTo(this._container)}this._pointer=$('<span class="elementPointer"><span /></span>').appendTo(this._container),require(["Environment"],function(e){"desktop"===e.platform()&&null!==s&&s.perfectScrollbar({suppressScrollX:!0})}.bind(this)),this._container.appendTo(e)},getContainer:function(){return this._container},getItemList:function(){return this._itemList},getLinkList:function(){return this._linkList},open:function(){WCF.Dropdown._closeAll(),this._triggerElement.addClass("open"),this._container.addClass("open"),WCF.System.Event.fireEvent("com.woltlab.wcf.Search","close"),this.render()},close:function(){this._triggerElement.removeClass("open"),this._container.removeClass("open")},isOpen:function(){return this._triggerElement.hasClass("open")},toggle:function(){return this._container.hasClass("open")?(this.close(),!1):(WCF.Dropdown.Interactive.Handler.closeAll(),this.open(),!0)},resetItems:function(){this._itemList.empty(),this.close()},render:function(){require(["Ui/Alignment","Ui/Screen"],function(e,t){t.is("screen-lg")?e.set(this._container[0],this._triggerElement[0],{horizontal:"right",pointer:!0}):this._container.css({bottom:"",left:"",right:"",top:elById("pageHeader").clientHeight+"px"})}.bind(this))},rebuildScrollbar:function(){require(["Environment"],function(e){if("desktop"===e.platform()){var t=this._itemList.parent();t.perfectScrollbar("destroy"),t.perfectScrollbar({suppressScrollX:!0})}}.bind(this))}}),WCF.Clipboard={init:function(e,t,i,n){require(["WoltLabSuite/Core/Controller/Clipboard"],function(i){i.setup({hasMarkedItems:t>0,pageClassName:e,pageObjectId:n})})},reload:function(){require(["WoltLabSuite/Core/Controller/Clipboard"],function(e){e.reload()})}},WCF.PeriodicalExecuter=Class.extend({_callback:null,_delay:0,_intervalID:null,_isExecuting:!1,init:function(e,t){return $.isFunction(e)?(this._callback=e,this._interval=t,void this.resume()):void console.debug("[WCF.PeriodicalExecuter] Given callback is invalid, aborting.")},_execute:function(){if(!this._isExecuting)try{this._isExecuting=!0,this._callback(this),this._isExecuting=!1}catch(e){throw this._isExecuting=!1,e}},stop:function(){this._intervalID&&clearInterval(this._intervalID)},resume:function(){this.restart()},restart:function(){this._intervalID&&this.stop(),this._intervalID=setInterval($.proxy(this._execute,this),this._interval)},setInterval:function(e){this._interval=e,this.restart()}}),WCF.LoadingOverlayHandler={show:function(){require(["WoltLabSuite/Core/Ajax/Status"],function(e){e.show()})},hide:function(){require(["WoltLabSuite/Core/Ajax/Status"],function(e){e.hide()})},updateIcon:function(e,t){var i=void 0===t||t?"addClass":"removeClass";e.find(".icon")[i]("fa-spinner"),e.hasClass("icon")&&e[i]("fa-spinner")}},WCF.Action={},WCF.Action.Proxy=Class.extend({_ajaxRequest:null,init:function(e){this._ajaxRequest=null,e=$.extend(!0,{autoSend:!1,data:{},dataType:"json",after:null,init:null,jsonp:"callback",async:!0,failure:null,showLoadingOverlay:!0,success:null,suppressErrors:!1,type:"POST",url:"index.php?ajax-proxy/&t="+SECURITY_TOKEN,aborted:null,autoAbortPrevious:!1},e),"jsonp"===e.dataType?require(["AjaxJsonp"],function(t){t.send(e.url,e.success,e.failure,{parameterName:e.jsonp})}):require(["AjaxRequest"],function(t){this._ajaxRequest=new t({data:e.data,type:e.type,url:e.url,responseType:"json"===e.dataType?"application/json":"",autoAbort:e.autoAbortPrevious,ignoreError:e.suppressErrors,silent:!e.showLoadingOverlay,failure:e.failure,finalize:e.after,success:e.success}),e.autoSend&&this._ajaxRequest.sendRequest()}.bind(this))},sendRequest:function(e){require(["AjaxRequest"],function(){null!==this._ajaxRequest&&this._ajaxRequest.sendRequest(e)}.bind(this))},abortPrevious:function(){require(["AjaxRequest"],function(){null!==this._ajaxRequest&&this._ajaxRequest.abortPrevious()}.bind(this))},setOption:function(e,t){require(["AjaxRequest"],function(){null!==this._ajaxRequest&&this._ajaxRequest.setOption(e,t)}.bind(this))},showLoadingOverlayOnce:function(){},suppressErrors:function(){},_failure:function(){},_success:function(){},_after:function(){}}),WCF.Action.SimpleProxy=Class.extend({init:function(e,t){this.options=$.extend(!0,{action:"",className:"",elements:null,eventName:"click"},e),this.callbacks=$.extend(!0,{after:null,failure:null,init:null,success:null},t),this.options.elements&&(this.proxy=new WCF.Action.Proxy(this.callbacks),this.options.elements.each($.proxy(function(e,t){$(t).bind(this.options.eventName,$.proxy(this._handleEvent,this))},this)))},_handleEvent:function(e){this.proxy.setOption("data",{actionName:this.options.action,className:this.options.className,objectIDs:[$(e.target).data("objectID")]}),this.proxy.sendRequest()}}),WCF.Action.Delete=Class.extend({_buttonSelector:"",_callback:null,_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i?i:".jsDeleteButton",this._callback=null,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(){$(this._containerSelector).each(function(e,t){var i=$(t),n=i.wcfIdentify();if(!WCF.inArray(n,this._containers)){var s=i.find(this._buttonSelector);s.length&&(this._containers.push(n),s.click($.proxy(this._click,this)))}}.bind(this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessageHtml")||t.data("confirmMessage")?WCF.System.Confirmation.show(t.data(t.data("confirmMessageHtml")?"confirmMessageHtml":"confirmMessage"),$.proxy(this._execute,this),{target:t},void 0,t.data("confirmMessageHtml")?!0:!1):(WCF.LoadingOverlayHandler.updateIcon(t),this._sendRequest(t))},_didTriggerEffect:function(){},_execute:function(e,t){"cancel"!==e&&(WCF.LoadingOverlayHandler.updateIcon(t.target),this._sendRequest(t.target))},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"delete",className:this._className,interfaceName:"wcf\\data\\IDeleteAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e){this._callback&&this._callback(e.objectIDs),this.triggerEffect(e.objectIDs)},setCallback:function(e){if("function"!=typeof e)throw new TypeError("[WCF.Action.Delete] Expected a valid callback for '"+this._className+"'.");this._callback=e},triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]),n=i.find(this._buttonSelector);if(WCF.inArray(n.data("objectID"),e)){var s=this;i.wcfBlindOut("up",function(){var e=$(this).remove();s._containers.splice(s._containers.indexOf(e.wcfIdentify()),1),s._didTriggerEffect(e),n.data("eventName")&&WCF.System.Event.fireEvent("com.woltlab.wcf.action.delete",n.data("eventName"),{button:n,container:e})})}}}}),WCF.Action.NestedDelete=WCF.Action.Delete.extend({triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]);if(WCF.inArray(i.find(this._buttonSelector).data("objectID"),e))if(i.has("ol").has("li").length)i.is(":only-child")?i.parent().replaceWith(i.find("> ol")):i.replaceWith(i.find("> ol > li")),this._containers.splice(this._containers.indexOf(i.wcfIdentify()),1),this._didTriggerEffect(i);else{var n=this;i.wcfBlindOut("up",function(){$(this).remove(),n._containers.splice(n._containers.indexOf($(this).wcfIdentify()),1),n._didTriggerEffect($(this))})}}}}),WCF.Action.Toggle=Class.extend({_buttonSelector:".jsToggleButton",_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i?i:".jsToggleButton",this._containers=[];var n={success:$.proxy(this._success,this)};this.proxy=new WCF.Action.Proxy(n),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Toggle"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each($.proxy(function(e,t){var i=$(t),n=i.wcfIdentify();WCF.inArray(n,this._containers)||(this._containers.push(n),i.find(this._buttonSelector).click($.proxy(this._click,this)))},this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessageHtml")||t.data("confirmMessage")?WCF.System.Confirmation.show(t.data(t.data("confirmMessageHtml")?"confirmMessageHtml":"confirmMessage"),$.proxy(this._execute,this),{target:t},void 0,t.data("confirmMessageHtml")?!0:!1):(WCF.LoadingOverlayHandler.updateIcon(t),this._sendRequest(t))},_execute:function(e,t){"cancel"!==e&&(WCF.LoadingOverlayHandler.updateIcon(t.target),this._sendRequest(t.target))},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"toggle",className:this._className,interfaceName:"wcf\\data\\IToggleAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e){this.triggerEffect(e.objectIDs)},triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]),n=i.find(this._buttonSelector);WCF.inArray(n.data("objectID"),e)&&(i.wcfHighlight(),this._toggleButton(i,n))}},_toggleButton:function(e,t){var i="";WCF.LoadingOverlayHandler.updateIcon(t,!1),t.hasClass("fa-square-o")?(t.removeClass("fa-square-o").addClass("fa-check-square-o"),i=t.data("disableTitle")?t.data("disableTitle"):WCF.Language.get("wcf.global.button.disable"),t.attr("title",i)):(t.removeClass("fa-check-square-o").addClass("fa-square-o"),i=t.data("enableTitle")?t.data("enableTitle"):WCF.Language.get("wcf.global.button.enable"),t.attr("title",i)),e.toggleClass("disabled")}}),WCF.Action.Scroll=Class.extend({_callback:null,_reference:null,_target:null,_threshold:0,init:function(e,t,i,n){return this._threshold=parseInt(e),0===this._threshold?void console.debug("[WCF.Action.Scroll] Given threshold is invalid, aborting."):($.isFunction(t)&&(this._callback=t),null===this._callback?void console.debug("[WCF.Action.Scroll] Given callback is invalid, aborting."):(this._reference=$(i?i:window),this._target=$(n?n:document),this.start(),void this._scroll()))},_scroll:function(){var e=this._target.height(),t=this._reference.scrollTop(),i=this._reference.height();e-(i+t)<this._threshold&&this._callback(this)},start:function(){this._reference.on("scroll",$.proxy(this._scroll,this))},stop:function(){this._reference.off("scroll")}}),WCF.Date={},WCF.Date.Picker={init:function(){}},WCF.Date.Util={gmdate:function(e){var t=e?e:new Date;return Math.round(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDay(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())/1e3)},getTimezoneDate:function(e,t){var i=new Date(e),n=6e4*i.getTimezoneOffset();return new Date(e+n+t)}},WCF.Dictionary=Class.extend({_variables:{},init:function(){this._variables={}},add:function(e,t){this._variables[e]=t},addObject:function(e){for(var t in e)this.add(t,e[t])},addDictionary:function(e){e.each($.proxy(function(e){this.add(e.key,e.value)},this))},get:function(e){return this.isset(e)?this._variables[e]:null},isset:function(e){return this._variables.hasOwnProperty(e)},remove:function(e){delete this._variables[e]},each:function(e){if($.isFunction(e))for(var t in this._variables){var i=this._variables[t],n={key:t,value:i};e(n)}},count:function(){return $.getLength(this._variables)},isEmpty:function(){return!this.count()}}),null==window.WCF.Language&&(WCF.Language={add:function(e,t){require(["Language"],function(i){i.add(e,t)})},addObject:function(e){require(["Language"],function(t){t.addObject(e)})},get:function(e){throw new Error('Call to deprecated WCF.Language.get("'+e+'")')}}),WCF.Number={round:function(e,t){return t=Math.pow(10,t||0),Math.round(e*t)/t}},WCF.String={addThousandsSeparator:function(e){return String(e).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g,"$1"+WCF.Language.get("wcf.global.thousandsSeparator"))},escapeHTML:function(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},escapeRegExp:function(e){return String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(e,t){e=String(WCF.Number.round(e,t||2));var i=e.split(".");return e=this.addThousandsSeparator(i[0]),i.length>1&&(e+=WCF.Language.get("wcf.global.decimalPoint")+i[1]),e=e.replace("-","−")},lcfirst:function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},ucfirst:function(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)},unescapeHTML:function(e){return String(e).replace(/&/g,"&").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")}},WCF.TabMenu={init:function(){require(["WoltLabSuite/Core/Ui/TabMenu"],function(e){e.setup()})},reload:function(){this.init()}},WCF.Template=Class.extend({init:function(e){var t=new WCF.Dictionary,i=0;e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n"),e=e.replace(/\{literal\}(.*?)\{\/literal\}/g,$.proxy(function(e){var i="@@@@@@@@@@@"+Math.random()+"@@@@@@@@@@@";return t.add(i,e.replace(/\{\/?literal\}/g,"")),i},this)),e=e.replace(/\{\*.*?\*\}/g,"");var n=function(e){for(var t=e.split(""),i={},n=!0,s="",a="",o=!1,r=!1,l=!1,c=0,u=t.length;u>c;c++){var d=t[c];n&&"="!=d&&" "!=d?s+=d:n&&"="==d?(n=!1,r=!1,o=!1,l=!1):n||r||o||" "!=d?n||!r||l||"'"!=d?n||r||o||"'"!=d?n||!o||l||'"'!=d?n||r||o||'"'!=d?n||!o&&!r||l||"\\"!=d?n||(l=!1,a+=d):(l=!0,a+=d):(o=!0,a+=d):(o=!1,a+=d):(r=!0,a+=d):(r=!1,a+=d):(n=!0,i[s]=a,a=s="")}if(i[s]=a,o||r||l)throw new Error('Syntax error in parameterList: "'+e+'"');return i},s=function(e){return e.replace(/\\n/g,"\n").replace(/\\\\/g,"\\").replace(/\\'/g,"'")};e=e.replace(/\{(\$[^\}]+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"' + WCF.String.escapeHTML("+t+") + '"}).replace(/\{#(\$[^\}]+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"' + WCF.String.formatNumeric("+t+") + '"}).replace(/\{@(\$[^\}]+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"' + "+t+" + '"}).replace(/\{lang\}(.+?)\{\/lang\}/g,function(e,t){return"' + WCF.Language.get('"+t+"', v) + '"}).replace(/\{include (.+?)\}/g,function(e,t){t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var i=n(t);if("undefined"==typeof i.file)throw new Error("Missing file attribute in include-tag");return i.file=i.file.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"' + "+i.file+".fetch(v) + '"}).replace(/\{if (.+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"';\nif ("+t+") {\n $output += '"}).replace(/\{else ?if (.+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"';\n}\nelse if ("+t+") {\n $output += '"}).replace(/\{implode (.+?)\}/g,function(e,t){i++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var s=n(t);if("undefined"==typeof s.from)throw new Error("Missing from attribute in implode-tag");if("undefined"==typeof s.item)throw new Error("Missing item attribute in implode-tag");return"undefined"==typeof s.glue&&(s.glue="', '"),s.from=s.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\nvar $implode_"+i+" = false;\nfor ($implodeKey_"+i+" in "+s.from+") {\n v["+s.item+"] = "+s.from+"[$implodeKey_"+i+"];\n"+("undefined"!=typeof s.key?" v["+s.key+"] = $implodeKey_"+i+";\n":"")+" if ($implode_"+i+") $output += "+s.glue+";\n $implode_"+i+" = true;\n $output += '"}).replace(/\{foreach (.+?)\}/g,function(e,t){i++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var s=n(t);if("undefined"==typeof s.from)throw new Error("Missing from attribute in foreach-tag");if("undefined"==typeof s.item)throw new Error("Missing item attribute in foreach-tag");return s.from=s.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\n$foreach_"+i+" = false;\nfor ($foreachKey_"+i+" in "+s.from+") {\n $foreach_"+i+" = true;\n break;\n}\nif ($foreach_"+i+") {\n for ($foreachKey_"+i+" in "+s.from+") {\n v["+s.item+"] = "+s.from+"[$foreachKey_"+i+"];\n"+("undefined"!=typeof s.key?" v["+s.key+"] = $foreachKey_"+i+";\n":"")+" $output += '"}).replace(/\{foreachelse\}/g,"';\n }\n}\nelse {\n {\n $output += '").replace(/\{\/foreach\}/g,"';\n }\n}\n$output += '").replace(/\{else\}/g,"';\n}\nelse {\n $output += '").replace(/\{\/(if|implode)\}/g,"';\n}\n$output += '");for(var a in WCF.Template.callbacks)e=WCF.Template.callbacks[a](e);e=e.replace("{ldelim}","{").replace("{rdelim}","}"),t.each(function(t){e=e.replace(t.key,t.value)}),e="$output += '"+e+"';";try{this.fetch=new Function("v","v = window.$.extend({}, v, { __wcf: window.WCF, __window: window }); var $output = ''; "+e+" return $output;")}catch(t){throw console.debug("var $output = ''; "+e+" return $output;"),t}},fetch:function(){}}),WCF.Template.callbacks=[],WCF.ToggleOptions=Class.extend({_element:null,_showItems:[],_hideItems:[],_callback:null,init:function(e,t,i,n){this._element=$("#"+e),this._showItems=t,this._hideItems=i,void 0!==n&&(this._callback=n),this._element.click($.proxy(this._toggle,this)),this._toggle()},_toggle:function(){if(this._element.prop("checked")){for(var e=0,t=this._showItems.length;t>e;e++){var i=this._showItems[e];$("#"+i).show()}for(var e=0,t=this._hideItems.length;t>e;e++){var i=this._hideItems[e];$("#"+i).hide()}null!==this._callback&&this._callback()}}}),WCF.Collapsible={},WCF.Collapsible.Simple={init:function(){$(".jsCollapsible").each($.proxy(function(e,t){this._initButton(t)},this))},_initButton:function(e){var t=$(e),i=t.data("isOpen");i||$("#"+t.data("collapsibleContainer")).hide(),t.click($.proxy(this._toggle,this))},_toggle:function(e){var t=$(e.currentTarget),i=t.data("isOpen"),n=$("#"+$.wcfEscapeID(t.data("collapsibleContainer")));return i?(n.stop().wcfBlindOut("vertical",$.proxy(function(){this._toggleImage(t)},this)),i=!1):(n.stop().wcfBlindIn("vertical",$.proxy(function(){this._toggleImage(t)},this)),i=!0),t.data("isOpen",i),e.stopPropagation(),!1},_toggleImage:function(e){var t=e.find("span.icon");e.data("isOpen")?t.removeClass("fa-chevron-right").addClass("fa-chevron-down"):t.removeClass("fa-chevron-down").addClass("fa-chevron-right")}},WCF.Collapsible.Remote=Class.extend({_className:"",_containers:{},_containerData:{},_proxy:null,init:function(e){this._className=e,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Collapsible.Remote",$.proxy(this._init,this))},_init:function(){this._getContainers().each($.proxy(function(e,t){var i=$(t),n=i.wcfIdentify();void 0===this._containers[n]&&(this._containers[n]=i,this._initContainer(n))},this))},_initContainer:function(e){var t=this._getTarget(e),i=this._getButtonContainer(e),n=this._createButton(e,i);this._containerData[e]={button:n,buttonContainer:i,isOpen:this._containers[e].data("isOpen"),target:t},this._containers[e].data("isOpen")||$("#"+e).addClass("jsCollapsed")},_getContainers:function(){},_getTarget:function(){},_getButtonContainer:function(){},_createButton:function(e,t){var i=(this._containers[e].data("isOpen"),$('<span class="collapsibleButton jsTooltip pointer icon icon16 fa-chevron-down" title="'+WCF.Language.get("wcf.global.button.collapsible")+'">').prependTo(t));return i.data("containerID",e).click($.proxy(this._toggleContainer,this)),i},_toggleContainer:function(e){var t=$(e.currentTarget),i=t.data("containerID"),n=this._containerData[i].isOpen,s=n?"open":"close",a=n?"close":"open";this._proxy.setOption("data",{actionName:"loadContainer",className:this._className,interfaceName:"wcf\\data\\ILoadableContainerAction",objectIDs:[this._getObjectID(i)],parameters:$.extend(!0,{containerID:i,currentState:s,newState:a},this._getAdditionalParameters(i))}),this._proxy.sendRequest(),$("#"+i).toggleClass("jsCollapsed")},_exchangeIcon:function(e,t){t=t||"spinner",e.removeClass("fa-chevron-down fa-chevron-right fa-spinner").addClass("fa-"+t)},_getObjectID:function(e){return $("#"+e).data("objectID")},_getAdditionalParameters:function(){return{}},_updateContent:function(e,t){this._containerData[e].target.html(t)},_success:function(e){if(e.returnValues.containerID){var t=e.returnValues.containerID;if(this._containers[t]){this._containerData[t].isOpen=e.returnValues.isOpen?!0:!1;var i=e.returnValues.isOpen?"open":"close";this._updateContent(t,$.trim(e.returnValues.content),i)}}}}),WCF.Collapsible.SimpleRemote=WCF.Collapsible.Remote.extend({init:function(e){this._super(e),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1})},_initContainer:function(e){this._super(e),this._containerData[e].isOpen||(this._containerData[e].target.hide(),this._exchangeIcon(this._containerData[e].button,"chevron-right"))},_toggleContainer:function(e){var t=$(e.currentTarget),i=t.data("containerID"),n=this._containerData[i].isOpen,s=n?"open":"close",a=n?"close":"open";this._proxy.setOption("data",{actionName:"toggleContainer",className:this._className,interfaceName:"wcf\\data\\IToggleContainerAction",objectIDs:[this._getObjectID(i)],parameters:$.extend(!0,{containerID:i,currentState:s,newState:a},this._getAdditionalParameters(i))}),this._proxy.sendRequest(),this._exchangeIcon(this._containerData[i].button,"open"===a?"chevron-down":"chevron-right"),"open"===a?this._containerData[i].target.show():this._containerData[i].target.hide(),$("#"+i).toggleClass("jsCollapsed"),this._containerData[i].isOpen="open"===a?!0:!1}}),WCF.User={userID:0,username:"",init:function(e,t){this.userID=e,this.username=t}},WCF.Effect={},WCF.Effect.Scroll=Class.extend({scrollTo:function(e,t,i){if(!e.length)return!0;var n=e.getOffsets("offset").top,s=$(document).height(),a=$(window).height();return n>s-a&&(n=s-a,0>n&&(n=0)),i===!0?$("html,body").scrollTop(n):$("html,body").animate({scrollTop:n},400,function(e,t,i,n,s){return-n*((t=t/s-1)*t*t*t-1)+i}),!1}}),WCF.CloseOverlayHandler={addCallback:function(e,t){require(["Ui/CloseOverlay"],function(i){i.add(e,t)})},removeCallback:function(e){require(["Ui/CloseOverlay"],function(t){t.remove(e)})},forceExecution:function(){require(["Ui/CloseOverlay"],function(e){e.execute()})}},WCF.DOMNodeInsertedHandler={addCallback:function(e,t){
+require(["WoltLabSuite/Core/Dom/Change/Listener"],function(e){e.add("__legacy__",t)})},_executeCallbacks:function(){require(["WoltLabSuite/Core/Dom/Change/Listener"],function(e){e.trigger()})},execute:function(){this._executeCallbacks()}},WCF.DOMNodeRemovedHandler={_callbacks:new WCF.Dictionary,_isExecuting:!1,_isListening:!1,addCallback:function(e,t){return this._bindListener(),this._callbacks.isset(e)?(console.debug("[WCF.DOMNodeRemovedHandler] identifier '"+e+"' is already bound to a callback"),!1):void this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){if(!this._isListening){if(window.MutationObserver){var e=new MutationObserver(function(e){var t=!1;e.forEach(function(e){e.removedNodes.length&&(t=!0)}.bind(this)),t&&this._executeCallbacks({})}.bind(this));e.observe(document.body,{childList:!0,subtree:!0})}else $(document).bind("DOMNodeRemoved",$.proxy(this._executeCallbacks,this));this._isListening=!0}},_executeCallbacks:function(e){this._isExecuting||(this._isExecuting=!0,this._callbacks.each(function(t){t.value(e)}),this._isExecuting=!1)}},WCF.Option={},WCF.Option.Handler=Class.extend({init:function(){this._initOptions(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Option.Handler",$.proxy(this._initOptions,this))},_initOptions:function(){$(".jsEnablesOptions").each($.proxy(this._initOption,this))},_initOption:function(e,t){this._change(t),$(t).change($.proxy(this._handleChange,this))},_handleChange:function(e){this._change($(e.target))},_change:function(option){option=$(option);var disableOptions=eval(option.data("disableOptions")),enableOptions=eval(option.data("enableOptions"));switch(option.getTagName()){case"input":switch(option.attr("type")){case"checkbox":this._execute(option.prop("checked"),disableOptions,enableOptions);break;case"radio":if(option.prop("checked")){var isActive=!0;option.data("isBoolean")&&1!=option.val()&&(isActive=!1),this._execute(isActive,disableOptions,enableOptions)}}break;case"select":var $value=option.val(),relevantDisableOptions=[],relevantEnableOptions=[];if(disableOptions.length>0)for(var $index in disableOptions){var $item=disableOptions[$index];$item.value==$value?relevantDisableOptions.push($item.option):relevantEnableOptions.push($item.option)}if(enableOptions.length>0)for(var $index in enableOptions){var $item=enableOptions[$index];$item.value==$value?relevantEnableOptions.push($item.option):relevantDisableOptions.push($item.option)}this._execute(!0,relevantDisableOptions,relevantEnableOptions)}},_execute:function(e,t,i){if(t.length>0)for(var n=0,s=t.length;s>n;n++){var a=t[n];if($.wcfIsset(a))this._enableOption(a,!e);else{var o=$("."+a+"Input");o.length&&this._enableOptions(o.children("dd").find("input, select, textarea"),!e)}}if(i.length>0)for(var n=0,s=i.length;s>n;n++){var a=i[n];if($.wcfIsset(a))this._enableOption(a,e);else{var o=$("."+a+"Input");o.length&&this._enableOptions(o.children("dd").find("input, select, textarea"),e)}}},_enableOption:function(e,t){this._enableOptionElement($("#"+$.wcfEscapeID(e)),t)},_enableOptionElement:function(e,t){e=$(e);var i=e.getTagName();if("select"==i||"input"==i&&("checkbox"==e.attr("type")||"file"==e.attr("type")||"radio"==e.attr("type"))){if(t?e.enable():e.disable(),e.parents(".optionTypeBoolean:eq(0)")){var n=$("#"+e.wcfIdentify()+"_no");t?n.enable():n.disable()}}else t?e.removeAttr("readonly"):e.attr("readonly",!0);t?e.closest("dl").removeClass("disabled"):e.closest("dl").addClass("disabled")},_enableOptions:function(e,t){for(var i=0,n=e.length;n>i;i++)this._enableOptionElement(e[i],t)}}),WCF.PageVisibilityHandler={_callbacks:new WCF.Dictionary,_isListening:!1,_hiddenFieldName:"",addCallback:function(e,t){return this._bindListener(),this._callbacks.isset(e)?(console.debug("[WCF.PageVisibilityHandler] identifier '"+e+"' is already bound to a callback"),!1):void this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){if(!this._isListening){var e=null;"undefined"!=typeof document.hidden?(this._hiddenFieldName="hidden",e="visibilitychange"):"undefined"!=typeof document.mozHidden?(this._hiddenFieldName="mozHidden",e="mozvisibilitychange"):"undefined"!=typeof document.msHidden?(this._hiddenFieldName="msHidden",e="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(this._hiddenFieldName="webkitHidden",e="webkitvisibilitychange"),null===e?console.debug("[WCF.PageVisibilityHandler] This browser does not support the page visibility API."):$(document).on(e,$.proxy(this._executeCallbacks,this)),this._isListening=!0}},_executeCallbacks:function(){if(!this._isExecuting){this._isExecuting=!0;var e=document[this._hiddenFieldName];this._callbacks.each(function(t){t.value(e)}),this._isExecuting=!1}}},WCF.Table={},WCF.Table.EmptyTableHandler=Class.extend({_options:{},_rowClassName:"",init:function(e,t,i){this._rowClassName=t,this._tableContainer=e,this._options=$.extend(!0,{emptyMessage:null,messageType:"info",refreshPage:!1,updatePageNumber:!1},i||{}),WCF.DOMNodeRemovedHandler.addCallback("WCF.Table.EmptyTableHandler."+t,$.proxy(this._remove,this))},_getRowCount:function(){return this._tableContainer.find("table tr."+this._rowClassName).length},_handleEmptyTable:function(){if(this._options.emptyMessage)this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).text(this._options.emptyMessage));else if(this._options.refreshPage)if(this._options.updatePageNumber){var e=window.location.href.match(/(\?|&)pageNo=(\d+)/g);if(e){var t=e[e.length-1].match(/\d+/g);this._options.updatePageNumber>0?t++:t--,window.location=window.location.href.replace(e[e.length-1],e[e.length-1][0]+"pageNo="+t)}}else window.location.reload();else this._tableContainer.remove()},_remove:function(e){if($.getLength(e)){var t=$(e.target);if(t.hasClass(this._rowClassName)){var i=t.parents("tbody:eq(0)");1==i.children("tr").length&&this._handleEmptyTable()}}else this._getRowCount()||this._handleEmptyTable()}}),WCF.Search={},WCF.Search.Base=Class.extend({_callback:null,_caretAt:-1,_className:"",_commaSeperated:!1,_delay:0,_excludedSearchValues:[],_itemCount:0,_itemIndex:-1,_list:null,_oldSearchString:[],_proxy:null,_searchInput:null,_triggerLength:3,_timer:null,init:function(e,t,i,n,s){return null===t||void 0===t||$.isFunction(t)?(this._callback=t?t:null,this._caretAt=-1,this._delay=0,this._excludedSearchValues=[],i&&(this._excludedSearchValues=i),this._searchInput=$(e),this._searchInput.length?(this._searchInput.keydown($.proxy(this._keyDown,this)).keyup($.proxy(this._keyUp,this)).wrap('<span class="dropdown" />'),$.browser.mozilla&&$.browser.touch&&this._searchInput.on("input",$.proxy(this._keyUp,this)),this._list=$('<ul class="dropdownMenu" />').insertAfter(this._searchInput),this._commaSeperated=n?!0:!1,this._oldSearchString=[],this._itemCount=0,this._itemIndex=-1,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:s!==!0?!1:!0,success:$.proxy(this._success,this),autoAbortPrevious:!0}),this._searchInput.is("input")&&this._searchInput.attr("autocomplete","off"),this._searchInput.blur($.proxy(this._blur,this)),void WCF.Dropdown.initDropdownFragment(this._searchInput.parent(),this._list)):void console.debug("[WCF.Search.Base] Selector '"+e+"' for search input is invalid, aborting.")):void console.debug("[WCF.Search.Base] The given callback is invalid, aborting.")},_blur:function(){var e=this;new WCF.PeriodicalExecuter(function(t){e._list.is(":visible")&&e._clearList(!1),t.stop()},250)},_keyDown:function(e){if(e.which===$.ui.keyCode.ENTER){var t=this._searchInput.parents(".dropdown");t.data("disableAutoFocus")?-1!==this._itemIndex&&e.preventDefault():(t.data("preventSubmit")||-1!==this._itemIndex)&&e.preventDefault()}},_keyUp:function(e){switch(e.which){case 37:case 39:return;case 38:return void this._selectPreviousItem();case 40:return void this._selectNextItem();case 13:return this._selectElement(e)}var t=this._getSearchString(e);if(""===t)this._clearList(!1);else if(t.length>=this._triggerLength){var i={data:{excludedSearchValues:this._excludedSearchValues,searchString:t}};if(this._delay){null!==this._timer&&this._timer.stop();var n=this;this._timer=new WCF.PeriodicalExecuter(function(){n._queryServer(i),n._timer.stop(),n._timer=null},this._delay)}else this._queryServer(i)}else this._clearList(!1)},_queryServer:function(e){this._searchInput.parents(".searchBar").addClass("loading"),this._proxy.setOption("data",{actionName:"getSearchResultList",className:this._className,interfaceName:"wcf\\data\\ISearchAction",parameters:this._getParameters(e)}),this._proxy.sendRequest()},setDelay:function(e){this._delay=e},_selectNextItem:function(){0!==this._itemCount&&(this._itemIndex++,this._itemIndex===this._itemCount&&(this._itemIndex=0),this._highlightSelectedElement())},_selectPreviousItem:function(){0!==this._itemCount&&(this._itemIndex--,-1===this._itemIndex&&(this._itemIndex=this._itemCount-1),this._highlightSelectedElement())},_highlightSelectedElement:function(){this._list.find("li").removeClass("dropdownNavigationItem"),this._list.find("li:eq("+this._itemIndex+")").addClass("dropdownNavigationItem")},_selectElement:function(){return 0===this._itemCount?!0:(this._list.find("li.dropdownNavigationItem").trigger("click"),!1)},_getSearchString:function(e){var t=$.trim(this._searchInput.val());if(this._commaSeperated){var i=e.keyCode||e.which;if(i==$.ui.keyCode.COMMA)return"";for(var n=t.split(","),s=n.length,a=0;s>a;a++)n[a]=$.trim(n[a]);for(var a=0;s>a;a++){var o=n[a];if(!this._oldSearchString[a]){t=o;break}if(o!=this._oldSearchString[a]){t=o,this._caretAt=a;break}}this._oldSearchString=n}return t},_getParameters:function(e){return e},_success:function(e){if(this._clearList(!1),this._searchInput.parents(".searchBar").removeClass("loading"),$.getLength(e.returnValues))for(var t in e.returnValues){var i=e.returnValues[t];this._createListItem(i)}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy(function(){this._clearList()},this));var n=this._searchInput.parents(".dropdown").wcfIdentify();WCF.Dropdown.getDropdownMenu(n).hasClass("dropdownOpen")||WCF.Dropdown.toggleDropdown(n),this._itemIndex=-1,WCF.Dropdown.getDropdown(n).data("disableAutoFocus")||this._selectNextItem()},_handleEmptyResult:function(){return!1},_createListItem:function(e){var t=$("<li><span>"+WCF.String.escapeHTML(e.label)+"</span></li>").appendTo(this._list);return t.data("objectID",e.objectID).data("label",e.label).click($.proxy(this._executeCallback,this)),this._itemCount++,t},_executeCallback:function(e){var t=!1,i=$(e.currentTarget);if(this._commaSeperated){var n=i.data("label");this._oldSearchString[this._caretAt]=n,this._searchInput.val(this._oldSearchString.join(", ")),$.browser.webkit&&this._searchInput.css({display:"block"});var s=this._searchInput.val().toLowerCase().indexOf(n.toLowerCase())+n.length;this._searchInput.focus().setCaret(s)}else null===this._callback?this._searchInput.val(i.data("label")):t=this._callback(i.data())===!0?!0:!1;this._clearList(t)},_clearList:function(e){e&&!this._commaSeperated&&this._searchInput.val(""),WCF.Dropdown.getDropdown(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),this._list.end().empty(),WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base"),this._itemCount=0,this._itemIndex=-1},addExcludedSearchValue:function(e){WCF.inArray(e,this._excludedSearchValues)||this._excludedSearchValues.push(e)},removeExcludedSearchValue:function(e){var t=$.inArray(e,this._excludedSearchValues);-1!=t&&this._excludedSearchValues.splice(t,1)}}),WCF.Search.User=WCF.Search.Base.extend({_className:"wcf\\data\\user\\UserAction",_includeUserGroups:!1,init:function(e,t,i,n,s){this._includeUserGroups=i,this._super(e,t,n,s)},_getParameters:function(e){return e.data.includeUserGroups=this._includeUserGroups?1:0,e},_createListItem:function(e){var t=this._super(e),i=null;if(e.icon?i=$(e.icon):this._includeUserGroups&&"group"===e.type&&(i=$('<span class="icon icon16 fa-users" />')),i){var n=t.find("span").detach(),s=$("<div />").addClass("box16").appendTo(t);s.append(i),s.append($("<div />").append(n))}return t.data("type",e.type),t}}),WCF.System={},WCF.System.Dependency={},WCF.System.Dependency.Manager={_callbacks:{},_loaded:[],_setupCallbacks:{},register:function(e,t){return $.isFunction(t)?void(WCF.inArray(e,this._loaded)?setTimeout(function(){t()},1):(this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t))):void console.debug("[WCF.System.Dependency.Manager] Callback for identifier '"+e+"' is invalid, aborting.")},setup:function(e,t){return $.isFunction(t)?(this._setupCallbacks[e]||(this._setupCallbacks[e]=[]),void this._setupCallbacks[e].push(t)):void console.debug("[WCF.System.Dependency.Manager] Setup callback for identifier '"+e+"' is invalid, aborting.")},invoke:function(e){if(this._setupCallbacks[e]){for(var t=0,i=this._setupCallbacks[e].length;i>t;t++)this._setupCallbacks[e][t]();delete this._setupCallbacks[e]}if(this._loaded.push(e),this._callbacks[e]){for(var t=0,i=this._callbacks[e].length;i>t;t++)this._callbacks[e][t]();delete this._callbacks[e]}},reset:function(e){var t=this._loaded.indexOf(e);-1!==t&&this._loaded.splice(t,1)}},WCF.System.FlexibleMenu={init:function(){},registerMenu:function(e){require(["WoltLabSuite/Core/Ui/FlexibleMenu"],function(t){t.register(e)})},rebuild:function(e){require(["WoltLabSuite/Core/Ui/FlexibleMenu"],function(t){t.rebuild(e)})}},WCF.System.Mobile={},WCF.System.ObjectStore={_objects:{},add:function(e,t){void 0===this._objects[e]&&(this._objects[e]=[]),this._objects[e].push(t)},invoke:function(e,t){if(this._objects[e])for(var i=0;i<this._objects[e].length;i++)t(this._objects[e][i])}},WCF.System.Captcha={addCallback:function(e,t){require(["WoltLabSuite/Core/Controller/Captcha"],function(i){try{i.add(e,t)}catch(e){if(e instanceof TypeError)return void console.debug("[WCF.System.Captcha] Given callback is no function")}})},getData:function(e){var t,i=require("WoltLabSuite/Core/Controller/Captcha");try{t=i.getData(e)}catch(t){console.debug('[WCF.System.Captcha] Unknow captcha id "'+e+'"')}return t},removeCallback:function(e){require(["WoltLabSuite/Core/Controller/Captcha"],function(t){try{t.delete(e)}catch(e){}})}},WCF.System.Page={},WCF.System.Notification=Class.extend({_cssClassNames:"",_message:"",init:function(e,t){this._cssClassNames=t||"",this._message=e||""},show:function(e,t,i,n){require(["Ui/Notification"],function(t){t.show(i||this._message,e,n||this._cssClassNames)}.bind(this))}}),WCF.System.Confirmation={show:function(e,t,i,n,s){if("object"==typeof n){var a=$("<div />");a.append(n),n=a.html()}require(["Ui/Confirmation"],function(a){a.show({legacyCallback:t,message:e,parameters:i,template:n||"",messageIsHtml:s===!0})})}},WCF.System.DisableScrolling={_depth:0,_oldOverflow:null,disable:function(){$.browser.touch||(0===this._depth&&(this._oldOverflow=$(document.body).css("overflow"),$(document.body).css("overflow","hidden")),this._depth++)},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$(document.body).css("overflow",this._oldOverflow))}},WCF.System.DisableZoom={_depth:0,_oldViewportSettings:null,disable:function(){if(0===this._depth){var e=$("meta[name=viewport]");this._oldViewportSettings=e.attr("content"),e.attr("content",this._oldViewportSettings+",maximum-scale=1")}this._depth++},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$("meta[name=viewport]").attr("content",this._oldViewportSettings))}},WCF.System.Fullscreen={enterFullscreen:function(e){e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)},toggleFullscreen:function(e){null===this.getFullscreenElement()?this.enterFullscreen(e):this.exitFullscreen()},getFullscreenElement:function(){return document.fullscreenElement?document.fullscreenElement:document.mozFullScreenElement?document.mozFullScreenElement:document.webkitFullscreenElement?document.webkitFullscreenElement:document.msFullscreenElement?document.msFullscreenElement:null},exitFullscreen:function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},isSupported:function(){return document.documentElement.requestFullscreen||document.documentElement.msRequestFullscreen||document.documentElement.mozRequestFullScreen||document.documentElement.webkitRequestFullscreen?!0:!1}},WCF.System.PageNavigation={init:function(e,t){require(["WoltLabSuite/Core/Ui/Page/JumpTo"],function(i){for(var n=elBySelAll(e),s=0,a=n.length;a>s;s++)i.init(n[s],t)})}},WCF.System.KeepAlive=Class.extend({init:function(e){new WCF.PeriodicalExecuter(function(e){new WCF.Action.Proxy({autoSend:!0,data:{actionName:"keepAlive",className:"wcf\\data\\session\\SessionAction"},failure:function(){e.stop()},showLoadingOverlay:!1,success:function(e){WCF.System.PushNotification.executeCallbacks(e)},suppressErrors:!0})},1e3*e)}}),WCF.System.PushNotification={_callbacks:{},addCallback:function(e,t){void 0===this._callbacks[e]&&(this._callbacks[e]=[]),this._callbacks[e].push(t)},executeCallbacks:function(e){for(var t in e.returnValues)if(void 0!==this._callbacks[t])for(var i=0;i<this._callbacks[t].length;i++)this._callbacks[t][i](e.returnValues[t])}},WCF.System.Event={addListener:function(e,t,i){return window.__wcf_bc_eventHandler.add(e,t,i)},removeListener:function(e,t,i){return window.__wcf_bc_eventHandler.remove(e,t,i)},removeAllListeners:function(e,t){return window.__wcf_bc_eventHandler.removeAll(e,t)},fireEvent:function(e,t,i){window.__wcf_bc_eventHandler.fire(e,t,i)}},WCF.System.Worker=Class.extend({_aborted:!1,_actionName:"",_callback:null,_className:"",_dialog:null,_proxy:null,_title:"",init:function(e,t,i,n,s){this._aborted=!1,this._actionName=e,this._callback=s||null,this._className=t,this._dialog=null,this._proxy=new WCF.Action.Proxy({autoSend:!0,data:{actionName:this._actionName,className:this._className,parameters:n||{}},showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._title=i},_success:function(e){if(null===this._dialog&&(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.wcfDialog({closeConfirmMessage:WCF.Language.get("wcf.worker.abort.confirmMessage"),closeViaModal:!1,onClose:$.proxy(function(){this._aborted=!0,this._proxy.abortPrevious(),window.location.reload()},this),title:this._title})),!this._aborted)if(e.returnValues.template&&this._dialog.html(e.returnValues.template),this._dialog.find("progress").attr("value",e.returnValues.progress).text(e.returnValues.progress+"%").next("span").text(e.returnValues.progress+"%"),e.returnValues.progress<100){var t=e.returnValues.parameters||{};t.loopCount=e.returnValues.loopCount,this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:t}),this._proxy.sendRequest()}else if(null!==this._callback)this._callback(this,e);else{this._dialog.find(".fa-spinner").removeClass("fa-spinner").addClass("fa-check green"),this._dialog.find(".contentHeader h1").text(WCF.Language.get("wcf.global.worker.completed"));var i=$('<div class="formSubmit" />').appendTo(this._dialog);$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(i).focus().click(function(){e.returnValues.redirectURL?window.location=e.returnValues.redirectURL:window.location.reload()}),this._dialog.wcfDialog("render")}}}),WCF.InlineEditor=Class.extend({_callbacks:[],_dropdowns:{},_elements:{},_notification:null,_options:[],_proxy:null,_triggerElements:{},_updateData:[],init:function(e){var t=$(e);if(t.length){this._setOptions();for(var i="",n=0,s=this._options.length;s>n;n++)if(this._options[n].isQuickOption){i=this._options[n].optionName;break}var a=this;t.each(function(e,t){var n=$(t),s=n.wcfIdentify(),o=a._getTriggerElement(n);null!==o&&1===o.length&&(o.on(WCF_CLICK_EVENT,$.proxy(a._show,a)).data("elementID",s),i&&o.disableSelection().data("optionName",i).dblclick($.proxy(a._click,a)),a._elements[s]=n)}),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),WCF.CloseOverlayHandler.addCallback("WCF.InlineEditor",$.proxy(this._closeAll,this)),this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success"),"success")}},_closeAll:function(){for(var e in this._elements)this._hide(e)},_setOptions:function(){this._options=[]},registerCallback:function(e){$.isFunction(e)&&this._callbacks.push(e)},_getTriggerElement:function(){return null},_show:function(e){e.preventDefault();var t=$(e.currentTarget).data("elementID"),i=null;if(!this._dropdowns[t]){this._triggerElements[t]=i=this._getTriggerElement(this._elements[t]).addClass("dropdownToggle");var n=i[0].parentNode;n&&"LI"===n.nodeName&&1===n.childElementCount?n.classList.add("dropdown"):i.wrap('<span class="dropdown" />'),this._dropdowns[t]=$('<ul class="dropdownMenu" />').insertAfter(i)}this._dropdowns[t].empty();for(var s=!1,a="",o=0,r=this._options.length;r>o;o++){var l=this._options[o];if("divider"===l.optionName)""!==a&&"divider"!==a&&($('<li class="dropdownDivider" />').appendTo(this._dropdowns[t]),a=l.optionName);else if(this._validate(t,l.optionName)||this._validateCallbacks(t,l.optionName)){var c=$("<li><span>"+l.label+"</span></li>").appendTo(this._dropdowns[t]);c.data("elementID",t).data("optionName",l.optionName).data("isQuickOption",l.isQuickOption?!0:!1).click($.proxy(this._click,this)),s=!0,a=l.optionName}}if(s){var u=this._dropdowns[t].children().last();u.hasClass("dropdownDivider")&&u.remove();var d=null,h=0;if(this._dropdowns[t].children().each(function(e,t){var i=$(t);i.hasClass("dropdownDivider")||(i.data("isQuickOption")?d=i:h++)}),!h)return d.trigger("click"),this._triggerElements[t]&&WCF.Dropdown.close(this._triggerElements[t].parents(".dropdown").wcfIdentify()),!1}return null!==i&&WCF.Dropdown.initDropdown(i,!0),!1},_validate:function(){return!1},_validateCallbacks:function(e,t){var i=this._callbacks.length;if(i)for(var n=0;i>n;n++)if(this._callbacks[n].validate(this._elements[e],t))return!0;return!1},_success:function(e){var t=this._updateData.length;t&&(this._updateState(e),this._updateData=[])},_updateState:function(){},_click:function(e){var t=$(e.currentTarget),i=t.data("elementID"),n=t.data("optionName");this._execute(i,n)||this._executeCallback(i,n),this._hide(i)},_execute:function(){return!1},_executeCallback:function(e,t){var i=this._callbacks.length;if(i)for(var n=0;i>n;n++)if(this._callbacks[n].execute(this._elements[e],t))return!0;return!1},_hide:function(e){this._dropdowns[e]&&this._dropdowns[e].empty().removeClass("dropdownOpen")}}),WCF.Upload=Class.extend({_name:"__files[]",_buttonSelector:null,_fileListSelector:null,_fileUpload:null,_className:"",_iframe:null,_internalFileID:0,_options:{},_uploadMatrix:[],_supportsAJAXUpload:!0,_overlay:null,init:function(e,t,i,n){this._buttonSelector=e,this._fileListSelector=t,this._className=i,this._internalFileID=0,this._options=$.extend(!0,{action:"upload",multiple:!1,url:"index.php?ajax-upload/&t="+SECURITY_TOKEN},n||{}),this._options.url=WCF.convertLegacyURL(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=WSC_API_URL+this._options.url);var s=new XMLHttpRequest;this._supportsAJAXUpload=s&&"upload"in s&&"onprogress"in s.upload,this._createButton()},_createButton:function(){if(this._supportsAJAXUpload){this._fileUpload=$('<input type="file" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/>"),this._fileUpload.change($.proxy(this._upload,this));var e=$('<p class="button uploadButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>");e.prepend(this._fileUpload)}else{var e=$('<p class="button uploadFallbackButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>");e.click($.proxy(this._showOverlay,this))}this._insertButton(e)},_insertButton:function(e){this._buttonSelector.prepend(e)},_removeButton:function(){var e=".uploadButton";this._supportsAJAXUpload||(e=".uploadFallbackButton"),this._buttonSelector.find(e).remove()},_upload:function(e,t,i){var n=null,s=[];if(t)s.push(t);else if(i){var a="";switch(i.type){case"image/png":a=".png";break;case"image/jpeg":a=".jpg";break;case"image/gif":a=".gif"}s.push({name:"pasted-from-clipboard"+a})}else s=this._fileUpload.prop("files");if(s.length){var o=new FormData;if(n=this._createUploadMatrix(s),!this._uploadMatrix[n].length)return null;for(var r=0,l=s.length;l>r;r++)if(this._uploadMatrix[n][r]){var c=this._uploadMatrix[n][r].data("internalFileID");i?o.append("__files["+c+"]",i,s[r].name):o.append("__files["+c+"]",s[r])}o.append("actionName",this._options.action),o.append("className",this._className);var u=this._getParameters();for(var d in u)o.append("parameters["+d+"]",u[d]);var h=this;$.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:o,contentType:!1,processData:!1,success:function(e){h._success(n,e)},error:$.proxy(this._error,this),xhr:function(){var e=$.ajaxSettings.xhr();return e&&e.upload.addEventListener("progress",function(e){h._progress(n,e)},!1),e}})}return n},_createUploadMatrix:function(e){if(e.length){var t=this._uploadMatrix.length;this._uploadMatrix[t]=[];for(var i=0,n=e.length;n>i;i++){var s=e[i],a=this._initFile(s);a.hasClass("uploadFailed")||(a.data("filename",s.name).data("internalFileID",this._internalFileID++),this._uploadMatrix[t][i]=a)}return t}return null},_success:function(){},_error:function(){},_progress:function(e,t){var i=Math.round(100*t.loaded/t.total);for(var n in this._uploadMatrix[e])this._uploadMatrix[e][n].find("progress").attr("value",i)},_getParameters:function(){return{}},_initFile:function(e){return $("<li>"+e.name+" ("+e.size+')<progress max="100" /></li>').appendTo(this._fileListSelector)},_showOverlay:function(){if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body);var e=this._overlay.find("form");$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e);var t=this._getParameters();for(var i in t)$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy(function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix([e]),i=this;this._iframe.data("loading",!0).off("load").load(function(){i._evaluateResponse(t)}),this._overlay.wcfDialog("close")},this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)},_getFilename:function(){return $("#__fileUpload").val().split("\\").pop()}}),WCF.Upload.Parallel=WCF.Upload.extend({init:function(e,t,i,n){n=$.extend(!0,n||{},{multiple:!0}),this._super(e,t,i,n)},_upload:function(){for(var e=this._fileUpload.prop("files"),t=0,i=e.length;i>t;t++){var n=e[t],s=new FormData,a=this._createUploadMatrix(n);if(this._uploadMatrix[a].length){s.append("__files["+a+"]",n),s.append("actionName",this._options.action),s.append("className",this._className);var o=this._getParameters();for(var r in o)s.append("parameters["+r+"]",o[r]);this._sendRequest(a,s)}}},_sendRequest:function(e,t){var i=this;$.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:t,contentType:!1,processData:!1,success:function(t){i._success(e,t)},error:$.proxy(this._error,this),xhr:function(){var t=$.ajaxSettings.xhr();return t&&t.upload.addEventListener("progress",function(t){i._progress(e,t)},!1),t}})},_createUploadMatrix:function(e){var t=this._initFile(e);return t.hasClass("uploadFailed")?null:(t.data("filename",e.name).data("internalFileID",this._internalFileID),this._uploadMatrix[this._internalFileID++]=t,this._internalFileID-1)},_success:function(){},_progress:function(e,t){var i=Math.round(100*t.loaded/t.total);this._uploadMatrix[e].find("progress").attr("value",i)},_showOverlay:function(){if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body);var e=this._overlay.find("form");$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e);var t=this._getParameters();for(var i in t)$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy(function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix(e),i=this;this._iframe.data("loading",!0).off("load").load(function(){i._evaluateResponse(t)}),this._overlay.wcfDialog("close")},this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)}}),WCF.Sortable={},WCF.Sortable.List=Class.extend({_additionalParameters:{},_className:"",_containerID:"",_container:null,_notification:null,_offset:0,_options:{},_proxy:null,_structure:{},init:function(e,t,i,n,s,a){this._additionalParameters=a||{},this._containerID=$.wcfEscapeID(e),this._container=$("#"+this._containerID),this._className=t,this._offset=i?i:0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._structure={},this._options=$.extend(!0,{axis:"y",connectWith:"#"+this._containerID+" .sortableList",disableNesting:"sortableNoNesting",doNotClear:!0,errorClass:"sortableInvalidTarget",forcePlaceholderSize:!0,helper:"clone",items:"li:not(.sortableNoSorting)",opacity:.6,placeholder:"sortablePlaceholder",tolerance:"pointer",toleranceElement:"> span"},n||{});var o=$("#"+this._containerID+" .sortableList");if(o.is("tbody")&&"clone"===this._options.helper){this._options.helper=this._tableRowHelper.bind(this);var r=o.prev("thead");r&&r.find("th").each(function(e,t){t=$(t),t.width(t.width())})}if(s?o.sortable(this._options):o.nestedSortable(this._options),this._className){var l=this._container.find(".formSubmit");if(!l.length&&(l=this._container.next(".formSubmit"),!l.length))return void console.debug("[WCF.Sortable.Simple] Unable to find form submit for saving, aborting.");l.children('button[data-type="submit"]').click($.proxy(this._submit,this))}},_tableRowHelper:function(e,t){return t.children("td").each(function(e,t){t=$(t),t.width(t.width())}),t},_submit:function(){this._structure={},this._container.find(".sortableList").each($.proxy(function(e,t){var i=$(t),n=i.data("objectID");void 0!==n&&i.children(this._options.items).each($.proxy(function(e,t){
+var i=$(t).data("objectID");this._structure[n]||(this._structure[n]=[]),this._structure[n].push(i)},this))},this));var e=$.extend(!0,{data:{offset:this._offset,structure:this._structure}},this._additionalParameters);this._proxy.setOption("data",{actionName:"updatePosition",className:this._className,interfaceName:"wcf\\data\\ISortableAction",parameters:e}),this._proxy.sendRequest()},_success:function(){null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._notification.show()}}),WCF.Popover=Class.extend({_activeElementID:"",_identifier:"",_popoverObj:null,init:function(e){var t=!1;require(["Environment"],function(e){"desktop"!==e.platform()&&(t=!0)}.bind(this)),t||(this._activeElementID="",this._identifier=e,require(["WoltLabSuite/Core/Controller/Popover"],function(t){t.init({attributeName:"legacy",className:e,identifier:this._identifier,legacy:!0,loadCallback:this._legacyLoad.bind(this)})}.bind(this)))},_initContainers:function(){},_legacyLoad:function(e,t){this._activeElementID=e,this._popoverObj=t,this._loadContent()},_insertContent:function(e,t){this._popoverObj.setContent(this._identifier,e,t)}}),WCF.EditableItemList=Class.extend({_allowCustomInput:!1,_className:"",_data:{},_form:null,_itemList:null,_objectID:0,_objectTypeID:0,_search:null,_searchInput:null,init:function(e,t){if(this._itemList=$(e),this._searchInput=$(t),this._data={},!this._itemList.length||!this._searchInput.length)return void console.debug("[WCF.EditableItemList] Item list and/or search input do not exist, aborting.");if(this._objectID=this._getObjectID(),this._objectTypeID=this._getObjectTypeID(),this._itemList.find(".jsEditableItem").click($.proxy(this._click,this)),this._itemList.children("ul").length||$("<ul />").appendTo(this._itemList),this._itemList=this._itemList.children("ul"),this._form=this._itemList.parents("form").submit($.proxy(this._submit,this)),this._allowCustomInput){var i=this;this._searchInput.keydown($.proxy(this._keyDown,this)).keypress($.proxy(this._keyPress,this)).on("paste",function(){setTimeout(function(){i._onPaste()},100)})}this._searchInput.parents(".dropdown").data("preventSubmit",!0)},_keyDown:function(e){return null===e?this._keyPress(null):!0},_keyPress:function(e){if(null===e||44===e.charCode||e.charCode===$.ui.keyCode.ENTER||$.browser.mozilla&&e.keyCode===$.ui.keyCode.ENTER){if(null!==e&&e.charCode===$.ui.keyCode.ENTER&&this._search&&-1!==this._search._itemIndex)return!1;var t=$.trim(this._searchInput.val());return e&&44===e.charCode&&(t=t.substring(0,this._searchInput.getCaret())),""===t?!0:(this.addItem({objectID:0,label:t}),this._searchInput.val(e&&44===e.charCode?$.trim(this._searchInput.val().substr(this._searchInput.getCaret())):""),null!==e&&e.stopPropagation(),!1)}return!0},_onPaste:function(){var e=$.trim(this._searchInput.val());e=e.split(",");for(var t=0,i=e.length;i>t;t++){var n=$.trim(e[t]);""!==n&&this.addItem({objectID:0,label:n})}this._searchInput.val("")},load:function(){},_click:function(e){var t=$(e.currentTarget),i=t.data("objectID"),n=t.data("label");return this._search&&this._search.removeExcludedSearchValue(n),this._removeItem(i,n),t.remove(),e.stopPropagation(),!1},_getObjectID:function(){return 0},_getObjectTypeID:function(){return 0},addItem:function(e){if(this._data[e.objectID]&&(0!==e.objectID||!this._allowCustomInput))return!0;var t=$('<li class="badge">'+WCF.String.escapeHTML(e.label)+"</li>").data("objectID",e.objectID).data("label",e.label).appendTo(this._itemList);return t.click($.proxy(this._click,this)),this._search&&this._search.addExcludedSearchValue(e.label),this._addItem(e.objectID,e.label),!0},clearList:function(){this._itemList.children("li").each($.proxy(function(e,t){var i=$(t);this._search&&this._search.removeExcludedSearchValue(i.data("label")),i.remove(),this._removeItem(i.data("objectID"),i.data("label"))},this))},_submit:function(){this._keyDown(null)},_addItem:function(e,t){this._data[e]=t},_removeItem:function(e){delete this._data[e]},getSearchInput:function(){return this._searchInput}}),WCF.Language.Chooser=Class.extend({init:function(e,t,i,n,s,a){require(["WoltLabSuite/Core/Language/Chooser"],function(o){o.init(e,t,i,n,s,a)})}}),WCF.Style={},WCF.UserPanel=Class.extend({_container:null,_didLoad:!1,_link:null,_noItems:"",_revertOnEmpty:!0,init:function(e){return this._container=$("#"+e),this._didLoad=!1,this._revertOnEmpty=!0,1!=this._container.length?void console.debug("[WCF.UserPanel] Unable to find container identfied by '"+e+"', aborting."):void this._convert()},_convert:function(){this._container.addClass("dropdown"),this._link=this._container.children("a").remove();var e=$('<a href="'+this._link.attr("href")+'" class="dropdownToggle">'+this._link.html()+"</a>").appendTo(this._container).click($.proxy(this._click,this)),t=$('<ul class="dropdownMenu" />').appendTo(this._container);$('<li class="jsDropdownPlaceholder"><span>'+WCF.Language.get("wcf.global.loading")+"</span></li>").appendTo(t),this._addDefaultItems(t),this._container.dblclick($.proxy(function(){return window.location=this._link.attr("href"),!1},this)),WCF.Dropdown.initDropdown(e,!1)},_addDefaultItems:function(){},_addDivider:function(e){$('<li class="dropdownDivider" />').appendTo(e)},_click:function(e){e.preventDefault(),this._didLoad||(new WCF.Action.Proxy({autoSend:!0,data:this._getParameters(),success:$.proxy(this._success,this)}),this._didLoad=!0)},_getParameters:function(){return{}},_success:function(e){var t=WCF.Dropdown.getDropdownMenu(this._container.wcfIdentify());t.children(".jsDropdownPlaceholder").remove(),e.returnValues&&e.returnValues.template?($(""+e.returnValues.template).prependTo(t),this._updateBadge(e.returnValues.totalCount),this._after(t)):($("<li><span>"+WCF.Language.get(this._noItems)+"</span></li>").prependTo(t),this._updateBadge(0))},_updateBadge:function(e){if(e=parseInt(e)||0){var t=this._container.find(".badge");t.length||(t=$('<span class="badge badgeUpdate" />').appendTo(this._container.children(".dropdownToggle")),t.before(" ")),t.html(e)}else this._container.find(".badge").remove()},_after:function(){}}),jQuery.fn.extend({wcfDialog:function(e){var t=arguments;return require(["Dom/Util","Ui/Dialog"],function(i,n){var s=i.identify(this[0]);"close"===e?n.close(s):"render"===e?n.rebuild(s):"option"===e?3===t.length&&"title"===t[1]&&"string"==typeof t[2]&&n.setTitle(s,t[2]):(this[0].parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&document.body.appendChild(this[0]),n.openStatic(s,null,1===t.length&&"object"==typeof t[0]?t[0]:{}))}.bind(this)),this}}),$.widget("ui.wcfSlideshow",{_buttonList:null,_count:0,_index:0,_itemList:null,_items:null,_timer:null,_width:0,options:{cycle:!0,cycleInterval:5,itemGap:50},_create:function(){this._itemList=this.element.children("ul"),this._items=this._itemList.children("li"),this._count=this._items.length,this._index=0,this._count>1&&this._initSlideshow()},_initSlideshow:function(){var e=$(this._items.get(0)).outerHeight();this._items.addClass("slideshowItem"),this._width=this.element.css("height",e).innerWidth(),this._itemList.addClass("slideshowItemList").css("left",0),this._items.each($.proxy(function(t,i){$(i).show().css({height:e,left:(this._width+this.options.itemGap)*t,width:this._width})},this)),this.element.css({height:e,width:this._width}).hover($.proxy(this._hoverIn,this),$.proxy(this._hoverOut,this)),this._buttonList=$('<ul class="slideshowButtonList" />').appendTo(this.element);for(var t=0;t<this._count;t++){var i=$('<li><a><span class="icon icon16 fa-circle" /></a></li>').data("index",t).click($.proxy(this._click,this)).appendTo(this._buttonList);0==t&&i.find(".icon").addClass("active")}this._resetTimer(),$(window).resize($.proxy(this._resize,this))},rebuildHeight:function(){var e=$(this._items.get(0)).css("height","auto"),t=e.outerHeight();this._items.css("height",t+"px"),this.element.css("height",t+"px")},_resize:function(){this._width=this.element.css("width","auto").innerWidth(),this._items.each($.proxy(function(e,t){$(t).css({left:(this._width+this.options.itemGap)*e,width:this._width})},this)),this._index--,this.moveTo(null)},_hoverIn:function(){null!==this._timer&&this._timer.stop()},_hoverOut:function(){this._resetTimer()},_resetTimer:function(){if(this.options.cycle){null!==this._timer&&this._timer.stop();var e=this;this._timer=new WCF.PeriodicalExecuter(function(){e.moveTo(null)},1e3*this.options.cycleInterval)}},_click:function(e){this.moveTo($(e.currentTarget).data("index")),this._resetTimer()},moveTo:function(e){this._index=null===e?this._index+1:e,this._index==this._count&&(this._index=0),$(this._buttonList.find(".icon").removeClass("active").get(this._index)).addClass("active"),this._itemList.css("left",this._index*(this._width+this.options.itemGap)*-1),this._trigger("moveTo",null,{index:this._index})},getItem:function(e){return this._items[e]?this._items[e]:null}}),jQuery.fn.extend({datepicker:function(e){var t=this[0],i=Array.prototype.slice.call(arguments,1);switch(e){case"destroy":window.__wcf_bc_datePicker.destroy(t);break;case"getDate":return window.__wcf_bc_datePicker.getDate(t);case"option":if("onClose"===i[0])return function(){};console.warn("datepicker('option') supports only 'onClose'.");break;case"setDate":window.__wcf_bc_datePicker.setDate(t,i[0]);break;case"setOption":"onClose"===i[0]?window.__wcf_bc_datePicker.setCloseCallback(t,i[1]):console.warn("datepicker('setOption') supports only 'onClose'.");break;default:console.debug("Unsupported method '"+e+"' for datepicker()")}return this}}),jQuery.fn.extend({wcfTabs:function(e){var t=this[0],i=Array.prototype.slice.call(arguments,1);require(["Dom/Util","WoltLabSuite/Core/Ui/TabMenu"],function(n,s){var a=s.getTabMenu(n.identify(t));null!==a&&a[e].apply(a,i)})}}),$.widget("ui.wcfPages",{_api:null,SHOW_LINKS:11,SHOW_SUB_LINKS:20,options:{activePage:1,maxPage:1},_create:function(){require(["WoltLabSuite/Core/Ui/Pagination"],function(e){this._api=new e(this.element[0],{activePage:this.options.activePage,maxPage:this.options.maxPage,callbackShouldSwitch:function(e){var t=this._trigger("shouldSwitch",void 0,{nextPage:e});return t!==!1}.bind(this),callbackSwitch:function(e){this._trigger("switched",void 0,{activePage:e})}.bind(this)})}.bind(this))},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this._api=null,this.element[0].innerHTML=""},_setOption:function(e,t){if("activePage"==e&&t!=this.options[e]&&t>0&&t<=this.options.maxPage){var i=this._trigger("shouldSwitch",void 0,{nextPage:t});i||void 0!==i?this._api.switchPage(t):this._trigger("notSwitched",void 0,{activePage:t})}return this}}),WCF.Category={},WCF.Category.NestedList=Class.extend({_categories:{},init:function(){var e=this;$(".jsCategory").each(function(t,i){var n=$(i).data("parentCategoryID",null).change($.proxy(e._updateSelection,e));e._categories[n.val()]=n;var s=[];n.parents("li").find(".jsChildCategory").each(function(t,i){var a=$(i).data("parentCategoryID",n.val()).change($.proxy(e._updateSelection,e));e._categories[a.val()]=a,s.push(a.val()),a.is(":checked")&&n.prop("checked","checked")}),n.data("childCategoryIDs",s)})},_updateSelection:function(e){var t=$(e.currentTarget),i=t.data("parentCategoryID");if(t.is(":checked"))null!==i&&this._categories[i].prop("checked","checked");else if(null===i)for(var n=t.data("childCategoryIDs"),s=0,a=n.length;a>s;s++)this._categories[n[s]].prop("checked",!1)}}),WCF.Category.FlexibleCategoryList=Class.extend({_list:null,_categories:{},init:function(e){return this._list=$("#"+e),this._buildStructure(),this._list.find("input:checked").each(function(){$(this).trigger("change")}),this._list.children("li").length<2?void this._list.addClass("flexibleCategoryListDisabled"):void 0},_buildStructure:function(){var e=this;this._list.find(".jsCategory").each(function(t,i){var n=$(i).change(e._updateSelection.bind(e)),s=parseInt(n.val()),a=[];n.parents("li:eq(0)").find(".jsChildCategory").each(function(t,i){var s=$(i);s.data("parentCategory",n).change(e._updateSelection.bind(e));var o=parseInt(s.val());a.push(s);var r=[];s.parents("li:eq(0)").find(".jsSubChildCategory").each(function(t,i){var n=$(i);n.data("parentCategory",s).change(e._updateSelection.bind(e)),r.push(n)}),e._categories[o]=r}),e._categories[s]=a})},_updateSelection:function(e){var t=$(e.currentTarget),i=parseInt(t.val()),n=t.data("parentCategory");if(t.is(":checked"))n&&(n.prop("checked","checked"),n=n.data("parentCategory"),n&&n.prop("checked","checked"));else{if(this._categories[i])for(var s=0,a=this._categories[i].length;a>s;s++){var o=this._categories[i][s];o.prop("checked",!1);var r=parseInt(o.val());if(this._categories[r])for(var l=0,c=this._categories[r].length;c>l;l++)this._categories[r][l].prop("checked",!1)}if(n){for(var u=parseInt(n.val()),s=0,a=this._categories[u].length;a>s;s++)if(this._categories[u][s].prop("checked"))return;if(n=n.data("parentCategory")){u=parseInt(n.val());for(var s=0,a=this._categories[u].length;a>s;s++)if(this._categories[u][s].prop("checked"))return}}}}}),WCF.Condition={},WCF.Notice={}; })(this);
// WCF.Like.js
(function (window, undefined) {"use strict";WCF.Like=Class.extend({_allowForOwnContent:!1,_canLike:!1,_containers:{},_containerData:{},_enableDislikes:!0,_isBusy:!1,_likeDetails:{},_proxy:null,_showSummary:!0,init:function(t,e,i,a){this._canLike=t,this._enableDislikes=e,this._isBusy=!1,this._likeDetails={},this._showSummary=i,this._allowForOwnContent=a;var s=this._getContainers();this._initContainers(s),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)});var n=new Date,o=n.toString().hashCode+n.getUTCMilliseconds();WCF.DOMNodeInsertedHandler.addCallback("WCF.Like"+o,$.proxy(this._domNodeInserted,this))},_domNodeInserted:function(){var t=this._getContainers();this._initContainers(t)},_initContainers:function(containers){var $createdWidgets=!1;containers.each($.proxy(function(index,container){var $container=$(container),$containerID=$container.wcfIdentify();this._containers[$containerID]||(this._containers[$containerID]=$container,this._containerData[$containerID]={likeButton:null,badge:null,dislikeButton:null,likes:$container.data("like-likes"),dislikes:$container.data("like-dislikes"),objectType:$container.data("objectType"),objectID:this._getObjectID($containerID),users:eval($container.data("like-users")),liked:$container.data("like-liked")},this._createWidget($containerID),$createdWidgets=!0)},this)),$createdWidgets&&new WCF.PeriodicalExecuter(function(t){t.stop(),WCF.DOMNodeInsertedHandler.execute()},250)},_getContainers:function(){},_getWidgetContainer:function(){},_getObjectID:function(){},_addWidget:function(t,e){var i=this._getWidgetContainer(t);e.appendTo(i)},_buildWidget:function(t,e,i,a){var s=$('<aside class="likesWidget"><ul></ul></aside>');this._canLike&&(e.appendTo(s.find("ul")),i.appendTo(s.find("ul"))),a.appendTo(s),this._addWidget(t,s)},_createWidget:function(t){var e=$('<li class="wcfLikeButton"><a href="#" title="'+WCF.Language.get("wcf.like.button.like")+'" class="jsTooltip"><span class="icon icon16 fa-thumbs-o-up" /> <span class="invisible">'+WCF.Language.get("wcf.like.button.like")+"</span></a></li>"),i=$('<li class="wcfDislikeButton"><a href="#" title="'+WCF.Language.get("wcf.like.button.dislike")+'" class="jsTooltip"><span class="icon icon16 fa-thumbs-o-down" /> <span class="invisible">'+WCF.Language.get("wcf.like.button.dislike")+"</span></a></li>");this._enableDislikes||i.hide(),this._allowForOwnContent||WCF.User.userID!=this._containers[t].data("userID")||(e=$(""),i=$(""));var a=$('<a class="badge jsTooltip likesBadge" />').data("containerID",t).click($.proxy(this._showLikeDetails,this)),s=null;this._showSummary&&(s=$('<p class="likesSummary"><span class="pointer" /></p>'),s.children("span").data("containerID",t).click($.proxy(this._showLikeDetails,this))),this._buildWidget(t,e,i,a,s),this._containerData[t].likeButton=e,this._containerData[t].dislikeButton=i,this._containerData[t].badge=a,this._containerData[t].summary=s,e.data("containerID",t).data("type","like").click($.proxy(this._click,this)),i.data("containerID",t).data("type","dislike").click($.proxy(this._click,this)),this._setActiveState(e,i,this._containerData[t].liked),this._updateBadge(t),this._showSummary&&this._updateSummary(t)},_showLikeDetails:function(t,e){var i=null===t?e:$(t.currentTarget).data("containerID");void 0===this._likeDetails[i]&&(this._likeDetails[i]=new WCF.User.List("wcf\\data\\like\\LikeAction",WCF.Language.get("wcf.like.details"),{data:{containerID:i,objectID:this._containerData[i].objectID,objectType:this._containerData[i].objectType}})),this._likeDetails[i].open()},_click:function(t){t.preventDefault();var e=$(t.currentTarget);return null===e?void console.debug("[WCF.Like] Unable to find target button, aborting."):void this._sendRequest(e.data("containerID"),e.data("type"))},_sendRequest:function(t,e){this._isBusy||(this._isBusy=!0,this._proxy.setOption("data",{actionName:e,className:"wcf\\data\\like\\LikeAction",parameters:{data:{containerID:t,objectID:this._containerData[t].objectID,objectType:this._containerData[t].objectType}}}),this._proxy.sendRequest())},_success:function(t){var e=t.returnValues.containerID;if(this._containers[e])switch(t.actionName){case"dislike":case"like":this._containerData[e].likes=parseInt(t.returnValues.likes),this._containerData[e].dislikes=parseInt(t.returnValues.dislikes),this._containerData[e].users=t.returnValues.users,$.each(this._containerData[e].users,function(t,e){e.username=WCF.String.escapeHTML(e.username)}),this._updateBadge(e),this._showSummary&&this._updateSummary(e);var i=this._containerData[e].likeButton,a=this._containerData[e].dislikeButton,s=0;t.returnValues.isLiked?s=1:t.returnValues.isDisliked&&(s=-1),this._setActiveState(i,a,s),void 0!==this._likeDetails[e]&&delete this._likeDetails[e],this._isBusy=!1}},_updateBadge:function(t){if(this._containerData[t].likes||this._containerData[t].dislikes){this._containerData[t].badge.show();var e=this._containerData[t].likes-this._containerData[t].dislikes,i=this._containerData[t].badge;i.removeClass("green red"),e>0?(i.text("+"+WCF.String.formatNumeric(e)),i.addClass("green")):0>e?(i.text(WCF.String.formatNumeric(e)),i.addClass("red")):i.text("±0");var a=this._containerData[t].likes,s=this._containerData[t].dislikes;i.data("tooltip",WCF.Language.get("wcf.like.tooltip",{likes:a,dislikes:s}))}else this._containerData[t].badge.hide()},_updateSummary:function(t){if(this._containerData[t].likes){this._containerData[t].summary.show();var e=this._containerData[t].users,i=[];for(var a in e)i.push(e[a].username);var s=this._containerData[t].likes-i.length;this._containerData[t].summary.children("span").html(WCF.Language.get("wcf.like.summary",{users:i,others:s}))}else this._containerData[t].summary.hide()},_setActiveState:function(t,e,i){t.removeClass("active"),e.removeClass("active"),1==i?t.addClass("active"):-1==i&&e.addClass("active")}}); })(this);