1/* 2 =======================================================================*\ 3|| ###################################################################### || 4|| # vBulletin 5.7.5 Patch Level 3 5|| # ------------------------------------------------------------------ # || 6|| # Copyright 2000-2025 MH Sub I, LLC dba vBulletin. All Rights Reserved. # || 7|| # This file may not be redistributed in whole or significant part. # || 8|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # || 9|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || 10|| ###################################################################### || 11\*========================================================================*/ 12// ***************************
13// js.compressed/jquery/jquery-migrate-3.3.0.min.js 14// *************************** 15/*! jQuery Migrate v3.3.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ 16"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window)}(function(s,n){"use strict";function e(e){return 0<=function(e,t){var r,n=/^(\d+)\.(\d+)\.(\d+)/,i=n.exec(e)||[],o=n.exec(t)||[];for(r=1;r<=3;r++){if(+i[r]>+o[r])return 1;if(+i[r]<+o[r])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.3.0",n.console&&n.console.log&&(s&&e("3.0.0")||n.console.log("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),s.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),n.console.log("JQMIGRATE: Migrate is installed"+(s.migrateMute?"":" with logging active")+", version "+s.migrateVersion));var r={};function u(e){var t=n.console;s.migrateDeduplicateWarnings&&r[e]||(r[e]=!0,s.migrateWarnings.push(e),t&&t.warn&&!s.migrateMute&&(t.warn("JQMIGRATE: "+e),s.migrateTrace&&t.trace&&t.trace()))}function t(e,t,r,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return u(n),r},set:function(e){u(n),r=e}})}function i(e,t,r,n){e[t]=function(){return u(n),r.apply(this,arguments)}}s.migrateDeduplicateWarnings=!0,s.migrateWarnings=[],void 0===s.migrateTrace&&(s.migrateTrace=!0),s.migrateReset=function(){r={},s.migrateWarnings.length=0},"BackCompat"===n.document.compatMode&&u("jQuery is not compatible with Quirks Mode");var o,a={},c=s.fn.init,d=s.find,l=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,p=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,f=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;for(o in s.fn.init=function(e){var t=Array.prototype.slice.call(arguments);return"string"==typeof e&&"#"===e&&(u("jQuery( '#' ) is not a valid selector"),t[0]=[]),c.apply(this,t)},s.fn.init.prototype=s.fn,s.find=function(t){var r=Array.prototype.slice.call(arguments);if("string"==typeof t&&l.test(t))try{n.document.querySelector(t)}catch(e){t=t.replace(p,function(e,t,r,n){return"["+t+r+'"'+n+'"]'});try{n.document.querySelector(t),u("Attribute selector with '#' must be quoted: "+r[0]),r[0]=t}catch(e){u("Attribute selector with '#' was not fixed: "+r[0])}}return d.apply(this,r)},d)Object.prototype.hasOwnProperty.call(d,o)&&(s.find[o]=d[o]);if(i(s.fn,"size",function(){return this.length},"jQuery.fn.size() is deprecated and removed; use the .length property"),i(s,"parseJSON",function(){return JSON.parse.apply(null,arguments)},"jQuery.parseJSON is deprecated; use JSON.parse"),i(s,"holdReady",s.holdReady,"jQuery.holdReady is deprecated"),i(s,"unique",s.uniqueSort,"jQuery.unique is deprecated; use jQuery.uniqueSort"),t(s.expr,"filters",s.expr.pseudos,"jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),t(s.expr,":",s.expr.pseudos,"jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),e("3.1.1")&&i(s,"trim",function(e){return null==e?"":(e+"").replace(f,"")},"jQuery.trim is deprecated; use String.prototype.trim"),e("3.2.0")&&i(s,"nodeName",function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},"jQuery.nodeName is deprecated"),e("3.3.0")&&(i(s,"isNumeric",function(e){var t=typeof e;return("number"==t||"string"==t)&&!isNaN(e-parseFloat(e))},"jQuery.isNumeric() is deprecated"),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){a["[object "+t+"]"]=t.toLowerCase()}),i(s,"type",function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?a[Object.prototype.toString.call(e)]||"object":typeof e},"jQuery.type is deprecated"),i(s,"isFunction",function(e){return"function"==typeof e},"jQuery.isFunction() is deprecated"),i(s,"isWindow",function(e){return null!=e&&e===e.window},"jQuery.isWindow() is deprecated"),i(s,"isArray",Array.isArray,"jQuery.isArray is deprecated; use Array.isArray")),s.ajax){var y=s.ajax;s.ajax=function(){var e=y.apply(this,arguments);return e.promise&&(i(e,"success",e.done,"jQXHR.success is deprecated and removed"),i(e,"error",e.fail,"jQXHR.error is deprecated and removed"),i(e,"complete",e.always,"jQXHR.complete is deprecated and removed")),e}}var m=s.fn.removeAttr,g=s.fn.toggleClass,h=/\S+/g;function v(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}s.fn.removeAttr=function(e){var r=this;return s.each(e.match(h),function(e,t){s.expr.match.bool.test(t)&&(u("jQuery.fn.removeAttr no longer sets boolean properties: "+t),r.prop(t,!1))}),m.apply(this,arguments)};var j,Q=!(s.fn.toggleClass=function(t){return void 0!==t&&"boolean"!=typeof t?g.apply(this,arguments):(u("jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&s.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":s.data(this,"__className__")||"")}))}),b=/^[a-z]/,w=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;s.swap&&s.each(["height","width","reliableMarginRight"],function(e,t){var r=s.cssHooks[t]&&s.cssHooks[t].get;r&&(s.cssHooks[t].get=function(){var e;return Q=!0,e=r.apply(this,arguments),Q=!1,e})}),s.swap=function(e,t,r,n){var i,o,a={};for(o in Q||u("jQuery.swap() is undocumented and deprecated"),t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=r.apply(e,n||[]),t)e.style[o]=a[o];return i},e("3.4.0")&&"undefined"!=typeof Proxy&&(s.cssProps=new Proxy(s.cssProps||{},{set:function(){return u("JQMIGRATE: jQuery.cssProps is deprecated"),Reflect.set.apply(this,arguments)}})),s.cssNumber||(s.cssNumber={}),j=s.fn.css,s.fn.css=function(e,t){var r=this;return"string"!=typeof e&&s.each(e,function(e,t){s.fn.css.call(r,e,t)}),"number"!=typeof t||function(e){return b.test(e)&&w.test(e[0].toUpperCase()+e.slice(1))}
16(v(e))||u("Use of number-typed values is deprecated in jQuery.fn.css"),j.apply(this,arguments)};var x=s.data;if(s.data=function(e,t,r){var n,i,o;if(t&&"object"==typeof t&&2===arguments.length){for(o in n=s.hasData(e)&&x.call(this,e),i={},t)o!==v(o)?(u("jQuery.data() always sets/gets camelCased names: "+o),n[o]=t[o]):i[o]=t[o];return x.call(this,e,i),t}return t&&"string"==typeof t&&t!==v(t)&&(n=s.hasData(e)&&x.call(this,e))&&t in n?(u("jQuery.data() always sets/gets camelCased names: "+t),2<arguments.length&&(n[t]=r),n[t]):x.apply(this,arguments)},s.fx){var A,k,M=s.Tween.prototype.run,S=function(e){return e};s.Tween.prototype.run=function(){1<s.easing[this.easing].length&&(u("'jQuery.easing."+this.easing.toString()+"' should use only one argument"),s.easing[this.easing]=S),M.apply(this,arguments)},A=s.fx.interval||13,k="jQuery.fx.interval is deprecated",n.requestAnimationFrame&&Object.defineProperty(s.fx,"interval",{configurable:!0,enumerable:!0,get:function(){return n.document.hidden||u(k),A},set:function(e){u(k),A=e}})}var H=s.fn.load,R=s.event.add,N=s.event.fix;s.event.props=[],s.event.fixHooks={},t(s.event.props,"concat",s.event.props.concat,"jQuery.event.props.concat() is deprecated and removed"),s.event.fix=function(e){var t,r=e.type,n=this.fixHooks[r],i=s.event.props;if(i.length){u("jQuery.event.props are deprecated and removed: "+i.join());while(i.length)s.event.addProp(i.pop())}if(n&&!n._migrated_&&(n._migrated_=!0,u("jQuery.event.fixHooks are deprecated and removed: "+r),(i=n.props)&&i.length))while(i.length)s.event.addProp(i.pop());return t=N.call(this,e),n&&n.filter?n.filter(t,e):t},s.event.add=function(e,t){return e===n&&"load"===t&&"complete"===n.document.readyState&&u("jQuery(window).on('load'...) called after load event occurred"),R.apply(this,arguments)},s.each(["load","unload","error"],function(e,t){s.fn[t]=function(){var e=Array.prototype.slice.call(arguments,0);return"load"===t&&"string"==typeof e[0]?H.apply(this,e):(u("jQuery.fn."+t+"() is deprecated"),e.splice(0,0,t),arguments.length?this.on.apply(this,e):(this.triggerHandler.apply(this,e),this))}}),s.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,r){s.fn[r]=function(e,t){return u("jQuery.fn."+r+"() event shorthand is deprecated"),0<arguments.length?this.on(r,null,e,t):this.trigger(r)}}),s(function(){s(n.document).triggerHandler("ready")}),s.event.special.ready={setup:function(){this===n.document&&u("'ready' event is deprecated")}},s.fn.extend({bind:function(e,t,r){return u("jQuery.fn.bind() is deprecated"),this.on(e,null,t,r)},unbind:function(e,t){return u("jQuery.fn.unbind() is deprecated"),this.off(e,null,t)},delegate:function(e,t,r,n){return u("jQuery.fn.delegate() is deprecated"),this.on(t,e,r,n)},undelegate:function(e,t,r){return u("jQuery.fn.undelegate() is deprecated"),1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)},hover:function(e,t){return u("jQuery.fn.hover() is deprecated"),this.on("mouseenter",e).on("mouseleave",t||e)}});function C(e){var t=n.document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body&&t.body.innerHTML}function T(e){var t=e.replace(P,"<$1></$2>");t!==e&&C(e)!==C(t)&&u("HTML tags must be properly nested and closed: "+e)}var P=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,q=s.htmlPrefilter;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.htmlPrefilter=function(e){return T(e),e.replace(P,"<$1></$2>")}},s.htmlPrefilter=function(e){return T(e),q(e)};var D=s.fn.offset;if(s.fn.offset=function(){var e,t=this[0];if(t&&t.nodeType)return e=(t.ownerDocument||n.document).documentElement,s.contains(e,t)?D.apply(this,arguments):(u("jQuery.fn.offset() requires an element connected to a document"),{top:0,left:0});u("jQuery.fn.offset() requires a valid DOM element")},s.ajax){var E=s.param;s.param=function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),E.call(this,e,t)}}var _=s.fn.andSelf||s.fn.addBack;if(s.fn.andSelf=function(){return u("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),_.apply(this,arguments)},s.Deferred){var F=s.Deferred,O=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]];s.Deferred=function(e){var o=F(),a=o.promise();
16return o.pipe=a.pipe=function(){var i=arguments;return u("deferred.pipe() is deprecated"),s.Deferred(function(n){s.each(O,function(e,t){var r="function"==typeof i[e]&&i[e];o[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===a?n.promise():this,r?[e]:arguments)})}),i=null}).promise()},e&&e.call(o,o),o},s.Deferred.exceptionHook=F.exceptionHook}return s}); 17; 18 19// ***************************
20// js.compressed/jquery/jquery-ui-1.12.1.custom.min.js 21// *************************** 22/* 23 jQuery UI - v1.12.1 - 2020-05-28 24 http://jqueryui.com 25 Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/draggable.js, widgets/droppable.js, widgets/resizable.js, widgets/sortable.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/dialog.js, widgets/menu.js, widgets/mouse.js, widgets/slider.js, widgets/tabs.js 26 Copyright jQuery Foundation and other contributors; Licensed MIT jQuery UI Widget 1.12.1 27 http://jqueryui.com 28 29 Copyright jQuery Foundation and other contributors 30 Released under the MIT license. 31 http://jquery.org/license 32 jQuery UI Position 1.12.1 33 http://jqueryui.com 34 35 Copyright jQuery Foundation and other contributors 36 Released under the MIT license. 37 http://jquery.org/license 38 39 http://api.jqueryui.com/position/ 40 jQuery UI :data 1.12.1 41 http://jqueryui.com 42 43 Copyright jQuery Foundation and other contributors 44 Released under the MIT license. 45 http://jquery.org/license 46 jQuery UI Disable Selection 1.12.1 47 http://jqueryui.com 48 49 Copyright jQuery Foundation and other contributors 50 Released under the MIT license. 51 http://jquery.org/license 52 jQuery UI Focusable 1.12.1 53 http://jqueryui.com 54 55 Copyright jQuery Foundation and other contributors 56 Released under the MIT license. 57 http://jquery.org/license 58 jQuery UI Form Reset Mixin 1.12.1 59 http://jqueryui.com 60 61 Copyright jQuery Foundation and other contributors 62 Released under the MIT license. 63 http://jquery.org/license 64 jQuery UI Keycode 1.12.1 65 http://jqueryui.com 66 67 Copyright jQuery Foundation and other contributors 68 Released under the MIT license. 69 http://jquery.org/license 70 jQuery UI Labels 1.12.1 71 http://jqueryui.com 72 73 Copyright jQuery Foundation and other contributors 74 Released under the MIT license. 75 http://jquery.org/license 76 jQuery UI Scroll Parent 1.12.1 77 http://jqueryui.com 78 79 Copyright jQuery Foundation and other contributors 80 Released under the MIT license. 81 http://jquery.org/license 82 jQuery UI Tabbable 1.12.1 83 http://jqueryui.com 84 85 Copyright jQuery Foundation and other contributors 86 Released under the MIT license. 87 http://jquery.org/license 88 jQuery UI Unique ID 1.12.1 89 http://jqueryui.com 90 91 Copyright jQuery Foundation and other contributors 92 Released under the MIT license. 93 http://jquery.org/license 94 jQuery UI Mouse 1.12.1 95 http://jqueryui.com 96 97 Copyright jQuery Foundation and other contributors 98 Released under the MIT license. 99 http://jquery.org/license 100 jQuery UI Draggable 1.12.1 101 http://jqueryui.com 102 103 Copyright jQuery Foundation and other contributors 104 Released under the MIT license. 105 http://jquery.org/license 106 jQuery UI Droppable 1.12.1 107 http://jqueryui.com 108 109 Copyright jQuery Foundation and other contributors 110 Released under the MIT license. 111 http://jquery.org/license 112 jQuery UI Resizable 1.12.1 113 http://jqueryui.com 114 115 Copyright jQuery Foundation and other contributors 116 Released under the MIT license. 117 http://jquery.org/license 118 jQuery UI Sortable 1.12.1 119 http://jqueryui.com 120 121 Copyright jQuery Foundation and other contributors 122 Released under the MIT license. 123 http://jquery.org/license 124 jQuery UI Accordion 1.12.1 125 http://jqueryui.com 126 127 Copyright jQuery Foundation and other contributors 128 Released under the MIT license. 129 http://jquery.org/license 130 jQuery UI Menu 1.12.1 131 http://jqueryui.com 132 133 Copyright jQuery Foundation and other contributors 134 Released under the MIT license. 135 http://jquery.org/license 136 jQuery UI Autocomplete 1.12.1 137 http://jqueryui.com 138 139 Copyright jQuery Foundation and other contributors 140 Released under the MIT license. 141 http://jquery.org/license 142 jQuery UI Controlgroup 1.12.1 143 http://jqueryui.com 144 145 Copyright jQuery Foundation and other contributors 146 Released under the MIT license. 147 http://jquery.org/license 148 jQuery UI Checkboxradio 1.12.1 149 http://jqueryui.com 150 151 Copyright jQuery Foundation and other contributors 152 Released under the MIT license. 153 http://jquery.org/license 154 jQuery UI Button 1.12.1 155 http://jqueryui.com 156 157 Copyright jQuery Foundation and other contributors 158 Released under the MIT license. 159 http://jquery.org/license 160 jQuery UI Dialog 1.12.1 161 http://jqueryui.com 162 163 Copyright jQuery Foundation and other contributors 164 Released under the MIT license. 165 http://jquery.org/license 166 jQuery UI Slider 1.12.1 167 http://jqueryui.com 168 169 Copyright jQuery Foundation and other contributors 170 Released under the MIT license. 171 http://jquery.org/license 172 jQuery UI Tabs 1.12.1 173 http://jqueryui.com 174 175 Copyright jQuery Foundation and other contributors 176 Released under the MIT license. 177 http://jquery.org/license 178*/ 179(function(d){"function"===typeof define&&define.amd?define(["jquery"],d):d(jQuery)})(function(d){d.ui=d.ui||{};if(!d.ui.version){d.ui.version="1.12.1";var F=0,E=Array.prototype.slice;d.cleanData=function(a){return function(b){var c,e,f;for(f=0;null!=(e=b[f]);f++)try{(c=d._data(e,"events"))&&c.remove&&d(e).triggerHandler("remove")}catch(g){}a(b)}}(d.cleanData);d.widget=function(a,b,c){var e={},f=a.split(".")[0];a=a.split(".")[1];var g=f+"-"+a;c||(c=b,b=d.Widget);d.isArray(c)&&(c=d.extend.apply(null, 180[{}].concat(c)));d.expr[":"][g.toLowerCase()]=function(a){return!!d.data(a,g)};d[f]=d[f]||{};var h=d[f][a];var k=d[f][a]=function(a,b){if(!this._createWidget)return new k(a,b);arguments.length&&this._createWidget(a,b)};d.extend(k,h,{version:c.version,_proto:d.extend({},c),_childConstructors:[]});var m=new b;
180m.options=d.widget.extend({},m.options);d.each(c,function(a,c){d.isFunction(c)?e[a]=function(){function d(){return b.prototype[a].apply(this,arguments)}function e(c){return b.prototype[a].apply(this, 181c)}return function(){var a=this._super,b=this._superApply;this._super=d;this._superApply=e;var f=c.apply(this,arguments);this._super=a;this._superApply=b;return f}}():e[a]=c});k.prototype=d.widget.extend(m,{widgetEventPrefix:h?m.widgetEventPrefix||a:a},e,{constructor:k,namespace:f,widgetName:a,widgetFullName:g});h?(d.each(h._childConstructors,function(a,b){a=b.prototype;d.widget(a.namespace+"."+a.widgetName,k,b._proto)}),delete h._childConstructors):b._childConstructors.push(k);d.widget.bridge(a, 182k);return k};d.widget.extend=function(a){for(var b=E.call(arguments,1),c=0,e=b.length,f,g;c<e;c++)for(f in b[c])g=b[c][f],b[c].hasOwnProperty(f)&&void 0!==g&&(d.isPlainObject(g)?a[f]=d.isPlainObject(a[f])?d.widget.extend({},a[f],g):d.widget.extend({},g):a[f]=g);return a};d.widget.bridge=function(a,b){var c=b.prototype.widgetFullName||a;d.fn[a]=function(e){var f="string"===typeof e,g=E.call(arguments,1),h=this;f?this.length||"instance"!==e?this.each(function(){var b=d.data(this,c);if("instance"=== 183e)return h=b,!1;if(!b)return d.error("cannot call methods on "+a+" prior to initialization; attempted to call method '"+e+"'");if(!d.isFunction(b[e])||"_"===e.charAt(0))return d.error("no such method '"+e+"' for "+a+" widget instance");var f=b[e].apply(b,g);if(f!==b&&void 0!==f)return h=f&&f.jquery?h.pushStack(f.get()):f,!1}):h=void 0:(g.length&&(e=d.widget.extend.apply(null,[e].concat(g))),this.each(function(){var a=d.data(this,c);a?(a.option(e||{}),a._init&&a._init()):d.data(this,c,new b(e,this))})); 184return h}};d.Widget=function(){};d.Widget._childConstructors=[];d.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(a,b){b=d(b||this.defaultElement||this)[0];this.element=d(b);this.uuid=F++;this.eventNamespace="."+this.widgetName+this.uuid;this.bindings=d();this.hoverable=d();this.focusable=d();this.classesElementLookup={};b!==this&&(d.data(b,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target=== 185b&&this.destroy()}}),this.document=d(b.style?b.ownerDocument:b.document||b),this.window=d(this.document[0].defaultView||this.document[0].parentWindow));this.options=d.widget.extend({},this.options,this._getCreateOptions(),a);this._create();this.options.disabled&&this._setOptionDisabled(this.options.disabled);this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:d.noop,_create:d.noop,_init:d.noop,destroy:function(){var a=this; 186this._destroy();d.each(this.classesElementLookup,function(b,c){a._removeClass(c,b)});this.element.off(this.eventNamespace).removeData(this.widgetFullName);this.widget().off(this.eventNamespace).removeAttr("aria-disabled");this.bindings.off(this.eventNamespace)},_destroy:d.noop,widget:function(){return this.element},option:function(a,b){var c=a,e;if(0===arguments.length)return d.widget.extend({},this.options);if("string"===typeof a){c={};var f=a.split(".");a=f.shift();if(f.length){var g=c[a]=d.widget.extend({}, 187this.options[a]);for(e=0;e<f.length-1;e++)g[f[e]]=g[f[e]]||{},g=g[f[e]];a=f.pop();if(1===arguments.length)return void 0===g[a]?null:g[a];g[a]=b}else{if(1===arguments.length)return void 0===this.options[a]?null:this.options[a];c[a]=b}}this._setOptions(c);return this},_setOptions:function(a){for(var b in a)this._setOption(b,a[b]);return this},_setOption:function(a,b){"classes"===a&&this._setOptionClasses(b);this.options[a]=b;"disabled"===a&&this._setOptionDisabled(b);return this},_setOptionClasses:function(a){var b; 188for(b in a){var c=this.classesElementLookup[b];if(a[b]!==this.options.classes[b]&&c&&c.length){var e=d(c.get());this._removeClass(c,b);e.addClass(this._classes({element:e,keys:b,classes:a,add:!0}))}}},_setOptionDisabled:function(a){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!a);a&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})}, 189_classes:function(a){function b(b,g){var f;for(f=0;f<b.length;f++){var k=e.classesElementLookup[b[f]]||d();k=a.add?d(d.unique(k.get().concat(a.element.get()))):d(k.not(a.element).get());e.classesElementLookup[b[f]]=k;c.push(b[f]);g&&a.classes[b[f]]&&c.push(a.classes[b[f]])}}var c=[],e=this;a=d.extend({element:this.element,classes:this.options.classes||{}},a);this._on(a.element,{remove:"_untrackClassesElement"});a.keys&&b(a.keys.match(/\S+/g)||[],!0);a.extra&&b(a.extra.match(/\S+/g)||[]);return c.join(" ")}, 190_untrackClassesElement:function(a){var b=this;d.each(b.classesElementLookup,function(c,e){-1!==d.inArray(a.target,e)&&(b.classesElementLookup[c]=d(e.not(a.target).get()))})},_removeClass:function(a,b,c){return this._toggleClass(a,b,c,!1)},_addClass:function(a,b,c){return this._toggleClass(a,b,c,!0)},_toggleClass:function(a,b,c,d){d="boolean"===typeof d?d:c;var e="string"===typeof a||null===a;a={extra:e?b:c,keys:e?a:b,element:e?this.element:a,add:d};a.element.toggleClass(this._classes(a),d);return this}, 191_on:function(a,b,c){var e,f=this;"boolean"!==typeof a&&(c=b,b=a,a=!1);c?(b=e=d(b),this.bindings=this.bindings.add(b)):(c=b,b=this.element,e=this.widget());d.each(c,function(c,h){function g(){if(a||!0!==f.options.disabled&&!d(this).hasClass("ui-state-disabled"))return("string"===typeof h?f[h]:h).apply(f,arguments)}"string"!==typeof h&&(g.guid=h.guid=h.guid||g.guid||d.guid++);var m=c.match(/^([\w:-]*)\s*(.*)$/);c=m[1]+f.eventNamespace;if(m=m[2])e.on(c,m,g);else b.on(c,g)}
191)},_off:function(a,b){b=(b|| 192"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;a.off(b).off(b);this.bindings=d(this.bindings.not(a).get());this.focusable=d(this.focusable.not(a).get());this.hoverable=d(this.hoverable.not(a).get())},_delay:function(a,b){var c=this;return setTimeout(function(){return("string"===typeof a?c[a]:a).apply(c,arguments)},b||0)},_hoverable:function(a){this.hoverable=this.hoverable.add(a);this._on(a,{mouseenter:function(a){this._addClass(d(a.currentTarget),null,"ui-state-hover")},mouseleave:function(a){this._removeClass(d(a.currentTarget), 193null,"ui-state-hover")}})},_focusable:function(a){this.focusable=this.focusable.add(a);this._on(a,{focusin:function(a){this._addClass(d(a.currentTarget),null,"ui-state-focus")},focusout:function(a){this._removeClass(d(a.currentTarget),null,"ui-state-focus")}})},_trigger:function(a,b,c){var e,f=this.options[a];c=c||{};b=d.Event(b);b.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();b.target=this.element[0];if(a=b.originalEvent)for(e in a)e in b||(b[e]=a[e]);this.element.trigger(b, 194c);return!(d.isFunction(f)&&!1===f.apply(this.element[0],[b].concat(c))||b.isDefaultPrevented())}};d.each({show:"fadeIn",hide:"fadeOut"},function(a,b){d.Widget.prototype["_"+a]=function(c,e,f){"string"===typeof e&&(e={effect:e});var g=e?!0===e||"number"===typeof e?b:e.effect||b:a;e=e||{};"number"===typeof e&&(e={duration:e});var h=!d.isEmptyObject(e);e.complete=f;e.delay&&c.delay(e.delay);if(h&&d.effects&&d.effects.effect[g])c[a](e);else if(g!==a&&c[g])c[g](e.duration,e.easing,f);else c.queue(function(b){d(this)[a](); 195f&&f.call(c[0]);b()})}});(function(){function a(a,b,c){return[parseFloat(a[0])*(l.test(a[0])?b/100:1),parseFloat(a[1])*(l.test(a[1])?c/100:1)]}function b(a){var b=a[0];return 9===b.nodeType?{width:a.width(),height:a.height(),offset:{top:0,left:0}}:d.isWindow(b)?{width:a.width(),height:a.height(),offset:{top:a.scrollTop(),left:a.scrollLeft()}}:b.preventDefault?{width:0,height:0,offset:{top:b.pageY,left:b.pageX}}:{width:a.outerWidth(),height:a.outerHeight(),offset:a.offset()}}var c,e=Math.max,f=Math.abs, 196g=/left|center|right/,h=/top|center|bottom/,k=/[\+\-]\d+(\.[\d]+)?%?/,m=/^\w+/,l=/%$/,n=d.fn.position;d.position={scrollbarWidth:function(){if(void 0!==c)return c;var a=d("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>");var b=a.children()[0];d("body").append(a);var e=b.offsetWidth;a.css("overflow","scroll");b=b.offsetWidth;e===b&&(b=a[0].clientWidth);a.remove();return c=e-b},getScrollInfo:function(a){var b=a.isWindow|| 197a.isDocument?"":a.element.css("overflow-x"),c=a.isWindow||a.isDocument?"":a.element.css("overflow-y");b="scroll"===b||"auto"===b&&a.width<a.element[0].scrollWidth;return{width:"scroll"===c||"auto"===c&&a.height<a.element[0].scrollHeight?d.position.scrollbarWidth():0,height:b?d.position.scrollbarWidth():0}},getWithinInfo:function(a){var b=d(a||window),c=d.isWindow(b[0]),e=!!b[0]&&9===b[0].nodeType;return{element:b,isWindow:c,isDocument:e,offset:c||e?{left:0,top:0}:d(a).offset(),scrollLeft:b.scrollLeft(), 198scrollTop:b.scrollTop(),width:b.outerWidth(),height:b.outerHeight()}}};d.fn.position=function(c){if(!c||!c.of)return n.apply(this,arguments);c=d.extend({},c);var l=d(c.of),p=d.position.getWithinInfo(c.within),w=d.position.getScrollInfo(p),t=(c.collision||"flip").split(" "),u={};var q=b(l);l[0].preventDefault&&(c.at="left top");var x=q.width;var A=q.height;var B=q.offset;var v=d.extend({},B);d.each(["my","at"],function(){var a=(c[this]||"").split(" ");1===a.length&&(a=g.test(a[0])?a.concat(["center"]): 199h.test(a[0])?["center"].concat(a):["center","center"]);a[0]=g.test(a[0])?a[0]:"center";a[1]=h.test(a[1])?a[1]:"center";var b=k.exec(a[0]);var d=k.exec(a[1]);u[this]=[b?b[0]:0,d?d[0]:0];c[this]=[m.exec(a[0])[0],m.exec(a[1])[0]]});1===t.length&&(t[1]=t[0]);"right"===c.at[0]?v.left+=x:"center"===c.at[0]&&(v.left+=x/2);"bottom"===c.at[1]?v.top+=A:"center"===c.at[1]&&(v.top+=A/2);var z=a(u.at,x,A);v.left+=z[0];v.top+=z[1];return this.each(function(){var b,g=d(this),h=g.outerWidth(),k=g.outerHeight(),m= 200parseInt(d.css(this,"marginLeft"),10)||0,r=parseInt(d.css(this,"marginTop"),10)||0,y=h+m+(parseInt(d.css(this,"marginRight"),10)||0)+w.width,n=k+r+(parseInt(d.css(this,"marginBottom"),10)||0)+w.height,q=d.extend({},v),D=a(u.my,g.outerWidth(),g.outerHeight());"right"===c.my[0]?q.left-=h:"center"===c.my[0]&&(q.left-=h/2);
200"bottom"===c.my[1]?q.top-=k:"center"===c.my[1]&&(q.top-=k/2);q.left+=D[0];q.top+=D[1];var C={marginLeft:m,marginTop:r};d.each(["left","top"],function(a,b){if(d.ui.position[t[a]])d.ui.position[t[a]][b](q, 201{targetWidth:x,targetHeight:A,elemWidth:h,elemHeight:k,collisionPosition:C,collisionWidth:y,collisionHeight:n,offset:[z[0]+D[0],z[1]+D[1]],my:c.my,at:c.at,within:p,elem:g})});c.using&&(b=function(a){var b=B.left-q.left,d=b+x-h,m=B.top-q.top,r=m+A-k,p={target:{element:l,left:B.left,top:B.top,width:x,height:A},element:{element:g,left:q.left,top:q.top,width:h,height:k},horizontal:0>d?"left":0<b?"right":"center",vertical:0>r?"top":0<m?"bottom":"middle"};x<h&&f(b+d)<x&&(p.horizontal="center");A<k&&f(m+ 202r)<A&&(p.vertical="middle");e(f(b),f(d))>e(f(m),f(r))?p.important="horizontal":p.important="vertical";c.using.call(this,a,p)});g.offset(d.extend(q,{using:b}))})};d.ui.position={fit:{left:function(a,b){var c=b.within,d=c.isWindow?c.scrollLeft:c.offset.left,f=c.width,g=a.left-b.collisionPosition.marginLeft;c=d-g;var h=g+b.collisionWidth-f-d;b.collisionWidth>f?0<c&&0>=h?(b=a.left+c+b.collisionWidth-f-d,a.left+=c-b):a.left=0<h&&0>=c?d:c>h?d+f-b.collisionWidth:d:a.left=0<c?a.left+c:0<h?a.left-h:e(a.left- 203g,a.left)},top:function(a,b){var c=b.within,d=c.isWindow?c.scrollTop:c.offset.top,f=b.within.height,g=a.top-b.collisionPosition.marginTop;c=d-g;var h=g+b.collisionHeight-f-d;b.collisionHeight>f?0<c&&0>=h?(b=a.top+c+b.collisionHeight-f-d,a.top+=c-b):a.top=0<h&&0>=c?d:c>h?d+f-b.collisionHeight:d:a.top=0<c?a.top+c:0<h?a.top-h:e(a.top-g,a.top)}},flip:{left:function(a,b){var c=b.within,d=c.offset.left+c.scrollLeft,e=c.width,g=c.isWindow?c.scrollLeft:c.offset.left,h=a.left-b.collisionPosition.marginLeft; 204c=h-g;var k=h+b.collisionWidth-e-g;h="left"===b.my[0]?-b.elemWidth:"right"===b.my[0]?b.elemWidth:0;var m="left"===b.at[0]?b.targetWidth:"right"===b.at[0]?-b.targetWidth:0,l=-2*b.offset[0];if(0>c){if(b=a.left+h+m+l+b.collisionWidth-e-d,0>b||b<f(c))a.left+=h+m+l}else 0<k&&(b=a.left-b.collisionPosition.marginLeft+h+m+l-g,0<b||f(b)<k)&&(a.left+=h+m+l)},top:function(a,b){var c=b.within,d=c.offset.top+c.scrollTop,e=c.height,g=c.isWindow?c.scrollTop:c.offset.top,h=a.top-b.collisionPosition.marginTop;c=h- 205g;var k=h+b.collisionHeight-e-g;h="top"===b.my[1]?-b.elemHeight:"bottom"===b.my[1]?b.elemHeight:0;var m="top"===b.at[1]?b.targetHeight:"bottom"===b.at[1]?-b.targetHeight:0,l=-2*b.offset[1];if(0>c){if(b=a.top+h+m+l+b.collisionHeight-e-d,0>b||b<f(c))a.top+=h+m+l}else 0<k&&(b=a.top-b.collisionPosition.marginTop+h+m+l-g,0<b||f(b)<k)&&(a.top+=h+m+l)}},flipfit:{left:function(){d.ui.position.flip.left.apply(this,arguments);d.ui.position.fit.left.apply(this,arguments)},top:function(){d.ui.position.flip.top.apply(this, 206arguments);d.ui.position.fit.top.apply(this,arguments)}}}})();d.extend(d.expr[":"],{data:d.expr.createPseudo?d.expr.createPseudo(function(a){return function(b){return!!d.data(b,a)}}):function(a,b,c){return!!d.data(a,c[3])}});d.fn.extend({disableSelection:function(){var a="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(a+".ui-disableSelection",function(a){a.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}); 207d.ui.focusable=function(a,b){var c=a.nodeName.toLowerCase();if("area"===c){b=a.parentNode;c=b.name;if(!a.href||!c||"map"!==b.nodeName.toLowerCase())return!1;a=d("img[usemap='#"+c+"']");return 0<a.length&&a.is(":visible")}/^(input|select|textarea|button|object)$/.test(c)?(b=!a.disabled)&&(c=d(a).closest("fieldset")[0])&&(b=!c.disabled):b="a"===c?a.href||b:b;if(b=b&&d(a).is(":visible")){a=d(a);for(b=a.css("visibility");"inherit"===b;)a=a.parent(),b=a.css("visibility");b="hidden"!==b}return b};d.extend(d.expr[":"], 208{focusable:function(a){return d.ui.focusable(a,null!=d.attr(a,"tabindex"))}});d.fn.form=function(){return"string"===typeof this[0].form?this.closest("form"):d(this[0].form)};d.ui.formResetMixin={_formResetHandler:function(){var a=d(this);setTimeout(function(){var b=a.data("ui-form-reset-instances");d.each(b,function(){this.refresh()})})},_bindFormResetHandler:function(){this.form=this.element.form();if(this.form.length){var a=this.form.data("ui-form-reset-instances")||[];if(!a.length)this.form.on("reset.ui-form-reset", 209this._formResetHandler);a.push(this);this.form.data("ui-form-reset-instances",a)}},_unbindFormResetHandler:function(){if(this.form.length){var a=this.form.data("ui-form-reset-instances");a.splice(d.inArray(this,a),1);a.length?this.form.data("ui-form-reset-instances",a):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}};d.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9, 210UP:38};d.ui.escapeSelector=function(){var a=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(b){return b.replace(a,"\\$1")}}();d.fn.labels=function(){var a;if(this[0].labels&&this[0].labels.length)return this.pushStack(this[0].labels);var b=this.eq(0).parents("label");
210if(a=this.attr("id")){var c=this.eq(0).parents().last();c=c.add(c.length?c.siblings():this.siblings());a="label[for='"+d.ui.escapeSelector(a)+"']";b=b.add(c.find(a).addBack(a))}return this.pushStack(b)};d.fn.scrollParent=function(a){var b= 211this.css("position"),c="absolute"===b,e=a?/(auto|scroll|hidden)/:/(auto|scroll)/;a=this.parents().filter(function(){var a=d(this);return c&&"static"===a.css("position")?!1:e.test(a.css("overflow")+a.css("overflow-y")+a.css("overflow-x"))}).eq(0);return"fixed"!==b&&a.length?a:d(this[0].ownerDocument||document)};d.extend(d.expr[":"],{tabbable:function(a){var b=d.attr(a,"tabindex"),c=null!=b;return(!c||0<=b)&&d.ui.focusable(a,c)}});d.fn.extend({uniqueId:function(){var a=0;return function(){return this.each(function(){this.id|| 212(this.id="ui-id-"+ ++a)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&d(this).removeAttr("id")})}});d.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var z=!1;d(document).on("mouseup",function(){z=!1});d.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.on("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).on("click."+ 213this.widgetName,function(b){if(!0===d.data(b.target,a.widgetName+".preventClickEvent"))return d.removeData(b.target,a.widgetName+".preventClickEvent"),b.stopImmediatePropagation(),!1});this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName);this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(a){if(!z){this._mouseMoved=!1;this._mouseStarted&&this._mouseUp(a); 214this._mouseDownEvent=a;var b=this,c=1===a.which,e="string"===typeof this.options.cancel&&a.target.nodeName?d(a.target).closest(this.options.cancel).length:!1;if(!c||e||!this._mouseCapture(a))return!0;this.mouseDelayMet=!this.options.delay;this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){b.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)&&(this._mouseStarted=!1!==this._mouseStart(a),!this._mouseStarted))return a.preventDefault(),!0;!0===d.data(a.target, 215this.widgetName+".preventClickEvent")&&d.removeData(a.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(a){return b._mouseMove(a)};this._mouseUpDelegate=function(a){return b._mouseUp(a)};this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate);a.preventDefault();return z=!0}},_mouseMove:function(a){if(this._mouseMoved){if(d.ui.ie&&(!document.documentMode||9>document.documentMode)&&!a.button)return this._mouseUp(a); 216if(!a.which)if(a.originalEvent.altKey||a.originalEvent.ctrlKey||a.originalEvent.metaKey||a.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(a)}if(a.which||a.button)this._mouseMoved=!0;if(this._mouseStarted)return this._mouseDrag(a),a.preventDefault();this._mouseDistanceMet(a)&&this._mouseDelayMet(a)&&((this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,a))?this._mouseDrag(a):this._mouseUp(a));return!this._mouseStarted},_mouseUp:function(a){this.document.off("mousemove."+ 217this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate);this._mouseStarted&&(this._mouseStarted=!1,a.target===this._mouseDownEvent.target&&d.data(a.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(a));this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer);z=this.ignoreMissingWhich=!1;a.preventDefault()},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY- 218a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}});d.ui.plugin={add:function(a,b,c){var e;a=d.ui[a].prototype;for(e in c)a.plugins[e]=a.plugins[e]||[],a.plugins[e].push([b,c[e]])},call:function(a,b,c,d){if((b=a.plugins[b])&&(d||a.element[0].parentNode&&11!==a.element[0].parentNode.nodeType))for(d=0;d<b.length;
218d++)a.options[b[d][0]]&&b[d][1].apply(a.element, 219c)}};d.ui.safeActiveElement=function(a){try{var b=a.activeElement}catch(c){b=a.body}b||(b=a.body);b.nodeName||(b=a.body);return b};d.ui.safeBlur=function(a){a&&"body"!==a.nodeName.toLowerCase()&&d(a).trigger("blur")};d.widget("ui.draggable",d.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500, 220scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative();this.options.addClasses&&this._addClass("ui-draggable");this._setHandleClassName();this._mouseInit()},_setOption:function(a,b){this._super(a,b);"handle"===a&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")? 221this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(a){var b=this.options;if(this.helper||b.disabled||0<d(a.target).closest(".ui-resizable-handle").length)return!1;this.handle=this._getHandle(a);if(!this.handle)return!1;this._blurActiveElement(a);this._blockFrames(!0===b.iframeFix?"iframe":b.iframeFix);return!0},_blockFrames:function(a){this.iframeBlocks=this.document.find(a).map(function(){var a=d(this);return d("<div>").css("position","absolute").appendTo(a.parent()).outerWidth(a.outerWidth()).outerHeight(a.outerHeight()).offset(a.offset())[0]})}, 222_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(a){var b=d.ui.safeActiveElement(this.document[0]);d(a.target).closest(b).length||d.ui.safeBlur(b)},_mouseStart:function(a){var b=this.options;this.helper=this._createHelper(a);this._addClass(this.helper,"ui-draggable-dragging");this._cacheHelperProportions();d.ui.ddmanager&&(d.ui.ddmanager.current=this);this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent= 223this.helper.scrollParent(!0);this.offsetParent=this.helper.offsetParent();this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===d(this).css("position")}).length;this.positionAbs=this.element.offset();this._refreshOffsets(a);this.originalPosition=this.position=this._generatePosition(a,!1);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this._setContainment();if(!1===this._trigger("start",a))return this._clear(),!1; 224this._cacheHelperProportions();d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this._mouseDrag(a,!0);d.ui.ddmanager&&d.ui.ddmanager.dragStart(this,a);return!0},_refreshOffsets:function(a){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()};this.offset.click={left:a.pageX-this.offset.left,top:a.pageY-this.offset.top}},_mouseDrag:function(a,b){this.hasFixedAncestor&& 225(this.offset.parent=this._getParentOffset());this.position=this._generatePosition(a,!0);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(!1===this._trigger("drag",a,b))return this._mouseUp(new d.Event("mouseup",a)),!1;this.position=b.position}this.helper[0].style.left=this.position.left+"px";this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return!1},_mouseStop:function(a){var b=this,c=!1;d.ui.ddmanager&&!this.options.dropBehaviour&& 226(c=d.ui.ddmanager.drop(this,a));this.dropped&&(c=this.dropped,this.dropped=!1);"invalid"===this.options.revert&&!c||"valid"===this.options.revert&&c||!0===this.options.revert||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,c)?d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==b._trigger("stop",a)&&b._clear()}):!1!==this._trigger("stop",a)&&this._clear();return!1},_mouseUp:function(a){this._unblockFrames();d.ui.ddmanager&& 227d.ui.ddmanager.dragStop(this,a);this.handleElement.is(a.target)&&this.element.trigger("focus");return d.ui.mouse.prototype._mouseUp.call(this,a)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp(new d.Event("mouseup",{target:this.element[0]})):this._clear();return this},_getHandle:function(a){return this.options.handle?!!d(a.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle): 228this.element;this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(a){var b=this.options,c=d.isFunction(b.helper);a=c?d(b.helper.apply(this.element[0],[a])):"clone"===b.helper?this.element.clone().removeAttr("id"):this.element;a.parents("body").length||a.appendTo("parent"===b.appendTo?this.element[0].parentNode:b.appendTo);c&&a[0]===this.element[0]&&this._setPositionRelative(); 229a[0]===this.element[0]||/(fixed|absolute)/.test(a.css("position"))||a.css("position","absolute");return a},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(a){"string"===typeof a&&(a=a.split(" "));d.isArray(a)&&(a={left:+a[0],top:+a[1]||0});
229"left"in a&&(this.offset.click.left=a.left+this.margins.left);"right"in a&&(this.offset.click.left=this.helperProportions.width-a.right+this.margins.left); 230"top"in a&&(this.offset.click.top=a.top+this.margins.top);"bottom"in a&&(this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top)},_isRootNode:function(a){return/(html|body)/i.test(a.tagName)||a===this.document[0]},_getParentOffset:function(){var a=this.offsetParent.offset(),b=this.document[0];"absolute"===this.cssPosition&&this.scrollParent[0]!==b&&d.contains(this.scrollParent[0],this.offsetParent[0])&&(a.left+=this.scrollParent.scrollLeft(),a.top+=this.scrollParent.scrollTop()); 231this._isRootNode(this.offsetParent[0])&&(a={top:0,left:0});return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var a=this.element.position(),b=this._isRootNode(this.scrollParent[0]);return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+(b?0:this.scrollParent.scrollTop()),left:a.left-(parseInt(this.helper.css("left"), 23210)||0)+(b?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a;var b=this.options;var c=this.document[0];this.relativeContainer= 233null;if(b.containment)if("window"===b.containment)this.containment=[d(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,d(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,d(window).scrollLeft()+d(window).width()-this.helperProportions.width-this.margins.left,d(window).scrollTop()+(d(window).height()||c.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];else if("document"===b.containment)this.containment=[0,0,d(c).width()-this.helperProportions.width- 234this.margins.left,(d(c).height()||c.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];else if(b.containment.constructor===Array)this.containment=b.containment;else{if("parent"===b.containment&&(b.containment=this.helper[0].parentNode),c=d(b.containment),a=c[0])b=/(scroll|auto)/.test(c.css("overflow")),this.containment=[(parseInt(c.css("borderLeftWidth"),10)||0)+(parseInt(c.css("paddingLeft"),10)||0),(parseInt(c.css("borderTopWidth"),10)||0)+(parseInt(c.css("paddingTop"), 23510)||0),(b?Math.max(a.scrollWidth,a.offsetWidth):a.offsetWidth)-(parseInt(c.css("borderRightWidth"),10)||0)-(parseInt(c.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(b?Math.max(a.scrollHeight,a.offsetHeight):a.offsetHeight)-(parseInt(c.css("borderBottomWidth"),10)||0)-(parseInt(c.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=c}else this.containment=null},_convertPositionTo:function(a, 236b){b||(b=this.position);a="absolute"===a?1:-1;var c=this._isRootNode(this.scrollParent[0]);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-("fixed"===this.cssPosition?-this.offset.scroll.top:c?0:this.offset.scroll.top)*a,left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-("fixed"===this.cssPosition?-this.offset.scroll.left:c?0:this.offset.scroll.left)*a}},_generatePosition:function(a,b){var c=this.options,d=this._isRootNode(this.scrollParent[0]);var f=a.pageX;var g= 237a.pageY;d&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()});if(b){if(this.containment){if(this.relativeContainer){var h=this.relativeContainer.offset();h=[this.containment[0]+h.left,this.containment[1]+h.top,this.containment[2]+h.left,this.containment[3]+h.top]}else h=this.containment;a.pageX-this.offset.click.left<h[0]&&(f=h[0]+this.offset.click.left);a.pageY-this.offset.click.top<h[1]&&(g=h[1]+this.offset.click.top);a.pageX-this.offset.click.left> 238h[2]&&(f=h[2]+this.offset.click.left);a.pageY-this.offset.click.top>h[3]&&(g=h[3]+this.offset.click.top)}c.grid&&(g=c.grid[1]?this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1]:this.originalPageY,g=h?g-this.offset.click.top>=h[1]||g-this.offset.click.top>h[3]?g:g-this.offset.click.top>=h[1]?g-c.grid[1]:g+c.grid[1]:g,f=c.grid[0]?this.originalPageX+Math.round((f-this.originalPageX)
238/c.grid[0])*c.grid[0]:this.originalPageX,f=h?f-this.offset.click.left>=h[0]||f-this.offset.click.left> 239h[2]?f:f-this.offset.click.left>=h[0]?f-c.grid[0]:f+c.grid[0]:f);"y"===c.axis&&(f=this.originalPageX);"x"===c.axis&&(g=this.originalPageY)}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:d?0:this.offset.scroll.top),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:d?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper, 240"ui-draggable-dragging");this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove();this.helper=null;this.cancelHelperRemoval=!1;this.destroyOnClear&&this.destroy()},_trigger:function(a,b,c){c=c||this._uiHash();d.ui.plugin.call(this,a,[b,c,this],!0);/^(drag|start|stop)/.test(a)&&(this.positionAbs=this._convertPositionTo("absolute"),c.offset=this.positionAbs);return d.Widget.prototype._trigger.call(this,a,b,c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position, 241originalPosition:this.originalPosition,offset:this.positionAbs}}});d.ui.plugin.add("draggable","connectToSortable",{start:function(a,b,c){var e=d.extend({},b,{item:c.element});c.sortables=[];d(c.options.connectToSortable).each(function(){var b=d(this).sortable("instance");b&&!b.options.disabled&&(c.sortables.push(b),b.refreshPositions(),b._trigger("activate",a,e))})},stop:function(a,b,c){var e=d.extend({},b,{item:c.element});c.cancelHelperRemoval=!1;d.each(c.sortables,function(){this.isOver?(this.isOver= 2420,c.cancelHelperRemoval=!0,this.cancelHelperRemoval=!1,this._storedCSS={position:this.placeholder.css("position"),top:this.placeholder.css("top"),left:this.placeholder.css("left")},this._mouseStop(a),this.options.helper=this.options._helper):(this.cancelHelperRemoval=!0,this._trigger("deactivate",a,e))})},drag:function(a,b,c){d.each(c.sortables,function(){var e=!1,f=this;f.positionAbs=c.positionAbs;f.helperProportions=c.helperProportions;f.offset.click=c.offset.click;f._intersectsWith(f.containerCache)&& 243(e=!0,d.each(c.sortables,function(){this.positionAbs=c.positionAbs;this.helperProportions=c.helperProportions;this.offset.click=c.offset.click;this!==f&&this._intersectsWith(this.containerCache)&&d.contains(f.element[0],this.element[0])&&(e=!1);return e}));e?(f.isOver||(f.isOver=1,c._parent=b.helper.parent(),f.currentItem=b.helper.appendTo(f.element).data("ui-sortable-item",!0),f.options._helper=f.options.helper,f.options.helper=function(){return b.helper[0]},a.target=f.currentItem[0],f._mouseCapture(a, 244!0),f._mouseStart(a,!0,!0),f.offset.click.top=c.offset.click.top,f.offset.click.left=c.offset.click.left,f.offset.parent.left-=c.offset.parent.left-f.offset.parent.left,f.offset.parent.top-=c.offset.parent.top-f.offset.parent.top,c._trigger("toSortable",a),c.dropped=f.element,d.each(c.sortables,function(){this.refreshPositions()}),c.currentItem=c.element,f.fromOutside=c),f.currentItem&&(f._mouseDrag(a),b.position=f.position)):f.isOver&&(f.isOver=0,f.cancelHelperRemoval=!0,f.options._revert=f.options.revert, 245f.options.revert=!1,f._trigger("out",a,f._uiHash(f)),f._mouseStop(a,!0),f.options.revert=f.options._revert,f.options.helper=f.options._helper,f.placeholder&&f.placeholder.remove(),b.helper.appendTo(c._parent),c._refreshOffsets(a),b.position=c._generatePosition(a,!0),c._trigger("fromSortable",a),c.dropped=!1,d.each(c.sortables,function(){this.refreshPositions()}))})}});d.ui.plugin.add("draggable","cursor",{start:function(a,b,c){a=d("body");c=c.options;a.css("cursor")&&(c._cursor=a.css("cursor"));a.css("cursor", 246c.cursor)},stop:function(a,b,c){a=c.options;a._cursor&&d("body").css("cursor",a._cursor)}});d.ui.plugin.add("draggable","opacity",{start:function(a,b,c){a=d(b.helper);c=c.options;a.css("opacity")&&(c._opacity=a.css("opacity"));a.css("opacity",c.opacity)},stop:function(a,b,c){a=c.options;a._opacity&&d(b.helper).css("opacity",a._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(a,b,c){c.scrollParentNotHidden||(c.scrollParentNotHidden=c.helper.scrollParent(!1));c.scrollParentNotHidden[0]!== 247c.document[0]&&"HTML"!==c.scrollParentNotHidden[0].tagName&&(c.overflowOffset=c.scrollParentNotHidden.offset())},drag:function(a,b,c){b=c.options;var e=!1,f=c.scrollParentNotHidden[0],g=c.document[0];f!==g&&"HTML"!==f.tagName?(b.axis&&"x"===b.axis||(c.overflowOffset.top+f.offsetHeight-a.pageY<b.scrollSensitivity?f.scrollTop=e=f.scrollTop+b.scrollSpeed:a.pageY-c.overflowOffset.top<b.scrollSensitivity&&(f.scrollTop=e=f.scrollTop-b.scrollSpeed)),b.axis&&"y"===b.axis||(c.overflowOffset.left+f.offsetWidth- 248a.pageX<b.scrollSensitivity?f.scrollLeft=e=f.scrollLeft+b.scrollSpeed:a.pageX-c.overflowOffset.left<b.scrollSensitivity&&(f.scrollLeft=e=f.scrollLeft-b.
248scrollSpeed))):(b.axis&&"x"===b.axis||(a.pageY-d(g).scrollTop()<b.scrollSensitivity?e=d(g).scrollTop(d(g).scrollTop()-b.scrollSpeed):d(window).height()-(a.pageY-d(g).scrollTop())<b.scrollSensitivity&&(e=d(g).scrollTop(d(g).scrollTop()+b.scrollSpeed))),b.axis&&"y"===b.axis||(a.pageX-d(g).scrollLeft()<b.scrollSensitivity?e=d(g).scrollLeft(d(g).scrollLeft()- 249b.scrollSpeed):d(window).width()-(a.pageX-d(g).scrollLeft())<b.scrollSensitivity&&(e=d(g).scrollLeft(d(g).scrollLeft()+b.scrollSpeed))));!1!==e&&d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(c,a)}});d.ui.plugin.add("draggable","snap",{start:function(a,b,c){a=c.options;c.snapElements=[];d(a.snap.constructor!==String?a.snap.items||":data(ui-draggable)":a.snap).each(function(){var a=d(this),b=a.offset();this!==c.element[0]&&c.snapElements.push({item:this,width:a.outerWidth(),height:a.outerHeight(), 250top:b.top,left:b.left})})},drag:function(a,b,c){var e,f=c.options,g=f.snapTolerance,h=b.offset.left,k=h+c.helperProportions.width,m=b.offset.top,l=m+c.helperProportions.height;for(e=c.snapElements.length-1;0<=e;e--){var n=c.snapElements[e].left-c.margins.left;var p=n+c.snapElements[e].width;var r=c.snapElements[e].top-c.margins.top;var y=r+c.snapElements[e].height;if(k<n-g||h>p+g||l<r-g||m>y+g||!d.contains(c.snapElements[e].item.ownerDocument,c.snapElements[e].item))c.snapElements[e].snapping&&c.options.snap.release&& 251c.options.snap.release.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[e].item})),c.snapElements[e].snapping=!1;else{if("inner"!==f.snapMode){var w=Math.abs(r-l)<=g;var t=Math.abs(y-m)<=g;var u=Math.abs(n-k)<=g;var q=Math.abs(p-h)<=g;w&&(b.position.top=c._convertPositionTo("relative",{top:r-c.helperProportions.height,left:0}).top);t&&(b.position.top=c._convertPositionTo("relative",{top:y,left:0}).top);u&&(b.position.left=c._convertPositionTo("relative",{top:0,left:n-c.helperProportions.width}).left); 252q&&(b.position.left=c._convertPositionTo("relative",{top:0,left:p}).left)}var x=w||t||u||q;"outer"!==f.snapMode&&(w=Math.abs(r-m)<=g,t=Math.abs(y-l)<=g,u=Math.abs(n-h)<=g,q=Math.abs(p-k)<=g,w&&(b.position.top=c._convertPositionTo("relative",{top:r,left:0}).top),t&&(b.position.top=c._convertPositionTo("relative",{top:y-c.helperProportions.height,left:0}).top),u&&(b.position.left=c._convertPositionTo("relative",{top:0,left:n}).left),q&&(b.position.left=c._convertPositionTo("relative",{top:0,left:p- 253c.helperProportions.width}).left));!c.snapElements[e].snapping&&(w||t||u||q||x)&&c.options.snap.snap&&c.options.snap.snap.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[e].item}));c.snapElements[e].snapping=w||t||u||q||x}}}});d.ui.plugin.add("draggable","stack",{start:function(a,b,c){a=d.makeArray(d(c.options.stack)).sort(function(a,b){return(parseInt(d(a).css("zIndex"),10)||0)-(parseInt(d(b).css("zIndex"),10)||0)});if(a.length){var e=parseInt(d(a[0]).css("zIndex"),10)||0;d(a).each(function(a){d(this).css("zIndex", 254e+a)});this.css("zIndex",e+a.length)}}});d.ui.plugin.add("draggable","zIndex",{start:function(a,b,c){a=d(b.helper);c=c.options;a.css("zIndex")&&(c._zIndex=a.css("zIndex"));a.css("zIndex",c.zIndex)},stop:function(a,b,c){a=c.options;a._zIndex&&d(b.helper).css("zIndex",a._zIndex)}});d.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var a, 255b=this.options,c=b.accept;this.isover=!1;this.isout=!0;this.accept=d.isFunction(c)?c:function(a){return a.is(c)};this.proportions=function(){if(arguments.length)a=arguments[0];else return a?a:a={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}};this._addToManager(b.scope);b.addClasses&&this._addClass("ui-droppable")},_addToManager:function(a){d.ui.ddmanager.droppables[a]=d.ui.ddmanager.droppables[a]||[];d.ui.ddmanager.droppables[a].push(this)},_splice:function(a){for(var b=0;b< 256a.length;b++)a[b]===this&&a.splice(b,1)},_destroy:function(){this._splice(d.ui.ddmanager.droppables[this.options.scope])},_setOption:function(a,b){"accept"===a?this.accept=d.isFunction(b)?b:function(a){return a.is(b)}:"scope"===a&&(this._splice(d.ui.ddmanager.droppables[this.options.scope]),this._addToManager(b));this._super(a,b)},_activate:function(a){var b=d.ui.ddmanager.current;this._addActiveClass();b&&this._trigger("activate",a,this.ui(b))},_deactivate:function(a){var b=d.ui.ddmanager.current; 257this._removeActiveClass();b&&this._trigger("deactivate",a,this.ui(b))},_over:function(a){var b=d.ui.ddmanager.current;b&&(b.currentItem||b.element)[0]!==this.element[0]&&this.accept.call(this.element[0],b.currentItem||b.element)&&(this._addHoverClass(),this._trigger("over",a,this.ui(b)))},_out:function(a){var b=d.ui.ddmanager.current;b&&(b.currentItem||b.element)[0]!==this.element[0]&&this.accept.call(this.element[0],b.currentItem||b.element)&&(this._removeHoverClass(),this._trigger("out",a,this.ui(b)))}, 258_drop:function(a,b){var c=b||d.ui.ddmanager.current,e=!1;if(!c||(c.currentItem||c.element)[0]===this.element[0])return!1;this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var b=d(this).droppable("instance");if(b.options.greedy&&!b.options.disabled&&b.options.scope===c.options.scope&&b.accept.call(b.element[0],c.currentItem||c.element)&&C(c,d.extend(b,{offset:b.element.offset()}),b.options.tolerance,a))return e=!0,!1});return e?!1:this.accept.call(this.element[0], 259c.currentItem||c.element)?(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",a,this.ui(c)),this.element):!1},ui:function(a){return{draggable:a.currentItem||a.element,helper:
259a.helper,position:a.position,offset:a.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}}); 260var C=d.ui.intersect=function(){return function(a,b,c,d){if(!b.offset)return!1;var e=(a.positionAbs||a.position.absolute).left+a.margins.left,g=(a.positionAbs||a.position.absolute).top+a.margins.top,h=e+a.helperProportions.width,k=g+a.helperProportions.height,m=b.offset.left,l=b.offset.top,n=m+b.proportions().width,p=l+b.proportions().height;switch(c){case "fit":return m<=e&&h<=n&&l<=g&&k<=p;case "intersect":return m<e+a.helperProportions.width/2&&h-a.helperProportions.width/2<n&&l<g+a.helperProportions.height/ 2612&&k-a.helperProportions.height/2<p;case "pointer":a=d.pageY;c=b.proportions().height;if(l=a>=l&&a<l+c)d=d.pageX,b=b.proportions().width,l=d>=m&&d<m+b;return l;case "touch":return(g>=l&&g<=p||k>=l&&k<=p||g<l&&k>p)&&(e>=m&&e<=n||h>=m&&h<=n||e<m&&h>n);default:return!1}}}();d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var c,e=d.ui.ddmanager.droppables[a.options.scope]||[],f=b?b.type:null,g=(a.currentItem||a.element).find(":data(ui-droppable)").addBack();var h=0; 262a:for(;h<e.length;h++)if(!(e[h].options.disabled||a&&!e[h].accept.call(e[h].element[0],a.currentItem||a.element))){for(c=0;c<g.length;c++)if(g[c]===e[h].element[0]){e[h].proportions().height=0;continue a}e[h].visible="none"!==e[h].element.css("display");e[h].visible&&("mousedown"===f&&e[h]._activate.call(e[h],b),e[h].offset=e[h].element.offset(),e[h].proportions({width:e[h].element[0].offsetWidth,height:e[h].element[0].offsetHeight}))}},drop:function(a,b){var c=!1;d.each((d.ui.ddmanager.droppables[a.options.scope]|| 263[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&C(a,this,this.options.tolerance,b)&&(c=this._drop.call(this,b)||c),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],a.currentItem||a.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,b)))});return c},dragStart:function(a,b){a.element.parentsUntil("body").on("scroll.droppable",function(){a.options.refreshPositions||d.ui.ddmanager.prepareOffsets(a,b)})},drag:function(a,b){a.options.refreshPositions&& 264d.ui.ddmanager.prepareOffsets(a,b);d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var c=C(a,this,this.options.tolerance,b);var e=!c&&this.isover?"isout":c&&!this.isover?"isover":null;if(e){if(this.options.greedy){var f=this.options.scope;c=this.element.parents(":data(ui-droppable)").filter(function(){return d(this).droppable("instance").options.scope===f});if(c.length){var g=d(c[0]).droppable("instance");g.greedyChild="isover"=== 265e}}g&&"isover"===e&&(g.isover=!1,g.isout=!0,g._out.call(g,b));this[e]=!0;this["isout"===e?"isover":"isout"]=!1;this["isover"===e?"_over":"_out"].call(this,b);g&&"isout"===e&&(g.isout=!1,g.isover=!0,g._over.call(g,b))}}})},dragStop:function(a,b){a.element.parentsUntil("body").off("scroll.droppable");a.options.refreshPositions||d.ui.ddmanager.prepareOffsets(a,b)}};!1!==d.uiBackCompat&&d.widget("ui.droppable",d.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(); 266this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super();this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super();this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super();this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});d.widget("ui.resizable",d.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize", 267options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(a){return parseFloat(a)||0},_isNumber:function(a){return!isNaN(parseFloat(a))},_hasScroll:function(a,b){if("hidden"===d(a).css("overflow"))return!1;b=b&&"left"=== 268b?"scrollLeft":"scrollTop";if(0<a[b])return!0;a[b]=1;var c=0<a[b];a[b]=0;return c},_create:function(){var a=this.options,b=this;this._addClass("ui-resizable");d.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)){this.element.wrap(d("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"), 269width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance"));this.elementIsWrapper=!0;var c={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")};this.element.css(c);this.originalElement.css("margin", 2700);this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css(c);this._proportionallyResize()}this._setupHandles();if(a.autoHide)d(this.element).on("mouseenter",function(){a.disabled||(b._removeClass("ui-resizable-autohide"),b._handles.show())}).on("mouseleave",function(){a.disabled||b.resizing||(b._addClass("ui-resizable-autohide"), 271b._handles.hide())});this._mouseInit()},_destroy:function(){this._mouseDestroy();var a=function(a){d(a).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){a(this.element);var b=this.element;this.originalElement.css({position:b.css("position"),width:b.outerWidth(),height:b.outerHeight(),top:b.css("top"),left:b.css("left")}).insertAfter(b);b.remove()}this.originalElement.css("resize",this.originalResizeStyle);a(this.originalElement); 272return this},_setOption:function(a,b){this._super(a,b);switch(a){case "handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var a=this.options,b,c=this;this.handles=a.handles||(d(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se");this._handles=d();if(this.handles.constructor===String){"all"===this.handles&& 273(this.handles="n,e,s,w,se,sw,ne,nw");var e=this.handles.split(",");this.handles={};for(b=0;b<e.length;b++){var f=d.trim(e[b]);var g="ui-resizable-"+f;var h=d("<div>");this._addClass(h,"ui-resizable-handle "+g);h.css({zIndex:a.zIndex});this.handles[f]=".ui-resizable-"+f;this.element.append(h)}}this._renderAxis=function(a){var b;a=a||this.element;
273for(b in this.handles){if(this.handles[b].constructor===String)this.handles[b]=this.element.children(this.handles[b]).first().show();else if(this.handles[b].jquery|| 274this.handles[b].nodeType)this.handles[b]=d(this.handles[b]),this._on(this.handles[b],{mousedown:c._mouseDown});if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)){var e=d(this.handles[b],this.element);var f=/sw|ne|nw|se|n|s/.test(b)?e.outerHeight():e.outerWidth();e=["padding",/ne|nw|n/.test(b)?"Top":/se|sw|s/.test(b)?"Bottom":/^e$/.test(b)?"Right":"Left"].join("");a.css(e,f);this._proportionallyResize()}this._handles=this._handles.add(this.handles[b])}}; 275this._renderAxis(this.element);this._handles=this._handles.add(this.element.find(".ui-resizable-handle"));this._handles.disableSelection();this._handles.on("mouseover",function(){c.resizing||(this.className&&(h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),c.axis=h&&h[1]?h[1]:"se")});a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(a){var b,c=!1;for(b in this.handles){var e=d(this.handles[b])[0]; 276if(e===a.target||d.contains(e,a.target))c=!0}return!this.options.disabled&&c},_mouseStart:function(a){var b=this.options,c=this.element;this.resizing=!0;this._renderProxy();var e=this._num(this.helper.css("left"));var f=this._num(this.helper.css("top"));b.containment&&(e+=d(b.containment).scrollLeft()||0,f+=d(b.containment).scrollTop()||0);this.offset=this.helper.offset();this.position={left:e,top:f};this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:c.width(),height:c.height()}; 277this.originalSize=this._helper?{width:c.outerWidth(),height:c.outerHeight()}:{width:c.width(),height:c.height()};this.sizeDiff={width:c.outerWidth()-c.width(),height:c.outerHeight()-c.height()};this.originalPosition={left:e,top:f};this.originalMousePosition={left:a.pageX,top:a.pageY};this.aspectRatio="number"===typeof b.aspectRatio?b.aspectRatio:this.originalSize.width/this.originalSize.height||1;e=d(".ui-resizable-"+this.axis).css("cursor");d("body").css("cursor","auto"===e?this.axis+"-resize":e); 278this._addClass("ui-resizable-resizing");this._propagate("start",a);return!0},_mouseDrag:function(a){var b=this.originalMousePosition;var c=a.pageX-b.left||0;b=a.pageY-b.top||0;var e=this._change[this.axis];this._updatePrevProperties();if(!e)return!1;c=e.apply(this,[a,c,b]);this._updateVirtualBoundaries(a.shiftKey);if(this._aspectRatio||a.shiftKey)c=this._updateRatio(c,a);c=this._respectSize(c,a);this._updateCache(c);this._propagate("resize",a);c=this._applyChanges();!this._helper&&this._proportionallyResizeElements.length&& 279this._proportionallyResize();d.isEmptyObject(c)||(this._updatePrevProperties(),this._trigger("resize",a,this.ui()),this._applyChanges());return!1},_mouseStop:function(a){this.resizing=!1;var b,c=this.options;if(this._helper){var e=this._proportionallyResizeElements;e=(b=e.length&&/textarea/i.test(e[0].nodeName))&&this._hasScroll(e[0],"left")?0:this.sizeDiff.height;b=b?0:this.sizeDiff.width;b={width:this.helper.width()-b,height:this.helper.height()-e};e=parseFloat(this.element.css("left"))+(this.position.left- 280this.originalPosition.left)||null;var f=parseFloat(this.element.css("top"))+(this.position.top-this.originalPosition.top)||null;c.animate||this.element.css(d.extend(b,{top:f,left:e}));this.helper.height(this.size.height);this.helper.width(this.size.width);this._helper&&!c.animate&&this._proportionallyResize()}d("body").css("cursor","auto");this._removeClass("ui-resizable-resizing");this._propagate("stop",a);this._helper&&this.helper.remove();return!1},_updatePrevProperties:function(){this.prevPosition= 281{top:this.position.top,left:this.position.left};this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var a={};this.position.top!==this.prevPosition.top&&(a.top=this.position.top+"px");this.position.left!==this.prevPosition.left&&(a.left=this.position.left+"px");this.size.width!==this.prevSize.width&&(a.width=this.size.width+"px");this.size.height!==this.prevSize.height&&(a.height=this.size.height+"px");this.helper.css(a);return a},_updateVirtualBoundaries:function(a){var b= 282this.options;b={minWidth:this._isNumber(b.minWidth)?b.minWidth:0,maxWidth:this._isNumber(b.maxWidth)?b.maxWidth:Infinity,minHeight:this._isNumber(b.minHeight)?b.minHeight:0,maxHeight:this._isNumber(b.maxHeight)?b.maxHeight:Infinity};if(this._aspectRatio||a){a=b.minHeight*this.aspectRatio;var c=b.minWidth/this.aspectRatio;var d=b.maxHeight*this.aspectRatio;var f=b.maxWidth/this.aspectRatio;a>b.minWidth&&(b.minWidth=a);c>b.minHeight&&(b.minHeight=c);d<b.maxWidth&&(b.maxWidth=d);f<b.maxHeight&&(b.maxHeight= 283f)}this._vBoundaries=b},_updateCache:function(a){this.offset=this.helper.offset();
283this._isNumber(a.left)&&(this.position.left=a.left);this._isNumber(a.top)&&(this.position.top=a.top);this._isNumber(a.height)&&(this.size.height=a.height);this._isNumber(a.width)&&(this.size.width=a.width)},_updateRatio:function(a){var b=this.position,c=this.size,d=this.axis;this._isNumber(a.height)?a.width=a.height*this.aspectRatio:this._isNumber(a.width)&&(a.height=a.width/this.aspectRatio);"sw"===d&&(a.left=b.left+ 284(c.width-a.width),a.top=null);"nw"===d&&(a.top=b.top+(c.height-a.height),a.left=b.left+(c.width-a.width));return a},_respectSize:function(a){var b=this._vBoundaries,c=this.axis,d=this._isNumber(a.width)&&b.maxWidth&&b.maxWidth<a.width,f=this._isNumber(a.height)&&b.maxHeight&&b.maxHeight<a.height,g=this._isNumber(a.width)&&b.minWidth&&b.minWidth>a.width,h=this._isNumber(a.height)&&b.minHeight&&b.minHeight>a.height,k=this.originalPosition.left+this.originalSize.width,m=this.originalPosition.top+this.originalSize.height, 285l=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);g&&(a.width=b.minWidth);h&&(a.height=b.minHeight);d&&(a.width=b.maxWidth);f&&(a.height=b.maxHeight);g&&l&&(a.left=k-b.minWidth);d&&l&&(a.left=k-b.maxWidth);h&&c&&(a.top=m-b.minHeight);f&&c&&(a.top=m-b.maxHeight);a.width||a.height||a.left||!a.top?a.width||a.height||a.top||!a.left||(a.left=null):a.top=null;return a},_getPaddingPlusBorderDimensions:function(a){var b=0,c=[],d=[a.css("borderTopWidth"),a.css("borderRightWidth"),a.css("borderBottomWidth"),a.css("borderLeftWidth")]; 286for(a=[a.css("paddingTop"),a.css("paddingRight"),a.css("paddingBottom"),a.css("paddingLeft")];4>b;b++)c[b]=parseFloat(d[b])||0,c[b]+=parseFloat(a[b])||0;return{height:c[0]+c[2],width:c[1]+c[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var a,b=0,c=this.helper||this.element;b<this._proportionallyResizeElements.length;b++)a=this._proportionallyResizeElements[b],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(a)),a.css({height:c.height()- 287this.outerDimensions.height||0,width:c.width()-this.outerDimensions.width||0})},_renderProxy:function(){var a=this.options;this.elementOffset=this.element.offset();this._helper?(this.helper=this.helper||d("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++a.zIndex}),this.helper.appendTo("body").disableSelection()): 288this.helper=this.element},_change:{e:function(a,b){return{width:this.originalSize.width+b}},w:function(a,b){return{left:this.originalPosition.left+b,width:this.originalSize.width-b}},n:function(a,b,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(a,b,c){return d.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[a,b,c]))},sw:function(a,b,c){return d.extend(this._change.s.apply(this, 289arguments),this._change.w.apply(this,[a,b,c]))},ne:function(a,b,c){return d.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[a,b,c]))},nw:function(a,b,c){return d.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[a,b,c]))}},_propagate:function(a,b){d.ui.plugin.call(this,a,[b,this.ui()]);"resize"!==a&&this._trigger(a,b,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position, 290size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});d.ui.plugin.add("resizable","animate",{stop:function(a){var b=d(this).resizable("instance"),c=b.options,e=b._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&b._hasScroll(e[0],"left")?0:b.sizeDiff.height;f={width:b.size.width-(f?0:b.sizeDiff.width),height:b.size.height-g};g=parseFloat(b.element.css("left"))+(b.position.left-b.originalPosition.left)||null;var h=parseFloat(b.element.css("top"))+ 291(b.position.top-b.originalPosition.top)||null;b.element.animate(d.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,step:function(){var c={width:parseFloat(b.element.css("width")),height:parseFloat(b.element.css("height")),top:parseFloat(b.element.css("top")),left:parseFloat(b.element.css("left"))};e&&e.length&&d(e[0]).css({width:c.width,height:c.height});b._updateCache(c);
291b._propagate("resize",a)}})}});d.ui.plugin.add("resizable","containment",{start:function(){var a= 292d(this).resizable("instance"),b=a.element;var c=a.options.containment;if(b=c instanceof d?c.get(0):/parent/.test(c)?b.parent().get(0):c)if(a.containerElement=d(b),/document/.test(c)||c===document)a.containerOffset={left:0,top:0},a.containerPosition={left:0,top:0},a.parentData={element:d(document),left:0,top:0,width:d(document).width(),height:d(document).height()||document.body.parentNode.scrollHeight};else{var e=d(b);var f=[];d(["Top","Right","Left","Bottom"]).each(function(b,c){f[b]=a._num(e.css("padding"+ 293c))});a.containerOffset=e.offset();a.containerPosition=e.position();a.containerSize={height:e.innerHeight()-f[3],width:e.innerWidth()-f[1]};c=a.containerOffset;var g=a.containerSize.height;var h=a.containerSize.width;h=a._hasScroll(b,"left")?b.scrollWidth:h;g=a._hasScroll(b)?b.scrollHeight:g;a.parentData={element:b,left:c.left,top:c.top,width:h,height:g}}},resize:function(a){var b=d(this).resizable("instance");var c=b.options;var e=b.containerOffset;var f=b.position;a=b._aspectRatio||a.shiftKey;var g= 294{top:0,left:0},h=b.containerElement,k=!0;h[0]!==document&&/static/.test(h.css("position"))&&(g=e);f.left<(b._helper?e.left:0)&&(b.size.width+=b._helper?b.position.left-e.left:b.position.left-g.left,a&&(b.size.height=b.size.width/b.aspectRatio,k=!1),b.position.left=c.helper?e.left:0);f.top<(b._helper?e.top:0)&&(b.size.height+=b._helper?b.position.top-e.top:b.position.top,a&&(b.size.width=b.size.height*b.aspectRatio,k=!1),b.position.top=b._helper?e.top:0);c=b.containerElement.get(0)===b.element.parent().get(0); 295f=/relative|absolute/.test(b.containerElement.css("position"));c&&f?(b.offset.left=b.parentData.left+b.position.left,b.offset.top=b.parentData.top+b.position.top):(b.offset.left=b.element.offset().left,b.offset.top=b.element.offset().top);c=Math.abs(b.sizeDiff.width+(b._helper?b.offset.left-g.left:b.offset.left-e.left));e=Math.abs(b.sizeDiff.height+(b._helper?b.offset.top-g.top:b.offset.top-e.top));c+b.size.width>=b.parentData.width&&(b.size.width=b.parentData.width-c,a&&(b.size.height=b.size.width/ 296b.aspectRatio,k=!1));e+b.size.height>=b.parentData.height&&(b.size.height=b.parentData.height-e,a&&(b.size.width=b.size.height*b.aspectRatio,k=!1));k||(b.position.left=b.prevPosition.left,b.position.top=b.prevPosition.top,b.size.width=b.prevSize.width,b.size.height=b.prevSize.height)},stop:function(){var a=d(this).resizable("instance"),b=a.options,c=a.containerOffset,e=a.containerPosition,f=a.containerElement,g=d(a.helper),h=g.offset(),k=g.outerWidth()-a.sizeDiff.width;g=g.outerHeight()-a.sizeDiff.height; 297a._helper&&!b.animate&&/relative/.test(f.css("position"))&&d(this).css({left:h.left-e.left-c.left,width:k,height:g});a._helper&&!b.animate&&/static/.test(f.css("position"))&&d(this).css({left:h.left-e.left-c.left,width:k,height:g})}});d.ui.plugin.add("resizable","alsoResize",{start:function(){var a=d(this).resizable("instance").options;d(a.alsoResize).each(function(){var a=d(this);a.data("ui-resizable-alsoresize",{width:parseFloat(a.width()),height:parseFloat(a.height()),left:parseFloat(a.css("left")), 298top:parseFloat(a.css("top"))})})},resize:function(a,b){a=d(this).resizable("instance");var c=a.originalSize,e=a.originalPosition,f={height:a.size.height-c.height||0,width:a.size.width-c.width||0,top:a.position.top-e.top||0,left:a.position.left-e.left||0};d(a.options.alsoResize).each(function(){var a=d(this),c=d(this).data("ui-resizable-alsoresize"),e={},m=a.parents(b.originalElement[0]).length?["width","height"]:["width","height","top","left"];d.each(m,function(a,b){(a=(c[b]||0)+(f[b]||0))&&0<=a&& 299(e[b]=a||null)});a.css(e)})},stop:function(){d(this).removeData("ui-resizable-alsoresize")}});d.ui.plugin.add("resizable","ghost",{start:function(){var a=d(this).resizable("instance"),b=a.size;a.ghost=a.originalElement.clone();a.ghost.css({opacity:.25,display:"block",position:"relative",height:b.height,width:b.width,margin:0,left:0,top:0});a._addClass(a.ghost,"ui-resizable-ghost");!1!==d.uiBackCompat&&"string"===typeof a.options.ghost&&a.ghost.addClass(this.options.ghost);a.ghost.appendTo(a.helper)}, 300resize:function(){var a=d(this).resizable("instance");a.ghost&&a.ghost.css({position:"relative",height:a.size.height,width:a.size.width})},stop:function(){var a=d(this).resizable("instance");a.ghost&&a.helper&&a.helper.get(0).removeChild(a.ghost.get(0))}});d.ui.plugin.add("resizable","grid",{resize:function(){var a=d(this).resizable("instance"),b=a.options,c=a.size,e=a.originalSize,f
300=a.originalPosition,g=a.axis,h="number"===typeof b.grid?[b.grid,b.grid]:b.grid,k=h[0]||1,m=h[1]||1,l=Math.round((c.width- 301e.width)/k)*k;c=Math.round((c.height-e.height)/m)*m;var n=e.width+l,p=e.height+c,r=b.maxWidth&&b.maxWidth<n,y=b.maxHeight&&b.maxHeight<p,w=b.minWidth&&b.minWidth>n,t=b.minHeight&&b.minHeight>p;b.grid=h;w&&(n+=k);t&&(p+=m);r&&(n-=k);y&&(p-=m);if(/^(se|s|e)$/.test(g))a.size.width=n,a.size.height=p;else if(/^(ne)$/.test(g))a.size.width=n,a.size.height=p,a.position.top=f.top-c;else if(/^(sw)$/.test(g))a.size.width=n,a.size.height=p,a.position.left=f.left-l;else{if(0>=p-m||0>=n-k)var u=a._getPaddingPlusBorderDimensions(this); 3020<p-m?(a.size.height=p,a.position.top=f.top-c):(p=m-u.height,a.size.height=p,a.position.top=f.top+e.height-p);0<n-k?(a.size.width=n,a.position.left=f.left-l):(n=k-u.width,a.size.width=n,a.position.left=f.left+e.width-n)}}});d.widget("ui.sortable",d.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *", 303opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(a,b,c){return a>=b&&a<b+c},_isFloating:function(a){return/left|right/.test(a.css("float"))||/inline|table-cell/.test(a.css("display"))},_create:function(){this.containerCache={};this._addClass("ui-sortable"); 304this.refresh();this.offset=this.element.offset();this._mouseInit();this._setHandleClassName();this.ready=!0},_setOption:function(a,b){this._super(a,b);"handle"===a&&this._setHandleClassName()},_setHandleClassName:function(){var a=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle");d.each(this.items,function(){a._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy(); 305for(var a=this.items.length-1;0<=a;a--)this.items[a].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(a,b){var c=null,e=!1,f=this;if(this.reverting||this.options.disabled||"static"===this.options.type)return!1;this._refreshItems(a);d(a.target).parents().each(function(){if(d.data(this,f.widgetName+"-item")===f)return c=d(this),!1});d.data(a.target,f.widgetName+"-item")===f&&(c=d(a.target));if(!c||this.options.handle&&!b&&(d(this.options.handle,c).find("*").addBack().each(function(){this=== 306a.target&&(e=!0)}),!e))return!1;this.currentItem=c;this._removeCurrentsFromItems();return!0},_mouseStart:function(a,b,c){b=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left, 307top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!==this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder(); 308b.containment&&this._setContainment();if(b.cursor&&"auto"!==b.cursor){var e=this.document.find("body");this.storedCursor=e.css("cursor");e.css("cursor",b.cursor);this.storedStylesheet=d("<style>*{ cursor: "+b.cursor+" !important; }</style>").appendTo(e)}b.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",b.opacity));b.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",b.zIndex)); 309this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset());this._trigger("start",a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;0<=c;c--)this.containers[c]._trigger("activate",a,this._uiHash(this));d.ui.ddmanager&&(d.ui.ddmanager.current=this);d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=!0;this._addClass(this.helper, 310"ui-sortable-helper");this._mouseDrag(a);return!0},_mouseDrag:function(a){var b;var c=this.options;var e=!1;this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY<c.scrollSensitivity?this.scrollParent[0].scrollTop=e=this.scrollParent[0].scrollTop+ 311c.scrollSpeed:a.pageY-this.overflowOffset.top<c.scrollSensitivity&&(this.scrollParent[0].scrollTop=e=this.scrollParent[0].scrollTop-c.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-a.pageX<c.scrollSensitivity?this.scrollParent[0].scrollLeft=e=this.scrollParent[0].scrollLeft+c.scrollSpeed:a.pageX-this.overflowOffset.left<c.scrollSensitivity&&(this.scrollParent[0].scrollLeft=e=this.scrollParent[0].scrollLeft-c.scrollSpeed)):(a.pageY-this.document.scrollTop()<c.scrollSensitivity? 312e=this.document.scrollTop(this.document.scrollTop()-c.scrollSpeed):this.window.height()-(a.pageY-this.document.scrollTop())<c.scrollSensitivity&&(e=this.document.scrollTop(this.document.scrollTop()+c.scrollSpeed)),a.pageX-this.document.scrollLeft()<c.scrollSensitivity?e=this.document.scrollLeft(this.document.scrollLeft()-c.scrollSpeed):this.window.width()-(a.pageX-this.document.scrollLeft())<c.scrollSensitivity&&(e=this.document.scrollLeft(this.document.scrollLeft()+c.scrollSpeed))),!1!==e&&d.ui.ddmanager&& 313!c.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a));this.positionAbs=this._convertPositionTo("absolute");this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px");this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px");for(c=this.items.length-1;0<=c;c--){e=this.items[c];var f=e.item[0];if((b=this._intersectsWithPointer(e))&&e.instance===this.currentContainer&&f!==this.currentItem[0]&&this.placeholder[1===b?"next":"prev"]()[0]!== 314f&&!d.contains(this.placeholder[0],f)&&("semi-dynamic"===this.options.type?!d.contains(this.element[0],f):1)){this.direction=1===b?"down":"up";if("pointer"===this.options.tolerance||this._intersectsWithSides(e))this._rearrange(a,e);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return!1},_mouseStop:function(a,b){if(a){d.ui.ddmanager&&!this.options.dropBehaviour&& 315d.ui.ddmanager.drop(this,a);if(this.options.revert){var c=this;b=this.placeholder.offset();var e=this.options.axis,f={};e&&"x"!==e||(f.left=b.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft));e&&"y"!==e||(f.top=b.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop));this.reverting=!0;d(this.helper).animate(f,parseInt(this.options.revert,10)||500,function(){c._clear(a)})}else this._clear(a, 316b);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new d.Event("mouseup",{target:null}));"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var a=this.containers.length-1;0<=a;a--)this.containers[a]._trigger("deactivate",null,this._uiHash(this)),this.containers[a].containerCache.over&&(this.containers[a]._trigger("out",null,this._uiHash(this)),this.containers[a].containerCache.over= 3170)}this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),d.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):d(this.domPosition.parent).prepend(this.currentItem));return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{}; 318d(b).each(function(){var b=(d(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[\-=_](.+)/);b&&c.push((a.key||b[1]+"[]")+"="+(a.key&&a.expression?b[1]:b[2]))});!c.length&&a.key&&c.push(a.key+"=");return c.join("&")},toArray:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};b.each(function(){c.push(d(a.item||this).attr(a.attribute||"id")||"")});return c},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top, 319f=d+this.helperProportions.height,g=a.left,h=g+a.width,k=a.top,m=k+a.height,l=this.offset.click.top,n=this.offset.click.left;l="x"===this.options.axis||d+l>k&&d+l<m;n="y"===this.options.axis||b+n>g&&b+n<h;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?l&&n:g<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<h&&k<d+this.helperProportions.height/ 3202&&f-this.helperProportions.height/2<m},_intersectsWithPointer:function(a){var b="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,a.top,a.height);a="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,a.left,a.width);if(!b||!a)return!1;b=this._getDragVerticalDirection();a=this._getDragHorizontalDirection();return this.floating?"right"===a||"down"===b?2:1:b&&("down"===b?2:1)},_intersectsWithSides:function(a){var b=this._isOverAxis(this.positionAbs.top+ 321this.offset.click.top,a.top+a.height/2,a.height);a=this._isOverAxis(this.positionAbs.left+this.offset.click.left,a.left+a.width/2,a.width);var c=this._getDragVerticalDirection(),d=this._getDragHorizontalDirection();return this.floating&&d?"right"===d&&a||"left"===d&&!a:c&&("down"===c&&b||"up"===c&&!b)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return 0!==a&&(0<a?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left; 322return 0!==a&&(0<a?"right":"left")},refresh:function(a){this._refreshItems(a);this._setHandleClassName();this.refreshPositions();return this},_connectWith:function(){var a=this.options;
322return a.connectWith.constructor===String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){function b(){f.push(this)}var c,e,f=[],g=[],h=this._connectWith();if(h&&a)for(a=h.length-1;0<=a;a--){var k=d(h[a],this.document[0]);for(c=k.length-1;0<=c;c--)(e=d.data(k[c],this.widgetFullName))&&e!==this&&!e.options.disabled&& 323g.push([d.isFunction(e.options.items)?e.options.items.call(e.element):d(e.options.items,e.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),e])}g.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(a=g.length-1;0<=a;a--)g[a][0].each(b);return d(f)},_removeCurrentsFromItems:function(){var a=this.currentItem.find(":data("+ 324this.widgetName+"-item)");this.items=d.grep(this.items,function(b){for(var c=0;c<a.length;c++)if(a[c]===b.item[0])return!1;return!0})},_refreshItems:function(a){this.items=[];this.containers=[this];var b,c,e,f,g=this.items,h=[[d.isFunction(this.options.items)?this.options.items.call(this.element[0],a,{item:this.currentItem}):d(this.options.items,this.element),this]];if((f=this._connectWith())&&this.ready)for(b=f.length-1;0<=b;b--){var k=d(f[b],this.document[0]);for(c=k.length-1;0<=c;c--)(e=d.data(k[c], 325this.widgetFullName))&&e!==this&&!e.options.disabled&&(h.push([d.isFunction(e.options.items)?e.options.items.call(e.element[0],a,{item:this.currentItem}):d(e.options.items,e.element),e]),this.containers.push(e))}for(b=h.length-1;0<=b;b--)for(a=h[b][1],k=h[b][0],c=0,f=k.length;c<f;c++)e=d(k[c]),e.data(this.widgetName+"-item",a),g.push({item:e,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(a){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item): 326!1;this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var b;for(b=this.items.length-1;0<=b;b--){var c=this.items[b];if(c.instance===this.currentContainer||!this.currentContainer||c.item[0]===this.currentItem[0]){var e=this.options.toleranceElement?d(this.options.toleranceElement,c.item):c.item;a||(c.width=e.outerWidth(),c.height=e.outerHeight());e=e.offset();c.left=e.left;c.top=e.top}}
326if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this); 327else for(b=this.containers.length-1;0<=b;b--)e=this.containers[b].element.offset(),this.containers[b].containerCache.left=e.left,this.containers[b].containerCache.top=e.top,this.containers[b].containerCache.width=this.containers[b].element.outerWidth(),this.containers[b].containerCache.height=this.containers[b].element.outerHeight();return this},_createPlaceholder:function(a){a=a||this;var b=a.options;if(!b.placeholder||b.placeholder.constructor===String){var c=b.placeholder;b.placeholder={element:function(){var b= 328a.currentItem[0].nodeName.toLowerCase(),f=d("<"+b+">",a.document[0]);a._addClass(f,"ui-sortable-placeholder",c||a.currentItem[0].className)._removeClass(f,"ui-sortable-helper");"tbody"===b?a._createTrPlaceholder(a.currentItem.find("tr").eq(0),d("<tr>",a.document[0]).appendTo(f)):"tr"===b?a._createTrPlaceholder(a.currentItem,f):"img"===b&&f.attr("src",a.currentItem.attr("src"));c||f.css("visibility","hidden");return f},update:function(d,f){if(!c||b.forcePlaceholderSize)f.height()||f.height(a.currentItem.innerHe
328ight()- 329parseInt(a.currentItem.css("paddingTop")||0,10)-parseInt(a.currentItem.css("paddingBottom")||0,10)),f.width()||f.width(a.currentItem.innerWidth()-parseInt(a.currentItem.css("paddingLeft")||0,10)-parseInt(a.currentItem.css("paddingRight")||0,10))}}}a.placeholder=d(b.placeholder.element.call(a.element,a.currentItem));a.currentItem.after(a.placeholder);b.placeholder.update(a,a.placeholder)},_createTrPlaceholder:function(a,b){var c=this;a.children().each(function(){d("<td> </td>",c.document[0]).attr("colspan", 330d(this).attr("colspan")||1).appendTo(b)})},_contactContainers:function(a){var b,c,e,f=e=null;for(b=this.containers.length-1;0<=b;b--)d.contains(this.currentItem[0],this.containers[b].element[0])||(this._intersectsWith(this.containers[b].containerCache)?e&&d.contains(this.containers[b].element[0],e.element[0])||(e=this.containers[b],f=b):this.containers[b].containerCache.over&&(this.containers[b]._trigger("out",a,this._uiHash(this)),this.containers[b].containerCache.over=0));if(e)if(1===this.containers.length)this.containers[f].containerCache.over|| 331(this.containers[f]._trigger("over",a,this._uiHash(this)),this.containers[f].containerCache.over=1);else{b=1E4;var g=null;e=(c=e.floating||this._isFloating(this.currentItem))?"left":"top";var h=c?"width":"height";var k=c?"pageX":"pageY";for(c=this.items.length-1;0<=c;c--)if(d.contains(this.containers[f].element[0],this.items[c].item[0])&&this.items[c].item[0]!==this.currentItem[0]){var m=this.items[c].item.offset()[e];var l=!1;a[k]-m>this.items[c][h]/2&&(l=!0);Math.abs(a[k]-m)<b&&(b=Math.abs(a[k]- 332m),g=this.items[c],this.direction=l?"up":"down")}if(g||this.options.dropOnEmpty)this.currentContainer===this.containers[f]?this.currentContainer.containerCache.over||(this.containers[f]._trigger("over",a,this._uiHash()),this.currentContainer.containerCache.over=1):(g?this._rearrange(a,g,null,!0):this._rearrange(a,null,this.containers[f].element,!0),this._trigger("change",a,this._uiHash()),this.containers[f]._trigger("change",a,this._uiHash(this)),this.currentContainer=this.containers[f],this.options.placeholder.update(this.currentContainer, 333this.placeholder),this.containers[f]._trigger("over",a,this._uiHash(this)),this.containers[f].containerCache.over=1)}},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a,this.currentItem])):"clone"===b.helper?this.currentItem.clone():this.currentItem;a.parents("body").length||d("parent"!==b.appendTo?b.appendTo:this.currentItem[0].parentNode)[0].appendChild(a[0]);a[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width, 334height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")});a[0].style.width&&!b.forceHelperSize||a.width(this.currentItem.width());a[0].style.height&&!b.forceHelperSize||a.height(this.currentItem.height());return a},_adjustOffsetFromHelper:function(a){"string"===typeof a&&(a=a.split(" "));d.isArray(a)&&(a={left:+a[0],top:+a[1]||0});"left"in a&&(this.offset.click.left=a.left+this.margins.left);"right"in a&&(this.offset.click.left= 335this.helperProportions.width-a.right+this.margins.left);"top"in a&&(this.offset.click.top=a.top+this.margins.top);"bottom"in a&&(this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&d.contains(this.scrollParent[0],this.offsetParent[0])&&(a.left+=this.scrollParent.scrollLeft(),a.top+=this.scrollParent.scrollTop()); 336if(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&d.ui.ie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left- 337(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;"parent"===a.containment&&(a.containment=this.helper[0].parentNode);
337if("document"=== 338a.containment||"window"===a.containment)this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===a.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===a.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)){var b= 339d(a.containment)[0];a=d(a.containment).offset();var c="hidden"!==d(b).css("overflow");this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width- 340this.margins.left,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(a,b){b||(b=this.position);a="absolute"===a?1:-1;var c="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&d.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,e=/(html|body)/i.test(c[0].tagName); 341return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():e?0:c.scrollTop())*a,left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())*a}},_generatePosition:function(a){var b=this.options;var c=a.pageX;var e=a.pageY;var f="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&d.contains(this.scrollParent[0],this.offsetParent[0])? 342this.scrollParent:this.offsetParent,g=/(html|body)/i.test(f[0].tagName);"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset());this.originalPosition&&(this.containment&&(a.pageX-this.offset.click.left<this.containment[0]&&(c=this.containment[0]+this.offset.click.left),a.pageY-this.offset.click.top<this.containment[1]&&(e=this.containment[1]+this.offset.click.top),a.pageX-this.offset.click.left> 343this.containment[2]&&(c=this.containment[2]+this.offset.click.left),a.pageY-this.offset.click.top>this.containment[3]&&(e=this.containment[3]+this.offset.click.top)),b.grid&&(e=this.originalPageY+Math.round((e-this.originalPageY)/b.grid[1])*b.grid[1],e=this.containment?e-this.offset.click.top>=this.containment[1]&&e-this.offset.click.top<=this.containment[3]?e:e-this.offset.click.top>=this.containment[1]?e-b.grid[1]:e+b.grid[1]:e,c=this.originalPageX+Math.round((c-this.originalPageX)/b.grid[0])*b.grid[0], 344c=this.containment?c-this.offset.click.left>=this.containment[0]&&c-this.offset.click.left<=this.containment[2]?c:c-this.offset.click.left>=this.containment[0]?c-b.grid[0]:c+b.grid[0]:c));return{top:e-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():g?0:f.scrollTop()),left:c-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())}}, 345_rearrange:function(a,b,c,d){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?b.item[0]:b.item[0].nextSibling);var e=this.counter=this.counter?++this.counter:1;this._delay(function(){e===this.counter&&this.refreshPositions(!d)})},_clear:function(a,b){function c(a,b,c){return function(d){c._trigger(a,d,b._uiHash(b))}}this.reverting=!1;var d,f=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem); 346this._noFinalSort=null;if(this.helper[0]===this.currentItem[0]){for(d in this._storedCSS)if("auto"===this._storedCSS[d]||"static"===this._storedCSS[d])this._storedCSS[d]="";this.currentItem.css(this._storedCSS);this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!b&&f.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))});!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent=== 347this.currentItem.parent()[0]||b||f.push(function(a){this._trigger("update",a,this._uiHash())});this===this.currentContainer||b||(f.push(function(a){this._trigger("remove",a,this._uiHash())}),f.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.currentContainer)),f.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.currentContainer)));for(d=this.containers.length-1;0<=d;d--)b||f.push(c("deactivate",this,this.containers[d])), 348this.containers[d].containerCache.over&&(f.push(c("out",this,this.containers[d])),this.containers[d].containerCache.over=0);this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove());this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex);this.dragging=!1;b||this._trigger("beforeStop",a,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]); 349this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null);if(!b){for(d=0;d<f.length;d++)f[d].call(this,a);this._trigger("stop",a,this._uiHash())}this.fromOutside=!1;return!this.cancelHelperRemoval},_trigger:function(){!1===d.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(a){var b=a||this;return{helper:b.helper,placeholder:b.placeholder||d([]),position:b.position,originalPosition:b.originalPosition,offset:b.positionAbs, 350item:b.currentItem,sender:a?a.element:null}}});d.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide", 351paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var a=this.options;this.prevShow=this.prevHide=d();this._addClass("ui-accordion","ui-widget ui-helper-reset");this.element.attr("role","tablist");a.collapsible||!1!==a.active&&null!=a.active||(a.active=0);this._processPanels();0>a.active&&(a.active+=this.headers.length);this._refresh()},_getCreateEventData:function(){return{header:this.active, 352panel:this.active.length?this.active.next():d()}},_createIcons:function(){var a=this.options.icons;
352if(a){var b=d("<span>");this._addClass(b,"ui-accordion-header-icon","ui-icon "+a.header);b.prependTo(this.headers);b=this.active.children(".ui-accordion-header-icon");this._removeClass(b,a.header)._addClass(b,null,a.activeHeader)._addClass(this.headers,"ui-accordion-icons")}},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons");this.headers.children(".ui-accordion-header-icon").remove()}, 353_destroy:function(){this.element.removeAttr("role");this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId();this._destroyIcons();var a=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId();"content"!==this.options.heightStyle&&a.css("height","")},_setOption:function(a,b){"active"===a?this._activate(b):("event"===a&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(b)),this._super(a, 354b),"collapsible"!==a||b||!1!==this.options.active||this._activate(0),"icons"===a&&(this._destroyIcons(),b&&this._createIcons()))},_setOptionDisabled:function(a){this._super(a);this.element.attr("aria-disabled",a);this._toggleClass(null,"ui-state-disabled",!!a);this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!a)},_keydown:function(a){if(!a.altKey&&!a.ctrlKey){var b=d.ui.keyCode,c=this.headers.length,e=this.headers.index(a.target),f=!1;switch(a.keyCode){case b.RIGHT:case b.DOWN:f= 355this.headers[(e+1)%c];break;case b.LEFT:case b.UP:f=this.headers[(e-1+c)%c];break;case b.SPACE:case b.ENTER:this._eventHandler(a);break;case b.HOME:f=this.headers[0];break;case b.END:f=this.headers[c-1]}f&&(d(a.target).attr("tabIndex",-1),d(f).attr("tabIndex",0),d(f).trigger("focus"),a.preventDefault())}},_panelKeyDown:function(a){a.keyCode===d.ui.keyCode.UP&&a.ctrlKey&&d(a.currentTarget).prev().trigger("focus")},refresh:function(){var a=this.options;this._processPanels();!1===a.active&&!0===a.collapsible|| 356!this.headers.length?(a.active=!1,this.active=d()):!1===a.active?this._activate(0):this.active.length&&!d.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(a.active=!1,this.active=d()):this._activate(Math.max(0,a.active-1)):a.active=this.headers.index(this.active);this._destroyIcons();this._refresh()},_processPanels:function(){var a=this.headers,b=this.panels;this.headers=this.element.find(this.options.header);this._addClass(this.headers, 357"ui-accordion-header ui-accordion-header-collapsed","ui-state-default");this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide();this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content");b&&(this._off(a.not(this.headers)),this._off(b.not(this.panels)))},_refresh:function(){var a=this.options,b=a.heightStyle,c=this.element.parent();this.active=this._findActive(a.active);this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active, 358"ui-accordion-header-collapsed");this._addClass(this.active.next(),"ui-accordion-content-active");this.active.next().show();this.headers.attr("role","tab").each(function(){var a=d(this),b=a.uniqueId().attr("id"),c=a.next(),e=c.uniqueId().attr("id");a.attr("aria-controls",e);c.attr("aria-labelledby",b)}).next().attr("role","tabpanel");this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide();this.active.length?this.active.attr({"aria-selected":"true", 359"aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0);this._createIcons();this._setupEvents(a.event);if("fill"===b){var e=c.height();this.element.siblings(":visible").each(function(){var a=d(this),b=a.css("position");"absolute"!==b&&"fixed"!==b&&(e-=a.outerHeight(!0))});this.headers.each(function(){e-=d(this).outerHeight(!0)});this.headers.next().each(function(){d(this).height(Math.max(0,e-d(this).innerHeight()+d(this).height()))}).css("overflow", 360"auto")}else"auto"===b&&(e=0,this.headers.next().each(function(){var a=d(this).is(":visible");a||d(this).show();e=Math.max(e,d(this).css("height","").height());a||d(this).hide()}).height(e))},_activate:function(a){a=this._findActive(a)[0];a!==this.active[0]&&(a=a||this.active[0],this._eventHandler({target:a,currentTarget:a,preventDefault:d.noop}))},_findActive:function(a){return"number"===typeof a?this.headers.eq(a):d()},_setupEvents:function(a){var b={keydown:"_keydown"};a&&d.each(a.split(" "),function(a, 361d){b[d]="_eventHandler"});this._off(this.headers.add(this.headers.next()));this._on(this.headers,b);this._on(this.headers.next(),{keydown:"_panelKeyDown"});this._hoverable(this.headers);this._focusable(this.headers)},_eventHandler:function(a){var b,c=this.options,e=this.active,f=d(a.currentTarget),g=(b=f[0]===e[0])&&c.collapsible,h=g?d():f.next(),k=e.next();h={oldHeader:e,oldPanel:k,newHeader:g?d():f,newPanel:h};a.preventDefault();b&&!c.collapsible||!1===this._trigger("beforeActivate",a,h)||(c.active= 362g?!1:this.headers.index(f),this.active=b?d():f,this._toggle(h),this._removeClass(e,"ui-accordion-header-active","ui-state-active"),c.icons&&(a=e.children(".ui-accordion-header-icon"),this._removeClass(a,null,c.icons.activeHeader)._addClass(a,null,c.icons.header)),b||(this._removeClass(f,"ui-accordion-header-collapsed")._addClass(f,"ui-accordion-header-active","ui-state-active"),c.icons&&(b=f.children(".ui-accordion-header-icon"),this._removeClass(b,null,c.icons.header)._addClass(b,null,c.icons.activeHeader)), 363this._addClass(f.next(),"ui-accordion-content-active")))},_toggle:function(a){var b=a.newPanel,c=this.prevShow.length?this.prevShow:a.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0);this.prevShow=b;this.prevHide=c;this.options.animate?this._animate(b,c,a):(c.hide(),b.show(),this._toggleComplete(a));c.attr({"aria-hidden":"true"});c.prev().attr({"aria-selected":"false","aria-expanded":"false"});b.length&&c.length?c.prev().attr({tabIndex:-1,"aria-expanded":"false"}):b.length&&this.headers.filter(function(){return 0=== 364parseInt(d(this).attr("tabIndex"),10)}).attr("tabIndex",-1);b.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(a,b,c){var d,f,g=this,h=0,k=a.css("box-sizing"),m=a.length&&(!b.length||a.index()<b.index()),l=this.options.animate||{};m=m&&l.down||l;var n=function(){g._toggleComplete(c)};"number"===typeof m&&(f=m);"string"===typeof m&&(d=m);d=d||m.easing||l.easing;f=f||m.duration||l.duration;if(!b.length)return a.animate(this.showProps, 365f,d,n);if(!a.length)return b.animate(this.hideProps,f,d,n);var p=a.show().outerHeight();b.animate(this.hideProps,{duration:f,easing:d,step:function(a,b){b.now=Math.round(a)}});a.hide().animate(this.showProps,{duration:f,easing:d,complete:n,step:function(a,c){c.now=Math.round(a);"height"!==c.prop?"content-box"===k&&(h+=c.now):"content"!==g.options.heightStyle&&(c.now=Math.round(p-b.outerHeight()-h),h=0)}})},_toggleComplete:function(a){var b=a.oldPanel,c=b.prev();this._removeClass(b,"ui-accordion-content-active"); 366this._removeClass(c,"ui-accordion-header-active")._addClass(c,"ui-accordion-header-collapsed");b.length&&(b.parent()[0].className=b.parent()[0].className);this._trigger("activate",null,a)}});d.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"}
366,role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element;this.mouseHandled=!1;this.element.uniqueId().attr({role:this.options.role, 367tabIndex:0});this._addClass("ui-menu","ui-widget ui-widget-content");this._on({"mousedown .ui-menu-item":function(a){a.preventDefault()},"click .ui-menu-item":function(a){var b=d(a.target),c=d(d.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&b.not(".ui-state-disabled").length&&(this.select(a),a.isPropagationStopped()||(this.mouseHandled=!0),b.has(".ui-menu").length?this.expand(a):!this.element.is(":focus")&&c.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&& 3681===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(a){if(!this.previousFilter){var b=d(a.target).closest(".ui-menu-item"),c=d(a.currentTarget);b[0]===c[0]&&(this._removeClass(c.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(a,c))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(a,b){var c=this.active||this.element.find(this.options.items).eq(0);b||this.focus(a,c)},blur:function(a){this._delay(function(){d.contains(this.element[0], 369d.ui.safeActiveElement(this.document[0]))||this.collapseAll(a)})},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(a){this._closeOnDocumentClick(a)&&this.collapseAll(a);this.mouseHandled=!1}})},_destroy:function(){var a=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(); 370a.children().each(function(){var a=d(this);a.data("ui-menu-submenu-caret")&&a.remove()})},_keydown:function(a){var b=!0;switch(a.keyCode){case d.ui.keyCode.PAGE_UP:this.previousPage(a);break;case d.ui.keyCode.PAGE_DOWN:this.nextPage(a);break;case d.ui.keyCode.HOME:this._move("first","first",a);break;case d.ui.keyCode.END:this._move("last","last",a);break;case d.ui.keyCode.UP:this.previous(a);break;case d.ui.keyCode.DOWN:this.next(a);break;case d.ui.keyCode.LEFT:this.collapse(a);break;case d.ui.keyCode.RIGHT:this.active&& 371!this.active.is(".ui-state-disabled")&&this.expand(a);break;case d.ui.keyCode.ENTER:case d.ui.keyCode.SPACE:this._activate(a);break;case d.ui.keyCode.ESCAPE:this.collapse(a);break;default:b=!1;var c=this.previousFilter||"";var e=!1;var f=96<=a.keyCode&&105>=a.keyCode?(a.keyCode-96).toString():String.fromCharCode(a.keyCode);clearTimeout(this.filterTimer);f===c?e=!0:f=c+f;c=this._filterMenuItems(f);c=e&&-1!==c.index(this.active.next())?this.active.nextAll(".ui-menu-item"):c;c.length||(f=String.fromCharCode(a.keyCode), 372c=this._filterMenuItems(f));c.length?(this.focus(a,c),this.previousFilter=f,this.filterTimer=this._delay(function(){delete this.previousFilter},1E3)):delete this.previousFilter}b&&a.preventDefault()},_activate:function(a){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(a):this.select(a))},refresh:function(){var a=this,b=this.options.icons.submenu;var c=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null, 373!!this.element.find(".ui-icon").length);var e=c.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var c=d(this),e=c.prev(),f=d("<span>").data("ui-menu-submenu-caret",!0);a._addClass(f,"ui-menu-icon","ui-icon "+b);e.attr("aria-haspopup","true").prepend(f);c.attr("aria-labelledby",e.attr("id"))});this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front");e=c.add(this.element).find(this.options.items);e.not(".ui-menu-item").each(function(){var b= 374d(this);a._isDivider(b)&&a._addClass(b,"ui-menu-divider","ui-widget-content")});c=e.not(".ui-menu-item, .ui-menu-divider");var f=c.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()});this._addClass(c,"ui-menu-item")._addClass(f,"ui-menu-item-wrapper");e.filter(".ui-state-disabled").attr("aria-disabled","true");this.active&&!d.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(a, 375b){if("icons"===a){var c=this.element.find(".ui-menu-icon");this._removeClass(c,null,this.options.icons.submenu)._addClass(c,null,b.submenu)}this._super(a,b)},_setOptionDisabled:function(a){this._super(a);this.element.attr("aria-disabled",String(a));this._toggleClass(null,"ui-state-disabled",!!a)}
375,focus:function(a,b){this.blur(a,a&&"focus"===a.type);this._scrollIntoView(b);this.active=b.first();var c=this.active.children(".ui-menu-item-wrapper");this._addClass(c,null,"ui-state-active");this.options.role&& 376this.element.attr("aria-activedescendant",c.attr("id"));c=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper");this._addClass(c,null,"ui-state-active");a&&"keydown"===a.type?this._close():this.timer=this._delay(function(){this._close()},this.delay);c=b.children(".ui-menu");c.length&&a&&/^mouse/.test(a.type)&&this._startOpening(c);this.activeMenu=b.parent();this._trigger("focus",a,{item:b})},_scrollIntoView:function(a){if(this._hasScroll()){var b=parseFloat(d.css(this.activeMenu[0], 377"borderTopWidth"))||0;var c=parseFloat(d.css(this.activeMenu[0],"paddingTop"))||0;b=a.offset().top-this.activeMenu.offset().top-b-c;c=this.activeMenu.scrollTop();var e=this.activeMenu.height();a=a.outerHeight();0>b?this.activeMenu.scrollTop(c+b):b+a>e&&this.activeMenu.scrollTop(c+b-e+a)}},blur:function(a,b){b||clearTimeout(this.timer);this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",a,{item:this.active}),this.active=null)}, 378_startOpening:function(a){clearTimeout(this.timer);"true"===a.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close();this._open(a)},this.delay))},_open:function(a){var b=d.extend({of:this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(a.parents(".ui-menu")).hide().attr("aria-hidden","true");a.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(b)},collapseAll:function(a,b){clearTimeout(this.timer);this.timer=this._delay(function(){var c= 379b?this.element:d(a&&a.target).closest(this.element.find(".ui-menu"));c.length||(c=this.element);this._close(c);this.blur(a);this._removeClass(c.find(".ui-state-active"),null,"ui-state-active");this.activeMenu=c},this.delay)},_close:function(a){a||(a=this.active?this.active.parent():this.element);a.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(a){return!d(a.target).closest(".ui-menu").length},_isDivider:function(a){return!/[^\-\u2014\u2013\s]/.test(a.text())}, 380collapse:function(a){var b=this.active&&this.active.parent().closest(".ui-menu-item",this.element);b&&b.length&&(this._close(),this.focus(a,b))},expand:function(a){var b=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();b&&b.length&&(this._open(b.parent()),this._delay(function(){this.focus(a,b)}))},next:function(a){this._move("next","first",a)},previous:function(a){this._move("prev","last",a)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length}, 381isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(a,b,c){var d;this.active&&(d="first"===a||"last"===a?this.active["first"===a?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[a+"All"](".ui-menu-item").eq(0));d&&d.length&&this.active||(d=this.activeMenu.find(this.options.items)[b]());this.focus(c,d)},nextPage:function(a){var b;if(!this.active)this.next(a);else if(!this.isLastItem())if(this._hasScroll()){var c=this.active.offset().top;var e= 382this.element.height();this.active.nextAll(".ui-menu-item").each(function(){b=d(this);return 0>b.offset().top-c-e});this.focus(a,b)}else this.focus(a,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())},previousPage:function(a){var b;if(!this.active)this.next(a);else if(!this.isFirstItem())if(this._hasScroll()){var c=this.active.offset().top;var e=this.element.height();this.active.prevAll(".ui-menu-item").each(function(){b=d(this);return 0<b.offset().top-c+e});this.focus(a,b)}else this.focus(a, 383this.activeMenu.find(this.options.items).first())},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(a){this.active=this.active||d(a.target).closest(".ui-menu-item");var b={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(a,!0);this._trigger("select",a,b)},_filterMenuItems:function(a){a=a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");var b=new RegExp("^"+a,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return b.test(d.trim(d(this).children(".ui-menu-item-wrapper").text()))})}}); 384d.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var a,b,c,e=this.element[0].nodeName.toLowerCase(),f="textarea"===e;e="input"===e;this.isMultiLine=f||!e&&this._isContentEditable(this.element);this.valueMethod=this.element[f|| 385e?"val":"text"];this.isNewMenu=!0;this._addClass("ui-autocomplete-input");this.element.attr("autocomplete","off");this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))b=c=a=!0;else{b=c=a=!1;var f=d.ui.keyCode;switch(e.keyCode){case f.PAGE_UP:a=!0;this._move("previousPage",e);break;case f.PAGE_DOWN:a=!0;this._move("nextPage",e);break;case f.UP:a=!0;this._keyEvent("previous",e);break;case f.DOWN:a=!0;this._keyEvent("next",e);break;case f.ENTER:this.menu.active&&(a=!0,e.preventDefault(), 386this.menu.select(e));break;case f.TAB:this.menu.active&&this.menu.select(e);break;case f.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(e),e.preventDefault());break;default:b=!0,this._searchTimeout(e)}}},keypress:function(c){if(a)a=!1,this.isMultiLine&&!this.menu.element.is(":visible")||c.preventDefault();else if(!b){var e=d.ui.keyCode;switch(c.keyCode){case e.PAGE_UP:this._move("previousPage",c);break;case e.PAGE_DOWN:this._move("nextPage",c);break; 387case e.UP:this._keyEvent("previous",c);break;case e.DOWN:this._keyEvent("next",c)}}},input:function(a){c?(c=!1,a.preventDefault()):this._searchTimeout(a)},focus:function(){this.selectedItem=null;
387this.previous=this._value()},blur:function(a){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(a),this._change(a))}});this._initSource();this.menu=d("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance");this._addClass(this.menu.element,"ui-autocomplete", 388"ui-front");this._on(this.menu.element,{mousedown:function(a){a.preventDefault();this.cancelBlur=!0;this._delay(function(){delete this.cancelBlur;this.element[0]!==d.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(a,b){if(this.isNewMenu&&(this.isNewMenu=!1,a.originalEvent&&/^mouse/.test(a.originalEvent.type))){this.menu.blur();this.document.one("mousemove",function(){d(a.target).trigger(a.originalEvent)});return}var c=b.item.data("ui-autocomplete-item"); 389!1!==this._trigger("focus",a,{item:c})&&a.originalEvent&&/^key/.test(a.originalEvent.type)&&this._value(c.value);(b=b.item.attr("aria-label")||c.value)&&d.trim(b).length&&(this.liveRegion.children().hide(),d("<div>").text(b).appendTo(this.liveRegion))},menuselect:function(a,b){var c=b.item.data("ui-autocomplete-item"),e=this.previous;this.element[0]!==d.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=e,this._delay(function(){this.previous=e;this.selectedItem=c})); 390!1!==this._trigger("select",a,{item:c})&&this._value(c.value);this.term=this._value();this.close(a);this.selectedItem=c}});this.liveRegion=d("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body);this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible");this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching);this.element.removeAttr("autocomplete");this.menu.element.remove(); 391this.liveRegion.remove()},_setOption:function(a,b){this._super(a,b);"source"===a&&this._initSource();"appendTo"===a&&this.menu.element.appendTo(this._appendTo());"disabled"===a&&b&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(a){var b=this.menu.element[0];return a.target===this.element[0]||a.target===b||d.contains(b,a.target)},_closeOnClickOutside:function(a){this._isEventTargetInWidget(a)||this.close()},_appendTo:function(){var a=this.options.appendTo;a&&(a=a.jquery||a.nodeType?d(a): 392this.document.find(a).eq(0));a&&a[0]||(a=this.element.closest(".ui-front, dialog"));a.length||(a=this.document[0].body);return a},_initSource:function(){var a=this;if(d.isArray(this.options.source)){var b=this.options.source;this.source=function(a,c){c(d.ui.autocomplete.filter(b,a.term))}}else if("string"===typeof this.options.source){var c=this.options.source;this.source=function(b,f){a.xhr&&a.xhr.abort();a.xhr=d.ajax({url:c,data:b,dataType:"json",success:function(a){f(a)},error:function(){f([])}})}}else this.source= 393this.options.source},_searchTimeout:function(a){clearTimeout(this.searching);this.searching=this._delay(function(){var b=this.term===this._value(),c=this.menu.element.is(":visible"),d=a.altKey||a.ctrlKey||a.metaKey||a.shiftKey;if(!b||b&&!c&&!d)this.selectedItem=null,this.search(null,a)},this.options.delay)},search:function(a,b){a=null!=a?a:this._value();this.term=this._value();if(a.length<this.options.minLength)return this.close(b);if(!1!==this._trigger("search",b))return this._search(a)},_search:function(a){this.pending++; 394this._addClass("ui-autocomplete-loading");this.cancelSearch=!1;this.source({term:a},this._response())},_response:function(){var a=++this.requestIndex;return d.proxy(function(b){a===this.requestIndex&&this.__response(b);this.pending--;this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(a){a&&(a=this._normalize(a));this._trigger("response",null,{content:a});!this.options.disabled&&a&&a.length&&!this.cancelSearch?(this._suggest(a),this._trigger("open")):this._close()}, 395close:function(a){this.cancelSearch=!0;this._close(a)},_close:function(a){this._off(this.document,"mousedown");this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",a))}
395,_change:function(a){this.previous!==this._value()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(a){return a.length&&a[0].label&&a[0].value?a:d.map(a,function(a){return"string"===typeof a?{label:a,value:a}:d.extend({},a,{label:a.label||a.value, 396value:a.value||a.label})})},_suggest:function(a){var b=this.menu.element.empty();this._renderMenu(b,a);this.isNewMenu=!0;this.menu.refresh();b.show();this._resizeMenu();b.position(d.extend({of:this.element},this.options.position));this.options.autoFocus&&this.menu.next();this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(a,b){var c=this;d.each(b, 397function(b,d){c._renderItemData(a,d)})},_renderItemData:function(a,b){return this._renderItem(a,b).data("ui-autocomplete-item",b)},_renderItem:function(a,b){return d("<li>").append(d("<div>").text(b.label)).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.isFirstItem()&&/^previous/.test(a)||this.menu.isLastItem()&&/^next/.test(a))this.isMultiLine||this._value(this.term),this.menu.blur();else this.menu[a](b);else this.search(null,b)},widget:function(){return this.menu.element}, 398_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(a,b){if(!this.isMultiLine||this.menu.element.is(":visible"))this._move(a,b),b.preventDefault()},_isContentEditable:function(a){if(!a.length)return!1;var b=a.prop("contentEditable");return"inherit"===b?this._isContentEditable(a.parent()):"true"===b}});d.extend(d.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(a,b){var c=new RegExp(d.ui.autocomplete.escapeRegex(b), 399"i");return d.grep(a,function(a){return c.test(a.label||a.value||a)})}});d.widget("ui.autocomplete",d.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(a){return a+(1<a?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(a){this._superApply(arguments);if(!this.options.disabled&&!this.cancelSearch){var b=a&&a.length?this.options.messages.results(a.length):this.options.messages.noResults;this.liveRegion.children().hide(); 400d("<div>").text(b).appendTo(this.liveRegion)}}});var G=/ui-corner-([a-z]){2,6}/g;d.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role", 401"toolbar");this.refresh()},_destroy:function(){this._callChildMethod("destroy");this.childWidgets.removeData("ui-controlgroup-data");this.element.removeAttr("role");this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var a=this,b=[];d.each(this.options.items,function(c,e){var f={};e&&("controlgroupLabel"===c?(e=a.element.find(e),e.each(function(){var a=d(this);a.children(".ui-controlgroup-label-contents").length|| 402a.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),a._addClass(e,null,"ui-widget ui-widget-content ui-state-default"),b=b.concat(e.get())):d.fn[c]&&(f=a["_"+c+"Options"]?a["_"+c+"Options"]("middle"):{classes:{}},a.element.find(e).each(function(){var e=d(this),h=e[c]("instance"),k=d.widget.extend({},f);"button"===c&&e.parent(".ui-spinner").length||(h||(h=e[c]()[c]("instance")),h&&(k.classes=a._resolveClassesValues(k.classes,h)),e[c](k),k=e[c]("widget"),d.data(k[0],"ui-controlgroup-data", 403h?h:e[c]("instance")),b.push(k[0]))})))});this.childWidgets=d(d.unique(b));this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(a){this.childWidgets.each(function(){var b=d(this).data("ui-controlgroup-data");if(b&&b[a])b[a]()})},_updateCornerClass:function(a,b){b=this._buildSimpleOptions(b,"label").classes.label;this._removeClass(a,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all");this._addClass(a,null,b)},_buildSimpleOptions:function(a, 404b){var c="vertical"===this.options.direction,d={classes:{}};d.classes[b]={middle:"",first:"ui-corner-"+(c?"top":"left"),last:"ui-corner-"+(c?"bottom":"right"),only:"ui-corner-all"}[a];return d},_spinnerOptions:function(a){a=this._buildSimpleOptions(a,"ui-spinner");a.classes["ui-spinner-up"]="";a.classes["ui-spinner-down"]="";return a},_buttonOptions:function(a){return this._buildSimpleOptions(a,"ui-button")},_checkboxradioOptions:function(a){return this._buildSimpleOptions(a,"ui-checkboxradio-label")}, 405_selectmenuOptions:function(a){var b="vertical"===this.options.direction;
405return{width:b?"auto":!1,classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(b?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(b?"top":"left")},last:{"ui-selectmenu-button-open":b?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(b?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[a]}}, 406_resolveClassesValues:function(a,b){var c={};d.each(a,function(e){var f=b.options.classes[e]||"";f=d.trim(f.replace(G,""));c[e]=(f+" "+a[e]).replace(/\s+/g," ")});return c},_setOption:function(a,b){"direction"===a&&this._removeClass("ui-controlgroup-"+this.options.direction);this._super(a,b);"disabled"===a?this._callChildMethod(b?"disable":"enable"):this.refresh()},refresh:function(){var a=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction);"horizontal"===this.options.direction&& 407this._addClass(null,"ui-helper-clearfix");this._initWidgets();var b=this.childWidgets;this.options.onlyVisible&&(b=b.filter(":visible"));b.length&&(d.each(["first","last"],function(c,d){(c=b[d]().data("ui-controlgroup-data"))&&a["_"+c.widgetName+"Options"]?(d=a["_"+c.widgetName+"Options"](1===b.length?"only":d),d.classes=a._resolveClassesValues(d.classes,c),c.element[c.widgetName](d)):a._updateCornerClass(b[d](),d)}),this._callChildMethod("refresh"))}});d.widget("ui.checkboxradio",[d.ui.formResetMixin, 408{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var a=this,b=this._super()||{};this._readType();var c=this.element.labels();this.label=d(c[c.length-1]);this.label.length||d.error("No label found for checkboxradio widget");this.originalLabel="";this.label.contents().not(this.element[0]).each(function(){a.originalLabel+=3===this.nodeType?d(this).text():this.outerHTML}); 409this.originalLabel&&(b.label=this.originalLabel);c=this.element[0].disabled;null!=c&&(b.disabled=c);return b},_create:function(){var a=this.element[0].checked;this._bindFormResetHandler();null==this.options.disabled&&(this.options.disabled=this.element[0].disabled);this._setOption("disabled",this.options.disabled);this._addClass("ui-checkboxradio","ui-helper-hidden-accessible");this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget");"radio"===this.type&&this._addClass(this.label, 410"ui-checkboxradio-radio-label");this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel);this._enhance();a&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover"));this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})}, 411_readType:function(){var a=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type;"input"===a&&/radio|checkbox/.test(this.type)||d.error("Can't create checkboxradio on element.nodeName="+a+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var a=this.element[0].name,b="input[name='"+d.ui.escapeSelector(a)+"']";return a?(this.form.length?d(this.form[0].elements).filter(b):d(b).filter(function(){return 0=== 412d(this).form().length})).not(this.element):d([])},_toggleClasses:function(){var a=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",a);this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",a)._toggleClass(this.icon,null,"ui-icon-blank",!a);"radio"===this.type&&this._getRadioGroup().each(function(){var a=d(this).checkboxradio("instance");a&&a._removeClass(a.label,"ui-checkboxradio-checked","ui-state-active")})}, 413_destroy:function(){this._unbindFormResetHandler();
413this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(a,b){if("label"!==a||b)this._super(a,b),"disabled"===a?(this._toggleClass(this.label,null,"ui-state-disabled",b),this.element[0].disabled=b):this.refresh()},_updateIcon:function(a){var b="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=d("<span>"),this.iconSpace=d("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"=== 414this.type?(b+=a?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,a?"ui-icon-blank":"ui-icon-check")):b+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",b),a||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var a=this.label.contents().not(this.element[0]);this.icon&&(a=a.not(this.icon[0])); 415this.iconSpace&&(a=a.not(this.iconSpace[0]));a.remove();this.label.append(this.options.label)},refresh:function(){var a=this.element[0].checked,b=this.element[0].disabled;this._updateIcon(a);this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",a);null!==this.options.label&&this._updateLabel();b!==this.options.disabled&&this._setOptions({disabled:b})}}]);d.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null, 416icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var a=this._super()||{};this.isInput=this.element.is("input");var b=this.element[0].disabled;null!=b&&(a.disabled=b);if(this.originalLabel=this.isInput?this.element.val():this.element.html())a.label=this.originalLabel;return a},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0);null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1);this.hasTitle= 417!!this.element.attr("title");this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label));this._addClass("ui-button","ui-widget");this._setOption("disabled",this.options.disabled);this._enhance();this.element.is("a")&&this._on({keyup:function(a){a.keyCode===d.ui.keyCode.SPACE&&(a.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")|| 418this.element.attr("role","button");this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title");this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(a,b){var c=(a="iconPosition"!==a)?this.options.iconPosition:b,e="top"===c||"bottom"===c;this.icon?a&&this._removeClass(this.icon,null,this.options.icon):(this.icon=d("<span>"),this._addClass(this.icon,"ui-button-icon", 419"ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only"));a&&this._addClass(this.icon,null,b);this._attachIcon(c);e?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconS
419pace||(this.iconSpace=d("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(c))},_destroy:function(){this.element.removeAttr("role");this.icon&&this.icon.remove(); 420this.iconSpace&&this.iconSpace.remove();this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(a){this.icon[/^(?:end|bottom)/.test(a)?"before":"after"](this.iconSpace)},_attachIcon:function(a){this.element[/^(?:end|bottom)/.test(a)?"append":"prepend"](this.icon)},_setOptions:function(a){var b=void 0===a.icon?this.options.icon:a.icon;(void 0===a.showLabel?this.options.showLabel:a.showLabel)||b||(a.showLabel=!0);this._super(a)},_setOption:function(a,b){"icon"===a&&(b?this._updateIcon(a, 421b):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove()));"iconPosition"===a&&this._updateIcon(a,b);"showLabel"===a&&(this._toggleClass("ui-button-icon-only",null,!b),this._updateTooltip());"label"===a&&(this.isInput?this.element.val(b):(this.element.html(b),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition))));this._super(a,b);"disabled"===a&&(this._toggleClass(null,"ui-state-disabled",b),(this.element[0].disabled=b)&&this.element.blur())}, 422refresh:function(){var a=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");a!==this.options.disabled&&this._setOptions({disabled:a});this._updateTooltip()}});!1!==d.uiBackCompat&&(d.widget("ui.button",d.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text);!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel); 423this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end");this._super()},_setOption:function(a,b){"text"===a?this._super("showLabel",b):("showLabel"===a&&(this.options.text=b),"icon"===a&&(this.options.icons.primary=b),"icons"===a&&(b.primary?(this._super("icon", 424b.primary),this._super("iconPosition","beginning")):b.secondary&&(this._super("icon",b.secondary),this._super("iconPosition","end"))),this._superApply(arguments))}}),d.fn.button=function(a){return function(){if(!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type"))return a.apply(this,arguments);d.ui.checkboxradio||d.error("Checkboxradio widget missing");return 0===arguments.length?this.checkboxradio({icon:!1}): 425this.checkboxradio.apply(this,arguments)}}(d.fn.button),d.fn.buttonset=function(){d.ui.controlgroup||d.error("Controlgroup widget missing");if("option"===arguments[0]&&"items"===arguments[1]&&arguments[2])return this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]);if("option"===arguments[0]&&"items"===arguments[1])return this.controlgroup.apply(this,[arguments[0],"items.button"]);"object"===typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}); 426return this.controlgroup.apply(this,arguments)});d.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",showCloseButton:!0,showTitleBar:!0,draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(a){var b=d(this).css(a).offset().top;0>b&&d(this).css("top", 427a.top-b)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight, 428maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height};this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)};this.originalTitle=this.element.attr("title");null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle);this.options.disabled&&(this.options.disabled=!1);this._createWrapper();this.element.show().removeAttr("title").appendTo(this.uiDialog);this._addClass("ui-dialog-content","ui-widget-content"); 429this._createTitlebar();this._createButtonPane();this.options.draggable&&d.fn.draggable&&this._makeDraggable();this.options.resizable&&d.fn.resizable&&this._makeResizable();this._isOpen=!1;this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var a=this.options.appendTo;return a&&(a.jquery||a.nodeType)?d(a):this.document.find(a||"body").eq(0)},_destroy:function(){var a=this.originalPosition;this._untrackInstance();this._destroyOverlay();this.element.removeUniqueId().css(this.originalCss).detach(); 430this.uiDialog.remove();this.originalTitle&&this.element.attr("title",this.originalTitle);var b=a.parent.children().eq(a.index);b.length&&b[0]!==this.element[0]?b.before(this.element):a.parent.append(this.element)},widget:function(){return this.uiDialog},disable:d.noop,enable:d.noop,close:function(a){var b=this;this._isOpen&&!1!==this._trigger("beforeClose",a)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length|| 431d.ui.safeBlur(d.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){b._trigger("close",a)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(a,b){var c=!1,e=this.uiDialog.siblings(".ui-front:visible").map(function(){return+d(this).css("z-index")}).get();e=Math.max.apply(null,e);e>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",e+1),c=!0);c&&!b&&this._trigger("focus",a);return c},open:function(){var a= 432this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=d(d.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){a._focusTabbable();a._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var a=this._focusedElement;a||(a=this.element.find("[autofocus]")); 433a.length||(a=this.element.find(":tabbable"));a.length||(a=this.uiDialogButtonPane.find(":tabbable"));a.length||(a=this.uiDialogTitlebarClose.filter(":tabbable"));a.length||(a=this.uiDialog);a.eq(0).trigger("focus")},_keepFocus:function(a){function b(){var a=d.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===a||d.contains(this.uiDialog[0],a)||this._focusTabbable()}a.preventDefault();b.call(this);this._delay(b)},_createWrapper:function(){this.uiDialog=d("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()); 434this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front");
434this._on(this.uiDialog,{keydown:function(a){if(this.options.closeOnEscape&&!a.isDefaultPrevented()&&a.keyCode&&a.keyCode===d.ui.keyCode.ESCAPE)a.preventDefault(),this.close(a);else if(a.keyCode===d.ui.keyCode.TAB&&!a.isDefaultPrevented()){var b=this.uiDialog.find(":tabbable"),c=b.filter(":first"),e=b.filter(":last");a.target!==e[0]&&a.target!==this.uiDialog[0]||a.shiftKey?a.target!==c[0]&&a.target!==this.uiDialog[0]|| 435!a.shiftKey||(this._delay(function(){e.trigger("focus")}),a.preventDefault()):(this._delay(function(){c.trigger("focus")}),a.preventDefault())}},mousedown:function(a){this._moveToTop(a)&&this._focusTabbable()}});this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){this.uiDialogTitlebar=d("<div>");this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"+(this.options.showTitleBar? 436"":" ui-helper-hidden"));this._on(this.uiDialogTitlebar,{mousedown:function(a){d(a.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}});this.uiDialogTitlebarClose=d("<button type='button'></button>").button({label:d("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar);this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"+(this.options.showCloseButton?"":" ui-helper-hidden"));this._on(this.uiDialogTitlebarClose, 437{click:function(a){a.preventDefault();this.close(a)}});var a=d("<span>").uniqueId().prependTo(this.uiDialogTitlebar);this._addClass(a,"ui-dialog-title");this._title(a);this.uiDialogTitlebar.prependTo(this.uiDialog);this.uiDialog.attr({"aria-labelledby":a.attr("id")})},_title:function(a){this.options.title?a.text(this.options.title):a.html(" ")},_createButtonPane:function(){this.uiDialogButtonPane=d("<div>");this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"); 438this.uiButtonSet=d("<div>").appendTo(this.uiDialogButtonPane);this._addClass(this.uiButtonSet,"ui-dialog-buttonset");this._createButtons()},_createButtons:function(){var a=this,b=this.options.buttons;this.uiDialogButtonPane.remove();this.uiButtonSet.empty();d.isEmptyObject(b)||d.isArray(b)&&!b.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(d.each(b,function(b,e){e=d.isFunction(e)?{click:e,text:b}:e;e=d.extend({type:"button"},e);var c=e.click;b={icon:e.icon,iconPosition:e.iconPosition, 439showLabel:e.showLabel,icons:e.icons,text:e.text};delete e.click;delete e.icon;delete e.iconPosition;delete e.showLabel;delete e.icons;"boolean"===typeof e.text&&delete e.text;d("<button></button>",e).button(b).appendTo(a.uiButtonSet).on("click",function(){c.apply(a.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function a(a){return{position:a.position,offset:a.offset}}var b=this,c=this.options; 440this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(c,f){b._addClass(d(this),"ui-dialog-dragging");b._blockFrames();b._trigger("dragStart",c,a(f))},drag:function(c,d){b._trigger("drag",c,a(d))},stop:function(e,f){var g=f.offset.left-b.document.scrollLeft(),h=f.offset.top-b.document.scrollTop();c.position={my:"left top",at:"left"+(0<=g?"+":"")+g+" top"+(0<=h?"+":"")+h,of:b.window};b._removeClass(d(this), 441"ui-dialog-dragging");b._unblockFrames();b._trigger("dragStop",e,a(f))}})},_makeResizable:function(){function a(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}var b=this,c=this.options,e=c.resizable,f=this.uiDialog.css("position");e="string"===typeof e?e:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:c.maxWidth,maxHeight:c.maxHeight,minWidth:c.minWidth,minHeight:this._minHeight(), 442handles:e,start:function(c,e){b._addClass(d(this),"ui-dialog-resizing");b._blockFrames();b._trigger("resizeStart",c,a(e))},resize:function(c,d){b._trigger("resize",c,a(d))},stop:function(e,f){var g=b.uiDialog.offset(),h=g.left-b.document.scrollLeft();g=g.top-b.document.scrollTop();c.height=b.uiDialog.height();c.width=b.uiDialog.width();c.position={my:"left top",at:"left"+(0<=h?"+":"")+h+" top"+(0<=g?"+":"")+g,of:b.window};b._removeClass(d(this),"ui-dialog-resizing");b._unblockFrames();b._trigger("resizeStop", 443e,a(f))}}).css("position",f)},_trackFocus:function(){this._on(this.widget(),{focusin:function(a){this._makeFocusTarget();this._focusedElement=d(a.target)}})},_makeFocusTarget:function(){this._untrackInstance();this._trackingInstances().unshift(this)},_untrackInstance:function(){var a=this._trackingInstances(),b=d.inArray(this,a);-1!==b&&a.splice(b,1)},_trackingInstances:function(){var a=this.document.data("ui-dialog-instances");a||(a=[],this.document.data("ui-dialog-instances",a));return a},_minHeight:function(){var a= 444this.options;return"auto"===a.height?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(){var a=this.uiDialog.is(":visible");a||this.uiDialog.show();this.uiDialog.position(this.options.position);a||this.uiDialog.hide()},_setOptions:function(a){var b=this,c=!1,e={};d.each(a,function(a,d){b._setOption(a,d);a in b.sizeRelatedOptions&&(c=!0);a in b.resizableRelatedOptions&&(e[a]=d)});c&&(this._size(),this._position());this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option", 445e)},_setOption:function(a,b){var c,e=this.uiDialog;"disabled"!==a&&(this._super(a,b),"appendTo"===a&&this.uiDialog.appendTo(this._appendTo()),"buttons"===a&&this._createButtons(),"closeText"===a&&this.uiDialogTitlebarClose.button({label:d("<a>").text(""+this.options.closeText).html()}),"showCloseButton"===a&&this._toggleClass(this.uiDialogTitlebar.find(".ui-dialog-titlebar-close"),null,"ui-helper-hidden",!b),"showTitleBar"===a&&this._toggleClass(this.uiDialogTitlebar,null,"ui-helper-hidden",!b),"draggable"=== 446a&&((c=e.is(":data(ui-draggable)"))&&!b&&e.draggable("destroy"),!c&&b&&this._makeDraggable()),"position"===a&&this._position(),"resizable"===a&&((c=e.is(":data(ui-resizable)"))&&!b&&e.resizable("destroy"),c&&"string"===typeof b&&e.resizable("option","handles",b),c||!1===b||this._makeResizable()),"title"===a&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var a=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0});a.minWidth>a.width&& 447(a.width=a.minWidth);var b=this.uiDialog.css({height:"auto",width:a.width}).outerHeight();var c=Math.max(0,a.minHeight-b);var d="number"===typeof a.maxHeight?Math.max(0,a.maxHeight-b):"none";"auto"===a.height?this.element.css({minHeight:c,maxHeight:d,height:"auto"}):this.element.height(Math.max(0,a.height-b));this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var a= 448d(this);return d("<div>").css({position:"absolute",width:a.outerWidth(),height:a.outerHeight()}).appendTo(a.parent()).offset(a.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(a){return d(a.target).closest(".ui-dialog").length?!0:!!d(a.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var a=!0;this._delay(function(){a=!1});this.document.data("ui-dialog-overlays")|| 449this._on(this.document,{focusin:function(b){a||this._allowInteraction(b)||(b.preventDefault(),this._trackingInstances()[0]._focusTabbable())}});this.overlay=d("<div>").appendTo(this._appendTo());this._addClass(this.overlay,null,"ui-widget-overlay ui-front");this._on(this.overlay,{mousedown:"_keepFocus"});this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var a=this.document.data("ui-dialog-overlays")- 4501;a?this.document.data("ui-dialog-overlays",a):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays"));this.overlay.remove();this.overlay=null}}});!1!==d.uiBackCompat&&d.widget("ui.dialog",d.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super();this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(a,b){"dialogClass"===a&&this.uiDialog.removeClass(this.options.dialogClass).addClass(b);this._superApply(arguments)}});d.widget("ui.slider", 451d.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",isRTL:!1,range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null}
451,numPages:5,_create:function(){var a=this.options;this._mouseSliding=this._keySliding=!1;this._animateOff=!0;this._handleIndex=null;this._detectOrientation();this._mouseInit(); 452this._calculateNewMax();this._addClass("ui-slider ui-slider-"+this.orientation+(a.isRTL?" ui-slider-rtl":"")+"ui-widget ui-widget-content");this._refresh();this._animateOff=!1},_refresh:function(){this._createRange();this._createHandles();this._setupEvents();this._refreshValue()},_createHandles:function(){var a=this.options;var b=this.element.find(".ui-slider-handle"),c=[];var e=a.values&&a.values.length||1;b.length>e&&(b.slice(e).remove(),b=b.slice(0,e));for(a=b.length;a<e;a++)c.push("<span tabindex='0'></span>"); 453this.handles=b.add(d(c.join("")).appendTo(this.element));this._addClass(this.handles,"ui-slider-handle","ui-state-default");this.handle=this.handles.eq(0);this.handles.each(function(a){d(this).data("ui-slider-handle-index",a).attr("tabIndex",0)})},_createRange:function(){var a=this.options;a.range?(!0===a.range&&(a.values?a.values.length&&2!==a.values.length?a.values=[a.values[0],a.values[0]]:d.isArray(a.values)&&(a.values=a.values.slice(0)):a.values=[this._valueMin(),this._valueMin()]),this.range&& 454this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=d("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==a.range&&"max"!==a.range||this._addClass(this.range,"ui-slider-range-"+a.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles);this._on(this.handles,this._handleEvents);this._hoverable(this.handles);this._focusable(this.handles)}, 455_destroy:function(){this.handles.remove();this.range&&this.range.remove();this._mouseDestroy()},_mouseCapture:function(a){var b,c,e=this,f=this.options;if(f.disabled)return!1;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var g=this._normValueFromMouse({x:a.pageX,y:a.pageY});var h=this._valueMax()-this._valueMin()+1;this.handles.each(function(a){var k=Math.abs(g-e.values(a));if(h>k||h===k&&(a===e._lastChangedValue||e.values(a)=== 456f.min))h=k,b=d(this),c=a});if(!1===this._start(a,c))return!1;this._mouseSliding=!0;this._handleIndex=c;this._addClass(b,null,"ui-state-active");b.trigger("focus");var k=b.offset();this._clickOffset=d(a.target).parents().addBack().is(".ui-slider-handle")?{left:a.pageX-k.left-b.width()/2,top:a.pageY-k.top-b.height()/2-(parseInt(b.css("borderTopWidth"),10)||0)-(parseInt(b.css("borderBottomWidth"),10)||0)+(parseInt(b.css("marginTop"),10)||0)}:{left:0,top:0};this.handles.hasClass("ui-state-hover")||this._slide(a, 457c,g);return this._animateOff=!0},_mouseStart:function(){return!0},_mouseDrag:function(a){var b=this._normValueFromMouse({x:a.pageX,y:a.pageY});this._slide(a,this._handleIndex,b);return!1},_mouseStop:function(a){this._removeClass(this.handles,null,"ui-state-active");this._mouseSliding=!1;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation? 458"vertical":"horizontal"},_normValueFromMouse:function(a){if("horizontal"===this.orientation){var b=this.elementSize.width;a=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else b=this.elementSize.height,a=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0);b=a/b;1<b&&(b=1);0>b&&(b=0);"vertical"===this.orientation&&(b=1-b);this.options.isRTL&&(b=1-b);a=this._valueMax()-this._valueMin();b=this._valueMin()+b*a;return this._trimAlignValue(b)},_uiHash:function(a, 459b,c){var d={handle:this.handles[a],handleIndex:a,value:void 0!==b?b:this.value()};this._hasMultipleValues()&&(d.value=void 0!==b?b:this.values(a),d.values=c||this.values());return d},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(a,b){return this._trigger("start",a,this._uiHash(b))},_slide:function(a,b,c){var d=this.value(),f=this.values();if(this._hasMultipleValues()){var g=this.values(b?0:1);d=this.values(b);2===this.options.values.length&& 460!0===this.options.range&&(c=0===b?Math.min(g,c):Math.max(g,c));f[b]=c}c!==d&&!1!==this._trigger("slide",a,this._uiHash(b,c,f))&&(this._hasMultipleValues()?this.values(b,c):this.value(c))},_stop:function(a,b){this._trigger("stop",a,this._uiHash(b))},_change:function(a,b){this._keySliding||this._mouseSliding||(this._lastChangedValue=b,this._trigger("change",a,this._uiHash(b)))}
460,value:function(a){if(arguments.length)this.options.value=this._trimAlignValue(a),this._refreshValue(),this._change(null,0); 461else return this._value()},values:function(a,b){var c;if(1<arguments.length)this.options.values[a]=this._trimAlignValue(b),this._refreshValue(),this._change(null,a);else if(arguments.length)if(d.isArray(arguments[0])){var e=this.options.values;var f=arguments[0];for(c=0;c<e.length;c+=1)e[c]=this._trimAlignValue(f[c]),this._change(null,c);this._refreshValue()}else return this._hasMultipleValues()?this._values(a):this.value();else return this._values()},_setOption:function(a,b){var c=0;"range"===a&& 462!0===this.options.range&&("min"===b?(this.options.value=this._values(0),this.options.values=null):"max"===b&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null));d.isArray(this.options.values)&&(c=this.options.values.length);this._super(a,b);switch(a){case "orientation":this._detectOrientation();this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation);this._refreshValue();this.options.range&&this._refreshRange(b);this.handles.css("horizontal"=== 463b?"bottom":"left","");break;case "isRTL":this.element.toggleClass("ui-slider-rtl",b);this._refreshValue();break;case "value":this._animateOff=!0;this._refreshValue();this._change(null,0);this._animateOff=!1;break;case "values":this._animateOff=!0;this._refreshValue();for(a=c-1;0<=a;a--)this._change(null,a);this._animateOff=!1;break;case "step":case "min":case "max":this._animateOff=!0;this._calculateNewMax();this._refreshValue();this._animateOff=!1;break;case "range":this._animateOff=!0,this._refresh(), 464this._animateOff=!1}},_setOptionDisabled:function(a){this._super(a);this._toggleClass(null,"ui-state-disabled",!!a)},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(a){var b;if(arguments.length){var c=this.options.values[a];return c=this._trimAlignValue(c)}if(this._hasMultipleValues()){c=this.options.values.slice();for(b=0;b<c.length;b+=1)c[b]=this._trimAlignValue(c[b]);return c}return[]},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin(); 465if(a>=this._valueMax())return this._valueMax();var b=0<this.options.step?this.options.step:1,c=(a-this._valueMin())%b;a-=c;2*Math.abs(c)>=b&&(a+=0<c?b:-b);return parseFloat(a.toFixed(5))},_calculateNewMax:function(){var a=this.options.max,b=this._valueMin(),c=this.options.step;a=Math.round((a-b)/c)*c+b;a>this.options.max&&(a-=c);this.max=parseFloat(a.toFixed(this._precision()))},_precision:function(){var a=this._precisionOf(this.options.step);null!==this.options.min&&(a=Math.max(a,this._precisionOf(this.options.min))); 466return a},_precisionOf:function(a){a=a.toString();var b=a.indexOf(".");return-1===b?0:a.length-b-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(a){"vertical"===a&&this.range.css({width:"",left:""});"horizontal"===a&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var a,b=this.options.range,c=this.options,e=this,f=this._animateOff?!1:c.animate,g={};if(this._hasMultipleValues())this.handles.each(function(b){l=(e.values(b)- 467e._valueMin())/(e._valueMax()-e._valueMin())*100;l=e.options.isRTL?100-l:l;g["horizontal"===e.orientation?"left":"bottom"]=l+"%";d(this).stop(1,1)[f?"animate":"css"](g,c.animate);if(!0===e.options.range)if("horizontal"===e.orientation){if(0===b)e.range.stop(1,1)[f?"animate":"css"](e.options.isRTL?{right:100-l+"%"}:{left:l+"%"},c.animate);if(1===b)e.range[f?"animate":"css"]({width:(e.options.isRTL?-1:1)*(l-a)+"%"},{queue:!1,duration:c.animate})}else{if(0===b)e.range.stop(1,1)[f?"animate":"css"](e.options.isRTL? 468{top:100-l+"%"}:{bottom:l+"%"},c.animate);if(1===b)e.range[f?"animate":"css"]({height:(e.options.isRTL?-1:1)*(l-a)+"%"},{queue:!1,duration:c.animate})}a=l});else{var h=this.value();var k=this._valueMin();var m=this._valueMax();var l=m!==k?(h-k)/(m-k)*100:0;l=e.options.isRTL?100-l:l;g["horizontal"===this.orientation?"left":"bottom"]=l+"%";this.handle.stop(1,1)[f?"animate":"css"](g,c.animate);if("min"===b&&"horizontal"===this.orientation)this.range.stop(1,
4681)[f?"animate":"css"]({width:(e.options.isRTL? 469100-l:l)+"%"},c.animate);if("max"===b&&"horizontal"===this.orientation)this.range.stop(1,1)[f?"animate":"css"]({width:(e.options.isRTL?l:100-l)+"%"},c.animate);if("min"===b&&"vertical"===this.orientation)this.range.stop(1,1)[f?"animate":"css"]({height:(e.options.isRTL?100-l:l)+"%"},c.animate);if("max"===b&&"vertical"===this.orientation)this.range.stop(1,1)[f?"animate":"css"]({height:(e.options.isRTL?l:100-l)+"%"},c.animate)}},_handleEvents:{keydown:function(a){var b,c=d(a.target).data("ui-slider-handle-index"); 470switch(a.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(a.preventDefault(),!this._keySliding){this._keySliding=!0;this._addClass(d(a.target),null,"ui-state-active");var e=this._start(a,c);if(!1===e)return}}var f=this.options.step;e=this._hasMultipleValues()?b=this.values(c):b=this.value();switch(a.keyCode){case d.ui.keyCode.HOME:b=this._valueMin(); 471break;case d.ui.keyCode.END:b=this._valueMax();break;case d.ui.keyCode.PAGE_UP:b=this._trimAlignValue(e+(this._valueMax()-this._valueMin())/this.numPages);break;case d.ui.keyCode.PAGE_DOWN:b=this._trimAlignValue(e-(this._valueMax()-this._valueMin())/this.numPages);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:var g=self.options.isRTL?self._valueMin():self._valueMax();e!==g&&(b=self._trimAlignValue(e+(self.options.isRTL?-f:f)));break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:g=self.options.isRTL? 472self._valueMax():self._valueMin(),e!==g&&(b=self._trimAlignValue(e+(self.options.isRTL?f:-f)))}this._slide(a,c,b)},keyup:function(a){var b=d(a.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(a,b),this._change(a,b),this._removeClass(d(a.target),null,"ui-state-active"))}}});d.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"}, 473collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var a=/#.*$/;return function(b){var c=b.href.replace(a,"");var d=location.href.replace(a,"");try{c=decodeURIComponent(c)}catch(f){}try{d=decodeURIComponent(d)}catch(f){}return 1<b.hash.length&&c===d}}(),_create:function(){var a=this,b=this.options;this.running=!1;this._addClass("ui-tabs","ui-widget ui-widget-content");this._toggleClass("ui-tabs-collapsible", 474null,b.collapsible);this._processTabs();b.active=this._initialActive();d.isArray(b.disabled)&&(b.disabled=d.unique(b.disabled.concat(d.map(this.tabs.filter(".ui-state-disabled"),function(b){return a.tabs.index(b)}))).sort());this.active=!1!==this.options.active&&this.anchors.length?this._findActive(b.active):d();this._refresh();this.active.length&&this.load(b.active)},_initialActive:function(){var a=this.options.active,b=this.options.collapsible,c=location.hash.substring(1);null===a&&(c&&this.tabs.each(function(b, 475f){if(d(f).attr("aria-controls")===c)return a=b,!1}),null===a&&(a=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null===a||-1===a)&&(a=this.tabs.length?0:!1);!1!==a&&(a=this.tabs.index(this.tabs.eq(a)),-1===a&&(a=b?!1:0));!b&&!1===a&&this.anchors.length&&(a=0);return a},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):d()}},_tabKeydown:function(a){var b=d(d.ui.safeActiveElement(this.document[0])).closest("li"),c=this.tabs.index(b), 476e=!0;if(!this._handlePageNav(a)){switch(a.keyCode){case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:c++;break;case d.ui.keyCode.UP:case d.ui.keyCode.LEFT:e=!1;c--;break;case d.ui.keyCode.END:c=this.anchors.length-1;break;case d.ui.keyCode.HOME:c=0;break;case d.ui.keyCode.SPACE:a.preventDefault();clearTimeout(this.activating);this._activate(c);return;case d.ui.keyCode.ENTER:a.preventDefault();clearTimeout(this.activating);this._activate(c===this.options.active?!1:c);return;default:return}a.preventDefault(); 477clearTimeout(this.activating);c=this._focusNextTab(c,e);a.ctrlKey||a.metaKey||(b.attr("aria-selected","false"),this.tabs.eq(c).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",c)},this.delay))}},_panelKeydown:function(a){!this._handlePageNav(a)&&a.ctrlKey&&a.keyCode===d.ui.keyCode.UP&&(a.preventDefault(),this.active.trigger("focus"))}
477,_handlePageNav:function(a){if(a.altKey&&a.keyCode===d.ui.keyCode.PAGE_UP)return this._activate(this._focusNextTab(this.options.active- 4781,!1)),!0;if(a.altKey&&a.keyCode===d.ui.keyCode.PAGE_DOWN)return this._activate(this._focusNextTab(this.options.active+1,!0)),!0},_findNextTab:function(a,b){function c(){a>e&&(a=0);0>a&&(a=e);return a}for(var e=this.tabs.length-1;-1!==d.inArray(c(),this.options.disabled);)a=b?a+1:a-1;return a},_focusNextTab:function(a,b){a=this._findNextTab(a,b);this.tabs.eq(a).trigger("focus");return a},_setOption:function(a,b){"active"===a?this._activate(b):(this._super(a,b),"collapsible"===a&&(this._toggleClass("ui-tabs-collapsible", 479null,b),b||!1!==this.options.active||this._activate(0)),"event"===a&&this._setupEvents(b),"heightStyle"===a&&this._setupHeightStyle(b))},_sanitizeSelector:function(a){return a?a.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var a=this.options,b=this.tablist.children(":has(a[href])");a.disabled=d.map(b.filter(".ui-state-disabled"),function(a){return b.index(a)});this._processTabs();!1!==a.active&&this.anchors.length?this.active.length&&!d.contains(this.tablist[0],this.active[0])? 480this.tabs.length===a.disabled.length?(a.active=!1,this.active=d()):this._activate(this._findNextTab(Math.max(0,a.active-1),!1)):a.active=this.tabs.index(this.active):(a.active=!1,this.active=d());this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled);this._setupEvents(this.options.event);this._setupHeightStyle(this.options.heightStyle);this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1});this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}); 481this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var a=this,b=this.tabs,c=this.anchors,e=this.panels;this.tablist=this._getList().attr("role","tablist");this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header");this.tablist.on("mousedown"+ 482this.eventNamespace,"> li",function(a){d(this).is(".ui-state-disabled")&&a.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){d(this).closest("li").is(".ui-state-disabled")&&this.blur()});this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1});this._addClass(this.tabs,"ui-tabs-tab","ui-state-default");this.anchors=this.tabs.map(function(){return d("a",this)[0]}).attr({role:"presentation",tabIndex:-1});this._addClass(this.anchors,"ui-tabs-anchor"); 483this.panels=d();this.anchors.each(function(b,c){var e=d(c).uniqueId().attr("id"),f=d(c).closest("li"),g=f.attr("aria-controls");if(a._isLocal(c)){b=c.hash;c=b.substring(1);var l=a.element.find(a._sanitizeSelector(b))}else c=f.attr("aria-controls")||d({}).uniqueId()[0].id,l=a.element.find("#"+c),l.length||(l=a._createPanel(c),l.insertAfter(a.panels[b-1]||a.tablist)),l.attr("aria-live","polite");l.length&&(a.panels=a.panels.add(l));g&&f.data("ui-tabs-aria-controls",g);f.attr({"aria-controls":c,"aria-labelledby":e}); 484l.attr("aria-labelledby",e)});this.panels.attr("role","tabpanel");this._addClass(this.panels,"ui-tabs-panel","ui-widget-content");b&&(this._off(b.not(this.tabs)),this._off(c.not(this.anchors)),this._off(e.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol:not(.ui-tabs-skip),ul:not(.ui-tabs-skip)").eq(0)},_createPanel:function(a){return d("<div>").attr("id",a).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(a){var b,c;d.isArray(a)&&(a.length?a.length===this.anchors.length&& 485(a=!0):a=!1);for(c=0;b=this.tabs[c];c++)b=d(b),!0===a||-1!==d.inArray(c,a)?(b.attr("aria-disabled","true"),this._addClass(b,null,"ui-state-disabled")):(b.removeAttr("aria-disabled"),this._removeClass(b,null,"ui-state-disabled"));this.options.disabled=a;this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===a)},_setupEvents:function(a){var b={};a&&d.each(a.split(" "),function(a,d){b[d]="_eventHandler"});this._off(this.anchors.add(this.tabs).add(this.panels));this._on(!0,this.anchors, 486{click:function(a){a.preventDefault()}});this._on(this.anchors,b);this._on(this.tabs,{keydown:"_tabKeydown"});this._on(this.panels,{keydown:"_panelKeydown"});this._focusable(this.tabs);this._hoverable(this.tabs)},_setupHeightStyle:function(a){var b=this.element.parent();if("fill"===a){var c=b.height();c-=this.element.outerHeight()-this.element.height();this.element.siblings(":visible").each(function(){var a=d(this),b=a.css("position");"absolute"!==b&&"fixed"!==b&&(c-=a.outerHeight(!0))});this.element.children().not(this.panels).each(function(){c-= 487d(this).outerHeight(!0)});this.panels.each(function(){d(this).height(Math.max(0,c-d(this).innerHeight()+d(this).height()))}).css("overflow","auto")}else"auto"===a&&(c=0,this.panels.each(function(){c=Math.max(c,d(this).height("").height())}).height(c))},_eventHandler:function(a){var b=this.options,c=this.active,e=d(a.currentTarget).closest("li"),f=e[0]===c[0],g=f&&b.collapsible,h=g?d():this._getPanelForTab(e),k=c.length?this._getPanelForTab(c):d();c={oldTab:c,oldPanel:k,newTab:g?d():e,newPanel:h}; 488a.preventDefault();e.hasClass("ui-state-disabled")||e.hasClass("ui-tabs-loading")||this.running||f&&!b.collapsible||!1===this._trigger("beforeActivate",a,c)||(b.active=g?!1:this.tabs.index(e),this.active=f?d():e,this.xhr&&this.xhr.abort(),k.length||h.length||d.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(e),a),this._toggle(a,c))},_toggle:function(a,b){function c(){f.running=!1;f._trigger("activate",a,b)}function e(){f._addClass(b.newTab.closest("li"), 489"ui-tabs-active","ui-state-active");g.length&&f.options.show?f._show(g,f.options.show,c):(g.show(),c())}var f=this,g=b.newPanel,h=b.oldPanel;this.running=!0;h.length&&this.options.hide?this._hide(h,this.options.hide,function(){f._removeClass(b.oldTab.closest("li"),"ui-tabs-active","ui-state-active");e()}):(this._removeClass(b.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),h.hide(),e());h.attr("aria-hidden","true");b.oldTab.attr({"aria-selected":"false","aria-expanded":"false"});g.length&& 490h.length?b.oldTab.attr("tabIndex",-1):g.length&&this.tabs.filter(function(){return 0===d(this).attr("tabIndex")}).attr("tabIndex",-1);g.attr("aria-hidden","false");b.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(a){a=this._findActive(a);a[0]!==this.active[0]&&(a.length||(a=this.active),a=a.find(".ui-tabs-anchor")[0],this._eventHandler({target:a,currentTarget:a,preventDefault:d.noop}))},_findActive:function(a){return!1===a?d():this.tabs.eq(a)},_getIndex:function(a){"string"=== 491typeof a&&(a=this.anchors.index(this.anchors.filter("[href$='"+d.ui.escapeSelector(a)+"']")));return a},_destroy:function(){this.xhr&&this.xhr.abort();this.tablist.removeAttr("role").off(this.eventNamespace);this.anchors.removeAttr("role tabIndex").removeUniqueId();this.tabs.add(this.panels).each(function(){d.data(this,"ui-tabs-destroy")?d(this).remove():d(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")});this.tabs.each(function(){var a= 492d(this),b=a.data("ui-tabs-aria-controls");b?a.attr("aria-controls",b).removeData("ui-tabs-aria-controls"):a.removeAttr("aria-controls")});this.panels.show();"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(a){var b=this.options.disabled;!1!==b&&(void 0===a?b=!1:(a=this._getIndex(a),b=d.isArray(b)?d.map(b,function(b){return b!==a?b:null}):d.map(this.tabs,function(b,d){return d!==a?d:null})),this._setOptionDisabled(b))},disable:function(a){var b=this.options.disabled; 493if(!0!==b){if(void 0===a)b=!0;else{a=this._getIndex(a);if(-1!==d.inArray(a,b))return;
493b=d.isArray(b)?d.merge([a],b).sort():[a]}this._setOptionDisabled(b)}},load:function(a,b){a=this._getIndex(a);var c=this,e=this.tabs.eq(a);a=e.find(".ui-tabs-anchor");var f=this._getPanelForTab(e),g={tab:e,panel:f},h=function(a,b){"abort"===b&&c.panels.stop(!1,!0);c._removeClass(e,"ui-tabs-loading");f.removeAttr("aria-busy");a===c.xhr&&delete c.xhr};this._isLocal(a[0])||(this.xhr=d.ajax(this._ajaxSettings(a,b,g)))&& 494"canceled"!==this.xhr.statusText&&(this._addClass(e,"ui-tabs-loading"),f.attr("aria-busy","true"),this.xhr.done(function(a,d,e){setTimeout(function(){f.html(a);c._trigger("load",b,g);h(e,d)},1)}).fail(function(a,b){setTimeout(function(){h(a,b)},1)}))},_ajaxSettings:function(a,b,c){var e=this;return{url:a.attr("href").replace(/#.*$/,""),beforeSend:function(a,g){return e._trigger("beforeLoad",b,d.extend({jqXHR:a,ajaxSettings:g},c))}}},_getPanelForTab:function(a){a=d(a).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+ 495a))}});!1!==d.uiBackCompat&&d.widget("ui.tabs",d.ui.tabs,{_processTabs:function(){this._superApply(arguments);this._addClass(this.tabs,"ui-tab")}})}}); 496; 497 498// ***************************
499// js.compressed/jquery/jquery.ui.touch-punch.min.js 500// *************************** 501/* 502 jQuery UI Touch Punch 0.2.3 503 504 Copyright 2011-2014, Dave Furfero 505 Dual licensed under the MIT or GPL Version 2 licenses. 506 507 Depends: 508 jquery.ui.widget.js 509 jquery.ui.mouse.js 510*/ 511(function(c){function b(a,c){if(!(1<a.originalEvent.touches.length)){a.preventDefault();var b=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(c,!0,!0,window,1,b.screenX,b.screenY,b.clientX,b.clientY,!1,!1,!1,!1,0,null);a.target.dispatchEvent(d)}}c.support.touch="ontouchend"in document;if(c.support.touch){var d=c.ui.mouse.prototype,f=d._mouseInit,g=d._mouseDestroy,e;d._touchStart=function(a){!e&&this._mouseCapture(a.originalEvent.changedTouches[0])&& 512(e=!0,this._touchMoved=!1,b(a,"mouseover"),b(a,"mousemove"),b(a,"mousedown"))};d._touchMove=function(a){e&&(this._touchMoved=!0,b(a,"mousemove"))};d._touchEnd=function(a){e&&(b(a,"mouseup"),b(a,"mouseout"),this._touchMoved||b(a,"click"),e=!1)};d._mouseInit=function(){this.element.bind({touchstart:c.proxy(this,"_touchStart"),touchmove:c.proxy(this,"_touchMove"),touchend:c.proxy(this,"_touchEnd")});f.call(this)};d._mouseDestroy=function(){this.element.unbind({touchstart:c.proxy(this,"_touchStart"), 513touchmove:c.proxy(this,"_touchMove"),touchend:c.proxy(this,"_touchEnd")});g.call(this)}}})(jQuery); 514; 515 516// ***************************
517// js.compressed/jquery/jquery.cookie.min.js 518// *************************** 519/* 520 jQuery Cookie Plugin v1.2 521 https://github.com/carhartl/jquery-cookie 522 523 Copyright 2011, Klaus Hartl 524 Dual licensed under the MIT or GPL Version 2 licenses. 525 http://www.opensource.org/licenses/mit-license.php 526 http://www.opensource.org/licenses/GPL-2.0 527*/ 528(function(e,h,k){function l(b){return b}function m(b){return decodeURIComponent(b.replace(n," "))}var n=/\+/g,d=e.cookie=function(b,c,a){if(c!==k){a=e.extend({},d.defaults,a);null===c&&(a.expires=-1);if("number"===typeof a.expires){var f=a.expires,g=a.expires=new Date;g.setDate(g.getDate()+f)}c=d.json?JSON.stringify(c):String(c);return h.cookie=[encodeURIComponent(b),"=",d.raw?c:encodeURIComponent(c),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain? 529"; domain="+a.domain:"",a.secure?"; secure":""].join("")}c=d.raw?l:m;a=h.cookie.split("; ");for(f=0;g=a[f]&&a[f].split("=");f++)if(c(g.shift())===b)return b=c(g.join("=")),d.json?JSON.parse(b):b;return null};d.defaults={};e.removeCookie=function(b,c){return null!==e.cookie(b)?(e.cookie(b,null,c),!0):!1}})(jQuery,document); 530; 531 532// ***************************
533// js.compressed/responsive.js 534// *************************** 535/* 536 jQuery throttle / debounce - v1.1 - 3/7/2010 537 http://benalman.com/projects/jquery-throttle-debounce-plugin/ 538 539 Copyright (c) 2010 "Cowboy" Ben Alman 540 Dual licensed under the MIT and GPL licenses. 541 http://benalman.com/about/license/ 542*/ 543vBulletin.ensureObj("Responsive"); 544(function(d){function w(){d(".conversation-content .videoscontainer").each(function(){d(this).siblings("div.post-signature").length||d(this).addClass("no-signature")})}var p=vBulletin.Responsive,x=0;p.scrollToFixedBreakPoint=480;p.ChannelContent={cloneAndMoveToolbarButtons:function(){function g(){var f=parseInt(d(this).data("js-movable-button-clone-id")||0,10);b=Math.max(b,f)}var k=d(".js-movable-toolbar-button"),m=d(".js-movable-toolbar-button-clone"),n=k,a=d(".js-movable-toolbar-button-container"),b= 5450,c={};k.each(g);m.each(g);++b;k=k.filter(function(){var f=d(this),l="uniq-"+f.attr("class").split(/\s+/).sort().join("-")+"-"+f.attr("id");l=l.replace("-h-hide-on-small","");return c[l]?(f.addClass("h-hide-on-small"),!1):c[l]=!0});if(1>a.length){var e=!1;if(0<k.length){console.warn("Responsive warning: .js-movable-toolbar-button-container is not available.");var h=k.eq(0).closest(".canvas-widget");1==h.length&&(a=d("<div />").addClass("h-right h-clear hide-on-editmode b-button-group h-margin-bottom-l js-movable-toolbar-button-container h-hide-on-large"), 546h.is(".b-module--contiguous")?(e=h.closest(".canvas-layout-row"),a.removeClass("h-right").addClass("b-button-group--contiguous-layout").prependTo(e),d("<div />").addClass("js-movable-toolbar-button-container-marker-desktop h-hide-imp").prependTo(e),d("<div />").addClass("js-movable-toolbar-button-container-marker-small h-hide-imp").insertBefore(h)):a.prependTo(h),console.log("Responsive: Created .js-movable-toolbar-button-container"),e=!0)}if(!e)return}k=k.filter(function(){var f=d(this).data("js-movable-button-clone-id"); 547if(f){var l=!1;m.each(function(){if(d(this).data("js-movable-button-clone-id")==f)return l=!0,!1});if(l)return!1}return!0});m.each(function(){var f=d(this),l=f.data("js-movable-button-clone-id"),r=!1;n.each(function(u,t){if(d(t).data("js-movable-button-clone-id")==l)return r=!0,!1});r||f.remove()});k=k.reverse();k.each(function(){var f=d(this);f.data("js-movable-button-clone-id")||(f.clone().removeAttr("id").removeClass("js-movable-toolbar-button").addClass("h-hide-on-large js-movable-toolbar-button-clone").data("js-movable-button-clone-id", 548b).off("click").on("click",function(){f.trigger("click")}).prependTo(a),f.addClass("h-hide-on-small").data("js-movable-button-clone-id",b),++b)})},initToolbarShrink:function(){function g(c){d(".js-movable-toolbar-button-container, .js-movable-toolbar-button-clone").toggleClass("h-hide-on-large",c);d(".js-movable-toolbar-button, .js-button-filter-my-label").toggleClass("h-hide-imp",!c)}function k(c,e){e=e.closest(".conversation-toolbar-wrapper").next(".js-under-toolbar-pagenav");1==e.length&&e.parent().is(":visible")&& 549(d(".js-toolbar-pagenav").toggleClass("h-hide-on-xsmall",c).toggleClass("h-hide-imp",!c),e.toggleClass("h-show-on-xsmall",c),d(".js-subtoolbar-list-header").toggleClass("h-hide",!c))}function m(c){k(!1,c);g(!0)}function n(c){k(!0,c);g(!1)}function a(c){k(!1,c);g(!1)}function b(){var c=d(this),e=[m,n,a];k(!0,c);g(!0);d.each(e,function(h,f){if("need_shrink"==q.checkElementShrinkRequirement(c))f(c);else return!1})}d(".conversation-toolbar > .js-shrink-event-parent").on("vbulletin:shrink",b).on("vbulletin:unshrink", 550b)},initPmToolbarShrink:function(){function g(n){d(".js-movable-toolbar-button-container, .js-movable-toolbar-button-clone").toggleClass("h-hide-on-large",n);d(".js-movable-toolbar-button, .js-button-filter-my-label").toggleClass("h-hide-imp",!n)}function k(n){g(!1)}function m(){var n=d(this),a=[k];g(!0);d.each(a,function(b,c){if("need_shrink"==q.checkElementShrinkRequirement(n))c(n);else return!1})}d(".js-pm-floating-toolbar-content.js-shrink-event-parent, .js-pm-floating-toolbar-content > .js-shrink-event-parent").on("vbulletin:shrink", 551m).on("vbulletin:unshrink",m)},movePmToolbarButtonContainer:function(){var g=d(".js-movable-toolbar-button-container.b-button-group--contiguous-layout");g.length&&(d("body").is(".l-small")?g.insertAfter(".js-movable-toolbar-button-container-marker-small"):g.insertAfter(".js-movable-toolbar-button-container-marker-desktop"))}};p.MediaQueries={setResizeEvent:function(){var g=this.handleResizeEvent;d(window).on("resize orientationchange",g)},handleResizeEvent:function(){var g=d("#vb-page-body").width(); 552g!=x&&(x=g,(g=vBulletin.contentslider)&&"function"==typeof g.handleWindowResize&&g.handleWindowResize())}};p.checkForVideoSignature=w;var q=p.Debounce;
552(function(){function g(a){var b=a.first(),c=b.position().top,e=b.outerHeight()/2+c,h=!0;a.each(function(f,l){f=d(l);l=f.position().top;if(l!=c&&(f=f.outerHeight()/2+l,2<Math.abs(f-e)))return h=!1});return h}function k(a){var b=!1;a.each(function(c,e){if(c<a.length-1){var h=d(e),f=a.eq(c+1);c=h.offset();e=f.offset();h=h[0].getBoundingClientRect();f= 553f[0].getBoundingClientRect();c.bottom=c.top+h.height-1;c.right=c.left+h.width-1;e.bottom=e.top+f.height-1;e.right=e.left+f.width-1;if(!(c.right<e.left||c.bottom<e.top||e.right<c.left||e.bottom<c.top))return b=!0,!1}});return b}function m(a){q.callbacks.push(a)}function n(){var a=q.callbacks.length,b;for(b=0;b<a;++b)q.callbacks[b]()}(function(a,b){"$:nomunge";var c=a.jQuery||a.Cowboy||(a.Cowboy={}),e;c.throttle=e=function(h,f,l,r){function u(){function v(){y=+new Date;l.apply(A,B)}function C(){t=b} 554var A=this,z=+new Date-y,B=arguments;r&&!t&&v();t&&clearTimeout(t);r===b&&z>h?v():!0!==f&&(t=setTimeout(r?C:v,r===b?h-z:h))}var t,y=0;"boolean"!==typeof f&&(r=l,l=f,f=b);c.guid&&(u.guid=l.guid=l.guid||c.guid++);return u};c.debounce=function(h,f,l){return l===b?e(h,f,!1):e(h,l,!1!==f)}})(this);d.extend(q,{areElementsOnOneRow:g,checkElementShrinkRequirement:function(a){var b=a.find("> .js-shrink-event-child").filter(":visible");if(1>b.length)return a=a.data("vbulletin-shrink-triggered"),"undefined"!= 555typeof a&&"1"==a?"need_unshrink":"no_children";if(!g(b)||k(b))return a.data("vbulletin-shrink-triggered","1"),"need_shrink";a=a.data("vbulletin-shrink-triggered");return"undefined"!=typeof a&&"1"==a?"need_unshrink":"no_change"},checkShrinkEvent:function(a){"undefined"==typeof a&&(a=d(".js-shrink-event-parent"));a.each(function(b,c){b=d(c);switch(q.checkElementShrinkRequirement(b)){case "need_shrink":b.trigger("vbulletin:shrink");break;case "need_unshrink":b.trigger("vbulletin:unshrink")}})},init:function(){m(q.checkBrowserSize); 556m(function(){var a=d(".l-row");1>a.length||a.reverse().each(function(){var b=d(this);if(768<=b.width())return b.removeClass("l-small"),!0;var c=b.find("> .l-col__flex-1, > .l-col__flex-2, > .l-col__flex-3, > .l-col__flex-4, > .l-col__flex-5, > .l-col__flex-6"),e=!1;b.removeClass("l-small");c.reverse().each(function(){if(this.offsetWidth<this.scrollWidth)return e=!0,!1});e&&b.addClass("l-small")})});m(function(){var a=d(".l-row > .l-col__large-1, .l-row > .l-col__large-2, .l-row > .l-col__large-3, .l-row > .l-col__large-4, .l-row > .l-col__large-5, .l-row > .l-col__large-6, .l-row > .l-col__large-7, .l-row > .l-col__large-8, .l-row > .l-col__large-9, .l-row > .l-col__large-10, .l-row > .l-col__large-11, .l-row > .l-col__large-12, .l-row > .l-col__fixed-1, .l-row > .l-col__flex-1, .l-row > .l-col__fixed-2, .l-row > .l-col__flex-2, .l-row > .l-col__fixed-3, .l-row > .l-col__flex-3, .l-row > .l-col__fixed-4, .l-row > .l-col__flex-4, .l-row > .l-col__fixed-5, .l-row > .l-col__flex-5, .l-row > .l-col__fixed-6, .l-row > .l-col__flex-6, .l-row > .l-col__small-1, .l-row > .l-col__small-2, .l-row > .l-col__small-3, .l-row > .l-col__small-4"); 5571>a.length||a.reverse().each(function(){var b=d(this),c=b.width(),e=parseInt(b.css("marginLeft"),10),h=parseInt(b.css("marginRight"),10);0>e&&(c+=e);0>h&&(c+=h);b.toggleClass("l-column-xsmall",480>c);b.toggleClass("l-column-small",768>c);b.toggleClass("l-column-desktop",768<=c)})});m(function(){d(".ui-dialog:visible .ui-dialog-content").each(function(a,b){a=d(b);a.trigger("vbulletin:dialogresize");a.dialog("option","position",{my:"center",at:"center",of:window,collision:"flipfit"});if(!a.is(".js-no-responsive-resize")){a.closest(".ui-dialog").hide(); 558b=d(window).width();a.closest(".ui-dialog").show();var c=a.dialog("option","width");if(c>b)a.data("original-dialog-width")||a.data("original-dialog-width",c),a.dialog("option","width",b);else if(c<b){var e=a.data("original-dialog-width");e&&c<e&&a.dialog("option","width",Math.min(e,b))}}})});m(q.checkShrinkEvent);m(p.ChannelContent.movePmToolbarButtonContainer);d(window).on("resize",d.debounce(300,n));n()},callbacks:[],registerCallback:m,runCallbacks:n,registerCallbackOnce:function(a){var b=!1;d.each(q.callbacks, 559function(){if(a==this||""+a==""+this)return b=!0,!1});b||m(a)}})})();d(function(){p.MediaQueries.setResizeEvent();p.MediaQueries.handleResizeEvent();p.ChannelContent.cloneAndMoveToolbarButtons();p.ChannelContent.initToolbarShrink();p.ChannelContent.initPmToolbarShrink();var g=d(".search-results-widget .conversation-toolbar");g.addClass("desktop");if(g.find(".toolbar-pagenav").length){var k=d("<div>").addClass("conversation-toolbar mobile-search-results");k.insertAfter(g);
559k.append(g.find(".toolset-right").clone(!0, 560!0))}w();d("html").hasClass("touch")&&(g=navigator.userAgent.toLowerCase(),firefoxIndex=g.indexOf("firefox"),windows7Index=g.indexOf("windows nt 6.1"),-1!==firefoxIndex&&-1!==windows7Index&&d("html").removeClass("touch").addClass("no-touch"));q.init()})})(jQuery); 561; 562 563// ***************************
564// js.compressed/jquery/jquery.autogrow.min.js 565// *************************** 566/* 567 jQuery Textarea AutoGrow plugin 568 Author: Bruno Sampaio 569 Licensed under the MIT license 570*/ 571(function(f){function g(b,c){if("TEXTAREA"===b.tagName){var a=f(b),d=f("<div></div>");d.addClass("autogrow-mirror");void 0!==c.id&&d.attr("id",0==index?c.id:c.id+"-"+index);void 0!==c.classes&&d.addClass(c.classes);a.addClass("autogrow-field").on("input keyup",function(e){(e=a.val())&&"\n"!=e.charAt(e.length-1)||(e+="Â ");e=e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/ /g," ").replace(/\n/g,"<br/>");d.html(e); 572a.height(d.height())}).off("autogrow.resize").on("autogrow.resize",function(){d.css({border:a.css("border"),"font-family":a.css("font-family"),"font-size":a.css("font-size"),"font-weight":a.css("font-weight"),"letter-spacing":a.css("letter-spacing"),"line-height":a.css("line-height"),padding:a.css("padding"),position:"absolute",visibility:"hidden","white-space":"normal",width:a.css("width"),"word-break":"break-word","z-index":-1,zoom:a.css("zoom")})}).trigger("autogrow.resize").after(d)}}f.fn.autogrow= 573function(b,c){var a=this,d=this.context;void 0===c&&(c=b instanceof Object?b:{});"string"!==typeof b&&(b=null);b&&(a=f(b,d),f(document).on("DOMNodeInserted",function(a){a=a.target;f(a,d).is(b)&&g(a,c)}));a.each(function(a,b){g(b,c)});return this}})(jQuery); 574; 575 576// ***************************
577// js.compressed/jquery/jquery.form.min.js 578// *************************** 579/* 580 jQuery Form Plugin 581 version: 2.85 (23-SEP-2011) 582 @requires jQuery v1.3.2 or later 583 584 Examples and documentation at: http://malsup.com/jquery/form/ 585 Dual licensed under the MIT and GPL licenses: 586 http://www.opensource.org/licenses/mit-license.php 587 http://www.gnu.org/licenses/gpl.html 588*/ 589(function(c){function p(){if(c.fn.ajaxSubmit.debug){var a="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(a):window.opera&&window.opera.postError&&window.opera.postError(a)}}c.fn.ajaxSubmit=function(a){function d(b){function d(){function a(){try{var c=(r.contentWindow?r.contentWindow.document:r.contentDocument?r.contentDocument:r.document).readyState;p("state = "+c);"uninitialized"==c.toLowerCase()&&setTimeout(a,50)}catch(C){p("Server abort: ", 590C," (",C.name,")"),k(2),x&&clearTimeout(x),x=void 0}}var b=h.attr("target"),g=h.attr("action");m.setAttribute("target",z);f||m.setAttribute("method","POST");g!=e.url&&m.setAttribute("action",e.url);e.skipEncodingOverride||f&&!/post/i.test(f)||h.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"});e.timeout&&(x=setTimeout(function(){u=!0;k(1)},e.timeout));var d=[];try{if(e.extraData)for(var l in e.extraData)d.push(c('<input type="hidden" name="'+l+'" />').attr("value",e.extraData[l]).appendTo(m)[0]); 591e.iframeTarget||(v.appendTo("body"),r.attachEvent?r.attachEvent("onload",k):r.addEventListener("load",k,!1));setTimeout(a,15);m.submit()}finally{m.setAttribute("action",g),b?m.setAttribute("target",b):h.removeAttr("target"),c(d).remove()}}function k(a){if(!g.aborted&&!D){try{t=r.contentWindow?r.contentWindow.document:r.contentDocument?r.contentDocument:r.document}catch(w){p("cannot access response document: ",w),a=2}if(1===a&&g)g.abort("timeout");else if(2==a&&g)g.abort("server abort");else if(t&& 592t.location.href!=e.iframeSrc||u){r.detachEvent?r.detachEvent("onload",k):r.removeEventListener("load",k,!1);a="success";var b;try{if(u)throw"timeout";var d="xml"==e.dataType||t.XMLDocument||c.isXMLDoc(t);p("isXml="+d);if(!d&&window.opera&&(null==t.body||""==t.body.innerHTML)&&--A){p("requeing onLoad callback, DOM not available");setTimeout(k,250);return}var f=t.body?t.body:t.documentElement;g.responseText=f?f.innerHTML:null;g.responseXML=t.XMLDocument?t.XMLDocument:t;d&&(e.dataType="xml");g.getResponseHeader= 593function(a){return{"content-type":e.dataType}[a]};f&&(g.status=Number(f.getAttribute("status"))||g.status,g.statusText=f.getAttribute("statusText")||g.statusText);var h=(e.dataType||"").toLowerCase(),m=/(json|script|text)/.test(h);if(m||e.textarea){var l=t.getElementsByTagName("textarea")[0];if(l)g.responseText=l.value,g.status=Number(l.getAttribute("status"))||g.status,g.statusText=l.getAttribute("statusText")||g.statusText;else if(m){var y=t.getElementsByTagName("pre")[0],q=t.getElementsByTagName("body")[0]; 594y?g.responseText=y.textContent?y.textContent:y.innerText:q&&(g.responseText=q.textContent?q.textContent:q.innerText)}}else"xml"!=h||g.responseXML||null==g.responseText||(g.responseXML=E(g.responseText));try{B=F(g,h,e)}catch(w){a="parsererror",g.error=b=w||a}}catch(w){p("error caught: ",w),a="error",g.error=b=w||a}g.aborted&&(p("upload aborted"),a=null);g.status&&(a=200<=g.status&&300>g.status||304===g.status?"success":"error");"success"===a?(e.success&&e.success.call(e.context,B,"success",g),n&&c.event.trigger("ajaxSuccess", 595[g,e])):a&&(void 0==b&&(b=g.statusText),e.error&&e.error.call(e.context,g,a,b),n&&c.event.trigger("ajaxError",[g,e,b]));n&&c.event.trigger("ajaxComplete",[g,e]);n&&!--c.active&&c.event.trigger("ajaxStop");e.complete&&e.complete.call(e.context,g,a);D=!0;e.timeout&&clearTimeout(x);setTimeout(function(){e.iframeTarget||v.remove();g.responseXML=null},100)}}}var m=h[0],l,n,u,x;var q=!!c.fn.prop;if(b)if(q)for(l=0;l<b.length;l++)q=c(m[b[l].name]),q.prop("disabled",!1);else for(l=0;l<b.length;l++)q=c(m[b[l].name]), 596q.removeAttr("disabled");if(c(":input[name=submit],:input[id=submit]",m).length)alert('Error: Form elements must not have name or id of "submit".');else{var e=c.extend(!0,{},c.ajaxSettings,a);e.context=e.context||e;var z="jqFormIO"+(new Date).getTime();if(e.iframeTarget){var v=c(e.iframeTarget);q=v.attr("name");null==q?v.attr("name",z):z=q}else v=c('<iframe name="'+z+'" src="'+e.iframeSrc+'" />'),v.css({position:"absolute",top:"-1000px",left:"-1000px"});var r=v[0];var g={aborted:0,responseText:null, 597responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(a){var b="timeout"===a?"timeout":"aborted";p("aborting upload... "+b);this.aborted=1;v.attr("src",e.iframeSrc);g.error=b;e.error&&e.error.call(e.context,g,b,a);n&&c.event.trigger("ajaxError",[g,e,b]);e.complete&&e.complete.call(e.context,g,b)}};(n=e.global)&&!c.active++&&c.event.trigger("ajaxStart");n&&c.event.trigger("ajaxSend",[g,e]);if(e.beforeSend&&
598!1===e.beforeSend.call(e.context,g,e))e.global&&c.active--;else if(!g.aborted){(b=m.clk)&&(q=b.name)&&!b.disabled&&(e.extraData=e.extraData||{},e.extraData[q]=b.value,"image"==b.type&&(e.extraData[q+".x"]=m.clk_x,e.extraData[q+".y"]=m.clk_y));e.forceSync?d():setTimeout(d,10);var B,t,A=50,D,E=c.parseXML||function(a,b){window.ActiveXObject?(b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a)):b=(new DOMParser).parseFromString(a,"text/xml");return b&&b.documentElement&&"parsererror"!= 599b.documentElement.nodeName?b:null},G=c.parseJSON||function(a){return window.eval("("+a+")")},F=function(a,b,e){var d=a.getResponseHeader("content-type")||"",f="xml"===b||!b&&0<=d.indexOf("xml");a=f?a.responseXML:a.responseText;f&&"parsererror"===a.documentElement.nodeName&&c.error&&c.error("parsererror");e&&e.dataFilter&&(a=e.dataFilter(a,b));"string"===typeof a&&("json"===b||!b&&0<=d.indexOf("json")?a=G(a):("script"===b||!b&&0<=d.indexOf("javascript"))&&c.globalEval(a));return a}}}}if(!this.length)return p("ajaxSubmit: skipping submit process - no element selected"), 600this;var h=this;"function"==typeof a&&(a={success:a});var f=this.attr("method");var b=this.attr("action");(b=(b="string"===typeof b?c.trim(b):"")||window.location.href||"")&&(b=(b.match(/^([^#]+)/)||[])[1]);a=c.extend(!0,{url:b,success:c.ajaxSettings.success,type:f||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},a);b={};this.trigger("form-pre-serialize",[this,a,b]);if(b.veto)return p("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(a.beforeSerialize&& 601!1===a.beforeSerialize(this,a))return p("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var k=this.formToArray(a.semantic);if(a.data)for(n in a.extraData=a.data,a.data)if(c.isArray(a.data[n]))for(var m in a.data[n])k.push({name:n,value:a.data[n][m]});else{var u=a.data[n];u=c.isFunction(u)?u():u;k.push({name:n,value:u})}if(a.beforeSubmit&&!1===a.beforeSubmit(k,this,a))return p("ajaxSubmit: submit aborted via beforeSubmit callback"),this;this.trigger("form-submit-validate",[k,this,a, 602b]);if(b.veto)return p("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var n=c.param(k);"GET"==a.type.toUpperCase()?(a.url+=(0<=a.url.indexOf("?")?"&":"?")+n,a.data=null):a.data=n;var l=[];a.resetForm&&l.push(function(){h.resetForm()});a.clearForm&&l.push(function(){h.clearForm()});if(!a.dataType&&a.target){var A=a.success||function(){};l.push(function(b){var d=a.replaceTarget?"replaceWith":"html";c(a.target)[d](b).each(A,arguments)})}else a.success&&l.push(a.success);a.success= 603function(b,c,d){for(var f=a.context||a,k=0,m=l.length;k<m;k++)l[k].apply(f,[b,c,d||h,h])};n=0<c("input:file",this).length;m="multipart/form-data"==h.attr("enctype")||"multipart/form-data"==h.attr("encoding");!1!==a.iframe&&(n||a.iframe||m)?a.closeKeepAlive?c.get(a.closeKeepAlive,function(){d(k)}):d(k):c.ajax(a);this.trigger("form-submit-notify",[this,a]);return this};c.fn.ajaxForm=function(a){if(0===this.length){var d=this.selector,h=this.context;if(!c.isReady&&d)return p("DOM not ready, queuing ajaxForm"), 604c(function(){c(d,h).ajaxForm(a)}),this;p("terminating; zero elements found by selector"+(c.isReady?"":" (DOM not ready)"));return this}return this.ajaxFormUnbind().on("submit.form-plugin",function(d){d.isDefaultPrevented()||(d.preventDefault(),c(this).ajaxSubmit(a))}).on("click.form-plugin",function(a){var b=a.target,d=c(b);if(!d.is(":submit,input:image")){b=d.closest(":submit");if(0==b.length)return;b=b[0]}var f=this;f.clk=b;"image"==b.type&&(void 0!=a.offsetX?(f.clk_x=a.offsetX,f.clk_y=a.offsetY): 605"function"==typeof c.fn.offset?(d=d.offset(),f.clk_x=a.pageX-d.left,f.clk_y=a.pageY-d.top):(f.clk_x=a.pageX-b.offsetLeft,f.clk_y=a.pageY-b.offsetTop));setTimeout(function(){f.clk=f.clk_x=f.clk_y=null},100)})};c.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")};c.fn.formToArray=function(a){var d=[];if(0===this.length)return d;var h=this[0],f=a?h.getElementsByTagName("*"):h.elements;if(!f)return d;var b,k,m,p;var n=0;for(m=f.length;n<m;n++){var l=f[n];
605if(b=l.name)if(a&& 606h.clk&&"image"==l.type)l.disabled||h.clk!=l||(d.push({name:b,value:c(l).val()}),d.push({name:b+".x",value:h.clk_x},{name:b+".y",value:h.clk_y}));else if((k=c.fieldValue(l,!0))&&k.constructor==Array)for(l=0,p=k.length;l<p;l++)d.push({name:b,value:k[l]});else null!==k&&"undefined"!=typeof k&&d.push({name:b,value:k})}!a&&h.clk&&(a=c(h.clk),f=a[0],(b=f.name)&&!f.disabled&&"image"==f.type&&(d.push({name:b,value:a.val()}),d.push({name:b+".x",value:h.clk_x},{name:b+".y",value:h.clk_y})));return d};c.fn.formSerialize= 607function(a){return c.param(this.formToArray(a))};c.fn.fieldSerialize=function(a){var d=[];this.each(function(){var h=this.name;if(h){var f=c.fieldValue(this,a);if(f&&f.constructor==Array)for(var b=0,k=f.length;b<k;b++)d.push({name:h,value:f[b]});else null!==f&&"undefined"!=typeof f&&d.push({name:this.name,value:f})}});return c.param(d)};c.fn.fieldValue=function(a){for(var d=[],h=0,f=this.length;h<f;h++){var b=c.fieldValue(this[h],a);null===b||"undefined"==typeof b||b.constructor==Array&&!b.length|| 608(b.constructor==Array?c.merge(d,b):d.push(b))}return d};c.fieldValue=function(a,d){var h=a.name,f=a.type,b=a.tagName.toLowerCase();void 0===d&&(d=!0);if(d&&(!h||a.disabled||"reset"==f||"button"==f||("checkbox"==f||"radio"==f)&&!a.checked||("submit"==f||"image"==f)&&a.form&&a.form.clk!=a||"select"==b&&-1==a.selectedIndex))return null;if("select"==b){b=a.selectedIndex;if(0>b)return null;d=[];a=a.options;h=(f="select-one"==f)?b+1:a.length;for(b=f?b:0;b<h;b++){var k=a[b];if(k.selected){var m=k.value; 609m||(m=k.attributes&&k.attributes.value&&!k.attributes.value.specified?k.text:k.value);if(f)return m;d.push(m)}}return d}return c(a).val()};c.fn.clearForm=function(){return this.each(function(){c("input,select,textarea",this).clearFields()})};c.fn.clearFields=c.fn.clearInputs=function(){var a=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var c=this.type,h=this.tagName.toLowerCase();a.test(c)||"textarea"==h?this.value="":"checkbox"== 610c||"radio"==c?this.checked=!1:"select"==h&&(this.selectedIndex=-1)})};c.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})};c.fn.enable=function(a){void 0===a&&(a=!0);return this.each(function(){this.disabled=!a})};c.fn.selected=function(a){void 0===a&&(a=!0);return this.each(function(){var d=this.type;"checkbox"==d||"radio"==d?this.checked=a:"option"==this.tagName.toLowerCase()&&(d=c(this).parent("select"), 611a&&d[0]&&"select-one"==d[0].type&&d.find("option").selected(!1),this.selected=a)})};c.fn.ajaxSubmit.debug=!1})(jQuery); 612; 613 614// ***************************
615// js.compressed/jquery/jquery.selectBox.min.js 616// *************************** 617/* 618 jQuery selectBox - A cosmetic, styleable replacement for SELECT elements 619 620 Copyright 2012 Cory LaViska for A Beautiful Site, LLC. 621 622 https://github.com/claviska/jquery-selectBox 623 624 Licensed under both the MIT license and the GNU GPLv2 (same as jQuery: http://jquery.org/license) 625 626 627 Note: Modified for vBulletin. Grep for 'vBulletin' to see the changes. 628*/ 629jQuery&&function(b){b.extend(b.fn,{selectBox:function(x,k){var y,p="",z=navigator.platform.match(/mac/i),E=function(a,c){if(navigator.userAgent.match(/iPad|iPhone|Android|IEMobile|BlackBerry/i)||"select"!==a.tagName.toLowerCase())return!1;a=b(a);if(a.data("selectBox-control")||a.is(":hidden")&&(!c||!c.allowHidden))return!1;var e=b('<a class="selectBox" />'),d=a.attr("multiple")||1<parseInt(a.attr("size"));c=c||{};e.addClass(a.attr("class")).attr("title",a.attr("title")||"").attr("tabindex", 630parseInt(a.attr("tabindex"))).css("display","inline-block").on("focus.selectBox",function(){this!==document.activeElement&&document.body!==document.activeElement&&b(document.activeElement).blur();e.hasClass("selectBox-active")||(e.addClass("selectBox-active"),a.trigger("focus"))}).on("blur.selectBox",function(){e.hasClass("selectBox-active")&&(e.removeClass("selectBox-active"),a.trigger("blur"))});if(!b(window).data("selectBox-bindings"))b(window).data("selectBox-bindings",!0).on("scroll.selectBox", 631l).on("resize.selectBox",l);a.attr("disabled")&&e.addClass("selectBox-disabled");a.on("click.selectBox",function(a){e.focus();a.preventDefault()});if(d){var f=t(a,"inline");e.append(f).data("selectBox-options",f).addClass("selectBox-inline selectBox-menuShowing").on("keydown.selectBox",function(b){A(a,b)}).on("keypress.selectBox",function(b){B(a,b)}).on("mousedown.selectBox",function(a){b(a.target).is("A.selectBox-inline")&&a.preventDefault();e.hasClass("selectBox-focus")||e.focus()}).insertAfter(a); 632e.width(a.css("fontSize",e.css("fontSize")).outerWidth());if(!a[0].style.height){d=a.attr("size")?parseInt(a.attr("size")):5;var h=e.clone().removeAttr("id").css({position:"absolute",top:"-9999em"}).show().appendTo("body");h.find(".selectBox-options").html("<li><a>Â </a></li>");var g=parseInt(h.find(".selectBox-options A:first").html(" ").outerHeight());h.remove();e.height(g*d)}}else d=b('<span class="selectBox-label" />'),h=b('<span class="selectBox-arrow" />'),d.attr("class",C(a)).text(D(a)), 633f=t(a,"dropdown"),f.appendTo("BODY"),e.data("selectBox-options",f).addClass("selectBox-dropdown").append(d).append(h).on("mousedown.selectBox",function(b){e.hasClass("selectBox-menuShowing")?l():(b.stopPropagation(),f.data("selectBox-down-at-x",b.screenX).data("selectBox-down-at-y",b.screenY),m(a))}).on("keydown.selectBox",function(b){A(a,b)}).on("keypress.selectBox",function(b){B(a,b)}).on("open.selectBox",function(b,c){c&&!0===c._selectBox||m(a)}).on("close.selectBox",function(a,b){b&&!0===b._selectBox|| 634l()}).insertAfter(a),e.width(a.css("fontSize",e.css("fontSize")).width()),h=e.width()-h.outerWidth()-parseInt(d.css("paddingLeft"))-parseInt(d.css("paddingRight")),d.width(h);u(e);d=b(".selectBox-label",e);h=parseInt(d.css("paddingLeft"))-4+parseInt(d.css("paddingRight"));g=e.width()+h;g<=e.parent().innerWidth()&&(e.width(g),d.width(d.width()+h));a.addClass("selectBox").data("selectBox-control",e).data("selectBox-settings",c).hide()},t=function(a,c){var e=function(a,c){a.children("OPTION, OPTGROUP").each(function(){if(b(this).is("OPTION"))if(0< 635b(this).length){var a=b(this),d=c,f=b("<li />"),h=b("<a />");f.addClass(a.attr("class"));f.data(a.data());h.attr("rel",a.val()).text(a.text());f.append(h);a.attr("disabled")&&f.addClass("selectBox-disabled");a.prop("selected")&&f.addClass("selectBox-selected");d.append(f)}else c.append("<li>Â </li>");else a=b('<li class="selectBox-optgroup" />'),a.text(b(this).attr("label")),c.append(a),c=e(b(this),c)});return c};switch(c){case "inline":var d=b('<ul class="selectBox-options" />');d=e(a,d);d.find("A").on("mouseover.selectBox", 636function(c){n(a,b(this).parent())}).on("mouseout.selectBox",function(c){v(a,b(this).parent())}).on("mousedown.selectBox",function(b){b.preventDefault();a.selectBox("control").hasClass("selectBox-active")||a.selectBox("control").focus()}).on("mouseup.selectBox",function(c){l();q(a,b(this).parent(),c)});u(d);return d;
636case "dropdown":d=b('<ul class="selectBox-dropdown-menu selectBox-options" />');d=e(a,d);d.data("selectBox-select",a).css("display","none").appendTo("BODY").find("A").on("mousedown.selectBox", 637function(a){a.preventDefault();a.screenX===d.data("selectBox-down-at-x")&&a.screenY===d.data("selectBox-down-at-y")&&(d.removeData("selectBox-down-at-x").removeData("selectBox-down-at-y"),l())}).on("mouseup.selectBox",function(c){if(c.screenX!==d.data("selectBox-down-at-x")||c.screenY!==d.data("selectBox-down-at-y"))d.removeData("selectBox-down-at-x").removeData("selectBox-down-at-y"),q(a,b(this).parent()),l()}).on("mouseover.selectBox",function(c){n(a,b(this).parent())}).on("mouseout.selectBox", 638function(c){v(a,b(this).parent())});c=a.attr("class")||"";if(""!==c){c=c.split(" ");for(var f in c)d.addClass(c[f]+"-selectBox-dropdown-menu")}u(d);return d}},C=function(a){return("selectBox-label "+(b(a).find("OPTION:selected").attr("class")||"")).replace(/\s+$/,"")},D=function(a){return b(a).find("OPTION:selected").text()||String.fromCharCode(160)},w=function(a){a=b(a);var c=a.data("selectBox-control");c&&c.find(".selectBox-label").attr("class",C(a)).text(D(a))},m=function(a){a=b(a);var c=a.data("selectBox-control")|| 639b(),e=a.data("selectBox-settings")||{},d=c.data("selectBox-options")||b();if(c.hasClass("selectBox-disabled"))return!1;l();var f=parseInt(c.css("borderBottomWidth"))||0;d.width(c.innerWidth()).css({top:c.offset().top+c.outerHeight()-f,left:c.offset().left});if(a.triggerHandler("beforeopen"))return!1;f=function(){a.triggerHandler("open",{_selectBox:!0});var e=b(window).scrollTop(),f=e+b(window).height(),k=d.offset().top,l=k+d.outerHeight();0<=k-e&&0<=f-l||d.css("top",parseFloat(d.css("top"))-(c.outerHeight()+ 640d.outerHeight()))};switch(e.menuTransition){case "fade":d.fadeIn(e.menuSpeed,f);break;case "slide":d.slideDown(e.menuSpeed,f);break;default:d.show(e.menuSpeed,f)}e.menuSpeed||f();e=d.find(".selectBox-selected:first");r(a,e,!0);n(a,e);c.addClass("selectBox-menuShowing");b(document).on("mousedown.selectBox",function(a){b(a.target).parents().addBack().hasClass("selectBox-options")||l()})},l=function(){0!==b(".selectBox-dropdown-menu:visible").length&&(b(document).off("mousedown.selectBox"),b(".selectBox-dropdown-menu").each(function(){var a= 641b(this),c=a.data("selectBox-select")||b(),e=c.data("selectBox-control")||b(),d=c.data("selectBox-settings")||{};if(c.triggerHandler("beforeclose"))return!1;var f=function(){c.triggerHandler("close",{_selectBox:!0})};switch(d.menuTransition){case "fade":a.fadeOut(d.menuSpeed,f);break;case "slide":a.slideUp(d.menuSpeed,f);break;default:a.hide(d.menuSpeed,f)}d.menuSpeed||f();e.removeClass("selectBox-menuShowing")}))},q=function(a,c,e){a=b(a);c=b(c);var d=a.data("selectBox-control")||b();a.data("selectBox-settings"); 642if(d.hasClass("selectBox-disabled")||0===c.length||c.hasClass("selectBox-disabled"))return!1;a.attr("multiple")?e.shiftKey&&d.data("selectBox-last-selected")?(c.toggleClass("selectBox-selected"),e=c.index()>d.data("selectBox-last-selected").index()?c.siblings().slice(d.data("selectBox-last-selected").index(),c.index()):c.siblings().slice(c.index(),d.data("selectBox-last-selected").index()),e=e.not(".selectBox-optgroup, .selectBox-disabled"),c.hasClass("selectBox-selected")?e.addClass("selectBox-selected"): 643e.removeClass("selectBox-selected")):z&&e.metaKey||!z&&e.ctrlKey?c.toggleClass("selectBox-selected"):(c.siblings().removeClass("selectBox-selected"),c.addClass("selectBox-selected")):(c.siblings().removeClass("selectBox-selected"),c.addClass("selectBox-selected"));d.hasClass("selectBox-dropdown")&&d.find(".selectBox-label").text(c.text());var f=0,h=[];a.attr("multiple")?d.find(".selectBox-selected A").each(function(){h[f++]=b(this).attr("rel")}):h=c.find("A").attr("rel");d.data("selectBox-last-selected", 644c);a.val()!==h&&(a.val(h),w(a),a.trigger("change"));return!0},n=function(a,c){a=b(a);c=b(c);((a.data("selectBox-control")||b()).data("selectBox-options")||b()).find(".selectBox-hover").removeClass("selectBox-hover");c.addClass("selectBox-hover")},v=function(a,c){a=b(a);b(c);((a.data("selectBox-control")||b()).data("selectBox-options")||b()).find(".selectBox-hover").removeClass("selectBox-hover")}
644,r=function(a,c,e){if(c&&0!==c.length){a=b(a);a=a.data("selectBox-control")||b();var d=a.data("selectBox-options")|| 645b();a=a.hasClass("selectBox-dropdown")?d:d.parent();d=parseInt(c.offset().top-a.position().top);var f=parseInt(d+c.outerHeight());e?a.scrollTop(c.offset().top-a.offset().top+a.scrollTop()-a.height()/2):(0>d&&a.scrollTop(c.offset().top-a.offset().top+a.scrollTop()),f>a.height()&&a.scrollTop(c.offset().top+c.outerHeight()-a.offset().top+a.scrollTop()-a.height()))}},A=function(a,c){a=b(a);var e=a.data("selectBox-control")||b(),d=e.data("selectBox-options")||b(),f=a.data("selectBox-settings")||{},h;if(!e.hasClass("selectBox-disabled"))switch(c.keyCode){case 8:c.preventDefault(); 646p="";break;case 9:case 27:l();v(a);break;case 13:e.hasClass("selectBox-menuShowing")?(q(a,d.find("LI.selectBox-hover:first"),c),e.hasClass("selectBox-dropdown")&&l()):m(a);break;case 38:case 37:c.preventDefault();if(e.hasClass("selectBox-menuShowing")){var g=d.find(".selectBox-hover").prev("LI");e=d.find("LI:not(.selectBox-optgroup)").length;for(h=0;(0===g.length||g.hasClass("selectBox-disabled")||g.hasClass("selectBox-optgroup"))&&!(g=g.prev("LI"),0===g.length&&(g=f.loopOptions?d.find("LI:last"): 647d.find("LI:first")),++h>=e););n(a,g);q(a,g,c);r(a,g)}else m(a);break;case 40:case 39:if(c.preventDefault(),e.hasClass("selectBox-menuShowing")){g=d.find(".selectBox-hover").next("LI");e=d.find("LI:not(.selectBox-optgroup)").length;for(h=0;(0===g.length||g.hasClass("selectBox-disabled")||g.hasClass("selectBox-optgroup"))&&!(g=g.next("LI"),0===g.length&&(g=f.loopOptions?d.find("LI:first"):d.find("LI:last")),++h>=e););n(a,g);q(a,g,c);r(a,g)}else m(a)}},B=function(a,c){a=b(a);var e=a.data("selectBox-control")|| 648b(),d=e.data("selectBox-options")||b();if(!e.hasClass("selectBox-disabled"))switch(c.keyCode){case 9:case 27:case 13:case 38:case 37:case 40:case 39:break;default:e.hasClass("selectBox-menuShowing")||m(a),c.preventDefault(),clearTimeout(y),p+=String.fromCharCode(c.charCode||c.keyCode),d.find("A").each(function(){if(b(this).text().substr(0,p.length).toLowerCase()===p.toLowerCase())return n(a,b(this).parent()),r(a,b(this).parent()),!1}),y=setTimeout(function(){p=""},1E3)}},F=function(a,c){a=b(a);a.val(c); 649c=a.val();null!==c||a.attr("multiple")||(a[0].selectedIndex=0,c=a.val());var e=a.data("selectBox-control");if(e){var d=a.data("selectBox-settings")||{};e=e.data("selectBox-options")||b();w(a);e.find(".selectBox-selected").removeClass("selectBox-selected");e.find("A").each(function(){if("object"===typeof c)for(var a=0;a<c.length;a++)b(this).attr("rel")==c[a]&&b(this).parent().addClass("selectBox-selected");else b(this).attr("rel")==c&&b(this).parent().addClass("selectBox-selected")});d.change&&d.change.call(a)}}, 650u=function(a){b(a).css("MozUserSelect","none").on("selectstart",function(a){a.preventDefault()})};switch(x){case "control":return b(this).data("selectBox-control");case "settings":if(!k)return b(this).data("selectBox-settings");b(this).each(function(){b(this).data("selectBox-settings",b.extend(!0,b(this).data("selectBox-settings"),k))});break;case "options":if(void 0===k)return b(this).data("selectBox-control").data("selectBox-options");b(this).each(function(){var a=b(this);var c=a.data("selectBox-control")|| 651b();a.data("selectBox-settings");switch(typeof k){case "string":a.html(k);break;case "object":for(f in a.html(""),k)if(null!==k[f])if("object"===typeof k[f]){var e=b('<optgroup label="'+f+'" />');for(d in k[f])e.append('<option value="'+d+'">'+k[f][d]+"</option>");a.append(e)}else e=b('<option value="'+f+'">'+k[f]+"</option>"),a.append(e)}if(c){c.data("selectBox-options").remove();var d=c.hasClass("selectBox-dropdown")?"dropdown":"inline";var f=t(a,d);c.data("selectBox-options",f);switch(d){case "inline":c.append(f); 652break;case "dropdown":w(a),b("BODY").append(f)}}});break;case "value":if(void 0===k)return b(this).val();b(this).each(function(){F(this,k)});break;case "refresh":b(this).each(function(){var a=b(this);a.selectBox("options",a.html())});break;case "enable":b(this).each(function(){var a=b(this);a.attr("disabled",!1);(a=a.data("selectBox-control"))&&a.removeClass("selectBox-disabled")});break;case "disable":b(this).each(function(){var a=b(this);a.attr("disabled",!0);(a=a.data("selectBox-control"))&&a.addClass("selectBox-disabled")}); 653break;case "destroy":b(this).each(function(){var a=b(this);var c=a.data("selectBox-control");c&&((c.data("selectBox-options")||b()).remove(),c.remove(),a.removeClass("selectBox").removeData("selectBox-control").data("selectBox-control",null).removeData("selectBox-settings").data("selectBox-settings",null).show())});break;default:b(this).each(function(){E(this,x)})}return b(this)}})}(jQuery); 654; 655 656// ***************************
657// js.compressed/storage.js 658// *************************** 659vBulletin.createStorageTools=function(f,p,q){function e(a){if(!a.loaded){a.loaded=!0;try{var b=localStorage.getItem(f+a.name);if(b)if(b=JSON.parse(b),a.istimed){a.cache.values=b.values||a.cache.values;a.cache.times=b.times||a.cache.times;b=!1;var c=a.cache.values,d=a.cache.times,g;for(g in c)d[g]<a.latest&&(delete c[g],delete d[g],b=!0);b&&h(a)}else a.cache.values=b}catch(r){}}}function h(a){try{var b=f+a.name,c=a.cache;a.istimed||(c=c.values);localStorage.removeItem(b);localStorage.setItem(b,JSON.stringify(c))}catch(d){}} 660function k(a,b,c,d){this.loaded=!1;this.name=a;this.cache={values:{},times:{}};if(this.istimed=!!b)this.latest=c,this.current=d}function l(a,b,c){var d={path:p,domain:q};c&&(!0===c&&(c=365),d.expires=c);$.cookie(f+a,b,d)}function m(a){return $.cookie(f+a)}function n(a,b){this.name=a;this.permanent=b;try{var c=m(a);c&&(this.cache=JSON.parse(c))}catch(d){}this.cache=this.cache||{}}try{localStorage.removeItem("vbcache-")}catch(a){}k.prototype={get:function(a){e(this);var b=this.cache.values;return b.hasOwnProperty(a)? 661b[a]:null},getAll:function(){e(this);return this.cache.values},isSet:function(a){e(this);return this.cache.values.hasOwnProperty(a)},set:function(a,b){e(this);var c=a;$.isPlainObject(a)||(c={},c[a]=b);for(_key in c)this.cache.values[_key]=c[_key],this.istimed&&(this.cache.times[_key]=this.current);h(this)},unset:function(a){e(this);delete this.cache.values[a];delete this.cache.times[a];h(this)}};n.prototype={get:function(a,b){return this.cache.hasOwnProperty(a)?this.cache[a]:void 0!==b?b:null},getAll:function(){return this.cache}, 662set:function(a,b){this.cache[a]=b;l(this.name,JSON.stringify(this.cache),this.permanent)},unset:function(a){delete this.cache[a];l(this.name,JSON.stringify(this.cache),this.permanent)}};return{createStorage:a=>new k(a),createStorageTimed:(a,b,c)=>new k(a,!0,b,c),createArrayCookie:(a,b)=>new n(a,b),setCookie:l,getCookie:m}}; 663; 664 665// ***************************
666// js.compressed/sitedata.js 667// *************************** 668vBulletin.createSiteDataTools=function(v){function r(){var a=[],c=[];(new Set(f)).forEach(function(b){a.push(b)});a=a.filter(function(b){return!g.isSet(b)});(new Set(h)).forEach(function(b){c.push(b)});c=c.filter(function(b){return!k.isSet(b+n)});vBulletin.loadingIndicator.suppressNextAjaxIndicator();$.ajax({url:v+"/ajax/loaddata",async:!1,data:{options:a,phrases:c},type:"POST",dataType:"json",success:function(b){if(b&&!b.hasOwnProperty("errors")){f.length=0;h.length=0;var l={},p=b.options;$.each(a, 669function(w,e){l[e]=p.hasOwnProperty(e)?p[e]:null});g.set(l);var t={},u=b.phrases;$.each(c,function(w,e){t[e+n]=u.hasOwnProperty(e)?u[e]:e});k.set(t)}else console.warn("Unexpected result when fetching options",b)},error:function(b,l,p){console.warn("Error when fetching options: {0}".format(p))}})}var q={},k,h,d,n,m={},g,f;q.init=function(a,c,b,l){d=a;n="-"+c;k=b;h=l};q.get=function(){if(1>arguments.length)return console.log("vBulletin.phrase.get() called with no parameters"),"";var a=arguments;Array.isArray(a[0])&& 670(a=a[0]);var c=a[0]+n;k.isSet(c)||(h.push(a[0]),r());var b=k.get(c);if(!b)return c;b=b.replace(/\{sitename\}/g,m.get("bbtitle")).replace(/\{musername\}/g,d.musername).replace(/\{username\}/g,d.username).replace(/\{userid\}/g,d.userid).replace(/\{registerurl\}/g,d.registerurl).replace(/\{activationurl\}/g,d.activationurl).replace(/\{helpurl\}/g,d.helpurl).replace(/\{contacturl\}/g,d.contacturl).replace(/\{homeurl\}/g,d.baseurl).replace(/\{date\}/g,d.datenow).replace(/\{register_page\}/g,d.registerurl).replace(/\{activation_page\}/g, 671d.activationurl).replace(/\{help_page\}/g,d.helpurl).replace(/\{sessionurl\}/g,"").replace(/\{sessionurl_q\}/g,"");for(c=1;c<a.length;++c)b=b.replace(new RegExp("%"+c+"\\$s","gm"),a[c]);return b};q.register=function(a){$.merge(h,$.makeArray(a))};m.init=function(a,c){g=a;f=c};m.get=function(a){g.isSet(a)||(f.push(a),r(a));return g.get(a)};m.register=function(a){$.merge(f,$.makeArray(a))};return{phrase:q,options:m}}; 672; 673 674// ***************************
675// js.compressed/dialog.js 676// *************************** 677vBulletin.precache(["cancel","no","ok","yes"],[]); 678vBulletin.createDialogTools=(f,y,h)=>{function r(a,b,c){a.data("created")||a.dialog({autoOpen:!1,modal:!0,resizable:!1,closeOnEscape:!1,showCloseButton:!1,dialogClass:"dialog-container dialog-box "+c,create:()=>{a.data("created",!0)}});a.dialog("option","width",b||500);a.find(".js-button").toggleClass("b-button--sitebuilder",f("body").is(".edit-mode, .js-edit-mode-style"))}function t(a,b){a=a.find(".icon");a.removeClass((c,e)=>(e.match(/b-icon\S+\b/g)||[]).join(" ")+" no-icon b-icon");switch(b){case "warning":case "error":a.addClass("b-icon b-icon__warning-l--red h-margin-right-xl"); 679a.show();break;default:a.addClass("no-icon").hide()}}function u(a,b,c=e=>e){b&&a.find(".message").html(c(b))}function v(a){var b=f("#prompt-dialog");b.data("created")||b.dialog({autoOpen:!1,modal:!0,resizable:!1,closeOnEscape:!1,showCloseButton:!1,width:500,dialogClass:"dialog-container prompt-dialog-container dialog-box",create:function(){b.data("created",!0)}});a=a||{};b.dialog("option","title",a.title);var c=b.find(".dialog-content"),e=c.find(".message");a.message&&e.html(a.message);e=a.initialValue|| 680"";if(a.multiline){var d=b.find("textarea.input-box").val(e).removeClass("h-hide");d.prev().addClass("h-hide");c.removeClass("table");c.find("> .td").removeClass("td")}else d=b.find("input.input-box").val(e).removeClass("h-hide"),d.next().addClass("h-hide"),Number(a.maxlength)?d.attr("maxlength",Number(a.maxlength)):d.removeAttr("maxlength"),c.addClass("table"),c.find("> div").addClass("td");a.buttonLabel=a.buttonLabel||{};a.buttonLabel.okLabel=a.buttonLabel.okLabel||h.get("ok");a.buttonLabel.cancelLabel= 681a.buttonLabel.cancelLabel||h.get("cancel");f("#btnPromptDialogOK").html(a.buttonLabel.okLabel);f("#btnPromptDialogCancel").html(a.buttonLabel.cancelLabel);var g;b.find(".js-button").toggleClass("b-button--sitebuilder",f("body").is(".edit-mode, .js-edit-mode-style"));b.off("dialogopen").on("dialogopen",function(){f("#btnPromptDialogOK").off("click").on("click",function(){g=this;var n=f.trim(d.val());if(a.validation&&"object"==typeof a.validation){var k=a.validation;if(!k.override&&k.callback){var l= 682k.callback;Array.isArray(l)||(l=[l]);for(i=0;i<l.length;i++)if("function"==typeof l[i]){var m=l[i].apply(b,[d,a]);if(!0!==m)return m&&k.showError&&b.find(".js-prompt-error").html(h.get(m)).removeClass("h-hide"),d.trigger("select").trigger("focus"),!1}}if("function"==typeof k.custom&&!k.custom.apply(this,[d]))return!1}if("function"==typeof a.onClickOK){var z=a.onClickOK.apply(this,[n]);if("undefined"!=typeof a.onClickOKWithAjax&&a.onClickOKWithAjax)return!1}if(!1===z)return!1;if("function"==typeof a.onBeforeClose){var A= 683a.onBeforeClose.apply(this);if("undefined"!=typeof a.onBeforeCloseWithAjax&&a.onBeforeCloseWithAjax)return!1}if(!1===A)return!1;b.dialog("close")}).trigger("focus");f("#btnPromptDialogCancel").off("click").on("click",function(){g=this;"function"==typeof a.onClickCancel&&a.onClickCancel.apply(this);"function"==typeof a.onBeforeClose&&a.onBeforeClose.apply(this);b.dialog("close")})});b.off("dialogclose").on("dialogclose",function(){b.find(".js-prompt-error").addClass("h-hide");"function"==typeof a.onAfterClose&& 684(a.onAfterClose.apply(g),d.val(""))});b.dialog("open");d.trigger("focus");return b}function w(a){a=a||{};let b=f("#confirm-dialog");r(b,a.width,"");b.dialog("option","dialogClass","dialog-container confirm-dialog-container dialog-box "+(a.dialogClass||""));var c=a.title;b.dialog("option","title",c);b.closest(".ui-dialog").find(".ui-dialog-title").html(c);c=b.find(".dialog-content");t(c,a.iconType);u(c,a.message,g=>g.replace("\n","<br />"));c=a.buttonLabel||{};let e=f("#btnConfirmDialogYes").html(c.yesLabel|| 685h.get("yes"));$noButton=f("#btnConfirmDialogNo").html(c.noLabel||h.get("no"));e.addClass("b-button--primary").removeClass("b-button--secondary");$noButton.addClass("b-button--secondary").removeClass("b-button--primary");let d;processcallback=g=>p(g).apply(d,[b]);b.offon("dialogopen",function(){e.offon("click",function(){d=this;if(!1===processcallback(a.onClickYes)||a.onClickYesWithAjax||!1===processcallback(a.onBeforeClose))return!1;b.dialog("close")}).trigger("focus");$noButton.offon("click",function(){d= 686this;processcallback(a.onClickNo);processcallback(a.onBeforeClose);b.dialog("close")})});b.offon("dialogclose",()=>{processcallback(a.onAfterClose)});b.dialog("open");return b}function x(a){a=a||{};var b=f("#alert-dialog");r(b,a.width,"alert-dialog-container");b.dialog("option","title",a.title);var c=b.find(".dialog-content"),e=f("#btnAlertDialogOK"),d="",g="";t(c,a.iconType);u(c,a.message);
686a.maxHeight&&(d=a.maxHeight,g="auto");c.css({"max-height":d,overflow:g});e.html(a.buttonLabel||h.get("ok")); 687b.offon("dialogopen",function(){e.offon("click",function(){p(a.onBeforeClose).apply(this);b.dialog("close")}).trigger("focus");b.parent(".alert-dialog-container").css("z-index","10100")});b.offon("dialogclose",()=>{p(a.onAfterClose).apply(e)});b.dialog("open");return b}function q(a,b,c,e){var d=e;d instanceof jQuery&&(d=()=>{e.trigger("focus")});x({title:h.get(a),message:h.get(b),iconType:c,onAfterClose:d})}let p=y.ensureFun;f.widget("ui.dialog",f.ui.dialog,{_allowInteraction:function(a){if(this._super(a)|| 688a.target.ownerDocument!=this.document[0]||f(a.target).closest(".cke_dialog").length||f(a.target).closest(".cke").length)return!0}});(function(){var a=jQuery.fn.dialog;jQuery.fn.dialog=function(){if("object"==typeof arguments[0]){var b=function(){};"function"==typeof arguments[0].open&&(b=arguments[0].open);arguments[0].open=function(){var e=f(this);setTimeout(function(){vBulletin.Responsive.Debounce.runCallbacks();e.closest(".ui-dialog").find(".ui-dialog-titlebar-close .ui-icon").removeClass("ui-icon ui-icon-closethick").addClass("b-icon b-icon__x-square--gray")}, 6890);e.closest(".ui-dialog").find(".ui-dialog-content").removeClass("h-hide");return b.apply(this,arguments)};var c=function(){};"function"==typeof arguments[0].close&&(c=arguments[0].close);arguments[0].close=function(){f(this).closest(".ui-dialog").find(".ui-dialog-content").addClass("h-hide");return c.apply(this,arguments)}}return a.apply(this,arguments)}})();v.validationString=function(a,b){return(a=f.trim(a.val()))?b.multiline&&a.length>b.maxlength?["message_too_long",b.maxlength]:!0:"please_enter_a_value"}; 690return{openAlertDialog:x,openConfirmDialog:w,openPromptDialog:v,openTemplateConfirmDialog:function(a,b,c){let e=b.title,d=w({title:h.get(e),message:h.get("loading_ellipsis"),width:b.width,dialogClass:"loading "+(b.dialogClass||""),buttonLabel:{yesLabel:h.get(b.yesPhrase||"yes"),noLabel:h.get(b.noPhrase||"no")},onClickYes:b.onClickYes,onClickNo:b.onClickNo}),g=c.data||{};g.isAjaxTemplateRender=!0;g.isAjaxTemplateRenderWithData=!0;let n=c.call||"/ajax/render/"+c.name;return new Promise((k,l)=>{a.ajax({call:n, 691data:g,success:m=>{d.parent(".confirm-dialog-container").removeClass("loading");f(".dialog-content .message",d).html(m.template);d.dialog("option","position",{of:window});k(d)},api_error:c.api_error,title_phrase:e,error_phrase:"error_loading_dialog_form",after_error:()=>{l();d.dialog("close")}})})},popupWindow:function(a,b,c,e){let d=window,g=document;a=d.open(a,b,"status=yes,resizable=yes,scrollbars=yes,width="+c+", height="+e+", top="+((d.innerHeight||g.documentElement.clientHeight||screen.height)/ 6922-e/2+(d.screenTop||screen.top))+", left="+((d.innerWidth||g.documentElement.clientWidth||screen.width)/2-c/2+(d.screenLeft||screen.left)));d.focus&&a.focus();return a},alert:q,warning:(a,b,c)=>q(a,b,"warning",c),error:(a,b,c)=>q(a,b,"error",c)}}; 693; 694 695// ***************************
696// js.compressed/ajax.js 697// *************************** 698vBulletin.precache(["login","cancel"],[]); 699vBulletin.createAjaxTools=(v,m,k,w)=>{function q(a,b){if(Array.isArray(a))a.unshift(b);else{var c=a;a=function(...d){b.apply(this,d);"function"==typeof c&&c.apply(this,d)}}return a}function B(a){return'<textarea style="border:1px solid #999;margin-top:10px;height:120px;width:100%;">'+a+"</textarea>"}function C(a){for(var b=[],c=0;c<a.length;c++){var d=$.isArray(a[c])?a[c][0]:a[c],e=k.get(a[c]);1==$("#debug-information").length&&d!=e&&(e+=" ("+d+")");b.push(e)}return b}function D(a,b){return(c,d,e)=> 700{var g="";"undefined"!=typeof c.status&&(g+=" "+c.status);null!=d&&(g+=" "+d);"undefined"!=typeof e&&(g+=" "+e);console.log(b+" Error callback: "+a.url);E(c,d,e);c=k.get(a.error_phrase)+"<br /><br />"+k.get("error_information_x",g);w.openAlertDialog({title:k.get(a.title_phrase),message:c,iconType:"error",onAfterClose:a.after_error})}}function F(a,b,c,d,e,g){(c=a.errors)||(c=[a.error]);if(!b.api_error||b.api_error.apply(d,[c,a,b])){var f=h=>{g.data=g.data.replace(/securitytoken=[^&]*(&|$)/,"securitytoken="+ 701h.newtoken+"$1");$.ajax(g)};if(0!=m){if(x(c,["inlinemodauth_required"])){y("inlinemod_auth",f,m,"cplogin");return}if(0==a.userid&&x(c,[/^humanverify_/,"no_create_permissions","session_timed_out_login","not_logged_no_permission","no_permission","no_delete_permissions","no_featured_permissions"])){a=()=>{y("login",f,m,b.cpaction?"cplogin":"")};L(f,a,m)||a();return}}z(c,a,b)}}function x(a,b){if(!$.isArray(a))return!1;var c=b;$.isArray(c)||(c=[b]);for(b=0;b<a.length;b++){var d=a[b];$.isArray(d)&&(d=d[0]); 702for(var e=0;e<c.length;e++){var g=c[e];if("regexp"==$.type(g)){if(g.test(d))return!0}else if(g==d)return!0}}return!1}function z(a,b,c){var d={title_phrase:"error",after_error:null};$.extend(!0,d,c);a:{for(c=0;c<a.length;c++){var e=a[c];if($.isArray(e)&&"exception_trace"==e[0]){a.splice(c,1);c=e[1];break a}}c=""}a=C(a);1==$("#debug-information").length&&(c&&a.push(B(c)),a.push(B(JSON.stringify(b))));a="<ul>\n<li>"+a.join("</li>\n<li>")+"</li>\n</ul>";w.openAlertDialog({title:k.get(d.title_phrase), 703message:a,iconType:"error",onAfterClose:d.after_error})}function E(a,b,c){console.dir({textStatus:b,jqXHRStatus:a.status,jqXHRResponseText:a.responseText,errorThrown:c});console.trace()}function n(a){var b={type:"POST",dataType:"json",title_phrase:"error",error_phrase:"error",api_error:!1,after_error:null,silent:!1};a.data instanceof FormData&&(b.processData=!1,b.contentType=!1);$.extend(!0,b,a);b.url||(b.url=v+b.call,b.call="");b.silent&&(b.error=$.noop,b.api_error=$.noop);b.error||(b.error=D(b, 704"ajax"));var c=this;b.success=function(d,e,g){d||b.allowEmptyResponse||(d={errors:[["invalid_server_response_please_try_again"]]});d&&(d.errors||d.error)?F(d,b,a,c,n,this):a.success&&a.success.apply(this,arguments)};return $.ajax(b)}function G(a){var b={dataType:"json",title_phrase:"error",error_phrase:"error",api_error:!1,after_error:null,iframe:!1,silent:!1};$.extend(b,a);b.silent&&(b.error=$.noop,b.api_error=$.noop);b.error||(b.error=D(b,"ajaxForm"));b.beforeSubmit=function(d,e,g){if(a.beforeSubmit&& 705!1===a.beforeSubmit.apply(this,arguments))return!1;var f=$("button, .b-button",e);f.prop("disabled",!0);$(document).one("ajaxComplete",()=>{f.prop("disabled",!1)});return!0};var c=this;b.success=function(d,e,g,f){d||b.allowEmptyResponse||(d={errors:[["invalid_server_response_please_try_again"]]});d&&(d.errors||d.error)?F(d,b,a,c,G,this):a.success&&a.success.apply(this,arguments)};this.ajaxForm(b)}function L(a,b,c){return"undefined"!=typeof vBfb&&vBfb.isFbLogin()?(vBfb.makeAuthEvent(d=>{n({call:"/auth/login-external", 706data:{provider:"facebook",auth:d.accessToken,userid:c},success:e=>{vBulletin.doReplaceSecurityToken(e.newtoken);return a(e)},api_error:b})})(),!0):!1}function y(a,b,c,d){let e,g;w.openTemplateConfirmDialog(H,{title:a,width:400,yesPhrase:"login",noPhrase:"cancel",onClickYes:f=>{g.text("").addClass("h-hide");n({call:"/auth/ajax-login",data:e.serializeArray(),success:h=>{f.trigger("vb-login",h)},api_error:h=>{g.html(k.get(h[0])).removeClass("h-hide");g.find("a").attr("target","_blank")},title_phrase:a}); 707return!1}},{call:"/auth/login-dialog",data:{logintype:d,userid:c},api_error:z}).then(f=>{e=f.find(".js-login-form");
707g=$(".js-error-box",e);var h=$('[type="text"], [type="password"]',f);h.on("keydown",l=>{13==l.which&&(l.preventDefault(),$("#btnConfirmDialogYes",f).trigger("click"))});h.filter(":visible").first().trigger("focus");f.on("vb-login",(l,p)=>{l.stopPropagation();vBulletin.doReplaceSecurityToken(p.newtoken);f.dialog("close");return b(p)})})}$.ajaxSetup({contentType:"application/x-www-form-urlencoded; charset=UTF-8"}); 708let A,I=!1,J=!0,r,t,u=[];$(()=>{A=$("#debug-information");(I=0<A.length)?(r=A.find("#debug-ajax-request-count"),t=$("<ol />").attr("id","debug-ajax-request-list").hide().css({height:"150px",overflow:"auto",padding:"4px",border:"1px solid #CCC",background:"#EEE","margin-top":"2px","margin-bottom":"4px"}).appendTo(r.closest("li")),r.css("cursor","pointer").on("click",()=>{t.toggle()})):(J=!1,u=[])});$.ajaxPrefilter((a,b,c)=>{if(J){var d={url:a.url,startTimeStamp:Date.now(),endTimeStamp:0,finalTimeStamp:0, 709status:"UNKNOWN",errorThrown:""};u.push(d);a.success=q(a.success,(e,g,f)=>{d.endTimeStamp=Date.now()});a.error=q(a.error,(e,g,f)=>{d.endTimeStamp=Date.now();d.errorThrown=f});a.complete=q(a.complete,(e,g)=>{d.finalTimeStamp=Date.now();d.status=g;if(I)for(e=u.length,r.text(e),g=0;g<e;g++){var f=u[g];let h="js-request-counter-"+g;if(0==t.find("."+h).length){let l=0==f.url.indexOf(v)?f.url.substring(v.length):f.url,p=f.endTimeStamp-f.startTimeStamp,K=f.finalTimeStamp-f.startTimeStamp;f='{0} <span style="font-size:x-small;">({1}, <span title="Request Time: {2}ms, Processing Time: {3}ms, Total Time: {4}ms" style="text-decoration:underline;">{2}ms, {3}ms</span>){5}</span>'.format(l, 710f.status,p,K-p,K,f.errorThrown?" Error: "+f.errorThrown:"");$("<li />").addClass(h).html(f).appendTo(t)}}})}});var H={hasError:x,ajax:n,ajaxSilent:function(a){vBulletin.loadingIndicator.suppressNextAjaxIndicator();return n(a)},ajaxForm:G,logApiError:function(a){console.dir(C(a))},logAjaxError:E,showApiError:z,runBeforeCallback:q,library:{inlineMod(a){y("inlinemod_auth",a,m,"cplogin")}}};return H}; 711; 712 713// ***************************
714// js.compressed/global.js 715// *************************** 716(function(a){function C(){vBulletin.AJAX({call:"/ajax/activate-sitebuilder",data:{pageid:pageData.pageid,nodeid:pageData.nodeid,userid:pageData.userid,loadMenu:!1,isAjaxTemplateRender:!0,isAjaxTemplateRenderWithData:!0},cache:!1,success:b=>{b.templates&&(a("#sitebuilder-wrapper").prepend(b.templates.main),a(".js-top-menu-sitebuilder").show(),a(".edit-switch-container .switch-control").addClass("on"),D.setCookie("sitebuilder_active","1"))}})}function z(b,d){var f=0,h=b.length;b.each(function(){if(this.complete&& 7170<this.naturalHeight&&this.src)++f;else a(this).one("load",function(){++f;f==h&&d()})});f==h&&d()}function E(b,d,f,h,n){function g(k){k=k.position().top+k.outerHeight();k=Math.round(k);return[k-1,k,k+1]}function c(k,r){var p,q;for(p in k)for(q in r)if(k[p]===r[q])return!0;return!1}a(b).each(function(){var k=a(this);k.trigger("vbulletin:flexgridstart",{isResize:n});var r=a(d,k),p=r.last(),q=!1,v={},m=0,e=!1,l=!1,t=r.first();r.length&&(r.removeClass(f+" vb-temp-placeholder-grid-lastrow"),r.removeClass(h), 718setTimeout(function(){q=g(p);r.each(function(){var w=a(this),x=g(w);c(q,x)?w.addClass("vb-temp-placeholder-grid-lastrow"):(e||=x,c(e,x)||(++m,t.addClass(h)),e=x,t=w,"undefined"==typeof v[m]&&(v[m]=0),++v[m])});t!=r.first()&&t.addClass(h);a.each(v,function(w,x){!1===l&&(l=x);x<l&&(l=x)});var u=r.filter(".vb-temp-placeholder-grid-lastrow");u.removeClass("vb-temp-placeholder-grid-lastrow");(!1===l||u.length<l)&&u.addClass(f);!1!==l&&u.length==l&&u.last().addClass(h);k.trigger("vbulletin:flexgridready", 719{isResize:n})},0))})}function G(b,d,f,h,n,g,c){a(b).each(function(){var k=a(this),r=a(f,k);g?E(k,d,h,n,c):z(r,function(){E(k,d,h,n,c)})})}function M(b,d){function f(c,k,r){var p={},q=[];var v=c.data.length-32;var m=c.data;for(c=0;c<v;c+=32){var e=Math.round(m[c]/k);var l=Math.round(m[c+1]/k);var t=Math.round(m[c+2]/k);var u=Math.round(m[c+3]/k);e=e+100*l+1E4*t+1E6*u;p[e]?++p[e]:p[e]=1}for(c in p)q.push([c,p[c]]);q.sort(function(w,x){return w[1]>x[1]?-1:x[1]>w[1]?1:0});q.length>r&&(q=q.slice(0,r)); 720return q}function h(c){var k=Math.floor(c/1E6);var r=Math.floor(c/1E4)-100*k;var p=Math.floor(c/100)-1E4*k-100*r;return[c-1E6*k-1E4*r-100*p,p,r,k]}function n(c,k){c=h(c[0]);var r=h(k[0]);k=Math.min(c[0],c[1],c[2]);var p=Math.max(c[0],c[1],c[2]);c=Math.min(r[0],r[1],r[2]);r=Math.max(r[0],r[1],r[2]);k=p-k;c=r-c;return k>c?-1:c>k?1:0}function g(c,k){var r=0,p=0;c=h(c[0]);k=h(k[0]);c[0]!=c[1]&&++r;c[0]!=c[2]&&++r;c[1]!=c[2]&&++r;k[0]!=k[1]&&++p;k[0]!=k[2]&&++p;k[1]!=k[2]&&++p;return r>p?-1:p>r?1:0}a(b).each(function(c){var k= 721a(this),r=a(d,k);r.length&&setTimeout(function(){z(r,function(){var p=a(d,k),q=k.innerWidth(),v=k.innerHeight(),m=p.outerWidth(),e=p.outerHeight();if(p.length&&!(m>=q&&e>=v)){p=p.get(0);q=document.createElement("canvas");v=q.getContext&&q.getContext("2d");m=p.naturalWidth||m;e=p.naturalHeight||e;var l=!1;q.width=m;q.height=e;v.drawImage(p,0,0);try{l=v.getImageData(0,0,m,e)}catch(t){}l&&l.data&&l.data.length&&(e=f(l,20,100),e.sort(n),e.sort(g),e=e.shift(),e=h(e[0]),e[0]*=20,e[1]*=20,e[2]*=20,e[3]*= 72220,245<=e[3]&&(e[3]=255),k.css("backgroundColor","rgba("+e.join(",")+")"))}})},0)})}function N(){function b(){var d=a(this);if(""==d.prop("title")){var f=d.get(0);f.scrollWidth>f.clientWidth&&(f=d.text().trim(),300<f.length&&(f=f.substr(0,297)+"..."),d.prop("title",f))}d.addClass("js-ellipsis-has-title")}a(document).off("mouseover",".ellipsis:not(.js-ellipsis-has-title)",b).on("mouseover",".ellipsis:not(.js-ellipsis-has-title)",b)}a.fn.offon=function(b,d,f,h){null==h&&(h=f,null==f?(h=d,d=void 0): 723"string"!==typeof d&&(f=d,d=void 0));return this.off(b,d).on(b,d,f,h)};String.prototype.format=function(){for(var b=this,d=arguments.length;d--;)b=b.replace(new RegExp("\\{"+d+"\\}","gm"),arguments[d]);return b};jQuery.fn.reverse=[].reverse;a(".js-module__hide-if-empty:not(:has(*))").each(function(){var b=a(this);/\s/.test(b.html())&&b.closest(".js-module").hide()});jQuery.ajaxPrefilter(function(b){b.crossDomain&&(b.contents.script=!1)});a.ajaxPrefilter("script",function(b){b.cache=!0});vBulletin.normalizeAjaxUrl= 724function(b){return 0==b.indexOf("http://")?b.substring(5):0==b.indexOf("https://")?b.substring(6):b};vBulletin.getAjaxBaseurl=function(){return vBulletin.normalizeAjaxUrl(pageData.baseurl)};vBulletin.getAbsoluteUrl=function(){var b;return function(d){b||=document.createElement("a");b.href=d;return b.href}}();vBulletin.regexEscape=function(b){return b.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")};vBulletin.isInternalUrl=function(){var b=vBulletin.normalizeAjaxUrl(pageData.baseurl),d=new RegExp("^"+vBulletin.regexEscape(b)); 725return function(f){f=vBulletin.normalizeAjaxUrl(vBulletin.getAbsoluteUrl(f));return d.test(f)}}();vBulletin.isInternalJSUrl=function(){var b=vBulletin.normalizeAjaxUrl(pageData.baseurl),d=new RegExp("^"+vBulletin.regexEscape(b+"/js/")+".*.js");return function(f){f=vBulletin.normalizeAjaxUrl(vBulletin.getAbsoluteUrl(f));return d.test(f)}}();vBulletin.isAbsoluteUrl=function(){var b=RegExp("^(?:[a-z]+:)?//","i");return function(d){return b.test(d)}}();vBulletin.isEmptyList=function(b){return a.isArray(b)&& 7260==b.length||a.isPlainObject(b)&&a.isEmptyObject(b)};a.ajaxPrefilter(function(b,d,f){if(!b.url||vBulletin.isInternalUrl(b.url)&&!vBulletin.isInternalJSUrl(b.url))if("undefined"==typeof b.data)b.data="securitytoken="+pageData.securitytoken,"undefined"!==typeof b.formData&&Array.isArray(b.formData)&&b.formData.push({name:"securitytoken",value:pageData.securitytoken});else if("undefined"!==typeof FormData&&b.data instanceof FormData)b.data.append("securitytoken",pageData.securitytoken);else{var h=!0; 727d=b.data.split("&");a.each(d,function(n,g){if(g.match(/^securitytoken=/))return h=!1});h&&(b.data+="&securitytoken="+pageData.securitytoken)}});a.ajaxPrefilter(function(b,d,f){(function(){var h=vBulletin.getAjaxBaseurl();if(0==d.url.indexOf(h)&&0==d.url.substr(h.length).indexOf("/ajax/render/")||d&&d.data&&d.data.isAjaxTemplateRender){var n=b.success;b.success=function(){console.log("Intercept AJAX template render calls: Start (URL: {0})".format(b.url));var g=arguments[0];if(!g||"object"!=typeof g|| 728a.isEmptyObject(g))return"function"==typeof n?n.apply(this,arguments):!1;d.data&&d.data.isAjaxTemplateRenderWithData?arguments[0]=g:(arguments[0]=g.template,arguments[1]=g.errors);var c=g.css_links;
728if(c&&0!=c.length){console.log("Intercept AJAX template render calls: Has CSS");var k=/sheet=([^&]+)&/;g=c.pop();var r=null!=g.match(k);c.push(g);var p=function(u){var w=u.match(k),x={};w&&w[1]?a.each(w[1].split(","),function(A,F){x[F]=u}):x[u.replace(/^.*\//g,"")]=u;return x},q={};a("head link[rel=stylesheet]").each(function(){a.extend(q, 729p(a(this).attr("href")))});var v={};a.each(c,function(u,w){a.extend(v,p(w))});var m=[];a.each(v,function(u,w){u&&"undefined"==typeof q[u]&&(r?m.push(u):m.push(w))});if(0==m.length){if(console.log("Intercept AJAX template render calls: Needed CSS is already on the page"),"function"==typeof n)return console.log("Intercept AJAX template render calls: Calling original success handler"),n.apply(this,arguments)}else{c=[];r?(console.log("Intercept AJAX template render calls: found DB CSS"),c.push(g.replace(/sheet=[^&]+&/, 730"sheet="+m.join(",")+"&"))):(console.log("Intercept AJAX template render calls: found FS CSS"),c=m);var e=this,l=arguments;console.log("Intercept AJAX template render calls: Fetching CSS: {0}".format(c.join(", ")));var t=function(u){if(0==u.length)console.log("Intercept AJAX template render calls: Done. Calling original callback."),setTimeout(function(){if("function"==typeof n)return n.apply(e,l)},50);else{var w=a("<div />").append(u.shift()).text();console.log("Intercept AJAX template render calls: Fetching CSS file: {0}".format(w)); 731a.get(w,{cache:!0},function(x){x=a("<link />",{rel:"stylesheet",type:"text/css",href:w});var A=a(".js-additional-css");1==A.length?A.before(x):a("head").append(x)}).then(function(){console.log("Intercept AJAX template render calls: Fetched CSS file: {0}".format(w));if(0<a(".js-debug-css-template-list").length){var x=p(w),A=a("<ol />");a.each(x,function(F,O){r?A.append(a("<li />").append(F)):A.append(a("<li />").append(O))});x=a(".js-debug-css-template-list").append(a("<li />").append(vBulletin.phrase.get("added_via_ajax_call")+ 732":").append(A)).prev("b");x.text(parseInt(x.text(),10)+1)}t(u)},function(){console.warn("Intercept AJAX template render calls: Failed to fetch CSS file: {0}".format(w));t(u)})}};t(c)}}else if(console.log("Intercept AJAX template render calls: No CSS"),"function"==typeof n)return console.log("Intercept AJAX template render calls: Calling original success handler"),n.apply(this,arguments)}}})()});vBulletin.isRtl=function(){return"rtl"==a("html").attr("dir")};"object"==typeof a.cookie.defaults&&(a.cookie.defaults.secure= 733"https"==pageData.baseurl.substr(0,5).toLowerCase()||"https:"==location.protocol);var D=vBulletin.createStorageTools(pageData.cookie_prefix,pageData.cookie_path,pageData.cookie_domain);vBulletin.storagetools=D;jQuery.fn.swipeable=function(b){function d(q){var v={x:0,y:0};try{v={x:q.pageX||q.originalEvent.touches[0].pageX||0,y:q.pageY||q.originalEvent.touches[0].pageY||0}}catch(m){}return v}function f(q,v){return{x:q.x-v.x,y:q.y-v.y}}function h(q){k=!0;r=!1;p.start=d(q);p.previous=d(q);p.current=d(q); 734p.moved={x:0,y:0};p.totalMoved={x:0,y:0};p.target=q.target;"touchstart"!=q.type&&q.preventDefault()}function n(q){if(k){p.current=d(q);p.moved=f(p.current,p.previous);p.totalMoved=f(p.current,p.start);if(p.moved.x||p.moved.y)r=!0;b.swiping.call(this,q,p);p.previous=p.current}}function g(q){k&&("mouseup"==q.type&&q.target!=p.target?c.call(this,q):"mouseleave"==q.type&&c.call(this,q));k=!1;q.preventDefault()}function c(q){if(p.totalMoved){var v=Math.abs(p.totalMoved.x);var m=Math.abs(p.totalMoved.y), 735e=Math.max(v,m);v=40>e||e<=2*Math.min(v,m)?!1:v>m?0>p.totalMoved.x?"left":"right":0>p.totalMoved.y?"up":"down"}else v=!1;v&&b["swipe"+v].call(this,q,p);b.swipeend.call(this,q,p);k=!1;p={start:null,previous:null,current:null,moved:null,totalMoved:null,target:null};if(r)return r=!1}b=b||{};"object"==typeof b&&(b.swiping=b.swiping||function(){},b.swipeend=b.swipeend||function(){},b.swipeleft=b.swipeleft||function(){},b.swiperight=b.swiperight||function(){},b.swipeup=b.swipeup||function(){},b.swipedown= 736b.swipedown||function(){});var k=!1,r=!1,p={start:null,previous:null,current:null,moved:null,totalMoved:null,target:null};return this.each(function(){var q=a(this);if("disable"==b)q.off(".vbswipeable","body");else q.on("mousedown.vbswipeable touchstart.vbswipeable","body",h).on("mousemove.vbswipeable touchmove.vbswipeable","body",n).on("mouseup.vbswipeable mouseleave.vbswipeable touchcancel.vbswipeable","body",g).on("click.vbswipeable touchend.vbswipeable","body",c)})};(function(){var b=jQuery.fn.selectBox; 737jQuery.fn.selectBox=function(){var d=a(this);"undefined"==typeof d.attr("tabindex")&&d.attr("tabindex","0");d=b.apply(this,arguments);a(".selectBox-arrow").addClass("b-icon b-icon__arrow-down-s");return d}})();(function(){(function(){var b=a(".js-login-menu");b.find(".js-comp-menu-dropdown__trigger").on("click",function(){setTimeout(function(){b.find(".js-login-username").trigger("focus")},0)});(function(){function d(g,c){a(g).toggleClass("h-hide-imp",!c)}var f=a(".js-top-menu-user--list"),h=[".js-header__notifications-label", 738".js-pmchat__messages-label",".js-menu__username-label"],n=h.slice(0).reverse();f.on("vbulletin:shrink",function(){a.each(h,function(g,c){d(c,!1);if("need_shrink"!=vBulletin.Responsive.Debounce.checkElementShrinkRequirement
738(f))return!1})}).on("vbulletin:unshrink",function(){a.each(n,function(g,c){d(c,!0);if("need_shrink"==vBulletin.Responsive.Debounce.checkElementShrinkRequirement(f))return d(c,!1),!1})})})();(function(){var d=a(".js-top-menu-sitebuilder--list"),f=d.find(".b-top-menu__item"),h=f.find(".js-top-menu-link"), 739n=d.closest(".js-top-menu-sitebuilder"),g=[function(c){h.toggleClass("b-top-menu__item-link--compact",c)},function(c){n.toggleClass("b-top-menu__background--compact",c)},function(c){vBulletin.CompMenuHorizontal.convertDropdownProgressive({$parent:d,$children:f,removeMenu:!c})}];d.on("vbulletin:shrink",function(){a.each(g,function(c,k){k(!0);if("need_shrink"!=vBulletin.Responsive.Debounce.checkElementShrinkRequirement(d))return!1})}).on("vbulletin:unshrink",function(){for(var c=g.length;0<=--c;)if(g[c](!1), 740"need_shrink"==vBulletin.Responsive.Debounce.checkElementShrinkRequirement(d)){g[c](!0);break}})})()})();a(".ui-tabs .ui-tabs-nav > li").addClass("ui-state-disabled");a(".announcement-tabs .ui-tabs-nav > li").removeClass("ui-state-disabled")})();vBulletin.pageHasSelectors=function(b){if(a.isArray(b)&&0<b.length&&""!=a.trim(b.toString())){var d=!1;a.each(b,function(f,h){if(0<a(h).length)return d=!0,!1});return d}return!0};vBulletin.areJsonObjectsEqual=function(b,d){var f=function(h,n){for(var g in h)if(h.hasOwnProperty(g)&& 741n.hasOwnProperty(g)){var c=h[g],k=n[g];if(c!=k)if(c instanceof Array&&k instanceof Array){if(0<a(c).not(k).length||0<a(k).not(c).length)return!1}else return!1}else return!1;return!0};return Object.keys(b).length==Object.keys(d).length?f(b,d):!1};vBulletin.loadingIndicator=function(){function b(c){if(c){c=a(".js-loading-indicator");var k=c.outerWidth(),r=vBulletin.isRtl()?"margin-right":"margin-left";0<k&&c.css(r,-(k/2));c.removeClass("h-hide");a("body").css("cursor","wait")}else a(".js-loading-indicator").addClass("h-hide"), 742a("body").css("cursor","auto")}var d=0,f=!1,h=!1,n=0,g=0;return{init:function(){f||(a(document).ajaxStart(function(){vBulletin.loadingIndicator.show("ajaxStart")}),a(document).ajaxStop(function(){vBulletin.loadingIndicator.hide("ajaxStop")}),f=!0)},show:function(c){0<n&&"ajaxStart"==c?(--n,++g,console.log("vBulletin.loadingIndicator.show ajax indicator suppressed")):(++d,console.log("vBulletin.loadingIndicator.show Counter: "+d+" Source: "+(c||"Unspecified")),0<d&&(h=setTimeout(function(){h&&(b(!0), 743h=!1)},1E3)))},hide:function(c){0<g&&"ajaxStop"==c?(--g,console.log("vBulletin.loadingIndicator.hide ajax indicator suppressed")):(--d,d=0>d?0:d,c||(d=0),console.log("vBulletin.loadingIndicator.hide Counter: "+d+" Source: "+(c||"Unspecified")),1>d&&(h&&(clearTimeout(h),h=!1),b(!1)))},suppressNextAjaxIndicator:function(){++n}}}();vBulletin.precache("admin admin_auth april attach_link attach_video august cancel_edit close conversation december done email_addresses_must_match error error_loading_ckeditor_script error_loading_editor error_posting_comment_code error_x existing_reply_will_be_deleted february follow follow_error following following_pending following_remove friday_min go_to_first_new_post hour inlinemod_auth_password_empty invalid_data invalid_data_requested invalid_email_address invalid_request invalid_server_response_please_try_again invalid_special_channel_subscribe_request invalid_username_specified invalid_username_specified_maxlength_x invalid_username_specified_minlength_x invalid_query_definition_x january join joined join_error july june leave loading logged_out_while_editing_post login login_success_admin_auth march may minute moderator monday_min new_posts no no_create_permissions no_icon no_leave_channel_permission no_permission no_update_permissions no_valid_tags_found not_logged_no_permission november now october physically_remove_blog physically_remove_comment physically_remove_media physically_remove_reply physically_remove_topic physically_remove_visitorMessage please_enter_a_valid_url_and_click_attach please_enter_link_url please_enter_video_url please_enter_your_comment please_enter_your_email_address please_provide_search_string post_comment post_history posttype_blog posttype_comment posttype_media posttype_reply posttype_topic posttype_visitorMessage preview refer_a_friend saturday_min search see_less see_more select_option_and_click_delete_button_blog select_option_and_click_delete_button_comment select_option_and_click_delete_button_media select_option_and_click_delete_button_reply select_option_and_click_delete_button_topic select_option_and_click_delete_button_visitorMessage send_report september soft_delete_blog soft_delete_comment soft_delete_media soft_delete_notes_blog soft_delete_notes_comment soft_delete_notes_media s
743oft_delete_notes_reply soft_delete_notes_topic soft_delete_notes_visitorMessage soft_delete_reply soft_delete_topic soft_delete_visitorMessage sunday_min thanks_for_signing_up_log_in time tuesday_min thursday_min unable_to_check_admin_permissions unable_to_contact_server_please_try_again unexpected_error unfollow_error unvote_cap usernametaken vote_a_post vote_cap wednesday_min".split(" "), 744["bbtitle","crontab","bbtitle","markinglimit","threadpreview"]);var y=vBulletin,H=y.getAjaxBaseurl(),B=y.createSiteDataTools(H);B.phrase.init(pageData,pageData.languageid,D.createStorageTimed("phrase",pageData.phrasedate,pageData.current_server_datetime),y.phrase.precache);a.extend(y.phrase,B.phrase);B.options.init(D.createStorageTimed("options",pageData.optionsdate,pageData.current_server_datetime),y.options.precache);a.extend(y.options,B.options);B=y.createDialogTools(a,y,y.phrase);y.dialogtools= 745B;y.error=B.error;y.warning=B.warning;y.alert=B.alert;y.openConfirmDialog=B.openConfirmDialog;y.openPromptDialog=B.openPromptDialog;window.openAlertDialog=B.openAlertDialog;window.openConfirmDialog=B.openConfirmDialog;window.openPromptDialog=vBulletin.openPromptDialog;H=y.createAjaxTools(H,pageData.userid,y.phrase,y.dialogtools);y.ajaxtools=H;y.ajaxlib=H.library;y.AJAX=H.ajax;y.ajaxForm=H.ajaxForm;vBulletin.getScrollbarWidth=function(){if(a("body").data("scrollbar-width"))return a("body").data("scrollbar-width"); 746var b=a('<div style="width:50px;height:50px;overflow:auto;position:absolute;top:-99999px;"><div /></div>').appendTo("body"),d=b.children();d=d.innerWidth()-d.height(99).innerWidth();b.remove();a("body").data("scrollbar-width",d);return d};vBulletin.assertUserHasAdminPermission=function(b,d,f,h){if(a(d).data("in-progress"))return!1;a("body").css("cursor","wait");a(d).data("in-progress",!0);vBulletin.AJAX({call:"/ajax/api/user/currentUserHasAdminPermission",data:{adminPermission:b},complete:function(){a("body").css("cursor", 747"auto");a(d).data("in-progress",null)},success:function(n){!0===n?f():(vBulletin.error("error","unable_to_check_admin_permissions"),a("#config-dialog .loader").hide())},api_error:"undefined"==typeof h?void 0:function(n){return vBulletin.ajaxtools.hasError(n,"inlinemodauth_required")?(vBulletin.ajaxlib.inlineMod(h),!1):!0},error_phrase:"unable_to_check_admin_permissions"})};vBulletin.selectTabByIndex=function(b){var d=this instanceof a?this:a(this);d.length&&-1<b&&d.hasClass("ui-tabs")&&d.data("noPushState", 748!0).tabs("option","active",b).data("noPushState",null).find(".ui-tabs-nav li").removeClass("ui-state-focus").eq(b).addClass("ui-state-focus").find("a").trigger("focus")};a.ui.tabs.prototype._isLocal=function(){return!0};(function(){var b=a.ui.tabs.prototype._processTabs;a.ui.tabs.prototype._processTabs=function(){var d=b.apply(this,arguments);this.panels.removeClass("h-hide");return d}})();vBulletin.getSelectedTabHashOrPath=function(b,d){return(d?b.find(".ui-tabs-nav > .ui-tabs-active > a").prop("hash"): 749b.find(".ui-tabs-nav > .ui-tabs-active > a").data("url-path"))||""};vBulletin.parseUrl=function(b){var d=document.createElement("a");d.href=b||"/";b=d.pathname;0!=b.indexOf("/")&&(b="/"+b);return{protocol:d.protocol,hostname:d.hostname,port:d.port,pathname:b,search:d.search,hash:d.hash}};vBulletin.makeTabUrl=function(b,d,f,h,n){b?(b=vBulletin.parseUrl(b),f?(n=n||"tab",f=new RegExp("([?+|&+])"+n+"=\\w+[-\\w]*","i"),b=b.search.match(f)?b.pathname+b.search.replace(f,"$1{0}={1}".format(n,d)):b.search? 750"{0}{1}&{2}={3}".format(b.pathname,b.search,n,d):"{0}?{1}={2}".format(b.pathname,n,d)):(n=b.pathname.replace(/\/$/,""),f=n.split("/"),f="\\/"+f[f.length-(n.match(/\/page([0-9]+)/)?2:1)]+"$",b=b.pathname.replace(new RegExp(f),"/"+d)+b.search)):b="/";h&&(b+="#"+h);return b};vBulletin.makePaginatedUrl=function(b,d){if(b){var f=b.match(/\/page[0-9]+/);f?b=1<d?b.replace(f[0],"/page"+d):b.replace(f[0],""):1<d&&(b=b.match(/\?/)?b.replace(/\?/,"/page"+d+"?"):b.match(/#/)?b.replace(/#.*/,"/page"+d):b+("/page"+ 751d))}return b};vBulletin.makeFilterUrl=function(b,d,f,h,n,g){g=g||!1;b=b||location.href;var c=a(".filtered-by",h);b=vBulletin.parseUrl(b);var k=b.search,r=a(".js-button-filter.js-default-checked.js-checked",h);r.data("filter-name")==d&&r.data("filter-value")==f&&(g=!0);!g&&(c.data("clicked")&&a('.toolbar-filter-overlay input[name="{0}"][value="{1}"]'.format(d,f),h).hasClass("js-default-checked")||a('.toolbar-search-form input[name="{0}"]'.format(d),h).length&&!f)&&(g=!0,c.data("clicked",null));b=b.pathname;
752if(k&&1<k.length)if(k.match(new RegExp(d+"=","i"))){if(h=vBulletin.parseQueryString(k),!a.isEmptyObject(h)){var p="";a.each(h,function(q,v){g&&q==d||(p+="{0}={1}&".format(q,q==d?f:v))});p&&(b+="?"+p.substring(0,p.length-1))}}else b=g?b+k:b+(k+"&{0}={1}".format(d,encodeURIComponent(f)));else g||(b+="?{0}={1}".format(d,encodeURIComponent(f)));n&&(b+="#"+n);return b};vBulletin.getSelectedFilters=function(b,d){var f={};if(d){var h=b.parent().find(".filtered-by .filter-text").filter(":visible");b.find(":input:radio:checked").each(function(n, 753g){n=a(g);if((n.hasClass("js-default-checked")||1==n.data("bypass-filter-display"))&&(0==h.length||0==h.filter('[data-filter-name={0}][data-filter-value="{1}"]').length))return!0;"[]"==g.name.slice(-2)?(n=g.name.split("[]"),f[n[0]]=f[n[0]]||[],f[n[0]].push(g.value)):f[g.name]=g.value})}else b=b.serializeArray(),a.each(b,function(n,g){"securitytoken"!=g.name&&("[]"==g.name.slice(-2)?(n=g.name.split("[]"),f[n[0]]=f[n[0]]||[],f[n[0]].push(g.value)):f[g.name]=g.value)});return f};vBulletin.parseQueryString= 754function(b,d){var f={};if(b&&1<b.length){var h=b.indexOf("?");d=d instanceof Array?d:[];-1!=h&&(b=b.substring(h+1).split("&"),a.each(b,function(n,g){n=g.split("=");if(0==d.length||-1==a.inArray(n[0],d))f[n[0]]=decodeURIComponent(n[1]||"").replace(/\+/g," ")}))}return f};vBulletin.togglePageScrolling=function(b){function d(){f.scrollTop(h).scrollLeft(n)}var f=a(window),h=f.scrollTop(),n=f.scrollLeft();f.off("scroll.vbtogglepagescrolling");if(!b)f.on("scroll.vbtogglepagescrolling",d)};vBulletin.pagination= 755function(b){function d(){return parseInt((a(".pagetotal",this).html()||"").replace(/[^\d]+/g,""),10)||1}function f(m,e){var l=d.apply(this),t=a(".arrow[rel=next]",this),u=a(".arrow[rel=prev]",this);1>m?m=1:m>l&&(m=l);a(".js-pagenum",this).val(m);m==l?t.addClass("h-disabled").removeAttr("href"):t.removeClass("h-disabled").attr("href",vBulletin.makePaginatedUrl(location.href,m+1));1==m?u.addClass("h-disabled").removeAttr("href"):u.removeClass("h-disabled").attr("href",vBulletin.makePaginatedUrl(location.href, 756m-1));"function"==typeof g.onPageChanged&&g.onPageChanged.apply(this,[m,e]);1<l&&r.isEnabled()&&!e&&(e=r.getState(),!e||!e.data||!e.data.from||a.inArray(e.data.from,-1==["filter_blogs","filter_groups"]))&&(v=1==m?a(".arrow[rel=next]",this).attr("href"):a(".arrow[rel=prev]",this).attr("href"))&&(v=vBulletin.makePaginatedUrl(v,m),m={from:"pagination",page:m,tab:g.tabParamAsQueryString?"#"+a(this).closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(a(this).closest(".ui-tabs"),!1)}, 757r.pushState(m,document.title,v))}function h(m){a("a.see-all-btn",this).closest(".pagenav-controls")[m?"addClass":"removeClass"]("h-hide")}
757function n(){a(g.context).off("click",".js-pagenav .js-pagenav-button").on("click",".js-pagenav .js-pagenav-button",function(m){if(r.isEnabled()){m=a(this).data("page");var e=a(".pagenav-form",g.context).get(0);f.apply(e,[m,!1]);return!1}return!0}).off("mouseover",".js-pagenav .js-pagenav-button").on("mouseover",".js-pagenav .js-pagenav-button",function(m){m=a(this); 758m.prop("href")||m.prop("href",vBulletin.makePaginatedUrl(location.href,parseInt(m.data("page"),10)))});a(".js-pagenav .js-pagenav-button",g.context).each(function(){this.href=vBulletin.makePaginatedUrl(location.href,parseInt(a(this).data("page")))});(function(){a(document).on("vbulletin:shrink vbulletin:unshrink",".js-pagenav",function(){var m=a(this),e=m.data("vbshrink-hidden-elements");"undefined"!=typeof e&&e.removeClass("h-hide-imp");e=m.find("> .js-pagenav-button").filter(":visible");var l=a(), 759t=a(),u=e.filter(".js-pagenav-current-button").data("page");e.each(function(w,x){w=a(x);var A=w.data("page");x=w.is(".js-pagenav-prev-button, .js-pagenav-current-button, .js-pagenav-next-button");var F=w.is(".js-pagenav-first-button, .js-pagenav-last-button");A=A==u-1||A==u+1;F=F?"1":A?"2":"3";x||(l=l.add(w),w.data("vbshrink-priority",F))});a.each(["3","2","1"],function(w,x){l.each(function(A,F){A=a(F);if(A.data("vbshrink-priority")!=x)return!0;if("need_shrink"==vBulletin.Responsive.Debounce.checkElementShrinkRequirement(m))A.addClass("h-hide-imp"), 760t=t.add(A);else return!1})});m.data("vbshrink-hidden-elements",t)});vBulletin.Responsive.Debounce.checkShrinkEvent(a(".js-pagenav"))})()}var g={context:document,onPageChanged:null,tabParamAsQueryString:!0,allowHistory:!1};b&&"object"==typeof b&&a.extend(g,b);var c=a(".pagenav-controls .pagenav-form",g.context),k=Number(a(".defaultpage",c).val())||Number(a(".js-pagenum",c).val())||1,r=new vBulletin.history.instance(g.allowHistory);c.data("object-instance",this);if(r.isEnabled()){b=vBulletin.parseQueryString(location.search, 761["_"]);var p=location.pathname.match(/\/page([0-9]+)/),q=r.getState();if(p&&1<Number(p[1])&&a.isEmptyObject(b)&&(!q||a.isEmptyObject(q.data))){var v=vBulletin.makePaginatedUrl(location.href,k);b={from:"pagination",page:k,tab:g.tabParamAsQueryString?"#"+c.closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(c.closest(".ui-tabs"),!1)};r.setDefaultState(b,document.title,v)}r.setStateChange(function(m){m=r.getState();if("pagination"==m.data.from){r.log(m.data,m.title,m.url);if(location.search){var e= 762vBulletin.parseQueryString(location.search,["_"]);if(!a.isEmptyObject(e)||"groups-tab"==e.tab){delete e.tab;a(window).trigger("statechange.filter",["pagination",e]);return}}var l,t;m.data.tab&&(l=g.tabParamAsQueryString?a(m.data.tab):a('.ui-tabs .ui-tabs-panel[data-url-path="'+m.data.tab+'"]'));e=l&&l.length&&l||g.context;(t=a(".conversation-toolbar .filter-wrapper",e).data("object-instance"))&&t.resetFilters(!0);if(m.data.tab&&(l=l.closest(".ui-tabs"),$tabAnchor=g.tabParamAsQueryString?l.find('.ui-tabs-nav > li >
762 a[href*="{0}"]'.format(m.data.tab)): 763l.find('.ui-tabs-nav > li > a[data-url-path="'+m.data.tab+'"]'),!$tabAnchor.parent().hasClass("ui-tabs-active"))){m=$tabAnchor.parent().index();vBulletin.selectTabByIndex.call(l,m);return}l=a(".pagenav-controls .pagenav-form",e);(e=l.data("object-instance"))&&"function"==typeof e.getOption&&"function"==typeof e.getOption("onPageChanged")&&(m=m.data.page||k,e.getOption("onPageChanged").apply(l.get(0),[m,!1,!location.search,location.search]))}},"pagination")}a(".arrow",c).off("click").on("click",function(m){var e= 764a(this);m=this.form||e.closest("form").get(0);if(!e.hasClass("h-disabled")){e=parseInt(a(".js-pagenum",m).val())+("next"==e.attr("rel")?1:-1);if(!r.isEnabled()&&g.allowHistory)return this.href&&this.hash!=this.href||(this.href=vBulletin.makePaginatedUrl(location.href,e)),!0;f.apply(m,[e,!1])}return!1});n();a(".js-pagenum",c).off("keypress").on("keypress",function(m){if(13==m.keyCode){m.preventDefault();m=a(this).val();m=isNaN(m)?1:parseInt(m,10);var e=d.apply(this.form);m>e&&(m=e);1>m&&(m=1);r.isEnabled()? 765f.apply(this.form,[m,!1]):g.allowHistory?location.href=vBulletin.makePaginatedUrl(location.href,m):f.apply(this.form,[m,!1])}});a(".js-pagenum",c).off("click").on("click",function(m){a(this).select()});this.updatePageInfo=function(m,e){if(m&&"object"==typeof m){var l=m.totalpages||1,t=a(".pagenav-controls .pagenav-form",g.context);a(".pagetotal",t).text(l);"undefined"!=typeof m.showseemore&&h.apply(t,[!m.showseemore]);m.perpage=vBulletin.conversation.POSTS_PER_PAGE;e&&0<a(".pagenav-container",g.context).length&& 766a.post(pageData.baseurl+"/ajax/render/pagenav",{pagenav:m},function(u){u&&(a(".pagenav-container",g.context).replaceWith(u.template),n())},"json");t.length&&f.apply(t.get(0),[m.pagenumber,e])}};this.updateResultId=function(m){(m=parseInt(m))&&"number"===typeof m&&a("input[name=result-id]",c).val(m)};this.setOption=function(m,e){g[m]=e};this.getOption=function(m){return g[m]};this.updatePageNavigation=function(m,e,l){f.apply(m.get(0),[e,l])}};vBulletin.conversation=vBulletin.conversation||{};vBulletin.conversation.postComment= 767function(b,d){var f=this;b=a(f);var h=b.closest(".js-comment-entry"),n=h.find(".js-comment-entry__textbox"),g=a.trim(n.val());if(!g)return vBulletin.warning("post_comment","please_enter_your_comment",function(){n.trigger("focus")}),!1;a("body").css("cursor","wait");b.blur();var c=b.closest(".js-comment-entry__parent"),k=1==b.closest(".js-comment-entry--blog").length?1:0,r=1==b.closest(".js-comment-entry--article").length?1:0,p={text:g,parentid:c.attr("data-node-id"),postindex:c.find(".js-post__content .js-show-post-link").text().replace("#", 768""),view:c.parent().hasClass("stream-view")?"stream":"thread",redirecturl:n.hasClass(".reload-on-post")?1:0,isblogcomment:k,isarticlecomment:r};h.find('[name^="humanverify"]').each((q,v)=>{q=a(v);p[q.attr("name")]=q.val()});vBulletin.AJAX({call:"/ajax/post-comment",data:p,complete:function(){console.log("post-comment complete.");a("body").css("cursor","auto");vBulletin.hv.reset()},success:function(q,v,m){"function"==typeof d&&d.apply(f,[q]);k||r||h.slideToggle();vBulletin.subscribe.updateSubscribeButton(q.topic_subscribed); 769q=c.attr("data-node-id");vBulletin.markRead(q)},api_error:vBulletin.hv.resetOnError,title_phrase:"conversation",error_phrase:"error_posting_comment_code"})};vBulletin.conversation.bindEditFormEventHandlers=function(b){b=b?b.toLowerCase():"";if(-1!=a.inArray(b,"text gallery video poll link comment event".split(" "))||"all"==b){var d=function(g,c){if("function"==typeof c){console.log("Edit mode: initializeEditor");var k=g.find(".js-editor");0<k.length?vBulletin.ckeditor.initEditor(k,{success:function(r){if("function"== 770typeof c){c();vBulletin.contentEntryBox.afterPanelChange(g);vBulletin.ckeditor.initEditorComponents(g);var p=this;setTimeout(function(){console.log("Edit mode: Adding post data to CKEditor (vBulletin.conversation.bindEditFormEventHandlers)");p.setData(k.prev(".js-editor-parsed-text").html(),function(){var q=vBulletin.ckeditor.getEditor(r);vBulletin.ckeditor.fixTableFunctionality.call(vBulletin.ckeditor,{},q);setTimeout(function(){vBulletin.ckeditor.modifyImagePaths(a(q.container.$))},0);q.focus()})}, 7710)}},error:function(r){"function"==typeof c&&c();k.prop("disabled",!1).removeClass("ckeditor-load-on-focus").closest(".
771js-content-entry").addClass("b-content-entry--no-ckeditor");r=k.prev(".js-editor-parsed-text").html();""!=r&&vBulletin.AJAX({call:"/ajax/api/editor/convertHtmlToBbcode",data:{nodeid:pageData.nodeid,data:r,allowsmilie:1,securitytoken:pageData.securitytoken},success:function(p){k.html(p.data)},error_phrase:"error_converting_message"})},hideLoadingDialog:!1}):"function"==typeof c&&(c(), 772k.trigger("focus"))}},f=function(g){g=g.find(".js-editor");if(0<g.length){var c=g.attr("id");vBulletin.ckeditor.editorExists(c)&&vBulletin.ckeditor.destroyEditor(c)}g.closest("form").remove()},h={comment:function(){a("body").off("comment_editform_onload").on("comment_editform_onload",function(g,c,k){"function"==typeof k&&(k(),a(".js-editor",c).trigger("focus").filter(".autogrow").css("min-height",function(){return a(this).css("height")}).autogrow())})},text:function(){a("body").off("text_editform_onload").on("text_editform_onload", 773function(g,c,k){d(c,k)}).off("text_editform_onunload").on("text_editform_onunload",function(g,c){f(c)}).off("text_newcontent_onload").on("text_newcontent_onload",function(g,c){0<c.closest(".conversation-list.stream-view.activity-view").length&&vBulletin.truncatePostContent(c)})},event:function(){a("body").off("event_editform_onload").on("event_editform_onload",function(g,c,k){d(c,k)}).off("event_editform_onunload").on("event_editform_onunload",function(g,c){f(c)}).off("event_newcontent_onload").on("event_newcontent_onload", 774function(g,c){0<c.closest(".conversation-list.stream-view.activity-view").length&&vBulletin.truncatePostContent(c)})},poll:function(){var g=function(c){c.find(".js-remove-button").prop("disabled",2>=c.find("li").length)};a("body").off("poll_editform_onload").on("poll_editform_onload",function(c,k,r){d(k,r);g(a(this).find(".b-poll-fieldset__poll-answers"))}).off("poll_editform_onunload").on("poll_editform_onunload",function(c,k){f(k)}).off("poll_newcontent_onload").on("poll_newcontent_onload",function(c, 775k){g(a(this).find(".b-poll-fieldset__poll-answers"));0<k.closest(".conversation-list.stream-view.activity-view").length&&(vBulletin.truncatePostContent(k),vBulletin.conversation.limitVisiblePollOptionsInAPost(a("form.poll",k),3))})},gallery:function(){a("body").off("gallery_editform_onload").on("gallery_editform_onload",function(g,c,k){a('.b-toolbar__item[data-panel="b-content-entry-panel__content--gallery"]',c).trigger("click");d(c,function(){"function"==typeof k&&k();vBulletin.upload.initializePhotoUpload(c)})}).off("gallery_editform_onunload").on("gallery_editform_onunload", 776function(g,c){f(c)}).off("gallery_newcontent_onload").on("gallery_newcontent_onload",function(g,c){0<c.closest(".conversation-list.stream-view.activity-view").length&&vBulletin.truncatePostContent(c)})},video:function(){a("body").off("video_editform_onload").on("video_editform_onload",function(g,c,k){a('.b-toolbar__item[data-panel="b-content-entry-panel__content--video"]',c).trigger("click");d(c,function(){"function"==typeof k&&k();n(a(".b-content-entry-panel__content--video",c),"video")});a(".js-attach-button", 777c).off("click").on("click",function(r){r.preventDefault();var p=a(this),q=p.closest(".b-content-entry-panel__content--video"),v=a(".b-link-input__url",q);r=a.trim(v.val());if(!r)return openAlertDialog({title:vBulletin.phrase.get("attach_video"),message:vBulletin.phrase.get("please_enter_video_url"),iconType:"warning",onAfterClose:function(){v.trigger("focus")}}),!1;p.prop("disabled",!0);a(".js-contententry-buttons .b-button",q).prop("disabled",!0);a("body").css("cursor","wait");a.post(vBulletin.getAjaxBaseurl()+ 778"/link/getlinkdata",{url:r,isAjaxTemplateRender:!0,isAjaxTemplateRenderWithData:!0},function(m){if(m.error)openAlertDialog({title:vBulletin.phrase.get("attach_video"),message:vBulletin.phrase.get(m.error),iconType:"warning",onAfterClose:function(){v.trigger("focus")}});else{var e=a(m.template);m=m.contenttype||"video";c.closest("form").data("content-type",m);q.find(".js-panel-content").append(e);n(q,"video");e.fadeIn("slow",function(){v.val("");a(".b-link-input",q).addClass("h-hide")})}},"json").error(function(m, 779e,l){openAlertDialog({title:vBulletin.phrase.get("attach_video"),message:"HTTP {0} - {1}".format(m.status,l),iconType:"error"})}).complete(function(){a("body").css("cursor","default");p.prop("disabled",!1);a(".js-contententry-buttons .b-button",q).prop("disabled",!1)})})}).off("video_editform_onunload").on("video_editform_onunload",function(g,c){f(c)}).off("video_newcontent_onload").on("video_newcontent_onload",function(g,c){0<c.closest(".conversation-list.stream-view.activity-view").length&&vBulletin.truncatePostContent(c)})}, 780link:function(){a("body").off("link_editform_onload").on("link_editform_onload",function(g,c,
780k){a('.b-toolbar__item[data-panel="b-content-entry-panel__content--link"]',c).trigger("click");d(c,function(){"function"==typeof k&&k();n(a(".b-content-entry-panel__content--link",c),"link")});a(".js-attach-button",c).off("click").on("click",function(r){r.preventDefault();var p=a(this),q=p.closest(".b-content-entry-panel__content--link"),v=a(".b-link-input__url",q);r=a.trim(v.val());if(!r)return openAlertDialog({title:vBulletin.phrase.get("error"), 781message:vBulletin.phrase.get("please_enter_a_valid_url_and_click_attach"),iconType:"warning",onAfterClose:function(){v.trigger("focus")}}),!1;r.match(/^https?:\/\//)||(r="http://"+r,v.val(r));p.prop("disabled",!0);a(".js-contententry-buttons .b-button",q).prop("disabled",!0);a("body").css("cursor","wait");a.post(vBulletin.getAjaxBaseurl()+"/link/getlinkdata",{url:r,isAjaxTemplateRender:!0,isAjaxTemplateRenderWithData:!0},function(m){if(m.error)openAlertDialog({title:vBulletin.phrase.get("attach_link"), 782message:vBulletin.phrase.get(m.error),iconType:"warning",onAfterClose:function(){v.trigger("focus")}});else{var e=a(m.template);m=m.contenttype||"video";c.closest("form").data("content-type",m);e.find("img").error(function(){a(this).closest("li").remove()});q.find(".js-panel-content").append(e);n(q,"link");e.fadeIn("slow",function(){v.val("");a(".b-link-input",q).addClass("h-hide")})}},"json").error(function(m,e,l){openAlertDialog({title:vBulletin.phrase.get("attach_link"),message:"HTTP {0} - {1}".format(m.status, 783l),iconType:"error"})}).complete(function(){a("body").css("cursor","default");p.prop("disabled",!1);a(".js-contententry-buttons .b-button",q).prop("disabled",!1)})})}).off("link_editform_onunload").on("link_editform_onunload",function(g,c){f(c)}).off("link_newcontent_onload").on("link_newcontent_onload",function(g,c){0<c.closest(".conversation-list.stream-view.activity-view").length&&vBulletin.truncatePostContent(c)}).off("link_savepost_success").on("link_savepost_success",function(g,c){a(".b-link-input", 784c).removeClass("h-hide-imp")})}},n=function(g,c){a(".b-link-content__urlinfo .js-link-edit",g).on("click",function(r){r.preventDefault();var p=a(this).parent().parent();p.addClass("b-link-content__urlinfo-meta--edit-mode");a(".js-link-textbox",p).val(a.trim(a(".b-link-content__urlinfo-text",p).text())).trigger("focus");a(".js-link-save",p).on("click",function(q){q.preventDefault();a(".b-link-content__urlinfo-text",p).text(a(".js-link-textbox",p).val());p.removeClass("b-link-content__urlinfo-meta--edit-mode")})}); 785a(".js-link-remove",g).on("click",function(r){r.preventDefault();a(this).closest(".b-content-entry-panel__content").find(".b-link-input").removeClass("h-hide");a(this).closest(".js-panel-content").empty();a(".b-link-input",g).removeClass("h-hide")});if("link"==c){a(".js-link-preview-checkbox",g).off("click").on("click",function(){a(".b-link-content__thumbnail",g)[this.checked?"addClass":"removeClass"]("h-hide")});var k=a(".b-link-thumbnail-list__item",g).length;a(".b-link-thumbnail-list",g).jcarousel({scroll:1, 786wrap:null,size:k,rtl:vBulletin.isRtl(),buttonNextCallback:function(r,p,q){a(".b-thumbnail-nav .b-thumbnail-nav__next-arrow",g).toggleClass("b-icon--disabled",!q)},buttonPrevCallback:function(r,p,q){a(".b-thumbnail-nav .b-thumbnail-nav__prev-arrow",g).toggleClass("b-icon--disabled",!q)},initCallback:function(r,p){"init"==p&&0<k&&(a(".b-thumbnail-nav .b-thumbnail-nav__counter",g).html("1/"+k),a(".b-thumbnail-nav .b-thumbnail-nav__prev-arrow",g).off("click").on("click",function(){a(this).hasClass("b-icon--disabled")|| 787a(".jcarousel-container .jcarousel-prev",g).trigger("click")}),a(".b-thumbnail-nav .b-thumbnail-nav__next-arrow",g).off("click").on("click",function(){a(this).hasClass("b-icon--disabled")||a(".jcarousel-container .jcarousel-next",g).trigger("click")}))},itemVisibleInCallback:function(r,p,q,v){if("init"==v)return!1;a(".b-thumbnail-nav .b-thumbnail-nav__counter",g).html(q+"/"+k);a('input[type="radio"]',p).prop("checked",!0)},itemFallbackDimension:90})}};"all"!=b?h[b].call():a.each(h,function(g,c){c.call()})}}; 788vBulletin.isScrolledIntoView=function(b,d){var f=!1;a.isPlainObject(d)&&"[object Object]"==d.toString()&&(f=!0,d.top=0,d.bottom=0);b=b instanceof a?b:a(b);if(0==b.length)return!1;var h=a(window).scrollTop(),n=h+a(window).height(),g=b.offset().top;b=g+b.outerHeight();h=g-h;n-=b;f&&(d.top=h,d.bottom=n);return 0<=h&&0<=n};vBulletin.scrollToFixed=function(b){function d(g){h=a.extend({},h,g);
788if(h.element&&(h.element=h.element instanceof a?h.element:a(h.element),0<h.element.length)){a.inArray(h.fixedAt, 789["top","bottom"])&&(h.fixedAt="top");var c=h.element,k={width:c.width(),offset:c.offset(),"margin-top":parseInt(c.css("margin-top"),10),"margin-bottom":parseInt(c.css("margin-bottom"),10),cssPosition:c.css("position"),coordinates:{left:c.css("left"),top:c.css("top"),right:c.css("right"),bottom:c.css("bottom")}},r=a("<div />").addClass("scrolltofixed-filler").hide().insertAfter(c);c.data("origOffsetTop",k.offset.top);c.css("z-index",h.zIndex);c.data("object-instance",f);g=a(window).off("scroll."+n).on("scroll."+ 790n,function(){if(!c.is(":hidden")){var p=a(this).scrollTop();if(0<h.limit&&p>h.limit&&c.hasClass("scrolltofixed"))c.removeClass("scrolltofixed").css({position:"absolute",left:"auto",right:"auto",top:"auto",bottom:"auto",width:k.width});else if(0<h.limit&&p<h.limit&&p>k.offset.top&&!c.hasClass("scrolltofixed")||0>=h.limit&&p>k.offset.top&&!c.hasClass("scrolltofixed")){if(r.css({display:c.css("display"),width:c.outerWidth(!0),height:c.outerHeight(!0),"float":c.css("float")}),p=vBulletin.Responsive&& 791vBulletin.Responsive.scrollToFixedBreakPoint?vBulletin.Responsive.scrollToFixedBreakPoint:0,a("#vb-page-body").width()>p?c.addClass("scrolltofixed").width(k.width).css({left:k.offset.left,right:"auto",width:k.width,top:"top"==h.fixedAt?0:"auto",bottom:"bottom"==h.fixedAt?0:"auto",position:""}):r.hide(),p=k["margin-"+h.fixedAt]){var q={};q[h.fixedAt]=-p+"px";c.animate(q,"fast")}}else p<=k.offset.top&&c.hasClass("scrolltofixed")&&(r.hide(),c.removeClass("scrolltofixed").css({position:"",width:"",left:"", 792top:"",right:"",bottom:""}))}}).off("resize."+n).on("resize."+n,function(){c.removeClass("scrolltofixed").width("auto").css({position:"",left:""});k.width=c.width();k.offset=c.offset();a(this).trigger("scroll."+n)});h.triggerOnload&&g.trigger("scroll."+n)}}var f=this,h={element:a(),fixedAt:"top",limit:0,triggerOnload:!0,zIndex:99},n=("scrollToFixed"+Math.random()).replace(".","");this.updateLimit=function(g){isNaN(Number(g))||(h.limit=g,a(window).trigger("scroll."+n))};this.addLimit=function(g){isNaN(Number(g))|| 793(h.limit+=g,a(window).trigger("scroll."+n))};this.reset=function(g){d(g)};d(b)};vBulletin.scrollToAnchor=function(b){b=b.replace(/(:|\.|\[|\]|,|\/)/g,"\\$1");var d=a(b);console.log("vBulletin.scrollToAnchor() hash: {0}, found: {1}".format(b,d.length));if(0<d.length){var f=d.show().offset().top-2;d.hide();var h=a("html,body"),n=a(".scrolltofixed-floating.scrolltofixed-top"),g=!1;0<n.length&&(1==a(".list-container .list-item:first > a.anchor"+b).length?(n.hasClass("scrolltofixed")&&n.removeClass("scrolltofixed"), 794f=n.offset().top,g=!0):n.hasClass("scrolltofixed")&&(f-=n.outerHeight()));function c(){h.stop(!0)}h.off("scroll mousedown wheel DOMMouseScroll mousewheel keyup",c).one("scroll mousedown wheel DOMMouseScroll mousewheel keyup",c);h.animate({scrollTop:f},{duration:1E3,step:function(k,r){g||(k=d.show().offset().top,d.hide(),k-=n.hasClass("scrolltofixed")?n.outerHeight():0,r.end=Math.round(k))},always:function(){a("a.anchor").show();d.show();h.off("scroll mousedown wheel DOMMouseScroll mousewheel keyup", 795c)}});return!1}a("a.anchor").show();return!0};location.hash&&vBulletin.scrollToAnchor(location.hash);vBulletin.animateScrollTop=function(b,d){console.log("vBulletin.animateScrollTop({0})".format(b));var f=a(".scrolltofixed-floating.scrolltofixed-top");if(0<f.length){var h=f.data("origOffsetTop")||f.offset().top;!f.hasClass("scrolltofixed")&&h<b&&(b-=f.outerHeight(!0));h<b&&(b-=f.outerHeight())}a("html, body").animate({scrollTop:b},d)};vBulletin.truncatePostContent=function(b){b=b instanceof a?b:a(b); 796b.length||(b=a("body"));a(".poll-desc.ellipsis, .message-body.ellipsis",b).each(function(){var d=a(this);truncatedHeight=d.height();d.removeClass("ellipsis");var f=d.height();d.addClass("ellipsis");if(f>truncatedHeight)d.closest(".list-item-body").find(".post-links").removeClass("hide-see-link").find(".see-link").off("click").on("click",function(){var h=a(this);h.hasClass("more")?d.removeClass("ellipsis"):d.addClass("ellipsis");h.toggleClass("more less");var n=h.text();h.text(h.data("toggle-text")).data("toggle-text", 797n);return!1})});a(".list-item .see-link.more",b).each(function(d){var f=a(this).closest(".list-item"),h=a(f).find(".post-content");
797if(0<h.length){var n=!1,g=!1,c=a(this).text(),k="",r=a(h).html(),p=this;a(this).on("click",function(){nodeid=a(f).attr("data-node-id");n?(a(p).text(c),a(h).html(r),n=!1):g?(a(p).text(vBulletin.phrase.get("see_less")),n=!0,a(h).html(k)):!g&&nodeid&&vBulletin.AJAX({call:"/activity/fetchText",data:{nodeid},success:function(q){k=q.nodeText;if(k.length<=r.length)a(p).addClass("ui-helper-hidden"), 798postLink=a(p).closest(".post-links").html().replace("<span>|</span>",""),a(p).closest(".post-links").html(postLink);else return a(h).html(k),a(p).text(vBulletin.phrase.get("see_less")),console.log("loaded content for node "+nodeid),g=n=!0,!1},error:vBulletin.ajaxtools.logAjaxError,api_error:vBulletin.ajaxtools.logApiError});return!1})}})};var I=0<parseInt(pageData.threadmarking)&&0<parseInt(pageData.userid);if(!I){var J=D.createArrayCookie("discussion_view",!0);var K=D.createArrayCookie("channel_view", 799!0)}vBulletin.discussionViewCookie=J;vBulletin.markreadcheck=function(){function b(h){var n=h.getAll(),g;for(g in n)n[g]<f&&h.unset(g)}function d(h,n,g){var c=parseInt(h.data("lastcontent"));if(c<=f)c=!1;else{var k=parseInt(K.get(h.data("channel-id"),0));c=c>k}h.find(".icon").toggleClass(n,c).toggleClass(g,!c)}if(!I){var f=Math.round(Date.now()/1E3)-86400*vBulletin.options.get("markinglimit");b(J);b(K);a(".forum-item").each(function(){d(a(this),"b-icon__speech-double-large--blue","b-icon__speech-double-large--gray")}); 800a(".subforum-item").each(function(){d(a(this),"b-icon__speech-single2--blue","b-icon__speech-single2--gray")});a(".topic-item").each(function(){var h=parseInt(a(this).data("lastcontent")),n=parseInt(K.get(a(this).data("channel-id"),0)),g=parseInt(J.get(a(this).data("node-id"),0));h<=Math.max(n,g,f)||a(this).hasClass("redirect")?a(this).addClass("read").removeClass("unread"):0==a(this).find(".topic-wrapper .js-go-to-first-unread").length&&(h=a(this).find(".topic-wrapper .topic-title").attr("href"), 801"undefined"!=typeof h&&(h+=(-1==h.indexOf("?")?"?":"&")+"goto=newpost",a("<a />").addClass("go-to-first-unread b-icon b-icon__double-arrow-down--blue js-go-to-first-unread").attr("href",h).attr("title",vBulletin.phrase.get("go_to_first_new_post")).html(" ").prependTo(a(this).find(".topic-wrapper")),a(this).find(".vb-icon-topic-status").attr("title",vBulletin.phrase.get("new_posts"))))})}};vBulletin.markchannelsread=function(b,d,f){if(parseInt(b))vBulletin.setChannelRead(b,d);else if(pageData.channelid&& 802parseInt(pageData.channelid)&&0<parseInt(pageData.threadmarking)&&0<parseInt(pageData.userid))vBulletin.setChannelRead(pageData.channelid,d);else{var h=[];f=a(f).closest(".widget-content").find(".forum-list-container");b=f.find(".forum-item");f=f.find(".subforum-item");var n=function(g,c){(g=parseInt(a(c).attr("data-channel-id"),10))&&h.push(g)};a.each(b,n);a.each(f,n);a.each(h,function(g,c){g>=h.length-1?vBulletin.setChannelRead(c,d):vBulletin.setChannelRead(c,[])})}};vBulletin.markRead=function(b){I? 803vBulletin.AJAX({call:"/ajax/api/node/markRead",data:{nodeid:b},success:a.noop,api_error:a.noop,error:a.noop}):J.set(b,Math.round(Date.now()/1E3))};vBulletin.setChannelRead=function(b,d){var f=Math.round(Date.now()/1E3);success=d.success&&"function"==typeof d.success?d.success:a.noop;I?vBulletin.AJAX({call:"/ajax/api/node/markChannelsRead",data:{nodeid:b},success,api_error:vBulletin.ajaxtools.logApiError}):(0==b?a.cookie(pageData.cookie_prefix+"lastvisit",f):K.set(b,f),success());return!0};vBulletin.ckeditor= 804vBulletin.ckeditor||{};window.CKEDITOR_BASEPATH=pageData.baseurl+"/js/ckeditor/";vBulletin.ckeditor.requiredScriptsLoaded=!1;vBulletin.ckeditor.requiredScriptsLoadFailed=!1;vBulletin.ckeditor.requiredScriptLoadingStarted=!1;vBulletin.ckeditor.checkEnvironment=function(){return!0};vBulletin.ckeditor.fireCallbacks=function(b,d,f,h){"error"==f&&"function"==typeof d.error&&d.error(b);"success"==f&&"function"==typeof d.success&&d.success.apply(h,[b,h]);"function"==typeof d.complete&&d.complete(b)};vBulletin.ckeditor.initEditor= 805function(b,d){d=d||{};b=vBulletin.ckeditor.verifyEditorId(b);console.log("Ckeditor: initEditor({0})".format(b));if(vBulletin.ckeditor.checkEnvironment())vBulletin.ckeditor.requiredScriptsLoaded?vBulletin.ckeditor.doInitEditor(b,d):vBulletin.ckeditor.loadScripts(b,d);
805else{var f=a("#"+b).closest(".js-content-entry");f.find("li[data-panel=b-content-entry-panel__content--toggle-editor]").addClass("h-hide");f.find("li[data-panel=b-content-entry-panel__content--smiley]").addClass("h-hide");f.find("form").append(a('<input type="hidden" name="nl2br" value="1" />')); 806vBulletin.ckeditor.fireCallbacks(b,d,"error")}};vBulletin.ckeditor.loadScripts=function(b,d,f){if(vBulletin.ckeditor.requiredScriptLoadingStarted)console.warn("Ckeditor: Trying to load required scripts more than once.");else{vBulletin.ckeditor.requiredScriptLoadingStarted=!0;d=d||{};b=b||"";"undefined"===typeof d.hideLoadingDialog||d.hideLoadingDialog||vBulletin.ckeditor.showLoadingDialog(b);var h=function(){!d.showError&&vBulletin.ckeditor.requiredScriptsLoadFailed||vBulletin.warning("error","error_loading_ckeditor_script"); 807vBulletin.loadingIndicator.hide();vBulletin.ckeditor.requiredScriptsLoadFailed=!0;vBulletin.ckeditor.fireCallbacks(b,d,"error")},n=function(){vBulletin.ckeditor.requiredScriptsLoadFailed?(vBulletin.ckeditor.fireCallbacks(b,d,"error"),d.hideLoadingDialog||vBulletin.ckeditor.hideLoadingDialog(b)):("function"==typeof f&&f(),"function"==typeof vBulletin.ckeditor.doInitEditor&&window.CKEDITOR?(vBulletin.ckeditor.requiredScriptsLoaded=!0,vBulletin.ckeditor.doInitEditor(b,d)):setTimeout(n,10))};"function"== 808typeof vBulletin.ckeditor.doInitEditor||window.CKEDITOR?n():vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/render/ckeditor_javascript",success:function(g){for(var c=[],k=/src="([^"]+)"/g;match=k.exec(g);)c.push(match[1]);var r=function(){0<c.length?(console.log("Ckeditor: Calling getScript for: {0}".format(c[0])),a.getScript(c[0],function(p,q,v){if("success"!=q)return console.warn("Ckeditor: Error loading "+c[0]),h(),!1;console.log("Ckeditor: Script loaded: "+c[0]);c.splice(0,1);r()}).fail(function(p, 809q,v){console.warn("Ckeditor: Error loading script: "+q+" Exception: "+v);h()})):n()};r()},error_phrase:"error_fetching_dialog"})}};vBulletin.ckeditor.editorExists=function(b){return!1};vBulletin.ckeditor.isEditorEmpty=function(b){return!0};vBulletin.ckeditor.resetEditor=function(b){return!1};vBulletin.ckeditor.getEditorContent=function(b){b=vBulletin.ckeditor.verifyEditorId(b);return b?vBulletin.ckeditor.editorExists(b)?(b=vBulletin.ckeditor.getEditor(b))&&b.getData?a.trim(b.getData()):!1:a.trim(a("#"+ 810b).val()):!1};vBulletin.ckeditor.focusEditor=function(b){if(b=vBulletin.ckeditor.verifyEditorId(b))vBulletin.ckeditor.editorExists(b)?(b=vBulletin.ckeditor.getEditor(b))&&b.focus():a("#"+b).trigger("focus")};vBulletin.ckeditor.loadingDialogStack={};vBulletin.ckeditor.showLoadingDialog=function(b){if("undefined"==typeof vBulletin.ckeditor.loadingDialogStack[b]||!vBulletin.ckeditor.loadingDialogStack[b]){vBulletin.ckeditor.loadingDialogStack[b]=!0;var d=a("#"+b);0<d.length&&d.is(":visible")&&d.prop("disabled", 811!0);vBulletin.loadingIndicator.show("vBulletin.ckeditor.showLoadingDialog editorId: "+b)}};vBulletin.ckeditor.hideLoadingDialog=function(b){"undefined"!=typeof vBulletin.ckeditor.loadingDialogStack[b]&&vBulletin.ckeditor.loadingDialogStack[b]&&(vBulletin.ckeditor.loadingDialogStack[b]=!1,a("#"+b).prop("disabled",!1),vBulletin.loadingIndicator.hide("vBulletin.ckeditor.hideLoadingDialog editorId: "+b))};vBulletin.ckeditor.generatedIdCounter=0;vBulletin.ckeditor.verifyEditorId=function(b){b=b||"";if("string"== 812typeof b)return b;if("object"==typeof b&&"undefined"!=typeof b.checkDirty&&"undefined"!=typeof b.name)return b.name;b=b instanceof a?b:a(b);b.attr("id")||(++vBulletin.ckeditor.generatedIdCounter,b.attr("id","vb-cke-instance-"+vBulletin.ckeditor.generatedIdCounter));return b.attr("id")};vBulletin.ckeditor.initEditorComponents=function(b,d){b=b||document;a(function(){a(".js-ckeditor-init-on-focus",b).off("focus").on("focus",function(){vBulletin.ckeditor.initEditor(a(this))});a(".js-ckeditor-init-on-page-load", 813b).each(function(){vBulletin.ckeditor.initEditor(a(this))});if(!d){var f=function(c){if(0==c)return a("<span />").html(vBulletin.phrase.get("no_icon")).get(0);var k=a(".js-content-entry-post-icons option",b).filter((p,q)=>a(q).val()==c),r=k.data("icon-url");return r?(k=k.text(),a("<img />").attr("src",r).attr("alt","").attr("title",k).get(0)):""},h=a(".js-content-entry-post-icons",b);h.selectBox().on("change",function(){var c=a(this).val();a(".js-content-entry-post-icons.selectBox-dropdown .selectBox-label", 814b).html(f(c))});a(".js-content-entry-post-icons-selectBox-dropdown-menu li a").each(function(){var c=a(this).attr("rel");a(this).html(f(c))});h.trigger("change");a(".js-content-entry-prefixes",b).selectBox();h=a(".js-content-entry-event-highlights-container",b);var n=h.is(".h-hide-imp");n&&h.removeClass("h-hide-imp");a(".js-content-entry-event-highlights",b).selectBox();n&&h.addClass("h-hide-imp");var g=[];a(".js-select-box",b).each(function(){for(var c=a(this),k;c.is(":hidden");
814){k=c.closest(".h-hide"); 815if(1>k.length)break;g.push(k);k.removeClass("h-hide")}c.selectBox()});a.each(g,function(c,k){k.addClass("h-hide")})}})};vBulletin.ckeditor.initEditorComponents(document);a(".js-focus-on-page-load").first().trigger("focus");vBulletin.doReplaceSecurityToken=function(b){"undefined"!=typeof b&&""!=b&&(a("form").each(function(){var d=a(this);if(this.action&&!vBulletin.isInternalUrl(this.action))return console.log("Skipping security token for external url (form action): "+this.action),!0;"undefined"!=typeof this.method&& 816"post"==this.method.toLowerCase()&&(d.find('input[name="securitytoken"]').length?d.find('input[name="securitytoken"]').val(b):d.append('<input type="hidden" name="securitytoken" value="'+b+'" />'))}),pageData.securitytoken=b,console.log("Securitytoken updated"))};var L=null;vBulletin.flashMessage=function(b){var d=a(".js-flash-message"),f=d.find(".js-flash-message-content");L&&clearTimeout(L);f.text(b);d.removeClass("h-hide").show();L=setTimeout(function(){d.fadeOut(function(){d.addClass("h-hide")})}, 8175E3)};vBulletin.flashPhrase=function(b){vBulletin.flashMessage(vBulletin.phrase.get(b))};bindFormReset=function(b){return a(b).on("reset",function(d,f){"function"==typeof f&&f()})};vBulletin.sitebuilder=vBulletin.sitebuilder||{};vBulletin.sitebuilder.toggleSitebuilder=function(b){b=a(this);b.hasClass("on")?(D.setCookie("sitebuilder_active",""),a(".js-top-menu-sitebuilder").slideUp("fast"),b.removeClass("on")):(a(".js-top-menu-sitebuilder").slideDown("fast"),b.addClass("on"),D.setCookie("sitebuilder_active", 818"1"))};vBulletin.sitebuilder.setupMenuProxy=()=>{var b=a(".js-top-menu-sitebuilder--list");b.find(".js-top-menu-link:not(.js-top-menu-tab--admincp)").removeClass("b-top-menu__item-link--disabled");b.on("click.menuproxy",".js-top-menu-link:not(.js-top-menu-tab--admincp)",d=>{C();vBulletin.ready("sb_page").then(()=>{b.off(".menuproxy");a(d.currentTarget).trigger("click")});return!1})};"undefined"!=typeof tzOffset&&(y=(new Date).getTimezoneOffset()/60,1==Math.abs(tzOffset+y)&&vBulletin.AJAX({call:"/profile/save-dst", 819data:{userid:pageData.userid,clientUtcOffset:y},success:function(){location.reload()},api_error:a.noop,error:a.noop}));vBulletin.initFlexGridFixLastRowAll=function(b){function d(f){G(".js-flexgrid",".js-flexgrid-item",".js-flexgrid-image","b-flexgrid__item--lastrow","b-flexgrid__item--lastinrow",!0,f);G(".js-photo-preview",".b-gallery-thumbnail-list__item",".b-gallery-thumbnail-list__thumbnail","b-gallery-thumbnail-list__item--lastrow","b-gallery-thumbnail-list__item--lastinrow",!1,f)}d("undefined"== 820typeof b?!1:b);vBulletin.Responsive.Debounce.registerCallbackOnce(function(){d(!0)})};vBulletin.initFrameImagesWithColor=function(){M(".js-frame-image-wrapper",".js-frame-image")};setTimeout(function(){function b(){clearTimeout(securitytoken_timeout);if("guest"!=pageData.securitytoken){securitytoken_timeout=setTimeout(b,36E5);var f=function(){3==++securitytoken_errors&&vBulletin.doReplaceSecurityToken("guest")};vBulletin.AJAX({call:"/ajax/replace-securitytoken",data:{securitytoken:pageData.securitytoken}, 821success:function(h){securitytoken_errors=0;vBulletin.doReplaceSecurityToken(h.newtoken)},api_error:f,error:f})}}a.support.selectstart||a.fn.extend({disableSelection:function(){return this.each(function(){a(this).css({"-moz-user-select":"-moz-none","-webkit-user-select":"none","-khtml-user-select":"none","-o-user-select":"none","user-select":"none"})})},enableSelection:function(){return this.each(function(){a(this).css({"-moz-user-select":"","-webkit-user-select":"","-khtml-user-select":"","-o-user-select":"", 822"user-select":""})})}});(function(){function f(e){a("textarea.autogrow",e).css("min-height",function(){return a(this).css("height")}).autogrow()}function h(e){e.preventDefault();e=a(".js-refer-user-dialog");e.length?e.dialog("open"):vBulletin.AJAX({call:"/ajax/render/dialog_refer_user",data:{isAjaxTemplateRenderWithData:!0},success:function(l){a(l.template).appendTo("body");a(".js-refer-user-dialog").dialog({title:vBulletin.phrase.get("refer_a_friend"),autoOpen:!0,modal:!0,resizable:!1,
822closeOnEscape:!0, 823showCloseButton:!1,width:500,dialogClass:"dialog-container dialog-box",create:function(){a(".js-close-button",this).on("click",function(t){t.preventDefault();a(this).closest(".js-refer-user-dialog").dialog("close")})},open:function(){function t(w){this.select()}var u=a(".js-referral-link",this);u.val(u.data("link")).off("focus",t).on("focus",t).trigger("focus")}})}})}function n(e){var l=a(`.js-namecard-html[data-userid="${e}"]`);return new Promise((t,u)=>{0<l.length?t(l):(vBulletin.loadingIndicator.show(), 824vBulletin.AJAX({call:"/ajax/render/user_namecard",data:{userid:e,isAjaxTemplateRender:!0},success:function(w){w&&(l=a(w).filter(".js-namecard-html"),l.appendTo(document.body),t(l))},after_error:function(){u()},complete:()=>{vBulletin.loadingIndicator.hide()}}))})}function g(e){var l=parseInt(e.data("vbnamecard")||0);if(Number.isNaN(l))return!1;n(l).then(t=>{vBulletin.qtip.apply(e,"",{content:function(u,w){u=a(t[0].outerHTML).removeClass("h-hide-imp");u.find(".js-close-qtip").click(()=>{w.hide()}); 825return u},position:{my:"top center",at:"bottom center",viewport:a(window),adjust:{method:"shift flip"}},show:{solo:!1,ready:!0,event:!1},hide:{event:"unfocus",fixed:!0},style:{classes:"qtip--b-namecard"}})});return!0}function c(e){e.find("input.js-dependent-master").each(function(){var l=a(this),t=l.attr("type"),u=function(){var w=l.data("action"),x=!l.is(":checked"),A=a(document).find(l.data("on"));"invisible"==w?A.toggleClass("h-invisible",x):"hide"==w?A.toggleClass("h-hide-imp",x):(A.find(":input").addBack(":input").prop("disabled", 826x),A.find("select").addBack("select").selectBox(x?"disable":"enable"))};if("checkbox"==t)l.on("change",u);else if("radio"==t)l.closest("form").find('input[name="'+l.attr("name")+'"]').on("change",u)})}function k(e){vBulletin.flashMessage(e);e=new URL(location.href);e.searchParams.delete("flashmsg");var l=document.title;History.replaceState({},l,e.href);document.title=l}function r(){a(".js-full-height").each(function(){var e=a(this),l=e.parent();e.css("height","");e.outerHeight(Math.floor(l.height()), 827!0)})}function p(e){let l=t=>t.src="core/images/default/google-material/image_placeholder.svg";a("img.js-img-fallback",e).each((t,u)=>{!u.complete||u.naturalWidth&&u.naturalHeight||l(u);u.addEventListener("error",()=>l(u))})}vBulletin.loadingIndicator.init();var q=a(document);q.off("click","a.animate-scroll").on("click","a.animate-scroll",function(){vBulletin.scrollToAnchor(this.hash)&&(location.href=this.href);return!1});var v=function(e){e=a(this).closest(".split-button");e.toggleClass("open").find(".submenu").toggleClass("h-hide"); 828e.find(".js-button__icon .vb-icon").toggleClass("vb-icon-triangle-down-wide vb-icon-triangle-up-wide");a("body").off("click.buttonset").on("click.buttonset",function(l){0==a(l.target).closest(".split-button").length&&(l=a(".split-button"),l.removeClass("open").find(".submenu").addClass("h-hide"),l.find(".js-button__icon .vb-icon").addClass("vb-icon-triangle-down-wide").removeClass("vb-icon-triangle-up-wide"),a("body").off("click.buttonset"))})};a(".split-button .button-text").button().closest(".button-set").find(".js-button__icon").button({showLabel:!1, 829icon:"vb-icon vb-icon-triangle-down-wide"}).closest(".button-set").buttonset();q.off("click",".split-button .button-set",v).on("click",".split-button .button-set",v);var m=D.createStorage("collapse");q.off("click",".canvas-widget .toggle-button").on("click",".canvas-widget .toggle-button",function(e,l){e=a(this);var t=e.closest(".canvas-widget"),u=a(".widget-content",t),w=t.data("widget-instance-id"),x=e.closest(".edit-mode").length;e.hasClass("expand")?(t.removeClass("collapsed"),l?u.show():u.slideDown("slow"), 830x||m.unset(w)):(l?(u.hide(),t.addClass("collapsed")):u.slideUp("slow",function(){t.addClass("collapsed")}),x||m.set(w,1));e.toggleClass("collapse expand");l=e.attr("title");e.attr("title",e.data("toggle-title")).data("toggle-title",l);return!1});(function(){var e=m.getAll("collapse");e&&null!=e&&a.each(e,function(l,t){a("#widget_"+l+":not(.widget-no-header-buttons) .widget-header .toggle-button").trigger("click",[!0])})})();a(".conversation-toolbar-wrapper form.toolbar-filter-overlay").trigger("reset"); 831f(q);q.on("vb-loadnewposts",function(e,l){f(q,l.insertedHtml)});a(".edit-switch-container .switch-control").on("click",vBulletin.sitebuilder.toggleSitebuilder);vBulletin.sitebuilder.setupMenuProxy();v=(new URL(location.href)).searchParams.get("adminAction");actionMap={quickConfig:".js-top-menu-tab--quicksetup",stylePanel:".js-top-menu-tab--style",editPage:".js-top-menu-tab--editpage"};$action=a(actionMap[v]);0<$action.length?($action.trigger("click"),"editPage"==v&&vBulletin.ready("history").then(()=> 832{let e=new URL(location.href),l=new vBulletin.history.instance(!0);e.searchParams.delete("adminAction");l.pushState({},document.title,e)})):0==pageData.userid&&actionMap[v]&&vBulletin.assertUserHasAdminPermission("canusesitebuilder",self,a.noop,function(){location.reload()});a("select.custom-dropdown").selectBox();q.off("keypress",".js-button").on("keypress",".js-button",function(e){if(32==e.which||13==e.which)e.target&&e.target.nodeName&&"label"==(e.target.nodeName+"").toLowerCase()&&1==a(e.target).find("input").length? 833a(e.target).find("input").trigger("click"):a(this).trigger("click"),e.preventDefault()});q.off("keypress",".js-link").on("keypress",".js-link",function(e){13==e.which&&(a(this).trigger("click"),e.preventDefault())});a(".js-debug-collapse-list").next("ol, ul").hide();q.off("click",".js-debug-collapse-list").on("click",".js-debug-collapse-list",function(e){a(this).next("ol, ul").toggle()});q.off("click",".js-refer-user",h).on("click",".js-refer-user",h);q.off("click",".js-toggle-slider").on("click", 834".js-toggle-slider",function(){var e=a(this);e.is(".b-toggle-slider--yes")?(e.removeClass("b-toggle-slider--yes").addClass("b-toggle-slider--no"),e.find(".b-toggle-slider__radio--no").prop("checked",!0),e.data("value","0")):(e.removeClass("b-toggle-slider--no").addClass("b-toggle-slider--yes"),e.find(".b-toggle-slider__radio--yes").prop("checked",!0),e.data("value","1"));var l=a(".js-toggle-slider, .js-toggle-slider__dependent"),t=l.index(e),u=!1;l.each(function(w,x){if(w==t)u=!0;else if(1==u)if(w= 835a(this),w.is(".js-toggle-slider__dependent"))w.toggleClass("h-hide");else return u=!1});e.trigger("change",e.data("value"));return!1});vBulletin.options.get("usenamecard")&&a(document).offon("click","a[data-vbnamecard]",function(e){g(a(e.currentTarget))&&e.preventDefault()});a(document).offon("click",".js-follow-action",e=>{e=a(e.currentTarget);var l=parseInt(e.data("userid")),t=e.data("action");if("add"!=t&&"delete"!=t||isNaN(l))return!1;vBulletin.AJAX({call:"/ajax/api/user/changeUserRelation",data:{action:t, 836userid:l},success:function(u){if(1==u.follow||2==u.follow){var w=u.follow;"delete"==t&&(w=0);a(document).trigger("vb-userrelation-change",{newRelation:w,ignoring:u.ignoring,targetUserid:l})}},title_phrase:"profile_guser"})});a(document).offon("mouseover mouseout",".js-button-hover-switch",e=>{var l=a(this),t=l.data("on-hover-toggle"),u=l.data("off-hover-toggle");
836e="mouseover"==e.type;t&&l.toggleClass(t,e);u&&l.toggleClass(u,!e)});a(document).offon("vb-userrelation-change",(e,l)=>{var t=parseInt(l.hasOwnProperty("targetUserid")? 837l.targetUserid:"");e=l.hasOwnProperty("newRelation")?l.newRelation:null;l=l.hasOwnProperty("ignoring")?l.ignoring:null;var u=`.js-ignore-user[data-userid="${t}"][data-state="`,w=a(`${u}ignoring"]`);u=a(`${u}normal"]`);isNaN(t)||(null!==l&&(w.toggleClass("h-hide-imp",!l),u.toggleClass("h-hide-imp",l)),null!==e&&(w=`.js-follow-action[data-userid="${t}"]`,t=a(w),w=a(`${w}[data-state="${e}"]`),t.addClass("h-hide-imp"),w.removeClass("h-hide-imp"),0===e||l||u.addClass("h-hide-imp")))});a(document).offon("click", 838".js-ignore-user",e=>{e=a(e.currentTarget);var l=parseInt(e.data("userid"));e=e.data("action");var t="ignore"==e?1:0;if("ignore"!=e&&"unignore"!=e||isNaN(l))return!1;vBulletin.AJAX({call:"/ajax/api/user/ignoreUser",data:{userid:l,add:t},success:function(u){u&&a(document).trigger("vb-userrelation-change",{ignoring:t,targetUserid:l})},title_phrase:"profile_guser"})});a(".js-select-box").selectBox();a(".channel-content-widget .new-conversation-btn").off("click").on("click",function(){location.href=pageData.baseurl+ 839"/new-content/"+pageData.channelid});a(".pagenav-form").on("submit",function(){var e=Number(this.page.value);0<e&&(location.href=this.action+"&p="+e);return!1}).trigger("reset");a(".toolbar-pagenav").off("keydown",".toolbar-pagenav input").on("keydown",".toolbar-pagenav input",function(e){var l=e.which;return e.shiftKey||e.altKey||e.ctrlKey||!(48<=l&&57>=l||96<=l&&105>=l||8==l||9==l||13==l||35==l||36==l||37==l||39==l||46==l||45==l)?!1:!0});a(document).off("click",".js-post__manage").on("click",".js-post__manage", 840function(){if("undefined"==typeof vBulletin.inlinemod){var e=vBulletin.getAjaxBaseurl()+"/js/inlinemod.js?v="+pageData.simpleversion,l=this;a.getScript(e,function(){vBulletin.inlinemod.manage_deleted_form.apply(l)}).error(function(){vBulletin.warning("error","error_loading_inlinemod_script")})}else vBulletin.inlinemod.manage_deleted_form.apply(this)});a(document).off("click",".js-post__show-hide").on("click",".js-post__show-hide",function(){var e=a(this),l=e.text(),t=e.data("toggle-text");e.hasClass("js-post__show-hide--show")? 841(e.closest(".js-post").addClass("b-post--show-deleted-content"),e.html(t).data("toggle-text",l).removeClass("js-post__show-hide--show")):(e.closest(".js-post").removeClass("b-post--show-deleted-content"),e.html(t).data("toggle-text",l).addClass("js-post__show-hide--show"))});a(document).offon("click","a.video-frame",function(e){e.preventDefault();var l=a(this);vBulletin.AJAX({call:"/ajax/render/bbcode_video",data:{code:l.data("vcode"),provider:l.data("vprovider"),height:l.data("height"),width:l.data("width"), 842isAjaxTemplateRenderWithData:!0},success:t=>{(t=t.template)&&l.replaceWith(t)}})});vBulletin.markreadcheck();a(document).offon("click","a.markchannelsread, a.navbar_mark_channels_read",function(){vBulletin.markchannelsread(0,{success:function(){location.reload()}},a(this));return!1});a(".js-footer-go-to-top").off("click").on("click",function(e){e.preventDefault();a("body,html").animate({scrollTop:0},800)});c(a(document));a(document).on("vb-instrument",function(e){c(a(e.target))});a("input.js-select-all-master").on("change", 843function(){var e=a(this);$list=a(document).find(e.data("list"));$list.prop("checked",e.is(":checked"))});pageData.flash_message&&k(pageData.flash_message);a("input[placeholder]").each(function(){var e=a(this),l=e.attr("placeholder");l&&!e.attr("aria-label")&&e.attr("aria-label",l)});r();vBulletin.Responsive.Debounce.registerCallbackOnce(r);a(document).off("vb-filterposts",r).on("vb-filterposts",r);p(a(document));a(document).on("vb-instrument",function(e){p(a(e.target))});vBulletin.ready("global").resolve()})(); 844a("#btnAdvSearch").off("click").on("click",function(f){f.preventDefault();a(this).data("clicked2submit",1);f=a("#searchForm");a('<input type="hidden" name="AdvSearch" value="1" />').appendTo(f);f.submit()});a("#searchForm").off("submit.searchform").on("submit.searchform",function(f){function h(r,p,q){0<q.length&&q.prop("checked")&&(r[p]=q.val())}var n=a(this),g={},c=n.find("#q"),k=a.trim(c.val());if(0<k.length)g.keywords=k;else if(!a("#btnAdvSearch").data("clicked2submit"))return vBulletin.warning("search", 845"please_provide_search_string",function(){c.trigger("focus")}),f.stopPropagation(),!1;f=n.find(".searchPopupBody");h(g,"title_only",f.find(".searchFields_title_only"));h(g,"authorid",f.find(".searchFields_authorid"));h(g,"channel",f.find(".searchFields_channel"));n.find("input[name=searchJSON]").val(JSON.stringify(g));return!0});
845var d=D.getCookie("np_notices_displayed");d=d?d.split(","):[];d=d.concat(a('ul.notices li[data-notice-persistent="0"]').map((f,h)=>a(h).data("notice-id")).get());d=d.filter((f, 846h)=>d.indexOf(f)===h);0<d.length&&D.setCookie("np_notices_displayed",d.join(","),!0);a("ul.notices > li > .close").off("click").on("click",function(f){var h=a(this).closest("li");f=h.attr("data-notice-id");vBulletin.AJAX({call:"/ajax/api/notice/dismiss",data:{noticeid:f},success:function(n){h.hide("slow",function(){var g=a(this).parent();0==g.find(">li:visible").length&&g.addClass("h-hide")})}})});a(".js-stylechooser a").off("click").on("click",function(){var f=a(this).data("styleid"),h=new Date; 847h.setDate(h.getDate()+365);a.cookie(pageData.cookie_prefix+"userstyleid",f,{path:pageData.cookie_path,domain:pageData.cookie_domain,expires:h});pageData.userid?(f={userid:pageData.userid,password:"",user:{styleid:f},options:[""],adminoptions:[""],userfield:[""]},vBulletin.loadingIndicator.suppressNextAjaxIndicator(),vBulletin.AJAX({call:"/ajax/apidetach/user/save",data:f,success:function(){location.reload()}})):location.reload();return!1});a(".js-languagechooser a").off("click").on("click",function(){var f= 848a(this).data("languageid"),h=new Date;h.setDate(h.getDate()+365);a.cookie(pageData.cookie_prefix+"languageid",f,{path:pageData.cookie_path,domain:pageData.cookie_domain,expires:h});location.reload();return!1});vBulletin.doReplaceSecurityToken(pageData.securitytoken);securitytoken_timeout=setTimeout(b,36E5);securitytoken_errors=0;vBulletin.initFlexGridFixLastRowAll();vBulletin.initFrameImagesWithColor();N();setTimeout(function(){vBulletin.options.get("crontab")&&pageData.nextcron<=pageData.current_server_datetime&& 849(vBulletin.loadingIndicator.suppressNextAjaxIndicator(),vBulletin.AJAX({call:"/ajax/apidetach/cron/run",api_error:a.noop,error:vBulletin.ajaxtools.logAjaxError}))},5)},1);vBulletin.triggerHandler=function(b,d,f){d&&0!=d.length?d instanceof a||(d=a(d)):d=a(document);f=f||[];b=a.Event(b);b.target=this instanceof a?this.get(0):this;return d.triggerHandler(b,f)}})(jQuery); 850function JShtmlEncode(a){var C="";a&&"undefined"!==typeof a&&0<a.length&&(C=$("<div/>").text(a).html());return C=String(C).replace(/"/g,""")} 851function isValidEmailAddress(a){return(new RegExp(/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/i)).test(a)} 852function str_repeat(a,C){for(var z="",E=0;E<C;E++)z=z.concat(a);return z} 853function showStatusMessage(a,C){var z=$(".conversation-status-message.notice"),E;if(0<z.length){var G=z.filter("."+C);z=1==G.length?G:1==(E=z.filter(".h-hide")).length?E:z.first().clone().removeClass().addClass("conversation-status-message notice").appendTo(".conversation-status-messages");z=(1==G.length?G:z).show();vBulletin.isScrolledIntoView(z)?z.hasClass("h-hide")?z.hide().removeClass("h-hide").addClass(C+" show-x").find("span").html(a).end().fadeIn(800,"linear"):z.fadeOut("slow","linear",function(){z.find("span").html(a).end().addClass(C+ 854" show-x").fadeIn("slow","linear")}):(E=z.offset().top-10,z.hide(),$("html,body").animate({scrollTop:E},"slow",function(){z.find("span").html(a).end().addClass(C+" show-x").fadeIn("slow","linear")}))}}vBulletin.htmlEntities=function(a){return String(a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")};vBulletin.htmlEntities_decode=function(a){return String(a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')}; 855; 856 857// ***************************
858// js.compressed/jquery/jquery.qtip.min.js 859// *************************** 860/* 861 qTip2 - Pretty powerful tooltips - v3.0.3 862 http://qtip2.com 863 864 Copyright (c) 2016 865 Released under the MIT licenses 866 http://jquery.org/license 867 868 Date: Wed May 11 2016 10:31 GMT+0100+0100 869 Plugins: tips modal viewport svg imagemap ie6 870 Styles: core basic css3 871*/ 872(function(z,w,I){(function(e){"function"===typeof define&&define.amd?define(["jquery"],e):jQuery&&!jQuery.fn.qtip&&e(jQuery)})(function(e){function T(a,b,c,d){this.id=c;this.target=a;this.tooltip=null;this.elements={target:a};this._id="qtip-"+c;this.timers={img:{}};this.options=b;this.plugins={};this.cache={event:{},target:e(),disabled:!1,attr:d,onTooltip:!1,lastClass:""};this.rendered=this.destroyed=this.disabled=this.waiting=this.hiddenDuringWait=this.positioning=this.triggering=!1} 873function A(a){return null===a||"object"!==e.type(a)}function X(a){return!(e.isFunction(a)||a&&a.attr||a.length||"object"===e.type(a)&&(a.jquery||a.then))}function O(a){var b;if(A(a))return!1;A(a.metadata)&&(a.metadata={type:a.metadata});if("content"in a){var c=a.content;if(A(c)||c.jquery||c.done){var d=X(c)?!1:c;c=a.content={text:d}}else d=c.text;if("ajax"in c){var h=(b=c.ajax)&&!1!==b.once;delete c.ajax;c.text=function(a,c){a=d||e(this).attr(c.options.content.attr)||"Loading...";var f=e.ajax(e.extend({}, 874b,{context:c})).then(b.success,null,b.error).then(function(a){a&&h&&c.set("content.text",a);return a},function(a,b,d){c.destroyed||0===a.status||c.set("content.text",b+": "+d)});return h?a:(c.set("content.text",a),f)}}"title"in c&&(e.isPlainObject(c.title)&&(c.button=c.title.button,c.title=c.title.text),X(c.title||!1)&&(c.title=!1))}"position"in a&&A(a.position)&&(a.position={my:a.position,at:a.position});"show"in a&&A(a.show)&&(a.show=a.show.jquery?{target:a.show}:!0===a.show?{ready:!0}:{event:a.show}); 875"hide"in a&&A(a.hide)&&(a.hide=a.hide.jquery?{target:a.hide}:{event:a.hide});"style"in a&&A(a.style)&&(a.style={classes:a.style});e.each(u,function(){this.sanitize&&this.sanitize(a)});return a}function Y(a,b){var c=0,d,e=a;for(b=b.split(".");e=e[b[c++]];)c<b.length&&(d=e);return[d||a,b.pop()]}function ia(a,b){var c,d,e;for(c in this.checks)if(this.checks.hasOwnProperty(c))for(d in this.checks[c])this.checks[c].hasOwnProperty(d)&&(e=(new RegExp(d,"i")).exec(a))&&(b.push(e),("builtin"===c||this.plugins[c])&& 876this.checks[c][d].apply(this.plugins[c]||this,b))}function P(a){return ja.concat("").join(a?"-"+a+" ":" ")}function Q(a,b){if(0<b)return setTimeout(e.proxy(a,this),b);a.call(this)}function ka(a){this.tooltip.hasClass(x)||(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this.timers.show=Q.call(this,function(){this.toggle(!0,a)},this.options.show.delay))}
876function la(a){if(!this.tooltip.hasClass(x)&&!this.destroyed){var b=e(a.relatedTarget),c=b.closest(".qtip")[0]===this.tooltip[0],d=b[0]=== 877this.options.show.target[0];clearTimeout(this.timers.show);clearTimeout(this.timers.hide);if(this!==b[0]&&"mouse"===this.options.position.target&&c||this.options.hide.fixed&&/mouse(out|leave|move)/.test(a.type)&&(c||d))try{a.preventDefault(),a.stopImmediatePropagation()}catch(h){}else this.timers.hide=Q.call(this,function(){this.toggle(!1,a)},this.options.hide.delay,this)}}function U(a){!this.tooltip.hasClass(x)&&this.options.hide.inactive&&(clearTimeout(this.timers.inactive),this.timers.inactive= 878Q.call(this,function(){this.hide(a)},this.options.hide.inactive))}function Z(a){this.rendered&&0<this.tooltip[0].offsetWidth&&this.reposition(a)}function aa(a,b,c){e(w.body).on((b.split?b:b.join(".qtip "))+".qtip",a,function(){var a=t.api[e.attr(this,"data-qtip-id")];a&&!a.disabled&&c.apply(a,arguments)})}function ma(a,b,c){var d,h=e(w.body),f=a[0]===w?h:a;var g=a.metadata?a.metadata(c.metadata):null;var k="html5"===c.metadata.type&&g?g[c.metadata.name]:null,m=a.data(c.metadata.name||"qtipopts"); 879try{m="string"===typeof m?e.parseJSON(m):m}catch(v){}g=e.extend(!0,{},t.defaults,c,"object"===typeof m?O(m):null,O(k||g));c=g.position;g.id=b;if("boolean"===typeof g.content.text){var n=a.attr(g.content.attr);if(!1!==g.content.attr&&n)g.content.text=n;else return!1}c.container.length||(c.container=h);!1===c.target&&(c.target=f);!1===g.show.target&&(g.show.target=f);!0===g.show.solo&&(g.show.solo=c.container.closest("body"));!1===g.hide.target&&(g.hide.target=f);!0===g.position.viewport&&(g.position.viewport= 880c.container);c.container=c.container.eq(0);c.at=new B(c.at,!0);c.my=new B(c.my);if(a.data("qtip"))if(g.overwrite)a.qtip("destroy",!0);else if(!1===g.overwrite)return!1;a.attr("data-hasqtip",b);g.suppress&&(d=a.attr("title"))&&a.removeAttr("title").attr("oldtitle",d).attr("title","");b=new T(a,g,b,!!n);a.data("qtip",b);return b}function N(a){return a.charAt(0).toUpperCase()+a.slice(1)}function na(a,b){var c=b.charAt(0).toUpperCase()+b.slice(1);c=(b+" "+oa.join(c+" ")+c).split(" ");var d,e,f=0;if(V[b])return a.css(V[b]); 881for(;d=c[f++];)if((e=a.css(d))!==I)return V[b]=d,e}function J(a,b){return Math.ceil(parseFloat(na(a,b)))}function ba(a,b){this._ns="tip";this.options=b;this.offset=b.offset;this.size=[b.width,b.height];this.qtip=a;this.init(a)}function ca(a,b){this.options=b;this._ns="-modal";this.qtip=a;this.init(a)}function da(a){this._ns="ie6";this.qtip=a;this.init(a)}var B,u={},ja=["ui-widget","ui-tooltip"],ea="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),x="qtip-disabled",R,F= 882function(){var a;var b=4;for(a=w.createElement("div");(a.innerHTML="\x3c!--[if gt IE "+b+"]><i></i><![endif]--\x3e")&&a.getElementsByTagName("i")[0];b+=1);return 4<b?b:NaN}(),D=parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||!1;var l=T.prototype;l._when=function(a){return e.when.apply(e,a)};l.render=function(a){if(this.rendered||this.destroyed)return this;var b=this,c=this.options, 883d=this.cache,h=this.elements,f=c.content.text,g=c.content.title,k=c.content.button,m=c.position,n=[];e.attr(this.target[0],"aria-describedby",this._id);d.posClass=this._createPosClass((this.position={my:m.my,at:m.at}).my);this.tooltip=h.tooltip=e("<div/>",{id:this._id,"class":["qtip qtip-default",c.style.classes,d.posClass].join(" "),width:c.style.width||"",height:c.style.height||"",tracking:"mouse"===m.target&&m.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":!1,"aria-describedby":this._id+ 884"-content","aria-hidden":!0}).toggleClass(x,this.disabled).attr("data-qtip-id",this.id).data("qtip",this).appendTo(m.container).append(h.content=e("<div />",{"class":"qtip-content",id:this._id+"-content","aria-atomic":!0}));this.rendered=-1;this.positioning=!0;g&&(this._createTitle(),e.isFunction(g)||n.push(this._updateTitle(g,!1)));k&&this._createButton();e.isFunction(f)||n.push(this._updateContent(f,!1));this.rendered=!0;
884this._setWidget();e.each(u,function(a){var c;"render"===this.initialize&&(c= 885this(b))&&(b.plugins[a]=c)});this._unassignEvents();this._assignEvents();this._when(n).then(function(){b._trigger("render");b.positioning=!1;b.hiddenDuringWait||!c.show.ready&&!a||b.toggle(!0,d.event,!1);b.hiddenDuringWait=!1});t.api[this.id]=this;return this};l.destroy=function(a){function b(){if(!this.destroyed){this.destroyed=!0;var a=this.target,b=a.attr("oldtitle"),h;this.rendered&&this.tooltip.stop(1,0).find("*").remove().end().remove();e.each(this.plugins,function(){this.destroy&&this.destroy()}); 886for(h in this.timers)this.timers.hasOwnProperty(h)&&clearTimeout(this.timers[h]);a.removeData("qtip").removeAttr("data-qtip-id").removeAttr("data-hasqtip").removeAttr("aria-describedby");this.options.suppress&&b&&a.attr("title",b).removeAttr("oldtitle");this._unassignEvents();this.options=this.elements=this.cache=this.timers=this.plugins=this.mouse=null;delete t.api[this.id]}}if(this.destroyed)return this.target;!0===a&&"hide"!==this.triggering||!this.rendered?b.call(this):(this.tooltip.one("tooltiphidden", 887e.proxy(b,this)),!this.triggering&&this.hide());return this.target};var W=l.checks={builtin:{"^id$":function(a,b,c,d){c=!0===c?t.nextid:c;var h="qtip-"+c;!1!==c&&0<c.length&&!e("#"+h).length?(this._id=h,this.rendered&&(this.tooltip[0].id=this._id,this.elements.content[0].id=this._id+"-content",this.elements.title[0].id=this._id+"-title")):a[b]=d},"^prerender":function(a,b,c){c&&!this.rendered&&this.render(this.options.show.ready)},"^content.text$":function(a,b,c){this._updateContent(c)},"^content.attr$":function(a, 888b,c,d){this.options.content.text===this.target.attr(d)&&this._updateContent(this.target.attr(c))},"^content.title$":function(a,b,c){if(!c)return this._removeTitle();c&&!this.elements.title&&this._createTitle();this._updateTitle(c)},"^content.button$":function(a,b,c){this._updateButton(c)},"^content.title.(text|button)$":function(a,b,c){this.set("content."+b,c)},"^position.(my|at)$":function(a,b,c){"string"===typeof c&&(this.position[b]=a[b]=new B(c,"at"===b))},"^position.container$":function(a,b, 889c){this.rendered&&this.tooltip.appendTo(c)},"^show.ready$":function(a,b,c){c&&(!this.rendered&&this.render(!0)||this.toggle(!0))},"^style.classes$":function(a,b,c,d){this.rendered&&this.tooltip.removeClass(d).addClass(c)},"^style.(width|height)":function(a,b,c){this.rendered&&this.tooltip.css(b,c)},"^style.widget|content.title":function(){this.rendered&&this._setWidget()},"^style.def":function(a,b,c){this.rendered&&this.tooltip.toggleClass("qtip-default",!!c)},"^events.(render|show|move|hide|focus|blur)$":function(a, 890b,c){this.rendered&&this.tooltip[(e.isFunction(c)?"":"un")+"bind"]("tooltip"+b,c)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){if(this.rendered){var a=this.options.position;this.tooltip.attr("tracking","mouse"===a.target&&a.adjust.mouse);this._unassignEvents();this._assignEvents()}}}};l.get=function(a){if(this.destroyed)return this;a=Y(this.options,a.toLowerCase());a=a[0][a[1]];return a.precedance?a.string():a};var pa=/^position\.(my|at|adjust|target|container|viewport)|style|content|show\.ready/i, 891qa=/^prerender|show\.ready/i;l.set=function(a,b){if(this.destroyed)return this;var c=this.rendered,d=!1,h=this.options;if("string"===typeof a){var f=a;a={};a[f]=b}else a=e.extend({},a);e.each(a,function(b,f){if(c&&qa.test(b))delete a[b];else{var m=Y(h,b.toLowerCase());var g=m[0][m[1]];m[0][m[1]]=f&&f.nodeType?e(f):f;d=pa.test(b)||d;a[b]=[m[0],m[1],f,g]}});O(h);this.positioning=!0;e.each(a,e.proxy(ia,this));this.positioning=!1;this.rendered&&0<this.tooltip[0].offsetWidth&&d&&this.reposition("mouse"=== 892h.position.target?null:this.cache.event);return this};l._update=function(a,b){var c=this,d=this.cache;if(!this.rendered||!a)return!1;e.isFunction(a)&&(a=a.call(this.elements.target,d.event,this)||"");if(e.isFunction(a.then))return d.waiting=!0,a.then(function(a){d.waiting=!1;return c._update(a,b)},null,function(a){return c._update(a,b)});if(!1===a||!a&&""!==a)return!1;a.jquery&&0<a.length?b.empty().append(a.css({display:"block",visibility:"visible"})):b.html(a);return this._waitForContent(b).then(function(a){c.rendered&& 8930<c.tooltip[0].offsetWidth&&c.reposition(d.event,!a.length)})};l._waitForContent=function(a){var b=this.cache;b.waiting=!0;return(e.fn.imagesLoaded?a.imagesLoaded():(new e.Deferred).resolve([])).done(function(){b.waiting=!1}).promise()};l._updateContent=function(a,b){this._update(a,this.elements.content,b)};l._updateTitle=function(a,b){!1===this._update(a,this.elements.title,b)&&this._removeTitle(!1)};l._createTitle=function(){var a=this.elements,b=this._id+"-title";a.titlebar&&this._removeTitle(); 894a.titlebar=e("<div />",{"class":"qtip-titlebar "+(this.options.style.widget?P("header"):"")}).append(a.title=e("<div />",{id:b,"class":"qtip-title","aria-atomic":!0})).insertBefore(a.content).on("mousedown keydown mouseup keyup mouseout",".qtip-close",function(a){e(this).toggleClass("ui-state-active ui-state-focus","down"===a.type.substr(-4))}).on("mouseover mouseout",".qtip-close",function(a){e(this).toggleClass("ui-state-hover","mouseover"===a.type)});this.options.content.button&&this._createButton()}; 895l._removeTitle=function(a){var b=this.elements;b.title&&(b.titlebar.remove(),b.titlebar=b.title=b.button=null,!1!==a&&this.reposition())};l._createPosClass=function(a){return"qtip-pos-"+(a||this.options.position.my).abbrev()};l.reposition=function(a,b){if(!this.rendered||this.positioning||this.destroyed)return this;this.positioning=!0;var c=this.cache,d=this.tooltip,h=this.options.position,f=h.target,g=h.my,k=h.at,m=h.viewport,n=h.container,v=h.adjust,p=v.method.split(" "),q=d.outerWidth(!1),H=d.outerHeight(!1), 896l=0,K=0,t=d.css("position"),r={left:0,top:0},x=0<d[0].offsetWidth,B=a&&"scroll"===a.type,y=e(z),A=n[0].ownerDocument,E=this.mouse,C;if(e.isArray(f)&&2===f.length)k={x:"left",y:"top"},r={left:f[0],top:f[1]};else if("mouse"===f)k={x:"left",y:"top"}
896,(!v.mouse||this.options.hide.distance)&&c.origin&&c.origin.pageX?a=c.origin:!a||a&&("resize"===a.type||"scroll"===a.type)?a=c.event:E&&E.pageX&&(a=E),"static"!==t&&(r=n.offset()),A.body.offsetWidth!==(z.innerWidth||A.documentElement.clientWidth)&&(C=e(w.body).offset()), 897r={left:a.pageX-r.left+(C&&C.left||0),top:a.pageY-r.top+(C&&C.top||0)},v.mouse&&B&&E&&(r.left-=(E.scrollX||0)-y.scrollLeft(),r.top-=(E.scrollY||0)-y.scrollTop());else{"event"===f?a&&a.target&&"scroll"!==a.type&&"resize"!==a.type?c.target=e(a.target):a.target||(c.target=this.elements.target):"event"!==f&&(c.target=e(f.jquery?f:this.elements.target));f=c.target;f=e(f).eq(0);if(0===f.length)return this;if(f[0]===w||f[0]===z)l=D?z.innerWidth:f.width(),K=D?z.innerHeight:f.height(),f[0]===z&&(r={top:(m|| 898f).scrollTop(),left:(m||f).scrollLeft()});else if(u.imagemap&&f.is("area"))var G=u.imagemap(this,f,k,u.viewport?p:!1);else u.svg&&f&&f[0].ownerSVGElement?G=u.svg(this,f,k,u.viewport?p:!1):(l=f.outerWidth(!1),K=f.outerHeight(!1),r=f.offset());G&&(l=G.width,K=G.height,C=G.offset,r=G.position);r=this.reposition.offset(f,r,n);if(3.1<D&&4.1>D||4.3<=D&&4.33>D||!D&&"fixed"===t)r.left-=y.scrollLeft(),r.top-=y.scrollTop();if(!G||G&&!1!==G.adjustable)r.left+="right"===k.x?l:"center"===k.x?l/2:0,r.top+="bottom"=== 899k.y?K:"center"===k.y?K/2:0}r.left+=v.x+("right"===g.x?-q:"center"===g.x?-q/2:0);r.top+=v.y+("bottom"===g.y?-H:"center"===g.y?-H/2:0);u.viewport?(g=r.adjusted=u.viewport(this,r,h,l,K,q,H),C&&g.left&&(r.left+=C.left),C&&g.top&&(r.top+=C.top),g.my&&(this.position.my=g.my)):r.adjusted={left:0,top:0};c.posClass!==(C=this._createPosClass(this.position.my))&&(c.posClass=C,d.removeClass(c.posClass).addClass(C));if(!this._trigger("move",[r,m.elem||m],a))return this;delete r.adjusted;!1===b||!x||isNaN(r.left)|| 900isNaN(r.top)||"mouse"===f||!e.isFunction(h.effect)?d.css(r):e.isFunction(h.effect)&&(h.effect.call(d,this,e.extend({},r)),d.queue(function(a){e(this).css({opacity:"",height:""});F&&this.style.removeAttribute("filter");a()}));this.positioning=!1;return this};l.reposition.offset=function(a,b,c){if(!c[0])return b;a=e(a[0].ownerDocument);var d=!!F&&"CSS1Compat"!==w.compatMode;c=c[0];var h,f,g;do if("static"!==(f=e.css(c,"position"))){if("fixed"===f){f=c.getBoundingClientRect();var k=a;b.left+=-1*k.scrollLeft(); 901b.top+=-1*k.scrollTop()}else f=e(c).position(),f.left+=parseFloat(e.css(c,"borderLeftWidth"))||0,f.top+=parseFloat(e.css(c,"borderTopWidth"))||0;b.left-=f.left+(parseFloat(e.css(c,"marginLeft"))||0);b.top-=f.top+(parseFloat(e.css(c,"marginTop"))||0);h||"hidden"===(g=e.css(c,"overflow"))||"visible"===g||(h=e(c))}while(c=c.offsetParent);h&&(h[0]!==a[0]||d)&&(b.left+=1*h.scrollLeft(),b.top+=1*h.scrollTop());return b};var L=(B=l.reposition.Corner=function(a,b){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi, 902"center").toLowerCase();this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase();this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase();this.forceY=!!b;a=a.charAt(0);this.precedance="t"===a||"b"===a?"y":"x"}).prototype;L.invert=function(a,b){this[a]="left"===this[a]?"right":"right"===this[a]?"left":b||this[a]};L.string=function(a){var b=this.x,c=this.y;b=b!==c?"center"===b||"center"!==c&&("y"===this.precedance||this.forceY)?[c,b]:[b,c]:[b];return!1!==a?b.join(" "): 903b};L.abbrev=function(){var a=this.string(!1);return a[0].charAt(0)+(a[1]&&a[1].charAt(0)||"")};L.clone=function(){return new B(this.string(),this.forceY)};l.toggle=function(a,b,c){var d=this.cache,h=this.options,f=this.tooltip;if(b){if(/over|enter/.test(b.type)&&d.event&&/out|leave/.test(d.event.type)&&h.show.target.add(b.target).length===h.show.target.length&&f.has(b.relatedTarget).length)return this;d.event=e.event.fix(b)}this.waiting&&!a&&(this.hiddenDuringWait=!0);if(!this.rendered)return a?this.render(1): 904this;if(this.destroyed||this.disabled)return this;h=a?"show":"hide";var g=this.options[h],k=this.options.position,m=this.options.content,n=this.tooltip.css("width"),v=this.tooltip.is(":visible"),p=a||1===g.target.length,q=!b||2>g.target.length||d.target[0]===b.target;(typeof a).search("boolean|number")&&(a=!v);q=(v=!f.is(":animated")&&v===a&&q)?null:!!this._trigger(h,[90]);if(this.destroyed)return this;!1!==q&&a&&this.focus(b);if(!q||v)return this;e.attr(f[0],"aria-hidden",!a);a?(this.mouse&&(d.origin= 905e.event.fix(this.mouse)),e.isFunction(m.text)&&this._updateContent(m.text,!1),e.isFunction(m.title)&&this._updateTitle(m.title,!1),!R&&"mouse"===k.target&&k.adjust.mouse&&(e(w).on("mousemove.qtip",this._storeMouse),R=!0),n||f.css("width",f.outerWidth(!1)),this.reposition(b,c),n||f.css("width",""),g.solo&&("string"===typeof g.solo?e(g.solo):e(".qtip",g.solo)).not(f).not(g.target).qtip("hide",new e.Event("tooltipsolo"))):(clearTimeout(this.timers.show),delete d.origin,R&&!e('.qtip[tracking="true"]:visible', 906g.solo).not(f).length&&(e(w).off("mousemove.qtip"),R=!1),this.blur(b));var H=e.proxy(function(){a?(F&&f[0].style.removeAttribute("filter"),f.css("overflow",""),"string"===typeof g.autofocus&&e(this.options.show.autofocus,f).focus(),this.options.show.target.trigger("qtip-"+this.id+"-inactive")):f.css({display:"",visibility:"",opacity:"",left:"",top:""});this._trigger(a?"visible":"hidden")},this);!1===g.effect||!1===p?(f[h](),H()):e.isFunction(g.effect)?(f.stop(1,
9061),g.effect.call(f,this),f.queue("fx", 907function(a){H();a()})):f.fadeTo(90,a?1:0,H);a&&g.target.trigger("qtip-"+this.id+"-inactive");return this};l.show=function(a){return this.toggle(!0,a)};l.hide=function(a){return this.toggle(!1,a)};l.focus=function(a){if(!this.rendered||this.destroyed)return this;var b=e(".qtip"),c=this.tooltip,d=parseInt(c[0].style.zIndex,10),h=t.zindex+b.length;!c.hasClass("qtip-focus")&&this._trigger("focus",[h],a)&&(d!==h&&(b.each(function(){this.style.zIndex>d&&--this.style.zIndex}),b.filter(".qtip-focus").qtip("blur", 908a)),c.addClass("qtip-focus")[0].style.zIndex=h);return this};l.blur=function(a){if(!this.rendered||this.destroyed)return this;this.tooltip.removeClass("qtip-focus");this._trigger("blur",[this.tooltip.css("zIndex")],a);return this};l.disable=function(a){if(this.destroyed)return this;"toggle"===a?a=!(this.rendered?this.tooltip.hasClass(x):this.disabled):"boolean"!==typeof a&&(a=!0);this.rendered&&this.tooltip.toggleClass(x,a).attr("aria-disabled",a);this.disabled=!!a;return this};l.enable=function(){return this.disable(!1)}; 909l._createButton=function(){var a=this,b=this.elements,c=b.tooltip,d=this.options.content.button,h="str
909ing"===typeof d?d:"Close tooltip";b.button&&b.button.remove();b.button=d.jquery?d:e("<a />",{"class":"qtip-close "+(this.options.style.widget?"":"qtip-icon"),title:h,"aria-label":h}).prepend(e("<span />",{"class":"ui-icon ui-icon-close",html:"×"}));b.button.appendTo(b.titlebar||c).attr("role","button").click(function(b){c.hasClass(x)||a.hide(b);return!1})};l._updateButton=function(a){if(!this.rendered)return!1; 910var b=this.elements.button;a?this._createButton():b.remove()};l._setWidget=function(){var a=this.options.style.widget,b=this.elements,c=b.tooltip,d=c.hasClass(x);c.removeClass(x);x=a?"ui-state-disabled":"qtip-disabled";c.toggleClass(x,d);c.toggleClass("ui-helper-reset "+P(),a).toggleClass("qtip-default",this.options.style.def&&!a);b.content&&b.content.toggleClass(P("content"),a);b.titlebar&&b.titlebar.toggleClass(P("header"),a);b.button&&b.button.toggleClass("qtip-icon",!a)};l._storeMouse=function(a){(this.mouse= 911e.event.fix(a)).type="mousemove";return this};l._bind=function(a,b,c,d,h){if(a&&c&&b.length)return d="."+this._id+(d?"-"+d:""),e(a).on((b.split?b:b.join(d+" "))+d,e.proxy(c,h||this)),this};l._unbind=function(a,b){a&&e(a).off("."+this._id+(b?"-"+b:""));return this};l._trigger=function(a,b,c){var d=new e.Event("tooltip"+a);d.originalEvent=c&&e.extend({},c)||this.cache.event||null;this.triggering=a;this.tooltip.trigger(d,[this].concat(b||[]));this.triggering=!1;return!d.isDefaultPrevented()};l._bindEvents= 912function(a,b,c,d,h,f){var g=c.filter(d).add(d.filter(c)),k=[];g.length&&(e.each(b,function(b,c){b=e.inArray(c,a);-1<b&&k.push(a.splice(b,1)[0])}),k.length&&(this._bind(g,k,function(a){(this.rendered&&0<this.tooltip[0].offsetWidth?f:h).call(this,a)}),c=c.not(g),d=d.not(g)));this._bind(c,a,h);this._bind(d,b,f)};l._assignInitialEvents=function(a){function b(a){if(this.disabled||this.destroyed)return!1;this.cache.event=a&&e.event.fix(a);this.cache.target=a&&e(a.target);clearTimeout(this.timers.show); 913this.timers.show=Q.call(this,function(){this.render("object"===typeof a||c.show.ready)},c.prerender?0:c.show.delay)}var c=this.options,d=c.show.target,h=c.hide.target,f=c.show.event?e.trim(""+c.show.event).split(" "):[],g=c.hide.event?e.trim(""+c.hide.event).split(" "):[];this._bind(this.elements.target,["remove","removeqtip"],function(){this.destroy(!0)},"destroy");/mouse(over|enter)/i.test(c.show.event)&&!/mouse(out|leave)/i.test(c.hide.event)&&g.push("mouseleave");this._bind(d,"mousemove",function(a){this._storeMouse(a); 914this.cache.onTarget=!0});this._bindEvents(f,g,d,h,b,function(){if(!this.timers)return!1;clearTimeout(this.timers.show)});(c.show.ready||c.prerender)&&b.call(this,a)};l._assignEvents=function(){var a=this,b=this.options,c=b.position,d=this.tooltip,h=b.show.target,f=b.hide.target,g=c.container,k=c.viewport,m=e(w),n=e(z),v=b.show.event?e.trim(""+b.show.event).split(" "):[],p=b.hide.event?e.trim(""+b.hide.event).split(" "):[];e.each(b.events,function(b,c){a._bind(d,"toggle"===b?["tooltipshow","tooltiphide"]: 915["tooltip"+b],c,null,d)});/mouse(out|leave)/i.test(b.hide.event)&&"window"===b.hide.leave&&this._bind(m,["mouseout","blur"],function(a){/select|option/.test(a.target.nodeName)||a.relatedTarget||this.hide(a)});b.hide.fixed?f=f.add(d.addClass("qtip-fixed")):/mouse(over|enter)/i.test(b.show.event)&&this._bind(f,"mouseleave",function(){clearTimeout(this.timers.show)});-1<(""+b.hide.event).indexOf("unfocus")&&this._bind(g.closest("html"),["mousedown","touchstart"],function(a){var b=e(a.target),c=this.rendered&& 916!this.tooltip.hasClass(x)&&0<this.tooltip[0].offsetWidth,d=0<b.parents(".qtip").filter(this.tooltip[0]).length;b[0]===this.target[0]||b[0]===this.tooltip[0]||d||this.target.has(b[0]).length||!c||this.hide(a)});"number"===typeof b.hide.inactive&&(this._bind(h,"qtip-"+this.id+"-inactive",U,"inactive"),this._bind(f.add(d),t.inactiveEvents,U));this._bindEvents(v,p,h,f,ka,la);this._bind(h.add(d),"mousemove",function(a){if("number"===typeof b.hide.distance){var c=this.cache.origin||{},d=this.options.hide.distance, 917f=Math.abs;(f(a.pageX-c.pageX)>=d||f(a.pageY-c.pageY)>=d)&&this.hide(a)}this._storeMouse(a)});"mouse"===c.target&&c.adjust.mouse&&(b.hide.event&&this._bind(h,["mouseenter","mouseleave"],function(a){if
917(!this.cache)return!1;this.cache.onTarget="mouseenter"===a.type}),this._bind(m,"mousemove",function(a){this.rendered&&this.cache.onTarget&&!this.tooltip.hasClass(x)&&0<this.tooltip[0].offsetWidth&&this.reposition(a)}));(c.adjust.resize||k.length)&&this._bind(e.event.special.resize?k:n,"resize",Z);c.adjust.scroll&& 918this._bind(n.add(c.container),"scroll",Z)};l._unassignEvents=function(){var a=this.options,b=a.show.target,c=a.hide.target;a=e.grep([this.elements.target[0],this.rendered&&this.tooltip[0],a.position.container[0],a.position.viewport[0],a.position.container.closest("html")[0],z,w],function(a){return"object"===typeof a});b&&b.toArray&&(a=a.concat(b.toArray()));c&&c.toArray&&(a=a.concat(c.toArray()));this._unbind(a)._unbind(a,"destroy")._unbind(a,"inactive")};e(function(){aa(".qtip",["mouseenter","mouseleave"], 919function(a){var b="mouseenter"===a.type,c=e(a.currentTarget),d=e(a.relatedTarget||a.target),h=this.options;b?(this.focus(a),c.hasClass("qtip-fixed")&&!c.hasClass(x)&&clearTimeout(this.timers.hide)):"mouse"===h.position.target&&h.position.adjust.mouse&&h.hide.event&&h.show.target&&!d.closest(h.show.target[0]).length&&this.hide(a);c.toggleClass("qtip-hover",b)});aa("[data-qtip-id]",ea,U)});var t=e.fn.qtip=function(a,b,c){var d=(""+a).toLowerCase(),h=null,f=e.makeArray(arguments).slice(1),g=f[f.length- 9201],k=this[0]?e.data(this[0],"qtip"):null;if(!arguments.length&&k||"api"===d)return k;if("string"===typeof a)return this.each(function(){var a=e.data(this,"qtip");if(!a)return!0;g&&g.timeStamp&&(a.cache.event=g);if(!b||"option"!==d&&"options"!==d)a[d]&&a[d].apply(a,f);else if(c!==I||e.isPlainObject(b))a.set(b,c);else return h=a.get(b),!1}),null!==h?h:this;if("object"===typeof a||!arguments.length)return k=O(e.extend(!0,{},a)),this.each(function(a){a=e.isArray(k.id)?k.id[a]:k.id;a=!a||!1===a||1>a.length|| 921t.api[a]?t.nextid++:a;var b=ma(e(this),a,k);if(!1===b)return!0;t.api[a]=b;e.each(u,function(){"initialize"===this.initialize&&this(b)});b._assignInitialEvents(g)})};e.qtip=T;t.api={};e.each({attr:function(a,b){if(this.length){var c=this[0],d=e.data(c,"qtip");if("title"===a&&d&&d.options&&"object"===typeof d&&"object"===typeof d.options&&d.options.suppress){if(2>arguments.length)return e.attr(c,"oldtitle");d&&"title"===d.options.content.attr&&d.cache.attr&&d.set("content.text",b);return this.attr("oldtitle", 922b)}}return e.fn.attr_replacedByqTip.apply(this,arguments)},clone:function(a){var b=e.fn.clone_replacedByqTip.apply(this,arguments);a||b.filter("[oldtitle]").attr("title",function(){return e.attr(this,"oldtitle")}).removeAttr("oldtitle");return b}},function(a,b){if(!b||e.fn[a+"_replacedByqTip"])return!0;var c=e.fn[a+"_replacedByqTip"]=e.fn[a];e.fn[a]=function(){return b.apply(this,arguments)||c.apply(this,arguments)}});e.ui||(e.cleanData_replacedByqTip=e.cleanData,e.cleanData=function(a){for(var b= 9230,c;(c=e(a[b])).length;b++)if(c.attr("data-hasqtip"))try{c.triggerHandler("removeqtip")}catch(d){}e.cleanData_replacedByqTip.apply(this,arguments)});t.version="3.0.3";t.nextid=0;t.inactiveEvents=ea;t.zindex=15E3;t.defaults={prerender:!1,id:!1,overwrite:!0,suppress:!0,content:{text:!0,attr:"title",title:!1,button:!1},position:{my:"top left",at:"bottom right",target:!1,container:!1,viewport:!1,adjust:{x:0,y:0,mouse:!0,scroll:!0,resize:!0,method:"flipinvert flipinvert"},effect:function(a,b){e(this).animate(b, 924{duration:200,queue:!1})}},show:{target:!1,event:"mouseenter",effect:!0,delay:90,solo:!1,ready:!1,autofocus:!1},hide:{target:!1,event:"mouseleave",effect:!0,delay:0,fixed:!1,inactive:!1,leave:"window",distance:!1},style:{classes:"",widget:!1,width:!1,height:!1,def:!0},events:{render:null,move:null,show:null,hide:null,toggle:null,visible:null,hidden:null,focus:null,blur:null}};var S=!!w.createElement("canvas").getContext,fa=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,V={},oa=["Webkit","O","Moz", 925"ms"];if(S){l=z.devicePixelRatio||1;L=function(){var a=w.createElement("canvas").getContext("2d");return a.backingStorePixelRatio||a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||1}();var M=l/L}else var ha=function(a,b,c){return"<qtipvml:"+a+' xmlns="urn:schemas-microsoft.com:vml" class="qtip-vml" '+(b||"")+' style="behavior: url(#default#VML); '+(c||"")+'" />'};e.extend(ba.prototype,{init:function(a){var b=this.element=a.elements.tip= 926e("<div />",{"class":"qtip-tip"}).prependTo(a.tooltip);if(S){var c=e("<canvas />").appendTo(this.element)[0].getContext("2d");c.lineJoin="miter";c.miterLimit=1E5;c.save()}else c=ha("shape",'coordorigin="0,0"',"position:absolute;"),this.element.html(c+c),a._bind(e("*",b).add(b),["click","mousedown"],function(a){a.stopPropagation()},this._ns);a._bind(a.tooltip,"tooltipmove",this.reposition,this._ns,this);this.create()},_swapDimensions:function(){this.size[0]=this.options.height;this.size[1]=this.options.width}, 927_resetDimensions:function(){this.size[0]=this.options.width;this.size[1]=this.options.height},_useTitle:function(a){var b=this.qtip.elements.titlebar;return b&&("top"===a.y||"center"===a.y&&this.element.position().top+this.size[1]/2+this.options.offset<b.outerHeight(!0))},_parseCorner:function(a){var b=this.qtip.options.position.my;!1===a||!1===b?a=!1:!0===a?a=new B(b.string()):a.string||(a=new B(a),a.fixed=!0);return a},_parseWidth:function(a,b,c){var d=this.qtip.elements;b="border"+N(b)+"Width"; 928return(c?J(c,b):J(d.content,b)||J(this._useTitle(a)&&d.titlebar||d.content,b)||J(d.tooltip,b))||0},_parseRadius:function(a){var b=this.qtip.elements,c="border"+N(a.y)+N(a.x)+"Radius";return 9>F?0:J(this._useTitle(a)&&b.titlebar||b.content,c)||J(b.tooltip,c)||0},_invalidColour:function(a,b,c){b=a.css(b);return!b||c&&b===a.css(c)||fa.test(b)?!1:b},_parseColours:function(a){var b=this.qtip.elements,c=this.element.css("cssText",""),d="border"+N(a[a.precedance])+N("color");a=this._useTitle(a)&&b.titlebar|| 929b.content;var h=this._invalidColour,f=[];f[0]=h(c,"background-color")||h(a,"background-color")||h(b.content,"background-color")||h(b.tooltip,"background-color")||c.css("background-color");f[1]=h(c,d,"color")||h(a,d,"color")||h(b.content,d,"color")||h(b.tooltip,d,"color")||b.tooltip.css(d);e("*",c).add(c).css("cssText","background-color:transparent !important;border:0 !important;");return f},_calculateSize:function(a){var b="y"===a.precedance,c=this.options.width,d=this.options.height,e="c"===a.abbrev(), 930f=(b?c:d)*(e?.5:1),g=Math.pow;a=Math.round;var k=Math.sqrt(g(f,2)+g(d,2));f=[this.border/f*k,this.border/d*k];f[2]=Math.sqrt(g(f[0],2)-g(this.border,2));f[3]=Math.sqrt(g(f[1],2)-g(this.border,2));e=(k+f[2]+f[3]+(e?0:f[0]))/k;c=[a(e*c),a(e*d)];return b?c:c.reverse()},_calculateTip:function(a,b,c){c=c||1;b=b||this.size;var d=b[0]*c;b=b[1]*c;c=Math.ceil(d/2);var e=Math.ceil(b/2);d={br:[0,0,d,b,d,0],bl:[0,0,d,0,0,b],tr:[0,b,d,0,d,b],tl:[0,0,0,b,d,b],tc:[0,b,c,0,d,b],bc:[0,0,d,0,c,b],rc:[0,0,d,e,0,b], 931lc:[d,0,d,b,0,e]};d.lt=d.br;d.rt=d.bl;d.lb=d.tr;d.rb=d.tl;return d[a.abbrev()]},_drawCoords:function(a,b){a.beginPath();a.moveTo(b[0],b[1]);a.lineTo(b[2],b[3]);a.lineTo(b[4],b[5]);a.closePath()},create:function(){var a=this.corner=(S||F)&&this._parseCorner(this.options.corner);if(this.enabled=!!this.corner&&"c"!==this.corner.abbrev())this.qtip.cache.corner=a.clone(),this.update();this.element.toggle(this.enabled);return this.corner},update:function(a,b){if(!this.enabled)return this;var c=this.qtip.elements, 932d=this.element,h=d.children(),f=this.options,g=this.size,k=f.mimic,m=Math.round;a||(a=this.qtip.cache.corner||this.corner);!1===k?k=a:(k=new B(k),k.precedance=a.precedance,"inherit"===k.x?k.x=a.x:"inherit"===k.y?k.y=a.y:k.x===k.y&&(k[a.precedance]=a[a.precedance]));var n=k.precedance;"x"===a.precedance?this._swapDimensions():this._resetDimensions();var v=this.color=this._parseColours(a);if("transparent"!==v[1]){var p=this.border=this._parseWidth(a,a[a.precedance]);f.border&&1>p&&!fa.test(v[1])&&(v[0]= 933v[1]);this.border=p=!0!==f.border?f.border:p}else this.border=p=0;var q=this.size=this._calculateSize(a);d.css({width:q[0],height:q[1],lineHeight:q[1]+"px"});d="y"===a.precedance?[m("left"===k.x?p:"right"===k.x?q[0]-g[0]-p:(q[0]-g[0])/2),m("top"===k.y?q[1]-g[1]:0)]:[m("left"===k.x?q[0]-g[0]:0),m("top"===k.y?p:"bottom"===k.y?q[1]-g[1]-p:(q[1]-g[1])/2)];if(S){n=h[0].getContext("2d");
933n.restore();n.save();n.clearRect(0,0,6E3,6E3);var l=this._calculateTip(k,g,M);g=this._calculateTip(k,this.size,M);h.attr("width", 934q[0]*M).attr("height",q[1]*M);h.css("width",q[0]).css("height",q[1]);this._drawCoords(n,g);n.fillStyle=v[1];n.fill();n.translate(d[0]*M,d[1]*M);this._drawCoords(n,l);n.fillStyle=v[0];n.fill()}else l=this._calculateTip(k),l="m"+l[0]+","+l[1]+" l"+l[2]+","+l[3]+" "+l[4]+","+l[5]+" xe",d[2]=p&&/^(r|b)/i.test(a.string())?8===F?2:1:0,h.css({coordsize:q[0]+p+" "+q[1]+p,antialias:""+(-1<k.string().indexOf("center")),left:d[0]-d[2]*Number("x"===n),top:d[1]-d[2]*Number("y"===n),width:q[0]+p,height:q[1]+p}).each(function(a){var b= 935e(this);b[b.prop?"prop":"attr"]({coordsize:q[0]+p+" "+q[1]+p,path:l,fillcolor:v[0],filled:!!a,stroked:!a}).toggle(!(!p&&!a));!a&&b.html(ha("stroke",'weight="'+2*p+'px" color="'+v[1]+'" miterlimit="1000" joinstyle="miter"'))});z.opera&&setTimeout(function(){c.tip.css({display:"inline-block",visibility:"visible"})},1);!1!==b&&this.calculate(a,q)},calculate:function(a,b){if(!this.enabled)return!1;var c=this,d=this.qtip.elements,h=this.element,f=this.options.offset,g={};a=a||this.corner;var k=a.precedance; 936b=b||this._calculateSize(a);var m=[a.x,a.y];"x"===k&&m.reverse();e.each(m,function(e,h){if("center"===h){var m="y"===k?"left":"top";g[m]="50%";g["margin-"+m]=-Math.round(b["y"===k?0:1]/2)+f}else{m=c._parseWidth(a,h,d.tooltip);var n=c._parseWidth(a,h,d.content);var l=c._parseRadius(a);g[h]=Math.max(-c.border,e?n:f+(l>m?l:-m))}});g[a[k]]-=b["x"===k?0:1];h.css({margin:"",top:"",bottom:"",left:"",right:""}).css(g);return g},reposition:function(a,b,c){function d(a,b,c,d,e){"shift"===a&&f.precedance=== 937b&&g[d]&&"center"!==f[c]?f.precedance="x"===f.precedance?"y":"x":"shift"!==a&&g[d]&&(f[b]="center"===f[b]?0<g[d]?d:e:f[b]===d?e:d)}function e(a,b,d){"center"===f[a]?n["margin-"+b]=m[a]=p["margin-"+b]-g[b]:(l=p[d]!==I?[g[b],-p[b]]:[-g[b],p[b]],(m[a]=Math.max(l[0],l[1]))>l[0]&&(c[b]-=g[b],m[b]=!1),n[p[d]!==I?d:b]=m[a])}if(this.enabled){a=b.cache;var f=this.corner.clone(),g=c.adjusted,k=b.options.position.adjust.method.split(" ");b=k[0];k=k[1]||k[0];var m={left:!1,top:!1,x:0,y:0},n={},l;!0!==this.corner.fixed&& 938(d(b,"x","y","left","right"),d(k,"y","x","top","bottom"),f.string()===a.corner.string()&&a.cornerTop===g.top&&a.cornerLeft===g.left||this.update(f,!1));var p=this.calculate(f);p.right!==I&&(p.left=-p.right);p.bottom!==I&&(p.top=-p.bottom);p.user=this.offset;m.left="shift"===b&&!!g.left;m.left&&e("x","left","right");m.top="shift"===k&&!!g.top;m.top&&e("y","top","bottom");this.element.css(n).toggle(!(m.x&&m.y||"center"===f.x&&m.y||"center"===f.y&&m.x));c.left-=p.left.charAt?p.user:"shift"!==b||m.top|| 939!m.left&&!m.top?p.left+this.border:0;c.top-=p.top.charAt?p.user:"shift"!==k||m.left||!m.left&&!m.top?p.top+this.border:0;a.cornerLeft=g.left;a.cornerTop=g.top;a.corner=f.clone()}},destroy:function(){this.qtip._unbind(this.qtip.tooltip,this._ns);this.qtip.elements.tip&&this.qtip.elements.tip.find("*").remove().end().remove()}});l=u.tip=function(a){return new ba(a,a.options.style.tip)};l.initialize="render";l.sanitize=function(a){if(a.style&&"tip"in a.style){var b=a.style.tip;"object"!==typeof b&&(b= 940a.style.tip={corner:b});/string|boolean/i.test(typeof b.corner)||(b.corner=!0)}};W.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){this.create();this.qtip.reposition()},"^style.tip.(height|width)$":function(a){this.size=[a.width,a.height];this.update();this.qtip.reposition()},"^content.title|style.(classes|widget)$":function(){this.update()}};e.extend(!0,t.defaults,{style:{tip:{corner:!0,mimic:!1,width:6,height:6,border:!0,offset:0}}});var y=function(){function a(a){if(e.expr[":"].focusable)return e.expr[":"].focusable; 941var b=!isNaN(e.attr(a,"tabindex")),c=a.nodeName&&a.nodeName.toLowerCase();if("area"===c){b=a.parentNode;c=b.name;if(!a.href||!c||"map"!==b.nodeName.toLowerCase())return!1;a=e("img[usemap=#"+c+"]")[0];return!!a&&a.is(":visible")}return/input|select|textarea|button|object/.test(c)?!a.disabled:"a"===c?a.href||b:b}function b(a){1>h.length&&a.length?a.not("body").blur():h.first().focus()}function c(a){if(k.is(":visible")){a=e(a.target);var c=f.tooltip,d=a.closest(".qtip");(1>
941d.length?0:parseInt(d[0].style.zIndex, 94210)>parseInt(c[0].style.zIndex,10))||a.closest(".qtip")[0]===c[0]||b(a)}}var d=this,h={},f,g,k;e.extend(d,{init:function(){k=d.elem=e("<div />",{id:"qtip-overlay",html:"<div></div>"}).on("mousedown",!1).hide();e(w.body).on("focusin.qtip-modal",c);e(w).on("keydown.qtip-modal",function(a){f&&f.options.show.modal.escape&&27===a.keyCode&&f.hide(a)});k.on("click.qtip-modal",function(a){f&&f.options.show.modal.blur&&f.hide(a)});return d},update:function(b){f=b;h=!1!==b.options.show.modal.stealfocus?b.tooltip.find("*").filter(function(){return a(this)}): 943[]},toggle:function(a,c,h){var m=a.tooltip,l=a.options.show.modal,n=l.effect,v=c?"show":"hide",u=k.is(":visible");m=e(".qtip-modal").filter(":visible:not(:animated)").not(m);d.update(a);c&&!1!==l.stealfocus&&b(e(":focus"));k.toggleClass("blurs",l.blur);c&&k.appendTo(w.body);if(k.is(":animated")&&u===c&&!1!==g||!c&&m.length)return d;k.stop(!0,!1);if(e.isFunction(n))n.call(k,c);else if(!1===n)k[v]();else k.fadeTo(parseInt(h,10)||90,c?1:0,function(){c||k.hide()});c||k.queue(function(a){k.css({left:"", 944top:""});e(".qtip-modal").length||k.detach();a()});g=c;f.destroyed&&(f=null);return d}});d.init()};y=new y;e.extend(ca.prototype,{init:function(a){var b=a.tooltip;if(!this.options.on)return this;a.elements.overlay=y.elem;b.addClass("qtip-modal").css("z-index",t.modal_zindex+e(".qtip-modal").length);a._bind(b,["tooltipshow","tooltiphide"],function(a,d,h){d=a.originalEvent;if(a.target===b[0])if(d&&"tooltiphide"===a.type&&/mouse(leave|enter)/.test(d.type)&&e(d.relatedTarget).closest(y.elem[0]).length)try{a.preventDefault()}catch(f){}else(!d|| 945d&&"tooltipsolo"!==d.type)&&this.toggle(a,"tooltipshow"===a.type,h)},this._ns,this);a._bind(b,"tooltipfocus",function(a,d){if(!a.isDefaultPrevented()&&a.target===b[0]){var c=e(".qtip-modal"),f=t.modal_zindex+c.length,g=parseInt(b[0].style.zIndex,10);y.elem[0].style.zIndex=f-1;c.each(function(){this.style.zIndex>g&&--this.style.zIndex});c.filter(".qtip-focus").qtip("blur",a.originalEvent);b.addClass("qtip-focus")[0].style.zIndex=f;y.update(d);try{a.preventDefault()}catch(k){}}},this._ns,this);a._bind(b, 946"tooltiphide",function(a){a.target===b[0]&&e(".qtip-modal").filter(":visible").not(b).last().qtip("focus",a)},this._ns,this)},toggle:function(a,b,c){if(a&&a.isDefaultPrevented())return this;y.toggle(this.qtip,!!b,c)},destroy:function(){this.qtip.tooltip.removeClass("qtip-modal");this.qtip._unbind(this.qtip.tooltip,this._ns);y.toggle(this.qtip,!1);delete this.qtip.elements.overlay}});l=u.modal=function(a){return new ca(a,a.options.show.modal)};l.sanitize=function(a){a.show&&("object"!==typeof a.show.modal? 947a.show.modal={on:!!a.show.modal}:"undefined"===typeof a.show.modal.on&&(a.show.modal.on=!0))};t.modal_zindex=t.zindex-200;l.initialize="render";W.modal={"^show.modal.(on|blur)$":function(){this.destroy();this.init();this.qtip.elems.overlay.toggle(0<this.qtip.tooltip[0].offsetWidth)}};e.extend(!0,t.defaults,{show:{modal:{on:!1,effect:!0,blur:!0,stealfocus:!0,escape:!0}}});u.viewport=function(a,b,c,d,e,f,g){function h(a,c,d,e,f,h,g,k,m){var l=b[f],n=v[a],q=p[a],t=n===f?m:n===h?-m:-m/2,u=F[f]+D[f]-(r? 9480:y[f]),w=u-l;m=l+m-("width"===g?A:B)-u;c=t-(v.precedance===a||n===v[c]?q===f?k:q===h?-k:-k/2:0)-("center"===q?k/2:0);"shift"===d?(c=(n===f?1:-1)*t,b[f]+=0<w?w:0<m?-m:0,b[f]=Math.max(-y[f]+D[f],l-c,Math.min(Math.max(-y[f]+D[f]+("width"===g?A:B),l+c),b[f],"center"===n?l-t:1E9))):(e*="flipinvert"===d?2:0,0<w&&(n!==f||0<m)?(b[f]-=c+e,E.invert(a,f)):0<m&&(n!==h||0<w)&&(b[f]-=("center"===n?-c:c)+e,E.invert(a,h)),b[f]<F[f]&&-b[f]>m&&(b[f]=l,E=v.clone()));return b[f]-l}var m=c.target,l=a.elements.tooltip, 949v=c.my,p=c.at;a=c.adjust;var q=a.method.split(" "),u=q[0];q=q[1]||q[0];var t=c.viewport,x=c.container;c={left:0,top:0};if(!t.jquery||m[0]===z||m[0]===w.body||"none"===a.method)return c;var y=x.offset()||c;var r="static"===x.css("position");m=t[0]===z;l="fixed"===l.css("position");var A=m?t.width():t.outerWidth(!1);var B=m?t.height():t.outerHeight(!1);var F={left:l?0:t.scrollLeft(),top:l?0:t.scrollTop()};var D=!m&&t.offset()||c;if("shift"!==u||"shift"!==q)var E=v.clone();return c={left:"none"!==u? 950h("x","y",u,a.x,"left","right","width",d,f):0,top:"none"!==q?h("y","x",q,a.y,"top","bottom","height",e,g):0,my:E}};u.polys={polygon:function(a,b){var c={width:0,height:0,position:{top:1E10,right:0,bottom:0,left:1E10},adjustable:!1},d,e=[],f=1,g=1;for(d=a.length;d--;){var k=[parseInt(a[--d],10),parseInt(a[d+1],10)];k[0]>c.position.right&&(c.position.right=k[0]);
950k[0]<c.position.left&&(c.position.left=k[0]);k[1]>c.position.bottom&&(c.position.bottom=k[1]);k[1]<c.position.top&&(c.position.top=k[1]);e.push(k)}var m= 951c.width=Math.abs(c.position.right-c.position.left);var l=c.height=Math.abs(c.position.bottom-c.position.top);if("c"===b.abbrev())c.position={left:c.position.left+c.width/2,top:c.position.top+c.height/2};else{for(;0<m&&0<l&&0<f&&0<g;)for(m=Math.floor(m/2),l=Math.floor(l/2),f="left"===b.x?m:"right"===b.x?c.width-m:f+Math.floor(m/2),g="top"===b.y?l:"bottom"===b.y?c.height-l:g+Math.floor(l/2),d=e.length;d--&&!(2>e.length);)a=e[d][0]-c.position.left,k=e[d][1]-c.position.top,("left"===b.x&&a>=f||"right"=== 952b.x&&a<=f||"center"===b.x&&(a<f||a>c.width-f)||"top"===b.y&&k>=g||"bottom"===b.y&&k<=g||"center"===b.y&&(k<g||k>c.height-g))&&e.splice(d,1);c.position={left:e[0][0],top:e[0][1]}}return c},rect:function(a,b,c,d){return{width:Math.abs(c-a),height:Math.abs(d-b),position:{left:Math.min(a,c),top:Math.min(b,d)}}},_angles:{tc:1.5,tr:1.75,tl:1.25,bc:.5,br:.25,bl:.75,rc:2,lc:1,c:0},ellipse:function(a,b,c,d,e){var f=u.polys._angles[e.abbrev()];e=0===f?0:c*Math.cos(f*Math.PI);f=d*Math.sin(f*Math.PI);return{width:2* 953c-Math.abs(e),height:2*d-Math.abs(f),position:{left:a+e,top:b+f},adjustable:!1}},circle:function(a,b,c,d){return u.polys.ellipse(a,b,c,c,d)}};u.svg=function(a,b,c){var d=b[0],h=e(d.ownerSVGElement),f=d.ownerDocument;b=(parseInt(b.css("stroke-width"),10)||0)/2;for(var g,k,m,l;!d.getBBox;)d=d.parentNode;if(!d.getBBox||!d.parentNode)return!1;switch(d.nodeName){case "ellipse":case "circle":b=u.polys.ellipse(d.cx.baseVal.value,d.cy.baseVal.value,(d.rx||d.r).baseVal.value+b,(d.ry||d.r).baseVal.value+b, 954c);break;case "line":case "polygon":case "polyline":l=d.points||[{x:d.x1.baseVal.value,y:d.y1.baseVal.value},{x:d.x2.baseVal.value,y:d.y2.baseVal.value}];b=[];m=-1;for(g=l.numberOfItems||l.length;++m<g;)k=l.getItem?l.getItem(m):l[m],b.push.apply(b,[k.x,k.y]);b=u.polys.polygon(b,c);break;default:b=d.getBBox(),b={width:b.width,height:b.height,position:{left:b.x,top:b.y}}}c=b.position;h=h[0];h.createSVGPoint&&(d=d.getScreenCTM(),l=h.createSVGPoint(),l.x=c.left,l.y=c.top,h=l.matrixTransform(d),c.left= 955h.x,c.top=h.y);f!==w&&"mouse"!==a.position.target&&(a=e((f.defaultView||f.parentWindow).frameElement).offset())&&(c.left+=a.left,c.top+=a.top);f=e(f);c.left+=f.scrollLeft();c.top+=f.scrollTop();return b};u.imagemap=function(a,b,c){b.jquery||(b=e(b));var d=(b.attr("shape")||"rect").toLowerCase().replace("poly","polygon");a=e('img[usemap="#'+b.parent("map").attr("name")+'"]');b=e.trim(b.attr("coords")).replace(/,$/,"").split(",");var h;if(!a.length)return!1;if("polygon"===d)d=u.polys.polygon(b,c);else if(u.polys[d]){var f= 956-1;var g=b.length;for(h=[];++f<g;)h.push(parseInt(b[f],10));d=u.polys[d].apply(this,h.concat(c))}else return!1;c=a.offset();c.left+=Math.ceil((a.outerWidth(!1)-a.width())/2);c.top+=Math.ceil((a.outerHeight(!1)-a.height())/2);d.position.left+=c.left;d.position.top+=c.top;return d};e.extend(da.prototype,{_scroll:function(){var a=this.qtip.elements.overlay;a&&(a[0].style.top=e(z).scrollTop()+"px")},init:function(a){var b=a.tooltip;1>e("select, object").length&&(this.bgiframe=a.elements.bgiframe=e('<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:\'\';" style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=0); -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";"></iframe>').appendTo(b), 957a._bind(b,"tooltipmove",this.adjustBGIFrame,this._ns,this));this.redrawContainer=e("<div/>",{id:"qtip-rcontainer"}).appendTo(w.body);a.elements.overlay&&a.elements.overlay.addClass("qtipmodal-ie6fix")&&(a._bind(z,["scroll","resize"],this._scroll,this._ns,this),a._bind(b,["tooltipshow"],this._scroll,this._ns,this));this.redraw()},adjustBGIFrame:function(){var a=this.qtip.tooltip,b={height:a.outerHeight(!1),width:a.outerWidth(!1)},c=this.qtip.plugins.tip,d=this.qtip.elements.tip;a=parseInt(a.css("borderLeftWidth"), 95810)||0;a={left:-a,top:-a};c&&d&&(c="x"===c.corner.precedance?["width","left"]:["height","top"],a[c[1]]-=d[c[0]]());this.bgiframe.css(a).css(b)},redraw:function(){if(1>this.qtip.rendered||this.drawing)return this;var a=this.qtip.tooltip,b=this.qtip.options.style,c=this.qtip.options.position.container;this.qtip.drawing=1;b.height&&a.css("height",b.height);if(b.width)a.css("width",b.width);else{a.css("width","").appendTo(this.redrawContainer);var d=a.width();1>d%2&&(d+=1);var e=a.css("maxWidth")||""; 959var f=a.css("minWidth")||"";b=-1<(e+f).indexOf("%")?c.width()/100:0;e=(-1<e.indexOf("%")?b:1*parseInt(e,10))||d;f=(-1<f.indexOf("%")?b:1*parseInt(f,10))||0;d=e+f?Math.min(Math.max(d,f),e):d;a.css("width",Math.round(d)).appendTo(c)}this.drawing=0;return this},destroy:function(){this.bgiframe&&this.bgiframe.remove();this.qtip._unbind([z,this.qtip.tooltip],this._ns)}});(u.ie6=function(a){return 6===F?new da(a):!1}).initialize="render";W.ie6={"^content|style$":function(){this.redraw()}}})})(window,document); 960; 961 962// ***************************
963// js.compressed/qtip.js 964// *************************** 965vBulletin.precache(["no_preview_text_available","working_ellipsis"],["threadpreview"]); 966vBulletin.qtip=function(a){function k(b,d,l){var g=["left","right"];vBulletin.isRtl()&&g.reverse();d={style:{classes:"qtip-shadow qtip-rounded "+d},position:{my:"top "+g[0],at:"bottom "+g[1],viewport:a(window)}};a.extend(d,l);b.qtip(d)}function m(b){k(a(".js-tooltip[title]",b))}(function(){function b(l,g){var e=g.elements.tooltip;window.setTimeout(function(){var c=parseInt(e.css("left"),10),f=a(window).scrollLeft();if(c<f)e.css("left",f+1);else{var h=e.outerWidth(),n=a(window).width();h=c+h;f+=n; 967h>f&&e.css("left",c-(h-f)-1)}},0)}var d=a.fn.qtip;a.fn.qtip=function(){"object"==typeof arguments[0]&&("undefined"==typeof arguments[0].events&&(arguments[0].events={}),arguments[0].events.move="function"==typeof arguments[0].events.move?vBulletin.ajaxtools.runBeforeCallback(arguments[0].events.move,b):b);return d.apply(this,arguments)}})();m(a(document));a(document).on("vb-instrument",function(b){m(a(b.target))});(0<a(".channel-content-widget").length&&a(".channel-content-widget").eq(0).attr("data-canviewtopiccontent")|| 9680<a(".search-results-widget").length)&&a(document).offon("mouseover",".topic-list-container .topic-title, .conversation-list .post-title, .conversation-list .b-post__title",function(){if(0<vBulletin.options.get("threadpreview")){var b=a(this);if("1"!=b.data("vb-qtip-preview-initialized")){b.data("vb-qtip-preview-initialized","1");var d=parseInt(b.closest(".topic-item").attr("data-node-id")||b.closest(".js-post").attr("data-node-id"));vBulletin.isRtl();k(b,"qtip-topicpreview",{content:{text:function(l, 969g){var e=function(c){var f=c?c:vBulletin.phrase.get("no_preview_text_available");g.set("content.text",f);return c};return d?(vBulletin.AJAX({call:"/ajax/fetch-node-preview",data:{nodeid:d},success:function(c){e(a.trim(c))},api_error:function(){e()},error:function(c,f,h){e(f+": "+h)}}),vBulletin.phrase.get("working_ellipsis")):e()}},show:{delay:500},hide:{event:"mouseleave click"}});b.trigger("mouseover")}}else a(document).off("mouseover",".topic-list-container .topic-title, .conversation-list .post-title, .conversation-list .b-post__title")}); 970return{apply:k}}(jQuery); 971; 972 973// ***************************
974// js.compressed/jquery/jquery.jcarousel.custom.min.js 975// *************************** 976/* 977 jCarousel - Riding carousels with jQuery 978 http://sorgalla.com/jcarousel/ 979 980 Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com) 981 Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 982 and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. 983 984 Built on top of the jQuery library 985 http://jquery.com 986 987 Inspired by the "Carousel Component" by Bill Scott 988 http://billwscott.com/carousel/ 989 990 Modified for vBulletin: 991 - added destroy method 992 - changed reset method by adding a flag to call setup method 993 - added check for undefined instance in the main jcarousel function 994*/ 995(function(g){var u={vertical:!1,rtl:!1,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,setupCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,animationStepCallback:null,buttonNextHTML:"<div></div>",buttonPrevHTML:"<div></div>",buttonNextEvent:"click",buttonPrevEvent:"click", 996buttonNextCallback:null,buttonPrevCallback:null,itemFallbackDimension:null},q=!1;g(window).on("load.jcarousel",function(){q=!0});g.jcarousel=function(a,b){this.options=g.extend({},u,b||{});this.autoStopped=this.locked=!1;this.buttonPrevState=this.buttonNextState=this.buttonPrev=this.buttonNext=this.list=this.clip=this.container=null;b&&void 0!==b.rtl||(this.options.rtl="rtl"==(g(a).attr("dir")||g("html").attr("dir")||"").toLowerCase());this.wh=this.options.vertical?"height":"width";this.lt=this.options.vertical? 997"top":this.options.rtl?"right":"left";for(var c="",e=a.className.split(" "),n=0;n<e.length;n++)if(-1!=e[n].indexOf("jcarousel-skin")){g(a).removeClass(e[n]);c=e[n];break}"UL"==a.nodeName.toUpperCase()||"OL"==a.nodeName.toUpperCase()?(this.list=g(a),this.clip=this.list.parents(".jcarousel-clip"),this.container=this.list.parents(".jcarousel-container")):(this.container=g(a),this.list=this.container.find("ul,ol").eq(0),this.clip=this.container.find(".jcarousel-clip"));0===this.clip.length&&(this.clip= 998this.list.wrap("<div></div>").parent());0===this.container.length&&(this.container=this.clip.wrap("<div></div>").parent());""!==c&&-1==this.container.parent()[0].className.indexOf("jcarousel-skin")&&this.container.wrap('<div class=" '+c+'"></div>');this.buttonPrev=g(".jcarousel-prev",this.container);0===this.buttonPrev.length&&null!==this.options.buttonPrevHTML&&(this.buttonPrev=g(this.options.buttonPrevHTML).appendTo(this.container));this.buttonPrev.addClass(this.className("jcarousel-prev"));this.buttonNext= 999g(".jcarousel-next",this.container);0===this.buttonNext.length&&null!==this.options.buttonNextHTML&&(this.buttonNext=g(this.options.buttonNextHTML).appendTo(this.container));this.buttonNext.addClass(this.className("jcarousel-next"));this.clip.addClass(this.className("jcarousel-clip")).css({position:"relative"});this.list.addClass(this.className("jcarousel-list")).css({overflow:"hidden",position:"relative",top:0,margin:0,padding:0}).css(this.options.rtl?"right":"left",0);this.container.addClass(this.className("jcarousel-container")).css({position:"relative"}); 1000!this.options.vertical&&this.options.rtl&&this.container.addClass("jcarousel-direction-rtl").attr("dir","rtl");var l=null!==this.options.visible?Math.ceil(this.clipping()/this.options.visible):null;a=this.list.children("li");var d=this;if(0<a.length){var h=0,k=this.options.offset;a.each(function(){d.format(this,k++);h+=d.dimension(this,l)});this.list.css(this.wh,h+100+"px");b&&void 0!==b.size||(this.options.size=a.length)}this.container.css("display","block");this.buttonNext.css("display","block"); 1001this.buttonPrev.css("display","block");this.funcNext=function(){d.next();return!1};this.funcPrev=function(){d.prev();return!1};this.funcResize=function(){d.resizeTimer&&clearTimeout(d.resizeTimer);d.resizeTimer=setTimeout(function(){d.reload()},100)};null!==this.options.initCallback&&this.options.initCallback(this,"init");
1001!q&&f.isSafari()?(this.buttons(!1,!1),g(window).on("load.jcarousel",function(){d.setup()})):this.setup()};var f=g.jcarousel;f.fn=f.prototype={jcarousel:"0.2.10"};f.fn.extend=f.extend= 1002g.extend;f.fn.extend({setup:function(){this.prevLast=this.prevFirst=this.last=this.first=null;this.animating=!1;this.tail=this.resizeTimer=this.timer=null;this.inTail=!1;if(!this.locked){this.list.css(this.lt,this.pos(this.options.offset)+"px");var a=this.pos(this.options.start,!0);this.prevFirst=this.prevLast=null;this.animate(a,!1);g(window).off("resize.jcarousel",this.funcResize).on("resize.jcarousel",this.funcResize);null!==this.options.setupCallback&&this.options.setupCallback(this)}},reset:function(a){this.list.empty(); 1003this.list.css(this.lt,"0px");this.list.css(this.wh,"10px");null!==this.options.initCallback&&this.options.initCallback(this,"reset");a&&this.setup()},reload:function(){null!==this.tail&&this.inTail&&this.list.css(this.lt,f.intval(this.list.css(this.lt))+this.tail);this.tail=null;this.inTail=!1;null!==this.options.reloadCallback&&this.options.reloadCallback(this);if(null!==this.options.visible){var a=this,b=Math.ceil(this.clipping()/this.options.visible),c=0,e=0;this.list.children("li").each(function(f){c+= 1004a.dimension(this,b);f+1<a.first&&(e=c)});this.list.css(this.wh,c+"px");this.list.css(this.lt,-e+"px")}this.scroll(this.first,!1)},canmove(){return!(this.locked||this.animating)},lock:function(){this.locked=!0;this.buttons()},unlock:function(){this.locked=!1;this.buttons()},size:function(a){void 0!==a&&(this.options.size=a,this.locked||this.buttons());return this.options.size},has:function(a,b){void 0!==b&&b||(b=a);null!==this.options.size&&b>this.options.size&&(b=this.options.size);for(;a<=b;a++){var c= 1005this.get(a);if(!c.length||c.hasClass("jcarousel-item-placeholder"))return!1}return!0},get:function(a){return g(">.jcarousel-item-"+a,this.list)},add:function(a,b){var c=this.get(a),e=0,n=g(b);if(0===c.length){var l=f.intval(a);for(c=this.create(a);;){var d=this.get(--l);if(0>=l||d.length){0>=l?this.list.prepend(c):d.after(c);break}}}else e=this.dimension(c);"LI"==n.get(0).nodeName.toUpperCase()?(c.replaceWith(n),c=n):c.empty().append(b);this.format(c.removeClass(this.className("jcarousel-item-placeholder")), 1006a);b=null!==this.options.visible?Math.ceil(this.clipping()/this.options.visible):null;e=this.dimension(c,b)-e;0<a&&a<this.first&&this.list.css(this.lt,f.intval(this.list.css(this.lt))-e+"px");this.list.css(this.wh,f.intval(this.list.css(this.wh))+e+"px");return c},remove:function(a){var b=this.get(a);if(b.length&&!(a>=this.first&&a<=this.last)){var c=this.dimension(b);a<this.first&&this.list.css(this.lt,f.intval(this.list.css(this.lt))+c+"px");b.remove();this.list.css(this.wh,f.intval(this.list.css(this.wh))- 1007c+"px")}},next:function(){null===this.tail||this.inTail?this.scroll("both"!=this.options.wrap&&"last"!=this.options.wrap||null===this.options.size||this.last!=this.options.size?this.first+this.options.scroll:1):this.scrollTail(!1)},prev:function(){null!==this.tail&&this.inTail?this.scrollTail(!0):this.scroll("both"!=this.options.wrap&&"first"!=this.options.wrap||null===this.options.size||1!=this.first?this.first-this.options.scroll:this.options.size)},scrollTail:function(a){if(!this.locked&&!this.animating&& 1008this.tail){this.pauseAuto();var b=f.intval(this.list.css(this.lt));b=a?b+this.tail:b-this.tail;this.inTail=!a;this.prevFirst=this.first;this.prevLast=this.last;this.animate(b)}},scroll:function(a,b){this.locked||this.animating||(this.pauseAuto(),this.animate(this.pos(a),b))},pos:function(a,b){var c=f.intval(this.list[0].style[this.lt]);if(this.locked||this.animating)return c;"circular"!=this.options.wrap&&(a=1>a?1:this.options.size&&a>this.options.size?this.options.size:a);for(var e=this.first>a, 1009g="circular"!=this.options.wrap&&1>=this.first?1:this.first,l=e?this.get(g):this.get(this.last),d=e?g:g-1,h,k=0,m,p;e?--d>=a:++d<a;)h=this.get(d),m=!h.length,0===h.length&&(h=this.create(d).addClass(this.className("jcarousel-item-placeholder")),l[e?"before":"after"](h),null!==this.first&&"circular"==this.options.wrap&&null!==this.options.size&&(0>=d||d>this.options.size)&&(l=this.get(this.index(d)),l.length&&(h=this.add(d,l.clone(!0))))),l=h,p=this.dimension(h),m&&(k+=p),null!==this.first&&("circular"== 1010this.options.wrap||1<=d&&(null===this.options.size||d<=this.options.size))&&(c=e?c+p:c-p);g=this.clipping();var q=[],t=0,r=0;l=this.get(a-1);for(d=a;++t;){h=this.get(d);m=!h.length;if(0===h.length){h=this.create(d).addClass(this.className("jcarousel-item-placeholder"));if(0===l.length)this.list.prepend(h);else l[e?"before":"after"](h);null!==this.first&&"circular"==this.options.wrap&&null!==this.options.size&&(0>=d||d>this.options.size)&&(l=this.get(this.index(d)),l.length&&(h=this.add(d,l.clone(!0))))}l= 1011h;p=this.dimension(h);if(0===p)throw Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...");"circular"!=this.options.wrap&&null!==this.options.size&&d>this.options.size?q.push(h):m&&(k+=p);r+=p;if(r>=g)break;d++}for(h=0;h<q.length;h++)q[h].remove();0<k&&(this.list.css(this.wh,this.dimension(this.list)+k+"px"),e&&(c-=k,this.list.css(this.lt,f.intval(this.list.css(this.lt))-k+"px")));k=a+t-1;"circular"!=this.options.wrap&&this.options.size&&k>this.options.size&& 1012(k=this.options.size);if(d>k)for(t=0,d=k,r=0;++t;){h=this.get(d--);if(!h.length)break;r+=this.dimension(h);if(r>=g)break}d=k-t+1;"circular"!=this.options.wrap&&1>d&&(d=1);this.inTail&&e&&(c+=this.tail,this.inTail=!1);this.tail=null;"circular"!=this.options.wrap&&k==this.options.size&&1<=k-t+1&&(e=f.intval(this.get(k).css(this.options.vertical?"marginBottom":"marginRight")),r-e>g&&(this.tail=r-g-e));b&&a===this.options.size&&this.tail&&(c-=this.tail,this.inTail=!0);for(;a-- >d;)c+=this.dimension(this.get(a)); 1013this.prevFirst=this.first;this.prevLast=this.last;this.first=d;this.last=k;return c},animate:function(a,b){if(!this.locked&&!this.animating){this.animating=!0;var c=this,e=function(){c.animating=!1;0===a&&c.list.css(c.lt,0);!c.autoStopped&&("circular"==c.options.wrap||"both"==c.options.wrap||"last"==c.options.wrap||null===c.options.size||c.last<c.options.size||c.last==c.options.size&&null!==c.tail&&!c.inTail)&&c.startAuto();c.buttons();c.notify("onAfterAnimation");if("circular"==c.options.wrap&&null!== 1014c.options.size)for(var b=c.prevFirst;b<=c.prevLast;b++)null===b||b>=c.first&&b<=c.last||!(1>b||b>c.options.size)||c.remove(b)};this.notify("onBeforeAnimation");this.options.animation&&!1!==b?(b=this.options.vertical?{top:a}:this.options.rtl?{right:a}:{left:a},e={duration:this.options.animation,easing:this.options.easing,complete:e},g.isFunction(this.options.animationStepCallback)&&(e.step=this.options.animationStepCallback),this.list.animate(b,e)):(this.list.css(this.lt,a+"px"),e())}},startAuto:function(a){void 0!== 1015a&&(this.options.auto=a);if(0===this.options.auto)return this.stopAuto();if(null===this.timer){this.autoStopped=!1;var b=this;this.timer=window.setTimeout(function(){b.next()},1E3*this.options.auto)}},stopAuto:function(){this.pauseAuto();this.autoStopped=!0},pauseAuto:function(){null!==this.timer&&(window.clearTimeout(this.timer),this.timer=null)},buttons:function(a,b){null==a&&(a=!this.locked&&0!==this.options.size&&(this.options.wrap&&"first"!=this.options.wrap||null===this.options.size||this.last< 1016this.options.size),!(this.locked||this.options.wrap&&"first"!=this.options.wrap)&&null!==this.options.size&&this.last>=this.options.size&&(a=null!==this.tail&&!this.inTail));null==b&&(b=!this.locked&&0!==this.options.size&&(this.options.wrap&&"last"!=this.options.wrap||1<this.first),this.locked||this.options.wrap&&"last"!=this.options.wrap||null===this.options.size||1!=this.first||(b=null!==this.tail&&this.inTail));var c=this;if(0<this.buttonNext.length){this.buttonNext.off(this.options.buttonNextEvent+ 1017".jcarousel",this.funcNext);if(a)this.buttonNext.on(this.options.buttonNextEvent+".jcarousel",this.funcNext);this.buttonNext[a?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",a?!1:!0);null!==this.options.buttonNextCallback&&this.buttonNext.data("jcarou
1017selstate")!=a&&this.buttonNext.each(function(){c.options.buttonNextCallback(c,this,a)}).data("jcarouselstate",a)}else null!==this.options.buttonNextCallback&&this.buttonNextState!=a&&this.options.buttonNextCallback(c, 1018null,a);if(0<this.buttonPrev.length){this.buttonPrev.off(this.options.buttonPrevEvent+".jcarousel",this.funcPrev);if(b)this.buttonPrev.on(this.options.buttonPrevEvent+".jcarousel",this.funcPrev);this.buttonPrev[b?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",b?!1:!0);null!==this.options.buttonPrevCallback&&this.buttonPrev.data("jcarouselstate")!=b&&this.buttonPrev.each(function(){c.options.buttonPrevCallback(c,this,b)}).data("jcarouselstate",b)}else null!==this.options.buttonPrevCallback&& 1019this.buttonPrevState!=b&&this.options.buttonPrevCallback(c,null,b);this.buttonNextState=a;this.buttonPrevState=b},notify:function(a){var b=null===this.prevFirst?"init":this.prevFirst<this.first?"next":"prev";this.callback("itemLoadCallback",a,b);this.prevFirst!==this.first&&(this.callback("itemFirstInCallback",a,b,this.first),this.callback("itemFirstOutCallback",a,b,this.prevFirst));this.prevLast!==this.last&&(this.callback("itemLastInCallback",a,b,this.last),this.callback("itemLastOutCallback",a, 1020b,this.prevLast));this.callback("itemVisibleInCallback",a,b,this.first,this.last,this.prevFirst,this.prevLast);this.callback("itemVisibleOutCallback",a,b,this.prevFirst,this.prevLast,this.first,this.last)},callback:function(a,b,c,e,f,l,d){if(null!=this.options[a]&&("object"==typeof this.options[a]||"onAfterAnimation"==b)){var h="object"==typeof this.options[a]?this.options[a][b]:this.options[a];if(g.isFunction(h)){var k=this;if(void 0===e)h(k,c,b);else if(void 0===f)this.get(e).each(function(){h(k, 1021this,e,c,b)});else{a=function(a){k.get(a).each(function(){h(k,this,a,c,b)})};for(var m=e;m<=f;m++)null===m||m>=l&&m<=d||a(m)}}}},create:function(a){return this.format("<li></li>",a)},destroy:function(){this.reset();g(window).off(".jcarousel");this.list.removeData("jcarousel");this.container.removeData("jcarousel");this.buttonNext.removeData("jcarouselstate").remove();this.buttonPrev.removeData("jcarouselstate").remove();return this},format:function(a,b){a=g(a);for(var c=a.get(0).className.split(" "), 1022e=0;e<c.length;e++)-1!=c[e].indexOf("jcarousel-")&&a.removeClass(c[e]);a.addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-"+b)).css({"float":this.options.rtl?"right":"left","list-style":"none"}).attr("jcarouselindex",b);return a},className:function(a){return a+" "+a+(this.options.vertical?"-vertical":"-horizontal")},dimension:function(a,b){a=g(a);if(null==b)return this.options.vertical?a.innerHeight()+f.intval(a.css("margin-top"))+f.intval(a.css("margin-bottom"))+ 1023f.intval(a.css("border-top-width"))+f.intval(a.css("border-bottom-width"))||f.intval(this.options.itemFallbackDimension):a.innerWidth()+f.intval(a.css("margin-left"))+f.intval(a.css("margin-right"))+f.intval(a.css("border-left-width"))+f.intval(a.css("border-right-width"))||f.intval(this.options.itemFallbackDimension);b=this.options.vertical?b-f.intval(a.css("marginTop"))-f.intval(a.css("marginBottom")):b-f.intval(a.css("marginLeft"))-f.intval(a.css("marginRight"));g(a).css(this.wh,b+"px");return this.dimension(a)}, 1024clipping:function(){return this.options.vertical?this.clip[0].offsetHeight-f.intval(this.clip.css("borderTopWidth"))-f.intval(this.clip.css("borderBottomWidth")):this.clip[0].offsetWidth-f.intval(this.clip.css("borderLeftWidth"))-f.intval(this.clip.css("borderRightWidth"))},index:function(a,b){null==b&&(b=this.options.size);return Math.round(((a-1)/b-Math.floor((a-1)/b))*b)+1}});f.extend({defaults:function(a){return g.extend(u,a||{})},intval:function(a){a=parseInt(a,10);return isNaN(a)?0:a},windowLoaded:function(){q= 1025!0},isSafari:function(){var a=navigator.userAgent.toLowerCase();return"webkit"===((/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||[])[1]||"")}});g.fn.jcarousel=function(a){if("string"==typeof a){var b=g(this).data("jcarousel"),c=Array.prototype.slice.call(arguments,1
1025);return"undefined"!=typeof b?b[a].apply(b,c):this}return this.each(function(){var b=g(this).data("jcarousel");b?(a&&g.extend(b.options,a),b.reload()):g(this).data("jcarousel",new f(this,a))})}})(jQuery); 1026; 1027 1028// ***************************
vendor: 15,915 bytes, lines 1029-1600
1029// js.compressed/jquery/history.js 1030// *************************** 1031/** 1032 * History.js Core 1033 * @author Benjamin Arthur Lupton <[email protected]> 1034 * @copyright 2010-2011 Benjamin Arthur Lupton <[email protected]> 1035 * @license New BSD License <http://creativecommons.org/licenses/BSD/> 1036 * 1037 * ============ NOTE: This version contains patch from https://github.com/christanto/history.js/commit/b78af84fc2b6b5da573e5ee0bd72f4213e36bb18 ============ 1038 */ 1039 1040(function(window,undefined){ 1041 "use strict"; 1042 1043 // -------------------------------------------------------------------------- 1044 // Initialise 1045 1046 // Localise Globals 1047 var 1048 console = window.console||undefined, // Prevent a JSLint complain 1049 document = window.document, // Make sure we are using the correct document 1050 navigator = window.navigator, // Make sure we are using the correct navigator 1051 amplify = window.amplify||false, // Amplify.js 1052 setTimeout = window.setTimeout, 1053 clearTimeout = window.clearTimeout, 1054 setInterval = window.setInterval, 1055 clearInterval = window.clearInterval, 1056 JSON = window.JSON, 1057 History = window.History = window.History||{}, // Public History Object 1058 history = window.history; // Old History Object 1059 1060 // MooTools Compatibility 1061 JSON.stringify = JSON.stringify||JSON.encode; 1062 JSON.parse = JSON.parse||JSON.decode; 1063 1064 // Check Existence 1065 if ( typeof History.init !== 'undefined' ) { 1066 throw new Error('History.js Core has already been loaded...'); 1067 } 1068 1069 // Initialise History 1070 History.init = function(){ 1071 // Check Load Status of Adapter 1072 if ( typeof History.Adapter === 'undefined' ) { 1073 return false; 1074 } 1075 1076 // Check Load Status of Core 1077 if ( typeof History.initCore !== 'undefined' ) { 1078 History.initCore(); 1079 } 1080 1081 // Check Load Status of HTML4 Support 1082 if ( typeof History.initHtml4 !== 'undefined' ) { 1083 History.initHtml4(); 1084 } 1085 1086 // Return true 1087 return true; 1088 }; 1089 1090 // -------------------------------------------------------------------------- 1091 // Initialise Core 1092 1093 // Initialise Core 1094 History.initCore = function(){ 1095 // Initialise 1096 if ( typeof History.initCore.initialized !== 'undefined' ) { 1097 // Already Loaded 1098 return false; 1099 } 1100 else { 1101 History.initCore.initialized = true; 1102 } 1103 1104 // ---------------------------------------------------------------------- 1105 // Options 1106 1107 /** 1108 * History.options 1109 * Configurable options 1110 */ 1111 History.options = History.options||{}; 1112 1113 /** 1114 * History.options.hashChangeInterval 1115 * How long should the interval be before hashchange checks 1116 */ 1117 History.options.hashChangeInterval = History.options.hashChangeInterval || 100; 1118 1119 /** 1120 * History.options.safariPollInterval 1121 * How long should the interval be before safari poll checks 1122 */ 1123 History.options.safariPollInterval = History.options.safariPollInterval || 500; 1124 1125 /** 1126 * History.options.doubleCheckInterval 1127 * How long should the interval be before we perform a double check 1128 */ 1129 History.options.doubleCheckInterval = History.options.doubleCheckInterval || 500; 1130 1131 /** 1132 * History.options.storeInterval 1133 * How long should we wait between store calls 1134 */ 1135 History.options.storeInterval = History.options.storeInterval || 1000; 1136 1137 /** 1138 * History.options.busyDelay 1139 * How long should we wait between busy events 1140 */ 1141 History.options.busyDelay = History.options.busyDelay || 250; 1142 1143 /** 1144 * History.options.debug 1145 * If true will enable debug messages to be logged 1146 */ 1147 History.options.debug = History.options.debug || false; 1148 1149 /** 1150 * History.options.initialTitle 1151 * What is the title of the initial state 1152 */ 1153 History.options.initialTitle = History.options.initialTitle || document.title; 1154 1155 /** 1156 * History.options.transformHash 1157 * If true will transform the HTML4 hash to HTML5 equivalence. Set to false if you want the hash to be just a plain string, no meaning whatsoever. 1158 */ 1159 History.options.transformHash = History.options.transformHash || true; 1160 1161 // ---------------------------------------------------------------------- 1162 // Interval record 1163 1164 /** 1165 * History.intervalList 1166 * List of intervals set, to be cleared when document is unloaded. 1167 */ 1168 History.intervalList = []; 1169 1170 /** 1171 * History.clearAllIntervals 1172 * Clears all setInterval instances. 1173 */ 1174 History.clearAllIntervals = function(){ 1175 var i, il = History.intervalList; 1176 if (typeof il !== "undefined" && il !== null) { 1177 for (i = 0; i < il.length; i++) { 1178 clearInterval(il[i]); 1179 } 1180 History.intervalList = null; 1181 } 1182 }; 1183 History.Adapter.bind(window,"beforeunload",History.clearAllIntervals); 1184 History.Adapter.bind(window,"unload",History.clearAllIntervals); 1185 1186 1187 // ---------------------------------------------------------------------- 1188 // Debug 1189 1190 /** 1191 * History.debug(message,...) 1192 * Logs the passed arguments if debug enabled 1193 */ 1194 History.debug = function(){ 1195 if ( (History.options.debug||false) ) { 1196 History.log.apply(History,arguments); 1197 } 1198 }; 1199 1200 /** 1201 * History.log(message,...) 1202 * Logs the passed arguments 1203 */ 1204 History.log = function(){ 1205 // Prepare 1206 var 1207 consoleExists = !(typeof console === 'undefined' || typeof console.log === 'undefined' || typeof console.log.apply === 'undefined'), 1208 textarea = document.getElementById('log'), 1209 message, 1210 i,n 1211 ; 1212 1213 // Write to Console 1214 if ( consoleExists ) { 1215 var args = Array.prototype.slice.call(arguments); 1216 message = args.shift(); 1217 if ( typeof console.debug !== 'undefined' ) { 1218 console.debug.apply(console,[message,args]); 1219 } 1220 else { 1221 console.log.apply(console,[message,args]); 1222 } 1223 } 1224 else { 1225 message = ("\n"+arguments[0]+"\n"); 1226 } 1227 1228 // Write to log 1229 for ( i=1,n=arguments.length; i<n; ++i ) { 1230 var arg = arguments[i]; 1231 if ( typeof arg === 'object' && typeof JSON !== 'undefined' ) { 1232 try { 1233 arg = JSON.stringify(arg); 1234 } 1235 catch ( Exception ) { 1236 // Recursive Object 1237 } 1238 } 1239 message += "\n"+arg+"\n"; 1240 } 1241 1242 // Textarea 1243 if ( textarea ) { 1244 textarea.value += message+"\n-----\n"; 1245 textarea.scrollTop = textarea.scrollHeight - textarea.clientHeight; 1246 } 1247 // No Textarea, No Console 1248 else if ( !consoleExists ) { 1249 alert(message); 1250 } 1251 1252 // Return true 1253 return true; 1254 }; 1255 1256 // ---------------------------------------------------------------------- 1257 // Emulated Status 1258 1259 /** 1260 * History.getInternetExplorerMajorVersion() 1261 * Get's the major version of Internet Explorer 1262 * @return {integer} 1263 * @license Public Domain 1264 * @author Benjamin Arthur Lupton <[email protected]> 1265 * @author James Padolsey <https://gist.github.com/527683> 1266 */ 1267 History.getInternetExplorerMajorVersion = function(){ 1268 var result = History.getInternetExplorerMajorVersion.cached = 1269 (typeof History.getInternetExplorerMajorVersion.cached !== 'undefined') 1270 ? History.getInternetExplorerMajorVersion.cached 1271 : (function(){ 1272 var v = 3, 1273 div = document.createElement('div'), 1274 all = div.getElementsByTagName('i'); 1275 while ( (div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->') && all[0] ) {} 1276 return (v > 4) ? v : false; 1277 })() 1278 ; 1279 return result; 1280 }; 1281 1282 /** 1283 * History.isInternetExplorer() 1284 * Are we using Internet Explorer? 1285 * @return {boolean} 1286 * @license Public Domain 1287 * @author Benjamin Arthur Lupton <[email protected]> 1288 */ 1289 History.isInternetExplorer = function(){ 1290 var result = 1291 History.isInternetExplorer.cached = 1292 (typeof History.isInternetExplorer.cached !== 'undefined') 1293 ? History.isInternetExplorer.cached 1294 : Boolean(History.getInternetExplorerMajorVersion()) 1295 ; 1296 return result; 1297 }; 1298 1299 /** 1300 * History.emulated 1301 * Which features require emulating? 1302 */ 1303 History.emulated = { 1304 pushState: !Boolean( 1305 window.history && window.history.pushState && window.history.replaceState 1306 && !( 1307 (/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i).test(navigator.userAgent) /* disable for versions of iOS before version 4.3 (8F190) */ 1308 || (/AppleWebKit\/5([0-2]|3[0-2])/i).test(navigator.userAgent) /* disable for the mercury iOS browser, or at least older versions of the webkit engine */ 1309 ) 1310 ), 1311 hashChange: Boolean( 1312 !(('onhashchange' in window) || ('onhashchange' in document)) 1313 || 1314 (History.isInternetExplorer() && History.getInternetExplorerMajorVersion() < 8) 1315 ) 1316 }; 1317 1318 /** 1319 * History.enabled 1320 * Is History enabled? 1321 */ 1322 History.enabled = !History.emulated.pushState; 1323 1324 /** 1325 * History.bugs 1326 * Which bugs are present 1327 */ 1328 History.bugs = { 1329 /** 1330 * Safari 5 and Safari iOS 4 fail to return to the correct state once a hash is replaced by a `replaceState` call 1331 * https://bugs.webkit.org/show_bug.cgi?id=56249 1332 */ 1333 setHash: Boolean(!History.emulated.pushState && navigator.vendor === 'Apple Computer, Inc.' && /AppleWebKit\/5([0-2]|3[0-3])/.test(navigator.userAgent)), 1334 1335 /** 1336 * Safari 5 and Safari iOS 4 sometimes fail to apply the state change under busy conditions 1337 * https://bugs.webkit.org/show_bug.cgi?id=42940 1338 */ 1339 safariPoll: Boolean(!History.emulated.pushState && navigator.vendor === 'Apple Computer, Inc.' && /AppleWebKit\/5([0-2]|3[0-3])/.test(navigator.userAgent)), 1340 1341 /** 1342 * MSIE 6 and 7 sometimes do not apply a hash even it was told to (requiring a second call to the apply function) 1343 */ 1344 ieDoubleCheck: Boolean(History.isInternetExplorer() && History.getInternetExplorerMajorVersion() < 8), 1345 1346 /** 1347 * MSIE 6 requires the entire hash to be encoded for the hashes to trigger the onHashChange event 1348 */ 1349 hashEscape: Boolean(History.isInternetExplorer() && History.getInternetExplorerMajorVersion() < 7) 1350 }; 1351 1352 /** 1353 * History.isEmptyObject(obj) 1354 * Checks to see if the Object is Empty 1355 * @param {Object} obj 1356 * @return {boolean} 1357 */ 1358 History.isEmptyObject = function(obj) { 1359 for ( var name in obj ) { 1360 return false; 1361 } 1362 return true; 1363 }; 1364 1365 /** 1366 * History.cloneObject(obj) 1367 * Clones a object 1368 * @param {Object} obj 1369 * @return {Object} 1370 */ 1371 History.cloneObject = function(obj) { 1372 var hash,newObj; 1373 if ( obj ) { 1374 hash = JSON.stringify(obj); 1375 newObj = JSON.parse(hash); 1376 } 1377 else { 1378 newObj = {}; 1379 } 1380 return newObj; 1381 }; 1382 1383 // ---------------------------------------------------------------------- 1384 // URL Helpers 1385 1386 /** 1387 * History.getRootUrl() 1388 * Turns "http://mysite.com/dir/page.html?asd" into "http://mysite.com" 1389 * @return {String} rootUrl 1390 */ 1391 History.getRootUrl = function(){ 1392 // Create 1393 var rootUrl = document.location.protocol+'//'+(document.location.hostname||document.location.host); 1394 if ( document.location.port||false ) { 1395 rootUrl += ':'+document.location.port; 1396 } 1397 rootUrl += '/'; 1398 1399 // Return 1400 return rootUrl; 1401 }; 1402 1403 /** 1404 * History.getBaseHref() 1405 * Fetches the `href` attribute of the `<base href="...">` element if it exists 1406 * @return {String} baseHref 1407 */ 1408 History.getBaseHref = function(){ 1409 // Create 1410 var 1411 baseElements = document.getElementsByTagName('base'), 1412 baseElement = null, 1413 baseHref = ''; 1414 1415 // Test for Base Element 1416 if ( baseElements.length === 1 ) { 1417 // Prepare for Base Element 1418 baseElement = baseElements[0]; 1419 baseHref = baseElement.href.replace(/[^\/]+$/,''); 1420 } 1421 1422 // Adjust trailing slash 1423 baseHref = baseHref.replace(/\/+$/,''); 1424 if ( baseHref ) baseHref += '/'; 1425 1426 // Return 1427 return baseHref; 1428 }; 1429 1430 /** 1431 * History.getBaseUrl() 1432 * Fetches the baseHref or basePageUrl or rootUrl (whichever one exists first) 1433 * @return {String} baseUrl 1434 */ 1435 History.getBaseUrl = function(){ 1436 // Create 1437 var baseUrl = History.getBaseHref()||History.getBasePageUrl()||History.getRootUrl(); 1438 1439 // Return 1440 return baseUrl; 1441 }; 1442 1443 /** 1444 * History.getPageUrl() 1445 * Fetches the URL of the current page 1446 * @return {String} pageUrl 1447 */ 1448 History.getPageUrl = function(){ 1449 // Fetch 1450 var 1451 State = History.getState(false,false), 1452 stateUrl = (State||{}).url||document.location.href; 1453 1454 // Create 1455 var pageUrl = stateUrl.replace(/\/+$/,'').replace(/[^\/]+$/,function(part,index,string){ 1456 return (/\./).test(part) ? part : part+'/'; 1457 }); 1458 1459 // Return 1460 return pageUrl; 1461 }; 1462 1463 /** 1464 * History.getBasePageUrl() 1465 * Fetches the Url of the directory of the current page 1466 * @return {String} basePageUrl 1467 */ 1468 History.getBasePageUrl = function(){ 1469 // Create 1470 var basePageUrl = document.location.href.replace(/[#\?].*/,'').replace(/[^\/]+$/,function(part,index,string){ 1471 return (/[^\/]$/).test(part) ? '' : part; 1472 }).replace(/\/+$/,'')+'/'; 1473 1474 // Return 1475 return basePageUrl; 1476 }; 1477 1478 /** 1479 * History.getFullUrl(url) 1480 * Ensures that we have an absolute URL and not a relative URL 1481 * @param {string} url 1482 * @param {Boolean} allowBaseHref 1483 * @return {string} fullUrl 1484 */ 1485 History.getFullUrl = function(url,allowBaseHref){ 1486 // Prepare 1487 var fullUrl = url, firstChar = url.substring(0,1); 1488 allowBaseHref = (typeof allowBaseHref === 'undefined') ? true : allowBaseHref; 1489 1490 // Check 1491 if ( /[a-z]+\:\/\//.test(url) ) { 1492 // Full URL 1493 } 1494 else if ( firstChar === '/' ) { 1495 // Root URL 1496 fullUrl = History.getRootUrl()+url.replace(/^\/+/,''); 1497 } 1498 else if ( firstChar === '#' ) { 1499 // Anchor URL 1500 fullUrl = History.getPageUrl().replace(/#.*/,'')+url; 1501 } 1502 else if ( firstChar === '?' ) { 1503 // Query URL 1504 fullUrl = History.getPageUrl().replace(/[\?#].*/,'')+url; 1505 } 1506 else { 1507 // Relative URL 1508 if ( allowBaseHref ) { 1509 fullUrl = History.getBaseUrl()+url.replace(/^(\.\/)+/,''); 1510 } else { 1511 fullUrl = History.getBasePageUrl()+url.replace(/^(\.\/)+/,''); 1512 } 1513 // We have an if condition above as we do not want hashes 1514 // which are relative to the baseHref in our URLs 1515 // as if the baseHref changes, then all our bookmarks 1516 // would now point to different locations 1517 // whereas the basePageUrl will always stay the same 1518 } 1519 1520 // Return 1521 return fullUrl.replace(/\#$/,''); 1522 }; 1523 1524 /** 1525 * History.getShortUrl(url) 1526 * Ensures that we have a relative URL and not a absolute URL 1527 * @param {string} url 1528 * @return {string} url 1529 */ 1530 History.getShortUrl = function(url){ 1531 // Prepare 1532 var shortUrl = url, baseUrl = History.getBaseUrl(), rootUrl = History.getRootUrl(); 1533 1534 // Trim baseUrl 1535 if ( History.emulated.pushState ) { 1536 // We are in a if statement as when pushState is not emulated 1537 // The actual url these short urls are relative to can change 1538 // So within the same session, we the url may end up somewhere different 1539 shortUrl = shortUrl.replace(baseUrl,''); 1540 } 1541 1542 // Trim rootUrl 1543 shortUrl = shortUrl.replace(rootUrl,'/'); 1544 1545 // Ensure we can still detect it as a state 1546 if ( History.isTraditionalAnchor(shortUrl) ) { 1547 shortUrl = './'+shortUrl; 1548 } 1549 1550 // Clean It 1551 shortUrl = shortUrl.replace(/^(\.\/)+/g,'./').replace(/\#$/,''); 1552 1553 // Return 1554 return shortUrl; 1555 }; 1556 1557 // ---------------------------------------------------------------------- 1558 // State Storage 1559 1560 /** 1561 * History.store 1562 * The store for all session specific data 1563 */ 1564 History.store = amplify ? (amplify.store('History.store')||{}) : {}; 1565 History.store.idToState = History.store.idToState||{}; 1566 History.store.urlToId = History.store.urlToId||{}; 1567 History.store.stateToId = History.store.stateToId||{}; 1568 1569 /** 1570 * History.idToState 1571 * 1-1: State ID to State Object 1572 */ 1573 History.idToState = History.idToState||{}; 1574 1575 /** 1576 * History.stateToId 1577 * 1-1: State String to State ID 1578 */ 1579 History.stateToId = History.stateToId||{}; 1580 1581 /** 1582 * History.urlToId 1583 * 1-1: State URL to State ID 1584 */ 1585 History.urlToId = History.urlToId||{}; 1586 1587 /** 1588 * History.storedStates 1589 * Store the states in an array 1590 */ 1591 History.storedStates = History.storedStates||[]; 1592 1593 /** 1594 * History.savedStates 1595 * Saved the states in an array 1596 */ 1597 History.savedStates = History.savedStates||[]; 1598 1599 /** 1600 * History.getState()
1601 * Get an object containing the data, title and url of the current state 1602 * @param {Boolean} friendly 1603 * @param {Boolean} create 1604 * @return {Object} State 1605 */ 1606 History.getState = function(friendly,create){ 1607 // Prepare 1608 if ( typeof friendly === 'undefined' ) { friendly = true; } 1609 if ( typeof create === 'undefined' ) { create = true; } 1610 1611 // Fetch 1612 var State = History.getLastSavedState(); 1613 1614 // Create 1615 if ( !State && create ) { 1616 State = History.createStateObject(); 1617 } 1618 1619 // Adjust 1620 if ( friendly ) { 1621 State = History.cloneObject(State); 1622 State.url = State.cleanUrl||State.url; 1623 } 1624 1625 // Return 1626 return State; 1627 }; 1628 1629 /** 1630 * History.getIdByState(State) 1631 * Gets a ID for a State 1632 * @param {State} newState 1633 * @return {String} id 1634 */ 1635 History.getIdByState = function(newState){ 1636 1637 // Fetch ID 1638 var id = History.extractId(newState.url); 1639 if ( !id ) { 1640 // Find ID via State String 1641 var str = History.getStateString(newState); 1642 if ( typeof History.stateToId[str] !== 'undefined' ) { 1643 id = History.stateToId[str]; 1644 } 1645 else if ( typeof History.store.stateToId[str] !== 'undefined' ) { 1646 id = History.store.stateToId[str]; 1647 } 1648 else { 1649 // Generate a new ID 1650 while ( true ) { 1651 id = String(Math.floor(Math.random()*1000)); 1652 if ( typeof History.idToState[id] === 'undefined' && typeof History.store.idToState[id] === 'undefined' ) { 1653 break; 1654 } 1655 } 1656 1657 // Apply the new State to the ID 1658 History.stateToId[str] = id; 1659 History.idToState[id] = newState; 1660 } 1661 } 1662 1663 // Return ID 1664 return id; 1665 }; 1666 1667 /** 1668 * History.normalizeState(State) 1669 * Expands a State Object 1670 * @param {object} State 1671 * @return {object} 1672 */ 1673 History.normalizeState = function(oldState){ 1674 // Prepare 1675 if ( !oldState || (typeof oldState !== 'object') ) { 1676 oldState = {}; 1677 } 1678 1679 // Check 1680 if ( typeof oldState.normalized !== 'undefined' ) { 1681 return oldState; 1682 } 1683 1684 // Adjust 1685 if ( !oldState.data || (typeof oldState.data !== 'object') ) { 1686 oldState.data = {}; 1687 } 1688 1689 // ---------------------------------------------------------------------- 1690 1691 // Create 1692 var newState = {}; 1693 newState.normalized = true; 1694 newState.title = oldState.title||''; 1695 newState.url = History.getFullUrl(History.unescapeString(oldState.url||document.location.href)); 1696 newState.hash = History.getShortUrl(newState.url); 1697 newState.data = History.cloneObject(oldState.data); 1698 1699 // Fetch ID 1700 newState.id = History.getIdByState(newState); 1701 1702 // ---------------------------------------------------------------------- 1703 1704 // Clean the URL 1705 newState.cleanUrl = newState.url.replace(/\??\&_suid.*/,''); 1706 newState.url = newState.cleanUrl; 1707 1708 // Check to see if we have more than just a url 1709 var dataNotEmpty = !History.isEmptyObject(newState.data); 1710 1711 // Apply 1712 if ( newState.title || dataNotEmpty ) { 1713 // Add ID to Hash 1714 newState.hash = History.getShortUrl(newState.url).replace(/\??\&_suid.*/,''); 1715 if ( !/\?/.test(newState.hash) ) { 1716 newState.hash += '?'; 1717 } 1718 newState.hash += '&_suid='+newState.id; 1719 } 1720 1721 // Create the Hashed URL 1722 newState.hashedUrl = History.getFullUrl(newState.hash); 1723 1724 // ---------------------------------------------------------------------- 1725 1726 // Update the URL if we have a duplicate 1727 if ( (History.emulated.pushState || History.bugs.safariPoll) && History.hasUrlDuplicate(newState) ) { 1728 newState.url = newState.hashedUrl; 1729 } 1730 1731 // ---------------------------------------------------------------------- 1732 1733 // Return 1734 return newState; 1735 }; 1736 1737 /** 1738 * History.createStateObject(data,title,url) 1739 * Creates a object based on the data, title and url state params 1740 * @param {object} data 1741 * @param {string} title 1742 * @param {string} url 1743 * @return {object} 1744 */ 1745 History.createStateObject = function(data,title,url){ 1746 // Hashify 1747 var State = { 1748 'data': data, 1749 'title': title, 1750 'url': url 1751 }; 1752 1753 // Expand the State 1754 State = History.normalizeState(State); 1755 1756 // Return object 1757 return State; 1758 }; 1759 1760 /** 1761 * History.getStateById(id) 1762 * Get a state by it's UID 1763 * @param {String} id 1764 */ 1765 History.getStateById = function(id){ 1766 // Prepare 1767 id = String(id); 1768 1769 // Retrieve 1770 var State = History.idToState[id] || History.store.idToState[id] || undefined; 1771 1772 // Return State 1773 return State; 1774 }; 1775 1776 /** 1777 * Get a State's String 1778 * @param {State} passedState 1779 */ 1780 History.getStateString = function(passedState){ 1781 // Prepare 1782 var State = History.normalizeState(passedState); 1783 1784 // Clean 1785 var cleanedState = { 1786 data: State.data, 1787 title: passedState.title, 1788 url: passedState.url 1789 }; 1790 1791 // Fetch 1792 var str = JSON.stringify(cleanedState); 1793 1794 // Return 1795 return str; 1796 }; 1797 1798 /** 1799 * Get a State's ID 1800 * @param {State} passedState 1801 * @return {String} id 1802 */ 1803 History.getStateId = function(passedState){ 1804 // Prepare 1805 var State = History.normalizeState(passedState); 1806 1807 // Fetch 1808 var id = State.id; 1809 1810 // Return 1811 return id; 1812 }; 1813 1814 /** 1815 * History.getHashByState(State) 1816 * Creates a Hash for the State Object 1817 * @param {State} passedState 1818 * @return {String} hash 1819 */ 1820 History.getHashByState = function(passedState){ 1821 // Prepare 1822 var hash, State = History.normalizeState(passedState); 1823 1824 // Fetch 1825 hash = State.hash; 1826 1827 // Return 1828 return hash; 1829 }; 1830 1831 /** 1832 * History.extractId(url_or_hash) 1833 * Get a State ID by it's URL or Hash 1834 * @param {string} url_or_hash 1835 * @return {string} id 1836 */ 1837 History.extractId = function ( url_or_hash ) { 1838 // Prepare 1839 var id; 1840 1841 // Extract 1842 var parts,url; 1843 parts = /(.*)\&_suid=([0-9]+)$/.exec(url_or_hash); 1844 url = parts ? (parts[1]||url_or_hash) : url_or_hash; 1845 id = parts ? String(parts[2]||'') : ''; 1846 1847 // Return 1848 return id||false; 1849 }; 1850 1851 /** 1852 * History.isTraditionalAnchor 1853 * Checks to see if the url is a traditional anchor or not 1854 * @param {String} url_or_hash 1855 * @return {Boolean} 1856 */ 1857 History.isTraditionalAnchor = function(url_or_hash){ 1858 // Check 1859 var isTraditional = !(/[\/\?\.]/.test(url_or_hash)); 1860 1861 // Return 1862 return isTraditional; 1863 }; 1864 1865 /** 1866 * History.extractState 1867 * Get a State by it's URL or Hash 1868 * @param {String} url_or_hash 1869 * @return {State|null} 1870 */ 1871 History.extractState = function(url_or_hash,create){ 1872 // Prepare 1873 var State = null; 1874 create = create||false; 1875 1876 // Fetch SUID 1877 var id = History.extractId(url_or_hash); 1878 if ( id ) { 1879 State = History.getStateById(id); 1880 } 1881 1882 // Fetch SUID returned no State 1883 if ( !State ) { 1884 // Fetch URL 1885 var url = History.getFullUrl(url_or_hash); 1886 1887 // Check URL 1888 id = History.getIdByUrl(url)||false; 1889 if ( id ) { 1890 State = History.getStateById(id); 1891 } 1892 1893 // Create State 1894 if ( !State && create && !History.isTraditionalAnchor(url_or_hash) ) { 1895 State = History.createStateObject(null,null,url); 1896 } 1897 } 1898 1899 // Return 1900 return State; 1901 }; 1902 1903 /** 1904 * History.getIdByUrl() 1905 * Get a State ID by a State URL 1906 */ 1907 History.getIdByUrl = function(url){ 1908 // Fetch 1909 var id = History.urlToId[url] || History.store.urlToId[url] || undefined; 1910 1911 // Return 1912 return id; 1913 }; 1914 1915 /** 1916 * History.getLastSavedState()
1917 * Get an object containing the data, title and url of the current state 1918 * @return {Object} State 1919 */ 1920 History.getLastSavedState = function(){ 1921 return History.savedStates[History.savedStates.length-1]||undefined; 1922 }; 1923 1924 /** 1925 * History.getLastStoredState() 1926 * Get an object containing the data, title and url of the current state 1927 * @return {Object} State 1928 */ 1929 History.getLastStoredState = function(){ 1930 return History.storedStates[History.storedStates.length-1]||undefined; 1931 }; 1932 1933 /** 1934 * History.hasUrlDuplicate 1935 * Checks if a Url will have a url conflict 1936 * @param {Object} newState 1937 * @return {Boolean} hasDuplicate 1938 */ 1939 History.hasUrlDuplicate = function(newState) { 1940 // Prepare 1941 var hasDuplicate = false; 1942 1943 // Fetch 1944 var oldState = History.extractState(newState.url); 1945 1946 // Check 1947 hasDuplicate = oldState && oldState.id !== newState.id; 1948 1949 // Return 1950 return hasDuplicate; 1951 }; 1952 1953 /** 1954 * History.storeState 1955 * Store a State 1956 * @param {Object} newState 1957 * @return {Object} newState 1958 */ 1959 History.storeState = function(newState){ 1960 // Store the State 1961 History.urlToId[newState.url] = newState.id; 1962 1963 // Push the State 1964 History.storedStates.push(History.cloneObject(newState)); 1965 1966 // Return newState 1967 return newState; 1968 }; 1969 1970 /** 1971 * History.isLastSavedState(newState) 1972 * Tests to see if the state is the last state 1973 * @param {Object} newState 1974 * @return {boolean} isLast 1975 */ 1976 History.isLastSavedState = function(newState){ 1977 // Prepare 1978 var isLast = false; 1979 1980 // Check 1981 if ( History.savedStates.length ) { 1982 var 1983 newId = newState.id, 1984 oldState = History.getLastSavedState(), 1985 oldId = oldState.id; 1986 1987 // Check 1988 isLast = (newId === oldId); 1989 } 1990 1991 // Return 1992 return isLast; 1993 }; 1994 1995 /** 1996 * History.saveState 1997 * Push a State 1998 * @param {Object} newState 1999 * @return {boolean} changed 2000 */ 2001 History.saveState = function(newState){ 2002 // Check Hash 2003 if ( History.isLastSavedState(newState) ) { 2004 return false; 2005 } 2006 2007 // Push the State 2008 History.savedStates.push(History.cloneObject(newState)); 2009 2010 // Return true 2011 return true; 2012 }; 2013 2014 /** 2015 * History.getStateByIndex() 2016 * Gets a state by the index 2017 * @param {integer} index 2018 * @return {Object} 2019 */ 2020 History.getStateByIndex = function(index){ 2021 // Prepare 2022 var State = null; 2023 2024 // Handle 2025 if ( typeof index === 'undefined' ) { 2026 // Get the last inserted 2027 State = History.savedStates[History.savedStates.length-1]; 2028 } 2029 else if ( index < 0 ) { 2030 // Get from the end 2031 State = History.savedStates[History.savedStates.length+index]; 2032 } 2033 else { 2034 // Get from the beginning 2035 State = History.savedStates[index]; 2036 } 2037 2038 // Return State 2039 return State; 2040 }; 2041 2042 // ---------------------------------------------------------------------- 2043 // Hash Helpers 2044 2045 /** 2046 * History.getHash() 2047 * Gets the current document hash 2048 * @return {string} 2049 */ 2050 History.getHash = function(){ 2051 var hash = History.unescapeHash(document.location.hash); 2052 return hash; 2053 }; 2054 2055 /** 2056 * History.unescapeString() 2057 * Unescape a string 2058 * @param {String} str 2059 * @return {string} 2060 */ 2061 History.unescapeString = function(str){ 2062 // Prepare 2063 var result = str; 2064 2065 // Unescape hash 2066 var tmp; 2067 while ( true ) { 2068 tmp = window.unescape(result); 2069 if ( tmp === result ) { 2070 break; 2071 } 2072 result = tmp; 2073 } 2074 2075 // Return result 2076 return result; 2077 }; 2078 2079 /** 2080 * History.unescapeHash() 2081 * normalize and Unescape a Hash 2082 * @param {String} hash 2083 * @return {string} 2084 */ 2085 History.unescapeHash = function(hash){ 2086 // Prepare 2087 var result = History.normalizeHash(hash); 2088 2089 // Unescape hash 2090 result = History.unescapeString(result); 2091 2092 // Return result 2093 return result; 2094 }; 2095 2096 /** 2097 * History.normalizeHash() 2098 * normalize a hash across browsers 2099 * @return {string} 2100 */ 2101 History.normalizeHash = function(hash){ 2102 var result = hash.replace(/[^#]*#/,'').replace(/#.*/, ''); 2103 2104 // Return result 2105 return result; 2106 }; 2107 2108 /** 2109 * History.setHash(hash) 2110 * Sets the document hash 2111 * @param {string} hash 2112 * @return {History} 2113 */ 2114 History.setHash = function(hash,queue){ 2115 // Handle Queueing 2116 if ( queue !== false && History.busy() ) { 2117 // Wait + Push to Queue 2118 //History.debug('History.setHash: we must wait', arguments); 2119 History.pushQueue({ 2120 scope: History, 2121 callback: History.setHash, 2122 args: arguments, 2123 queue: queue 2124 }); 2125 return false;
2126 } 2127 2128 // Log 2129 //History.debug('History.setHash: called',hash); 2130 2131 // Prepare 2132 var adjustedHash = History.escapeHash(hash); 2133 2134 // Make Busy + Continue 2135 History.busy(true); 2136 2137 // Check if hash is a state 2138 var State = History.extractState(hash,true); 2139 if ( State && !History.emulated.pushState ) { 2140 // Hash is a state so skip the setHash 2141 //History.debug('History.setHash: Hash is a state so skipping the hash set with a direct pushState call',arguments); 2142 2143 // PushState 2144 History.pushState(State.data,State.title,State.url,false); 2145 } 2146 else if ( document.location.hash !== adjustedHash ) { 2147 // Hash is a proper hash, so apply it 2148 2149 // Handle browser bugs 2150 if ( History.bugs.setHash ) { 2151 // Fix Safari Bug https://bugs.webkit.org/show_bug.cgi?id=56249 2152 2153 // Fetch the base page 2154 var pageUrl = History.getPageUrl(); 2155 2156 // Safari hash apply 2157 History.pushState(null,null,pageUrl+'#'+adjustedHash,false); 2158 } 2159 else { 2160 // Normal hash apply 2161 document.location.hash = adjustedHash; 2162 } 2163 } 2164 2165 // Chain 2166 return History; 2167 }; 2168 2169 /** 2170 * History.escape() 2171 * normalize and Escape a Hash 2172 * @return {string} 2173 */ 2174 History.escapeHash = function(hash){ 2175 var result = History.normalizeHash(hash); 2176 2177 // Escape hash 2178 result = window.escape(result); 2179 2180 // IE6 Escape Bug 2181 if ( !History.bugs.hashEscape ) { 2182 // Restore common parts 2183 result = result 2184 .replace(/\%21/g,'!') 2185 .replace(/\%26/g,'&') 2186 .replace(/\%3D/g,'=') 2187 .replace(/\%3F/g,'?'); 2188 } 2189 2190 // Return result 2191 return result; 2192 }; 2193 2194 /** 2195 * History.getHashByUrl(url) 2196 * Extracts the Hash from a URL 2197 * @param {string} url 2198 * @return {string} url 2199 */ 2200 History.getHashByUrl = function(url){ 2201 // Extract the hash 2202 var hash = String(url) 2203 .replace(/([^#]*)#?([^#]*)#?(.*)/, '$2') 2204 ; 2205 2206 // Unescape hash 2207 hash = History.unescapeHash(hash); 2208 2209 // Return hash 2210 return hash; 2211 }; 2212 2213 /** 2214 * History.setTitle(title) 2215 * Applies the title to the document 2216 * @param {State} newState 2217 * @return {Boolean} 2218 */ 2219 History.setTitle = function(newState){ 2220 // Prepare 2221 var title = newState.title; 2222 2223 // Initial 2224 if ( !title ) { 2225 var firstState = History.getStateByIndex(0); 2226 if ( firstState && firstState.url === newState.url ) { 2227 title = firstState.title||History.options.initialTitle; 2228 } 2229 } 2230 2231 // Apply 2232 try { 2233 document.getElementsByTagName('title')[0].innerHTML = title.replace('<','<').replace('>','>').replace(' & ',' & '); 2234 } 2235 catch ( Exception ) { } 2236 document.title = title; 2237 2238 // Chain 2239 return History; 2240 }; 2241 2242 // ---------------------------------------------------------------------- 2243 // Queueing 2244 2245 /** 2246 * History.queues 2247 * The list of queues to use 2248 * First In, First Out 2249 */ 2250 History.queues = []; 2251 2252 /** 2253 * History.busy(value) 2254 * @param {boolean} value [optional] 2255 * @return {boolean} busy 2256 */ 2257 History.busy = function(value){ 2258 // Apply 2259 if ( typeof value !== 'undefined' ) { 2260 //History.debug('History.busy: changing ['+(History.busy.flag||false)+'] to ['+(value||false)+']', History.queues.length); 2261 History.busy.flag = value; 2262 } 2263 // Default 2264 else if ( typeof History.busy.flag === 'undefined' ) { 2265 History.busy.flag = false; 2266 } 2267 2268 // Queue 2269 if ( !History.busy.flag ) { 2270 // Execute the next item in the queue 2271 clearTimeout(History.busy.timeout); 2272 var fireNext = function(){ 2273 if ( History.busy.flag ) return; 2274 for ( var i=History.queues.length-1; i >= 0; --i ) { 2275 var queue = History.queues[i]; 2276 if ( queue.length === 0 ) continue; 2277 var item = queue.shift(); 2278 History.fireQueueItem(item); 2279 History.busy.timeout = setTimeout(fireNext,History.options.busyDelay); 2280 } 2281 }; 2282 History.busy.timeout = setTimeout(fireNext,History.options.busyDelay); 2283 } 2284 2285 // Return 2286 return History.busy.flag; 2287 }; 2288 2289 /** 2290 * History.fireQueueItem(item) 2291 * Fire a Queue Item 2292 * @param {Object} item 2293 * @return {Mixed} result 2294 */ 2295 History.fireQueueItem = function(item){ 2296 return item.callback.apply(item.scope||History,item.args||[]); 2297 }; 2298 2299 /** 2300 * History.pushQueue(callback,args) 2301 * Add an item to the queue 2302 * @param {Object} item [scope,callback,args,queue] 2303 */ 2304 History.pushQueue = function(item){ 2305 // Prepare the queue 2306 History.queues[item.queue||0] = History.queues[item.queue||0]||[]; 2307 2308 // Add to the queue 2309 History.queues[item.queue||0].push(item); 2310 2311 // Chain 2312 return History; 2313 }; 2314 2315 /** 2316 * History.queue (item,queue), (func,queue), (func), (item) 2317 * Either firs the item now if not busy, or adds it to the queue 2318 */ 2319 History.queue = function(item,queue){ 2320 // Prepare 2321 if ( typeof item === 'function' ) { 2322 item = { 2323 callback: item 2324 }; 2325 } 2326 if ( typeof queue !== 'undefined' ) { 2327 item.queue = queue; 2328 } 2329 2330 // Handle 2331 if ( History.busy() ) { 2332 History.pushQueue(item); 2333 } else { 2334 History.fireQueueItem(item); 2335 } 2336 2337 // Chain 2338 return History; 2339 }; 2340 2341 /** 2342 * History.clearQueue() 2343 * Clears the Queue 2344 */ 2345 History.clearQueue = function(){ 2346 History.busy.flag = false;
2347 History.queues = []; 2348 return History; 2349 }; 2350 2351 2352 // ---------------------------------------------------------------------- 2353 // IE Bug Fix 2354 2355 /** 2356 * History.stateChanged 2357 * States whether or not the state has changed since the last double check was initialised 2358 */ 2359 History.stateChanged = false; 2360 2361 /** 2362 * History.doubleChecker 2363 * Contains the timeout used for the double checks 2364 */ 2365 History.doubleChecker = false; 2366 2367 /** 2368 * History.doubleCheckComplete() 2369 * Complete a double check 2370 * @return {History} 2371 */ 2372 History.doubleCheckComplete = function(){ 2373 // Update 2374 History.stateChanged = true; 2375 2376 // Clear 2377 History.doubleCheckClear(); 2378 2379 // Chain 2380 return History; 2381 }; 2382 2383 /** 2384 * History.doubleCheckClear() 2385 * Clear a double check 2386 * @return {History} 2387 */ 2388 History.doubleCheckClear = function(){ 2389 // Clear 2390 if ( History.doubleChecker ) { 2391 clearTimeout(History.doubleChecker); 2392 History.doubleChecker = false; 2393 } 2394 2395 // Chain 2396 return History; 2397 }; 2398 2399 /** 2400 * History.doubleCheck() 2401 * Create a double check 2402 * @return {History} 2403 */ 2404 History.doubleCheck = function(tryAgain){ 2405 // Reset 2406 History.stateChanged = false; 2407 History.doubleCheckClear(); 2408 2409 // Fix IE6,IE7 bug where calling history.back or history.forward does not actually change the hash (whereas doing it manually does) 2410 // Fix Safari 5 bug where sometimes the state does not change: https://bugs.webkit.org/show_bug.cgi?id=42940 2411 if ( History.bugs.ieDoubleCheck ) { 2412 // Apply Check 2413 History.doubleChecker = setTimeout( 2414 function(){ 2415 History.doubleCheckClear(); 2416 if ( !History.stateChanged ) { 2417 //History.debug('History.doubleCheck: State has not yet changed, trying again', arguments); 2418 // Re-Attempt 2419 tryAgain(); 2420 } 2421 return true; 2422 }, 2423 History.options.doubleCheckInterval 2424 ); 2425 } 2426 2427 // Chain 2428 return History; 2429 }; 2430 2431 // ---------------------------------------------------------------------- 2432 // Safari Bug Fix 2433 2434 /** 2435 * History.safariStatePoll() 2436 * Poll the current state 2437 * @return {History} 2438 */ 2439 History.safariStatePoll = function(){ 2440 // Poll the URL 2441 2442 // Get the Last State which has the new URL 2443 var 2444 urlState = History.extractState(document.location.href), 2445 newState; 2446 2447 // Check for a difference 2448 if ( !History.isLastSavedState(urlState) ) { 2449 newState = urlState; 2450 } 2451 else { 2452 return; 2453 } 2454 2455 // Check if we have a state with that url 2456 // If not create it 2457 if ( !newState ) { 2458 //History.debug('History.safariStatePoll: new'); 2459 newState = History.createStateObject(); 2460 } 2461 2462 // Apply the New State 2463 //History.debug('History.safariStatePoll: trigger'); 2464 History.Adapter.trigger(window,'popstate'); 2465 2466 // Chain 2467 return History; 2468 }; 2469 2470 // ---------------------------------------------------------------------- 2471 // State Aliases 2472 2473 /** 2474 * History.back(queue) 2475 * Send the browser history back one item 2476 * @param {Integer} queue [optional] 2477 */ 2478 History.back = function(queue){ 2479 //History.debug('History.back: called', arguments); 2480 2481 // Handle Queueing 2482 if ( queue !== false && History.busy() ) { 2483 // Wait + Push to Queue 2484 //History.debug('History.back: we must wait', arguments); 2485 History.pushQueue({ 2486 scope: History, 2487 callback: History.back, 2488 args: arguments, 2489 queue: queue 2490 }); 2491 return false; 2492 } 2493 2494 // Make Busy + Continue 2495 History.busy(true); 2496 2497 // Fix certain browser bugs that prevent the state from changing 2498 History.doubleCheck(function(){ 2499 History.back(false); 2500 }); 2501 2502 // Go back 2503 history.go(-1); 2504 2505 // End back closure 2506 return true; 2507 }; 2508 2509 /** 2510 * History.forward(queue) 2511 * Send the browser history forward one item 2512 * @param {Integer} queue [optional] 2513 */ 2514 History.forward = function(queue){ 2515 //History.debug('History.forward: called', arguments); 2516 2517 // Handle Queueing 2518 if ( queue !== false && History.busy() ) { 2519 // Wait + Push to Queue 2520 //History.debug('History.forward: we must wait', arguments); 2521 History.pushQueue({ 2522 scope: History, 2523 callback: History.forward, 2524 args: arguments, 2525 queue: queue 2526 }); 2527 return false;
2528 } 2529 2530 // Make Busy + Continue 2531 History.busy(true); 2532 2533 // Fix certain browser bugs that prevent the state from changing 2534 History.doubleCheck(function(){ 2535 History.forward(false); 2536 }); 2537 2538 // Go forward 2539 history.go(1); 2540 2541 // End forward closure 2542 return true; 2543 }; 2544 2545 /** 2546 * History.go(index,queue) 2547 * Send the browser history back or forward index times 2548 * @param {Integer} queue [optional] 2549 */ 2550 History.go = function(index,queue){ 2551 //History.debug('History.go: called', arguments); 2552 2553 // Prepare 2554 var i; 2555 2556 // Handle 2557 if ( index > 0 ) { 2558 // Forward 2559 for ( i=1; i<=index; ++i ) { 2560 History.forward(queue); 2561 } 2562 } 2563 else if ( index < 0 ) { 2564 // Backward 2565 for ( i=-1; i>=index; --i ) { 2566 History.back(queue); 2567 } 2568 } 2569 else { 2570 throw new Error('History.go: History.go requires a positive or negative integer passed.'); 2571 } 2572 2573 // Chain 2574 return History; 2575 }; 2576 2577 2578 // ---------------------------------------------------------------------- 2579 // Initialise 2580 2581 /** 2582 * Create the initial State 2583 */ 2584 History.saveState(History.storeState(History.extractState(document.location.href,true))); 2585 2586 /** 2587 * Bind for Saving Store 2588 */ 2589 if ( amplify ) { 2590 History.onUnload = function(){ 2591 // Prepare 2592 var 2593 currentStore = amplify.store('History.store')||{}, 2594 item; 2595 2596 // Ensure 2597 currentStore.idToState = currentStore.idToState || {}; 2598 currentStore.urlToId = currentStore.urlToId || {}; 2599 currentStore.stateToId = currentStore.stateToId || {}; 2600 2601 // Sync 2602 for ( item in History.idToState ) { 2603 if ( !History.idToState.hasOwnProperty(item) ) { 2604 continue; 2605 } 2606 currentStore.idToState[item] = History.idToState[item]; 2607 } 2608 for ( item in History.urlToId ) { 2609 if ( !History.urlToId.hasOwnProperty(item) ) { 2610 continue; 2611 } 2612 currentStore.urlToId[item] = History.urlToId[item]; 2613 } 2614 for ( item in History.stateToId ) { 2615 if ( !History.stateToId.hasOwnProperty(item) ) { 2616 continue; 2617 } 2618 currentStore.stateToId[item] = History.stateToId[item]; 2619 } 2620 2621 // Update 2622 History.store = currentStore; 2623 2624 // Store 2625 amplify.store('History.store',currentStore); 2626 }; 2627 // For Internet Explorer 2628 History.intervalList.push(setInterval(History.onUnload,History.options.storeInterval)); 2629 // For Other Browsers 2630 History.Adapter.bind(window,'beforeunload',History.onUnload); 2631 History.Adapter.bind(window,'unload',History.onUnload); 2632 // Both are enabled for consistency 2633 } 2634 2635 2636 // ---------------------------------------------------------------------- 2637 // HTML5 State Support 2638 2639 if ( History.emulated.pushState ) { 2640 /* 2641 * Provide Skeleton for HTML4 Browsers 2642 */ 2643 2644 // Prepare 2645 var emptyFunction = function(){}; 2646 History.pushState = History.pushState||emptyFunction; 2647 History.replaceState = History.replaceState||emptyFunction; 2648 } 2649 else { 2650 /* 2651 * Use native HTML5 History API Implementation 2652 */ 2653 2654 /** 2655 * History.onPopState(event,extra) 2656 * Refresh the Current State 2657 */ 2658 History.onPopState = function(event){ 2659 // Reset the double check 2660 History.doubleCheckComplete(); 2661 2662 // Check for a Hash, and handle apporiatly 2663 var currentHash = History.getHash(); 2664 if ( currentHash ) { 2665 // Expand Hash 2666 var currentState = History.extractState(currentHash||document.location.href,true); 2667 if ( History.options.transformHash && currentState ) { 2668 // We were able to parse it, it must be a State! 2669 // Let's forward to replaceState 2670 //History.debug('History.onPopState: state anchor', currentHash, currentState); 2671 History.replaceState(currentState.data, currentState.title, currentState.url, false); 2672 } 2673 else { 2674 // Traditional Anchor 2675 //History.debug('History.onPopState: traditional anchor', currentHash); 2676 History.Adapter.trigger(window,'anchorchange'); 2677 History.busy(false); 2678 } 2679 2680 // We don't care for hashes 2681 History.expectedStateId = false; 2682 return false; 2683 } 2684 2685 // Prepare 2686 var newState = false; 2687 2688 // Prepare 2689 event = event||{}; 2690 if ( typeof event.state === 'undefined' ) { 2691 // jQuery 2692 if ( typeof event.originalEvent !== 'undefined' && typeof event.originalEvent.state !== 'undefined' ) { 2693 event.state = event.originalEvent.state||false; 2694 } 2695 // MooTools 2696 else if ( typeof event.event !== 'undefined' && typeof event.event.state !== 'undefined' ) { 2697 event.state = event.event.state||false; 2698 } 2699 } 2700 2701 // Ensure 2702 event.state = (event.state||false); 2703 2704 // Fetch State 2705 if ( event.state ) { 2706 // Vanilla: Back/forward button was used 2707 newState = History.getStateById(event.state); 2708 } 2709 else if ( History.expectedStateId ) { 2710 // Vanilla: A new state was pushed, and popstate was called manually 2711 newState = History.getStateById(History.expectedStateId); 2712 } 2713 else { 2714 // Initial State 2715 newState = History.extractState(document.location.href); 2716 } 2717
2718 // The State did not exist in our store 2719 if ( !newState ) { 2720 // Regenerate the State 2721 newState = History.createStateObject(null,null,document.location.href); 2722 } 2723 2724 // Clean 2725 History.expectedStateId = false; 2726 2727 // Check if we are the same state 2728 if ( History.isLastSavedState(newState) ) { 2729 // There has been no change (just the page's hash has finally propagated) 2730 //History.debug('History.onPopState: no change', newState, History.savedStates); 2731 History.busy(false); 2732 return false; 2733 } 2734 2735 // Store the State 2736 History.storeState(newState); 2737 History.saveState(newState); 2738 2739 // Force update of the title 2740 History.setTitle(newState); 2741 2742 // Fire Our Event 2743 History.Adapter.trigger(window,'statechange'); 2744 History.busy(false); 2745 2746 // Return true 2747 return true; 2748 }; 2749 History.Adapter.bind(window,'popstate',History.onPopState); 2750 2751 /** 2752 * History.pushState(data,title,url) 2753 * Add a new State to the history object, become it, and trigger onpopstate 2754 * We have to trigger for HTML4 compatibility 2755 * @param {object} data 2756 * @param {string} title 2757 * @param {string} url 2758 * @return {true} 2759 */ 2760 History.pushState = function(data,title,url,queue){ 2761 //History.debug('History.pushState: called', arguments); 2762 2763 // Check the State 2764 if ( History.getHashByUrl(url) && History.emulated.pushState ) { 2765 throw new Error('History.js does not support states with fragement-identifiers (hashes/anchors).'); 2766 } 2767 2768 // Handle Queueing 2769 if ( queue !== false && History.busy() ) { 2770 // Wait + Push to Queue 2771 //History.debug('History.pushState: we must wait', arguments); 2772 History.pushQueue({ 2773 scope: History, 2774 callback: History.pushState, 2775 args: arguments, 2776 queue: queue 2777 }); 2778 return false; 2779 } 2780 2781 // Make Busy + Continue 2782 History.busy(true); 2783 2784 // Create the newState 2785 var newState = History.createStateObject(data,title,url); 2786 2787 // Check it 2788 if ( History.isLastSavedState(newState) ) { 2789 // Won't be a change 2790 History.busy(false); 2791 } 2792 else { 2793 // Store the newState 2794 History.storeState(newState); 2795 History.expectedStateId = newState.id; 2796 2797 // Push the newState 2798 history.pushState(newState.id,newState.title,newState.url); 2799 2800 // Fire HTML5 Event 2801 History.Adapter.trigger(window,'popstate'); 2802 } 2803 2804 // End pushState closure 2805 return true; 2806 }; 2807 2808 /** 2809 * History.replaceState(data,title,url) 2810 * Replace the State and trigger onpopstate 2811 * We have to trigger for HTML4 compatibility 2812 * @param {object} data 2813 * @param {string} title 2814 * @param {string} url 2815 * @return {true} 2816 */ 2817 History.replaceState = function(data,title,url,queue){ 2818 //History.debug('History.replaceState: called', arguments); 2819 2820 // Check the State 2821 if ( History.getHashByUrl(url) && History.emulated.pushState ) { 2822 throw new Error('History.js does not support states with fragement-identifiers (hashes/anchors).'); 2823 } 2824 2825 // Handle Queueing 2826 if ( queue !== false && History.busy() ) { 2827 // Wait + Push to Queue 2828 //History.debug('History.replaceState: we must wait', arguments); 2829 History.pushQueue({ 2830 scope: History, 2831 callback: History.replaceState, 2832 args: arguments, 2833 queue: queue 2834 }); 2835 return false; 2836 } 2837 2838 // Make Busy + Continue 2839 History.busy(true); 2840 2841 // Create the newState 2842 var newState = History.createStateObject(data,title,url); 2843 2844 // Check it 2845 if ( History.isLastSavedState(newState) ) { 2846 // Won't be a change 2847 History.busy(false); 2848 } 2849 else { 2850 // Store the newState 2851 History.storeState(newState); 2852 History.expectedStateId = newState.id; 2853 2854 // Push the newState 2855 history.replaceState(newState.id,newState.title,newState.url); 2856 2857 // Fire HTML5 Event 2858 History.Adapter.trigger(window,'popstate'); 2859 } 2860 2861 // End replaceState closure 2862 return true; 2863 }; 2864 2865 // Be aware, the following is only for native pushState implementations 2866 // If you are wanting to include something for all browsers 2867 // Then include it above this if block 2868 2869 /** 2870 * Setup Safari Fix 2871 */ 2872 if ( History.bugs.safariPoll ) { 2873 History.intervalList.push(setInterval(History.safariStatePoll, History.options.safariPollInterval)); 2874 } 2875 2876 /** 2877 * Ensure Cross Browser Compatibility 2878 */
2879 if ( navigator.vendor === 'Apple Computer, Inc.' || (navigator.appCodeName||'') === 'Mozilla' ) { 2880 /** 2881 * Fix Safari HashChange Issue 2882 */ 2883 2884 // Setup Alias 2885 History.Adapter.bind(window,'hashchange',function(){ 2886 History.Adapter.trigger(window,'popstate'); 2887 }); 2888 2889 // Initialise Alias 2890 if ( History.getHash() ) { 2891 History.Adapter.onDomLoad(function(){ 2892 History.Adapter.trigger(window,'hashchange'); 2893 }); 2894 } 2895 } 2896 2897 } // !History.emulated.pushState 2898 2899 }; // History.initCore 2900 2901 // Try and Initialise History 2902 History.init(); 2903 2904})(window); 2905; 2906 2907// ***************************
2908// js.compressed/jquery/history.adapter.jquery.js 2909// *************************** 2910/** 2911 * History.js jQuery Adapter 2912 * @author Benjamin Arthur Lupton <[email protected]> 2913 * @copyright 2010-2011 Benjamin Arthur Lupton <[email protected]> 2914 * @license New BSD License <http://creativecommons.org/licenses/BSD/> 2915 */ 2916 2917// Closure 2918(function(window,undefined){ 2919 // Localise Globals 2920 var 2921 History = window.History = window.History||{}, 2922 jQuery = window.jQuery; 2923 2924 // Check Existence 2925 if ( typeof History.Adapter !== 'undefined' ) { 2926 throw new Error('History.js Adapter has already been loaded...'); 2927 } 2928 2929 // Add the Adapter 2930 History.Adapter = { 2931 /** 2932 * History.Adapter.bind(el,event,callback) 2933 * @param {Element|Selector} el 2934 * @param {String} event - custom and standard events 2935 * @param {Function} callback 2936 * @return 2937 */ 2938 bind: function(el,event,callback){ 2939 jQuery(el).on(event,callback); 2940 }, 2941 2942 /** 2943 * History.Adapter.trigger(el,event) 2944 * @param {Element|Selector} el 2945 * @param {String} event - custom and standard events 2946 * @return 2947 */ 2948 trigger: function(el,event){ 2949 jQuery(el).trigger(event); 2950 }, 2951 2952 /** 2953 * History.Adapter.trigger(el,event,data) 2954 * @param {Function} callback 2955 * @return 2956 */ 2957 onDomLoad: function(callback) { 2958 jQuery(callback); 2959 } 2960 }; 2961 2962 // Try and Initialise History 2963 if ( typeof History.init !== 'undefined' ) { 2964 History.init(); 2965 } 2966 2967})(window); 2968; 2969 2970// ***************************
2971// js.compressed/history.js 2972// *************************** 2973(function(h){vBulletin.ensureObj("history");var d=window.History,k=d&&!!d.enabled;d.options.transformHash=!1;vBulletin.history.instance=function(l){var g=!0,e=!!l&&k;this.isEnabled=function(){return e};this.setDefaultState=function(b,a,c){if(e){g=!1;var f=vBulletin.parseUrl(c);try{c=decodeURI(f.pathname)+decodeURIComponent(f.search)+decodeURIComponent(f.hash),d.replaceState(b,a,c),g=!0}catch(m){console.error("Unable to parse and decode URL "+c)}}};this.setStateChange=function(b,a){e&&d.Adapter.bind(window, 2974"statechange"+(a?"."+a:""),function(c){g&&b.apply(this,h.makeArray(arguments))})};this.pushState=function(b,a,c){if(e){g=!1;var f=vBulletin.parseUrl(c);try{c=decodeURI(f.pathname)+decodeURIComponent(f.search)+decodeURIComponent(f.hash),d.pushState(b,a,c),g=!0}catch(m){console.error("Unable to parse and decode URL "+c)}}};this.getState=function(){if(e)return d.getState()};this.log=function(){e&&d.log.call(window,arguments)};e&&(h(window).data("hashchange.history")||d.Adapter.bind(window,"hashchange.history", 2975function(b){var a=location.hash;g&&a&&((b=a.match(/#post(\d+)/))&&Number(b[1])+""===b[1]&&1<Number(b[1])&&0==h(a).length&&h(".conversation-content-widget").length?(a=vBulletin.parseUrl(location.href),location.replace([a.pathname,a.search,a.search?"&":"?","p=",b[1],b[0]].join(""))):(setTimeout(function(){history.back()},0),(b=vBulletin.scrollToAnchor(a))&&window.scrollTo(0,0)))}),h(window).data("hashchange.history",!0));return this};vBulletin.ready("history").resolve()})(jQuery); 2976; 2977 2978// ***************************
2979// js.compressed/autocomplete.js 2980// *************************** 2981function vBulletin_Autocomplete(N,g){var e=$(N),z=g.apiClass||null,A=g.apiFunction||"getAutocomplete",O=g.delay||500,u=g.minLength||3,B=g.maxItems||!1,C=e.attr("name")||"autocompleteElements",P=g.containerClass||"entry-field",D=g.placeholderText,Q="undefined"!=typeof g.autoFocus?g.autoFocus:!1,R="undefined"!=typeof g.appendTo?g.appendTo:"body",E=g.delimiter||",",k=[],q=e.parent(".autocomplete-container"),h=q.find(".autocompleteHelper"),v=!1,w=!1,r=e.siblings(".autocomplete-box"),F=g.beforeAdd||!1, 2982G=g.afterAdd||!1,H=g.beforeDelete||!1,I=g.afterDelete||!1,J=this,t=g.editorContext||null,K=function(a,f,d){if(""==a||"function"==typeof F&&!F.call(this,a,f))return!1;var b=!0;$(k).each(function(n,p){p.label==a&&(b=!1)});if(!b||B&&k.length>=B)return!1;var c=$("<div />").addClass("element-x b-icon b-icon__x-circle").text("X"),l=$("<div />").addClass("element-text").text(a);$("<div />").addClass("autocomplete").append(l).append(c).appendTo(r);k.push({label:a,value:f});x();"function"==typeof G&&G.call(this, 2983a,f,d);r.show();return!0},y=function(a){var f=a.length,d;for(d=0;d<f;++d)K(a[d])},L=function(){r.html("");h.val("");k=[];x()},x=function(){var a=[];$(k).each(function(f,d){a.push(d.label)});e.val(a.join(E))},M=function(a,f,d){if(t)switch(t.type){case "tags":t.context.addTag(a)}else J.addElement(a,a),h.val("");if("undefined"!==typeof f&&"undefined"!==typeof d)return d.preventDefault(),!1};(function(){0==q.length&&(e.wrap('<div class="autocomplete-container b-form-input__input" />'),q=e.parent(".autocomplete-container"), 2984q.addClass(P).on("mousedown",function(b){var c=this;setTimeout(function(){var l=$(".autocompleteHelper:visible",c);0<l.length&&l[0].focus()},10);return!1}));0==r.length&&(r=$("<div />").addClass("autocomplete-box").insertBefore(e));0==h.length&&(h=$('<input type="text" name="autocompleteHelper" />').addClass("autocompleteHelper b-form-input__input b-form-input__input--hide-clear-button").attr("placeholder",function(){return D?D:null}).attr("maxlength",function(){return e.attr("maxlength")?e.attr("maxlength"): 2985null}).insertAfter(r));h.attr("tabindex",e.attr("tabindex")||0);h.off("keydown").on("keydown",function(b){if(13==b.which){var c=$(b.target).val();c.length>=u&&M(c,!0,b)}});h.off("blur").on("blur",function(b){v=window.setTimeout(function(){if(!w){var c=h.val();c.length>=u&&M(c,!0,b)}v=w=!1},200)});h.off("focus").on("focus",function(b){w=v?!0:!1;return!1});var a="font-family font-size font-weight font-style color line-height height".split(" "),f;for(f=0;f<a.length;++f)q.css(a[f],e.css(a[f]));a='<input type="hidden" name="'+ 2986C+'"';e.attr("id")&&(a+=' id="'+e.attr("id")+'"');e.attr("class")&&(a+=' class="'+e.attr("class")+'"');if(e.attr("data-value"))var d=e.attr("data-value").split(E);e.replaceWith(a+" />");e=q.find('[name="'+C+'"]');h.autocomplete({autoFocus:Q,appendTo:R,delay:O,minLength:u,search:function(b,c){console.log("searching for "+this.value)},source:function(b,c){console.log("getting source for "+b.term);vBulletin.AJAX({call:"/ajax/api/"+z+"/"+A,data:{searchStr:b.term},success:function(l){console.log("got source for "+ 2987b.term+":");if(l&&$.isArray(l.suggestions)){var n=[];$.each(l.suggestions,function(p,m){p={label:m.title};t&&"tags"==t.type?p.value=pageData.userid:(p.value=m.value,"id"in m&&m.id&&(p.id=m.id),m.hasOwnProperty("htmllabel")&&(p.htmllabel=m.htmllabel));n.push(p)});c(n)}else console.log("/ajax/api/"+z+"/"+A+" successful, but response was not an array"),vBulletin.error("error","error_getting_suggestions")},error_phrase:"error_getting_suggestions"})},select:function(b,c){J.addElement(c.item.label,c.item.value, 2988c.item);h.val("");b.preventDefault()},focus:function(b,c){h.val(c.item.label);b.preventDefault()},open:function(b){b=$(b.target).autocomplete("instance").menu.element;var c=parseInt($(".dialog-box").css("z-index"),10);b.css("z-index",c+1)}});if(a=h.data("ui-autocomplete"))a._renderItem=function(b,c){c=c.hasOwnProperty("htmllabel")?$("<div>").html(c.htmllabel):$("<div>").text(c.label);return $("<li>").append(c).appendTo(b)};r.on("click",".element-x",function(b){b=$(this).closest(".autocomplete");var c= 2989b.find(".element-text").text().toLowerCase(),l=[],n=!1;$(k).each(function(p,m){m.label.toLowerCase()==c?n=m:l.push(m)});if("function"==typeof H&&!H.call(this,n.label,n.data))return!1;k=l;b.remove();x();"function"==typeof I&&I.call(this,n.label,n.data)});q.off("click").on("click",function(b){$(b.target).hasClass("ui-autocomplete-input")||$(".ui-autocomplete-input",$(this)).trigger("focus");return!1});d&&y.call(this,d)}).call(this);this.addElement=function(a,f,d){return K.call(this,a,f,d)};this.addElements= 2990function(a){y.call(this,a)};this.setElements=function(a){L();y(a)};this.getElements=function(){return k};this.getLabels=function(){var a=[];$(k).each(function(f,d){a.push(d.label)});return a};this.getValues=function(){var a=[];$(k).each(function(f,d){a.push(d.value)});return a};this.getInputField=function(){return h};this.clearElements=function(){return L.call(this)};this.countElements=function(){return $(k).length};this.getMinLength=function(){return u};this.close=function(){h.val("");h.autocomplete("close")}} 2991; 2992; 2993 2994// ***************************
2995// js.compressed/poll.js 2996// *************************** 2997vBulletin.precache("vote_failed vote_now vote_first vote_error_retrieving votes vote voters voter".split(" "),["maxpolloptions"]); 2998(function(c){c(function(){function m(d,g,a){d=c("<span />").addClass(g).text(vBulletin.phrase.get(d));q(d,a)}function q(d,g){g.html(d);g.fadeIn("slow");c("body").on("click.voterpopup",function(a){0==c(a.target).closest(".voter-icon").length&&(g.hide(),c("body").off("click.voterpopup"))})}function n(d,g){var a=d.parent(),b=g.options,e;for(e in b){var f=c(".pollresults-option-"+b[e].polloptionid);f.find(".title").html(JShtmlEncode(b[e].title));f.find(".bar-container .bar").css("width",b[e].percentage+ 2999"%");f.find(".percentage").html(b[e].display_percentage+"%");f.find(".votes span").html(b[e].votes);var k=1==b[e].votes?"vote":"votes";f.find(".votes label").html(vBulletin.phrase.get(k))}c(".pollresults .pollvote-count span",a).html(g.poll_votes);k=1==g.poll_votes?"voter":"voters";c(".pollresults .pollvote-count label",a).html(vBulletin.phrase.get(k));d.hide();c("div.pollresults",a).removeClass("h-hide")}vBulletin.conversation.bindEditFormEventHandlers("poll");(function(d){var g=function(a){a.find(".js-remove-button").prop("disabled", 30002>=a.find("li").length)};c(".b-poll-fieldset__poll-answers").each(function(){g(c(this))});d.off("click",".js-poll__view-results").on("click",".js-poll__view-results",function(a){a.preventDefault();a=c(this).attr("data-nodeid");var b=c(this).closest("form");c.post(vBulletin.getAjaxBaseurl()+"/poll/get",{nodeid:a},function(e){n(b,e)},"json")});d.off("click",".js-poll__back-to-poll").on("click",".js-poll__back-to-poll",function(a){a.preventDefault();a=c(this).closest(".js-poll__parent");a.find("div.pollresults").addClass("h-hide"); 3001a.find("form.poll").show()});d.off("click",".b-poll-fieldset__add-more").on("click",".b-poll-fieldset__add-more",function(a){a=c(this);var b=a.prev(".b-poll-fieldset__poll-answers"),e=b.find("li").first().clone(!0),f=e.find(".b-form-input__input");f.val("").attr("name","polloptions[new][]");e.appendTo(b);f.trigger("focus");b.find("li").length==vBulletin.options.get("maxpolloptions")&&a.addClass("h-hide");g(b);return!1});d.off("click",".b-poll-fieldset__poll-answers .js-remove-button").on("click", 3002".b-poll-fieldset__poll-answers .js-remove-button",function(){var a=c(this),b=a.closest(".b-poll-fieldset__poll-answers");a.closest("li").remove();b.next(".b-poll-fieldset__add-more").removeClass("h-hide");g(b);return!1});d.off("click",".js-poll-timeout").on("click",".js-poll-timeout",function(a){a=c(this).closest(".b-poll-fieldset__poll-options").next(".b-poll-fieldset__datepicker-container");this.checked?a.removeClass("h-hide"):a.addClass("h-hide").find(".b-datepicker__input").val("")});d.off("submit.formpoll", 3003"form.poll").on("submit.formpoll","form.poll",function(a){a.preventDefault();var b=c(this);a=b.find('[name="polloptionid"]:checked').val();var e=[];b.find('[name="polloptionids[]"]:checked').each(function(){e.push(c(this).val())});c.post(vBulletin.normalizeAjaxUrl(b.attr("action")),{polloptionid:a,"polloptionids[]":e},function(f){0==f?vBulletin.warning("vote_now","vote_failed"):(n(b,f),f=b.parent(),c("div.pollresults",f).find(".js-poll__back-to-poll").remove())},"json")});d.offon("click",".pollresults-data .voter-icon", 3004a=>{a=c(a.currentTarget);var b=a.find(".voters");if(b.is(":visible"))return!1;c(".pollresults-data .voter-icon .voters").hide();var e=a.attr("data-node-id"),f=a.attr("data-polloption-id"),k=a.closest("form");vBulletin.AJAX({call:"/poll/get-voters",data:{nodeid:e,polloptionid:f},success:h=>{var {options:{[f]:l}={}}=h;if(l)if(n(k,h),h=l.votersinfo,c.isEmptyObject(h))m("vote_first","note",b);else{l=[];for(let p of Object.values(h))l.push('<a href="{0}" data-vbnamecard="{1}">{2}</a>'.format(p.profileurl, 3005p.userid,p.displayname_safe));q(l.join(", "),b)}else m("vote_error_retrieving","error",b)},api_error:h=>m(h[0],"error",b),error:()=>m("vote_error_retrieving","error",b)})});d.offon("click",".pollresults-data .voter-icon .voters",a=>{a.stopPropagation();return!0})})(c(document))})})(jQuery); 3006; 3007 3008// ***************************
3009// js.compressed/vbSlideshow.js 3010// *************************** 3011vBulletin.precache(["gallery_slideshow","no_photos_found_or_post_deleted"],[]); 3012(function(f){function A(a,b,e,c){var d=a.find(".caption");d.html("").hide();b.links&&d.append(f("<div />").addClass("links ellipsis").html(b.links));b.title&&d.append(f("<div />").addClass("title ellipsis").html(b.title));b.caption&&d.append(f("<div />").addClass("title ellipsis").html(b.caption));b=b.links&&b.title?15:b.links||b.title?35:50;e=a.find(".slideshow-wrapper .jcarousel-item-"+e+" img");e.outerWidth();d.css({marginBottom:b+"px",width:"100%",textAlign:"center",marginLeft:"auto",marginRight:"auto"}); 3013e.one("load",function(){var h=f(this).outerWidth();d.css("width",h+"px")});c?d.fadeIn("fast",function(){a.trigger("click")}):d.show()}function B(a){var b=vBulletin.isRtl();37==a.which?vBulletin.gallery.slideshow.jcarousel(b?"next":"prev"):39==a.which&&vBulletin.gallery.slideshow.jcarousel(b?"prev":"next");if(33<=a.which&&40>=a.which)return!1;27==a.which&&k.dialog("instance")&&k.dialog("close")}function C(a){0<(a.originalEvent.wheelDelta||-a.originalEvent.detail)?vBulletin.gallery.slideshow.jcarousel("prev"): 3014vBulletin.gallery.slideshow.jcarousel("next");return!1}function D(a){if(a){var b=vBulletin.isRtl(),e=0,c=!1,d=!1;function h(g,l){if(vBulletin.gallery.slideshow.jcarousel("canmove")){var n=f(".slideshow-wrapper .jcarousel-list"),q=b?"right":"left",m=parseInt(n.css(q),10);if("restore"===g)g=m+-1*e,l?(l={},l[q]=g,n.animate(l,"fast","swing")):n.css(q,g),e=0,c=!1;else if("prev"===g||"next"===g){parseInt(n.css("width"),10);m=n.find(".jcarousel-item");l=m.length;m=m.first();m=parseInt(m.css("width"),10);
3015var r=Math.abs(c);g="prev"===g?r-m:r+m;var t=(g?g/m:0)+1;if(0<=g&&g<=(l-1)*m&&(l={},l[q]=-1*g,n.animate(l,"fast","swing",function(){e=0;!1!==c&&(n.css("visibility","hidden"),n.css(q,c),c=!1,vBulletin.gallery.slideshow.jcarousel("scroll",t,!1),n.css("visibility","visible"))}),!1!==c))return!0}else b&&(g*=-1),n.css(q,m+g),e+=g,!1===c&&(c=m)}}function p(g){d=!0;h(g,!0)||h("restore",!0)}f(document).swipeable({swipeleft:function(g,l){p(b?"prev":"next")},swiperight:function(g,l){p(b?"next":"prev")},swiping:function(g, 3016l){h(l.moved.x)},swipeend:function(g,l){e&&!d&&h("restore",!0);d&&=!1}})}else f(document).swipeable("disable")}function F(){var a=f("body"),b=a.css("overflow")||"auto";a.css("overflow","hidden");var e=f(window).innerWidth(),c=f(window).innerHeight();e=parseInt(e-0,10);c=parseInt(c-0,10);k.css({borderRadius:0,borderWidth:0});a.css("overflow",b);k.dialog("instance")&&(k.dialog("option","width",e),k.dialog("option","height",c))}function G(a){var b=a.closest(".js-slideshow__gallery-node"),e=0,c="",d= 3017null,h=null;0<b.length&&(e=parseInt(b.attr("data-node-id")||b.attr("data-nodeid"),10),c=b.data("sort")||"",b=b.closest(".ui-widget-content"),b=b.find(".toolbar-filter-overlay .filter-options"),b.length&&(d=f("input[name=filter_time]:checked",b).val(),h=f("input[name=filter_show]:checked",b).val()));0==e&&(b=a.closest(".js-post-sm"),0<b.length&&(e=parseInt(b.attr("data-nodeid"),10)));0==e&&(a=a.closest(".js-post"),0<a.length&&(e=parseInt(a.attr("data-node-id"),10)));return{nodeid:e,sort:c,filter_time:d, 3018filter_show:h}}function H(a){var b=a.closest(".js-post__content-text"),e={photos:[]},c=0;(b.length&&b.find(".js-lightbox, .js-lightbox-participant")||a).each(function(){var d=f(this),h=d.data("fullsize-url")||d.parent().attr("href")||d.attr("src")||"";let p=d.data("thumb-url")||h,g=d.data("title")||"";d=d.data("caption")||"";h&&(h={url:h,thumb:p,links:g,title:d},e.photos.push(h),this===a[0]&&(u=c),c++)});return e}async function I(a){if(a.hasClass("js-lightbox"))return H(a);var b=a.closest(".b-content-entry-panel__content--gallery").find(".js-photo-postdata input"); 3019if(0<b.length){let r={photos:[]};b.filter('[name="filedataid[]"]').each(function(){var t=this.value;t={title:JShtmlEncode(b.filter('[name="title_'+t+'"]').val()),url:pageData.baseurl+"/filedata/fetch?filedataid="+t,thumb:pageData.baseurl+"/filedata/fetch?thumb=1&filedataid="+t};r.photos.push(t)});return new Promise((t,N)=>{setTimeout(()=>{t(r)},10)})}var e=a.attr("data-channelid"),c=a.attr("src")||a.attr("href"),d=G(a);a=d.nodeid;var h=d.sort,p=d.filter_time;d=d.filter_show;var g={nodeid:a},l=parseInt(f(".albumSlideShowPageNo").val(), 302010),n=parseInt(f(".albumSlideShowPerPage").val(),10),q=f(".media-tab .media-filter-overlay .filter-options input:checked").val();vBulletin.media&&vBulletin.media.MEDIA_USERID&&(g.userid=vBulletin.media.MEDIA_USERID);e&&(g.channelid=e);isNaN(l)||(g.pageno=l);isNaN(n)||(g.perpage=n);q&&(g.dateFilter=q);isNaN(u)||(g.startIndex=u);h&&(g.sort=h);p&&(g.dateFilter=p);d&&(g.showFilter=d);0<a&&(g.startIndex="");var m=JSON.stringify(g);0<a&&(v[a]=v[a]||[],v[a].push(m));w[m]||await vBulletin.AJAX({call:"/filedata/gallery", 3021data:g}).always(r=>{!r&&c&&(r={photos:[{title:"",url:c,thumb:""}]});w[m]=r});return w[m]}function y(a,b,e){let c=a.jcarousel("size")||1,d=a.data("curIndex")||1,h;if(b!=d)return b==c?(2<c&&(h=a.jcarousel("scroll",b-1,!1)),a.jcarousel("next")):d==c&&b==c-1?a.jcarousel("prev"):h=a.jcarousel("scroll",b,e),h}function z(a){var b=f(this);x=this;if(1==b.closest("#preview-overlay").length)return!1;a&&a.preventDefault&&a.preventDefault();!1===u&&(u=b.index());f(document).offon("click",".thumbnails .image-wrapper", 3022function(e,c){"undefined"==typeof c&&(c=!0);f(".thumbnails .image-wrapper",k).addClass("dimmed");f(this).removeClass("dimmed");e=Number(f(this).parent().attr("jcarouselindex"));k.data("thumbclick",!0);y(vBulletin.gallery.slideshow,e,c);k.removeData("thumbclick")});a=k.find(".slideshow-wrapper");0==a.find(".slideshow-list").length&&a.append(f("<ul />").addClass("slideshow-list"));k.dialog("open");window.vBulletin.loadingIndicator.show();
3022vBulletin.gallery.slideshow=a.jcarousel({wrap:null,animation:"fast", 3023easing:"swing",scroll:1,rtl:vBulletin.isRtl(),initCallback:function(e,c){"init"==c&&(window.vBulletin.loadingIndicator.show(),I(b).then(d=>{window.vBulletin.loadingIndicator.hide();J(d,e)}))},itemLoadCallback:{onBeforeAnimation:function(e,c,d){d=e.first;e.inTail&&(d=e.last);if("init"==c)return!1;if(c=k.data("image-data")){vBulletin.gallery.slideshow.data("curIndex",d);var h=c.photos.length;if(0<d)for(;d>h;)d-=h;else for(;0>=d;)d+=h;A(k,c.photos[d-1],d,!0);vBulletin.gallery.thumbnails&&(e=E(e),y(vBulletin.gallery.thumbnails, 3024Math.max(d-Math.floor(e.visibleCount/2),1),!0),k.data("thumbclick")||(f("#slideshow-dialog .thumbnails .image-wrapper").addClass("dimmed"),vBulletin.gallery.thumbnails.jcarousel("get",d).find(".image-wrapper").removeClass("dimmed")))}}}});"undefined"==typeof vBulletin.gallery.slideshow.data("curIndex")&&vBulletin.gallery.slideshow.data("curIndex",1);return!1}function J(a,b){if(a&&a.photos){k.data("image-data",a);K(b,a,k);k.find(".slideshow-wrapper").find(".jcarousel-prev-horizontal").addClass("b-icon b-icon__arrow-block-left").end().find(".jcarousel-next-horizontal").addClass("b-icon b-icon__arrow-block-right"); 3025var e=k.find(".thumbnails");b=e.find(".jcarousel-prev-horizontal");e=e.find(".jcarousel-next-horizontal");b.addClass("b-icon b-icon__arrow-bar-left").toggleClass("b-icon--disabled",b.is(".jcarousel-prev-disabled"));e.addClass("b-icon b-icon__arrow-bar-right").toggleClass("b-icon--disabled",e.is(".jcarousel-next-disabled"));A(k,a.photos[0],1);1<a.photos.length&&vBulletin.gallery.thumbnails.jcarousel("get",1).find(".image-wrapper").removeClass("dimmed");var c=u;a=parseInt(f(".albumSlideShowPerPage").val(), 302610);isNaN(a)||(c=u%a);0<c&&"undefined"!=typeof y(vBulletin.gallery.slideshow,c+1,!1)&&(k.find(".slideshow-wrapper").css("visibility","hidden"),window.setTimeout(function(){f(".thumbnails .image-wrapper",k).eq(c).trigger("click",[!1]);k.find(".slideshow-wrapper").css("visibility","")},0));window.vBulletin.loadingIndicator.hide()}else openAlertDialog({title:vBulletin.phrase.get("gallery_slideshow"),message:vBulletin.phrase.get("no_photos_found_or_post_deleted"),iconType:"warning"})}function K(a,b,e){let c= 3027b.photos.length;a.size(c);1<c?(f("#slideshow-dialog .thumbnails").show(),L(b)):f("#slideshow-dialog .thumbnails").hide();e.toggleClass("no-thumbnails",1>=c);var d=a.first||1;f.each(b.photos,function(p,g){let l=f("<a></a>").attr("href",g.url);g=f('<img alt="{0}" class="image" />'.format(g.htmltitle||"")).attr("src",g.url);let n=f('<div class="image-wrapper"></div>');l.append(g);n.append(l);a.add(d+p,n)});b=e.find(".slideshow-wrapper .slideshow-list");e=parseFloat(b.css("width"));var h=a.get(1);h=parseFloat(h.css("width")); 30280<h&&e/h<c&&b.css("width",c*h+"px");a.reload()}function E(a){var b=f("#slideshow-dialog .thumbnails .jcarousel-clip"),e=b.find(".jcarousel-item").outerWidth(!0);a=a.size();b=parseInt(b.css("max-width"),10);b=Math.min(a,Math.max(1,Math.floor(b/e)));return{visibleCount:b,recommendedContainerWidth:b*e}}function L(a){function b(c){var d=f(c.buttonPrev[0]);c=f(c.buttonNext[0]);d.toggleClass("b-icon--disabled",d.is(".jcarousel-prev-disabled"));c.toggleClass("b-icon--disabled",c.is(".jcarousel-next-disabled"))} 3029var e=f("#slideshow-dialog .thumbnails .thumbnail-list");0==e.length&&(e=f("#slideshow-dialog .thumbnails").append(f("<ul />").addClass("thumbnail-list")));vBulletin.gallery.thumbnails=e.jcarousel({wrap:null,animation:"fast",easing:"swing",rtl:vBulletin.isRtl(),size:a.photos.length,initCallback:function(c,d){"init"==d&&(c.size(a.photos.length),f.each(a.photos,function(h,p){h=(c.first||1)+h;if(c.has(h))return!0;if(h>a.photos.length)return!1;p=f("<img />").addClass("thumbnail").on("load",function(){}).attr({src:p.thumb, 3030alt:""}).appendTo(f("<div />").addClass("image-wrapper dimmed"));c.add(h,p.parent().get(0))}),d=E(c),f("#slideshow-dialog .thumbnails .jcarousel-clip").css("width",d.recommendedContainerWidth+"px"),c.size()<=d.visibleCount&&(c.buttonNext.hide(),c.buttonPrev.hide()))},itemVisibleInCallback:{onBeforeAnimation:function(c,d,h,p){f("#slideshow-dialog .thumbnails").data("visible-range",{first:c.first,last:c.last})}},buttonNextCallback:b,buttonPrevCallback:b}).disableSelection()}function M(){if(x){var a= 3031x;var b=(vBulletin.gallery.slideshow&&vBulletin.gallery.slideshow.data("curIndex")||
30311)-1;k.dialog("close");u=b;z.call(a)}}vBulletin.ensureObj("gallery");var k=f("#slideshow-dialog"),u=!1,x=!1,w={},v={};vBulletin.gallery.clearCacheForNodeid=function(a){v.hasOwnProperty(a)&&v[a].forEach(b=>delete w[b]);v[a]=[]};f(function(){k.data("vb-lightbox-initialized")||(k.data("vb-lightbox-initialized",!0),f(document).offon("click","#slideshow-dialog .close-btn",function(){k.dialog("instance")&&k.dialog("close")}), 3032k.dialog({autoOpen:!1,resizable:!1,closeOnEscape:!0,showTitleBar:!1,modal:!0,dialogClass:"slideshow-dialog",open:function(){F();f("body").css("overflow","hidden");f(".ui-widget-overlay").on("click",function(){k.dialog("close")});f(document).offon("keydown",B);f(document).offon("mousewheel DOMMouseScroll",C);D(!0)},close:function(a,b){vBulletin.gallery.thumbnails&&vBulletin.gallery.thumbnails.jcarousel("destroy");vBulletin.gallery.slideshow&&(vBulletin.gallery.slideshow.removeData("curIndex"),vBulletin.gallery.slideshow.jcarousel("destroy")); 3033f("body").css("overflow","auto");f(document).off("keydown",B);f(document).off("mousewheel DOMMouseScroll",C);D(!1);u=x=!1}}))});f(function(){f(document).offon("click",".js-slideshow--item",z);f(document).offon("click",".js-lightbox",z);k.addClass("js-no-responsive-resize");f(window).on("resize",f.debounce(300,M))})})(jQuery); 3034; 3035 3036// ***************************
3037// js.compressed/conversation_filter.js 3038// *************************** 3039vBulletin.precache(["invalid_request","invalid_search_syntax","invalid_server_response_please_try_again","unknown_error"],[]);vBulletin.ensureObj("conversation"); 3040(function(a){vBulletin.conversation.filter=function(q){function v(c,d){vBulletin.conversation.displaySelectedFilterText(c,d,b.context)}var e=this,r=null,t=0,x=!1,u=!1,b={context:document,autoCheck:!1,checkInterval:15E3,scrollToTop:null,customFilter:null,onContentLoad:null,closeOverlayOnScroll:!1,pagination:null,allowHistory:!1,tabParamAsQueryString:!0,hash:"",beforeApplyFilters:null,afterResetFilters:null};q&&"object"==typeof q&&a.extend(b,q);var p=new vBulletin.history.instance(b.allowHistory);(function(){a(".toolbar-filter-overlay input[type=radio]", 3041b.context).off("change.conversation_filter").on("change.conversation_filter",function(c,d,g){c=a(this);var f=a(this.form);if(!p.isEnabled()&&b.allowHistory)return c=vBulletin.makePaginatedUrl(location.href,1),location.href=vBulletin.makeFilterUrl(c,this.name,this.value,b.context,b.hash),!0;x=!0;b.customFilter=null;c.data("bypass-filter-display")||v(this);c=c.closest(".conversation-toolbar-wrapper");1<a(".conversation-toolbar-wrapper",b.context).length&&$toolbarWrappers.filter("."+(c.hasClass("top")? 3042"bottom":"top")).find("input[name={0}][value={1}]".format(this.name,this.value)).prop("checked",!0);"conversations_on"==this.value?(u=b.autoCheck=!0,t=1):(clearTimeout(t),u="filter_show"==this.name);a(".new-conversations-strip",b.context).hide();e.updatePageNumber(g||1);g=a('.filtered-by .filter-text[data-filter-name="q"]',b.context);if(g.length){var h=e.getSelectedFilters(f);h.q=g.data("filter-value");e.setOption("customFilter",h);e.forceApplyFilters()}else e.applyFilters(!1);p.isEnabled()&&!d&& 3043(h=e.getSelectedFilters(f),f=this.name,g=this.value,d=a(".filtered-by",c),h={from:"filter",page:1,tab:b.tabParamAsQueryString?"#"+c.closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(c.closest(".ui-tabs"),!1),filters:h,filtervalue:g,filtername:f},d.data("reset")?(c=location.pathname.replace(/\/page[0-9]+/,""),b.tabParamAsQueryString&&(f=vBulletin.parseQueryString(location.search),f.tab?c+="?tab="+f.tab:f.view&&(c+="?view="+f.view))):(c=vBulletin.makePaginatedUrl(location.href, 30441),c=vBulletin.makeFilterUrl(c,f,g,b.context)),p.pushState(h,document.title,c),d.data("reset",null))});
3044a(".new-conversations-strip",b.context).off("click.conversation_filter").on("click.conversation_filter",function(){a(this).hide();u=!0;e.updatePageNumber(1);e.applyFilters(!1,!0)});a(".toolbar-filter",b.context).off("click.conversation_filter").on("click.conversation_filter",function(c,d,g){c=a(this).closest(".conversation-toolbar-wrapper");var f=c.hasClass("bottom")?"bottom":"top";"undefined"== 3045typeof d&&(d="slow");a(".filter-wrapper",this).toggleClass("selected");a(".arrow .vb-icon",this).toggleClass("vb-icon-triangle-down-wide vb-icon-triangle-up-wide");a(".toolbar-filter-overlay",c).slideToggle(d,function(){var h="conversation_filter"+f;if(a(this).is(":visible")){a("body").off("click."+h).on("click."+h,function(n){0==a(n.target).closest(".toolbar-filter-overlay").length&&0==a(n.target).closest(".toolbar-filter").length&&(a("body").off("click."+h),a(window).off("scroll."+h),n=0<a(n.target).closest(".toolbar-filter").length? 3046"fast":"slow",a(".conversation-toolbar-wrapper.{0} .conversation-toolbar .toolbar-filter".format(f),b.context).triggerHandler("click.conversation_filter",[n]))});var k=!0;if("scroll"!=g){k=a(".filtered-by",b.context);if(0==k.length||k.is(":hidden"))k=this;var l={};(k=vBulletin.isScrolledIntoView(k,l))||a("html,body").animate({scrollTop:"+="+Math.abs(l.bottom)},"fast",function(){setTimeout(function(){if(b.closeOverlayOnScroll)a(window).off("scroll."+h).on("scroll."+h,function(){a(".conversation-toolbar-wrapper.{0} .conversation-toolbar .toolbar-filter".format(f), 3047b.context).triggerHandler("click.conversation_filter",[0,"scroll"])})},50)})}if(k&&b.closeOverlayOnScroll)a(window).off("scroll."+h).on("scroll."+h,function(){a(".conversation-toolbar-wrapper.{0} .conversation-toolbar .toolbar-filter".format(f),b.context).triggerHandler("click.conversation_filter",[0,"scroll"])})}else a("body").off("click."+h),a(window).off("scroll."+h)});c.hasClass("bottom")&&a(".arrow .vb-icon",this).hasClass("vb-icon-triangle-up-wide")&&(d=a(".conversation-toolbar-wrapper.bottom .toolbar-filter-overlay", 3048b.context),a("html, body").animate({scrollTop:d.offset().top+d.innerHeight()},500))});a(".filtered-by",b.context).offon("click.conversation_filter",".js-remove-filter",function(){var c=a(this),d=c.closest(".filtered-by"),g=c.closest(".filter-text"),f=g.data("filter-name");a();d.data("clicked",!0);if(!p.isEnabled()&&b.allowHistory)return"text"==g.data("filter-type")&&g.data("filter-js-selector")?(d=vBulletin.makePaginatedUrl(location.href,1),location.href=vBulletin.makeFilterUrl(d,"q","",b.context, 3049b.hash,!0)):(d=vBulletin.makePaginatedUrl(location.href,1),location.href=vBulletin.makeFilterUrl(d,f,g.data("filter-value"),b.context,b.hash,!0)),!1;var h=a(".toolbar-filter-overlay .filter-options input[name={0}]".format(f),b.context).prop("checked",!1).filter(".js-default-checked");e.updatePageNumber(1);if("text"==g.data("filter-type")&&g.data("filter-js-selector")){a(g.data("filter-js-selector")).val("");var k=e.getSelectedFilters(a("form.toolbar-filter-overlay",b.context));delete k[f];e.setOption("customFilter", 3050k)}g.remove();g=d.find(".filter-text").length;0==g?(d.addClass("h-hide"),d.data("reset",!0)):1==g&&d.find(".clear-all").addClass("h-hide");1==h.length?(h.data("bypass-filter-display",!0),h.trigger("click.conversation_filter"),h.data("bypass-filter-display",null)):(k&&(d=vBulletin.makePaginatedUrl(location.href,1),d=vBulletin.makeFilterUrl(d,"q","",b.context),p.pushState({from:"filter",page:1,tab:b.tabParamAsQueryString?"#"+c.closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(c.closest(".ui-tabs"), 3051!1),filters:k},document.title,d)),e.forceApplyFilters(),k&&e.setOption("customFilter",null))});a(".filtered-by",b.context).offon("click.conversation_filter",".clear-all",function(c){var d=a(this).closest(".conversation-toolbar-wrapper");a(this).data("clicked",!0);e.setOption("customFilter",null);e.resetFilters(!1,!1,d);c.preventDefault()});a(".conversation-toolbar .filter-wrapper",b.context).data("object-instance",e);
3051a(".js-conversation-showmore-button",b.context).off("click").on("click",function(){var c= 3052parseInt(a('form.toolbar-filter-overlay input[name="pagenum"]',b.context).val());u=!1;e.updatePageNumber(c+1);e.applyFilters(!1,!0,!0)});a(".conversation-toolbar .toolbar-search-form",b.context).off("submit.filtersearch").on("submit.filtersearch",function(){var c=a(this.elements.q),d=a.trim(c.val()),g=a(this).closest(".conversation-toolbar-wrapper");c.val(d);if(!p.isEnabled()&&b.allowHistory){var f=vBulletin.makePaginatedUrl(location.href,1);location.href=vBulletin.makeFilterUrl(f,"q",d,g);return!1}c= 3053b.tabParamAsQueryString?"#"+a(this).closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(a(this).closest(".ui-tabs"),!1);if(d){var h=e.getSelectedFilters(g.find(".toolbar-filter-overlay"));f={};f.q=d;a.extend(h,f);e.setOption("customFilter",h);e.forceApplyFilters();e.displayCustomFilterText(this.elements.q);p.isEnabled()&&(f=vBulletin.makePaginatedUrl(location.href,1),f=vBulletin.makeFilterUrl(f,"q",d,g),p.pushState({from:"filter",page:1,tab:c,filters:h},document.title,f))}else f= 3054g.find('.filter-text[data-filter-name="{0}"]'.format("q")),f.length&&(h=e.getSelectedFilters(g.find(".toolbar-filter-overlay")),e.setOption("customFilter",h),a(".x",f).trigger("click"),p.isEnabled()&&(f=vBulletin.makePaginatedUrl(location.href,1),f=vBulletin.makeFilterUrl(f,"q",d,g),p.pushState({from:"filter",page:1,tab:c,filters:h},document.title,f)));return!1})})();this.isFilterSelected=function(c){return a('.toolbar-filter-overlay input[value="'+c+'"]',b.context).is(":checked")};this.getSelectedFilters= 3055function(c){return vBulletin.getSelectedFilters(c,!1)};this.resetFilterForms=function(c){if(!c||c instanceof a&&!c.length)c=b.context;a(".toolbar-filter-overlay .js-default-checked",c).prop("checked",!0);a(".toolbar-search-form .js-filter-search",c).val("")};a(".toolbar-filter-overlay, .toolbar-search-form",b.context).trigger("reset");if(p.isEnabled()){q=p.getState();if(!q||a.isEmptyObject(q.data)){a(b.context).hasClass("ui-tabs-panel")?a(b.context).attr("id"):a(".conversation-toolbar-wrapper",b.context).closest(".ui-tabs-panel").attr("id"); 3056var y={from:"filter",page:Number(a(".pagenav-form .defaultpage",b.context).val())||1,tab:vBulletin.getSelectedTabHashOrPath(a(b.context).closest(".ui-tabs"),b.tabParamAsQueryString),filters:e.getSelectedFilters(a("form.toolbar-filter-overlay",b.context))};p.setDefaultState(y,document.title,location.href)}p.setStateChange(function(c,d,g){var f=p.getState();if("filter"==f.data.from||"pagination"==d||"tabs"==d){p.log(f.data,f.title,f.url);var h;f.data.tab&&(h=b.tabParamAsQueryString?a(f.data.tab):a('.ui-tabs .ui-tabs-panel[data-url-path="'+ 3057f.data.tab+'"]'));c=h&&h.length&&h||b.context;if("pagination"==d){if(g){d=a(".filtered-by",c);var k=a(".toolbar-filter-overlay .filter-options-list",c),l=!1;a(".filter-text",d).filter('[data-filter-name!="q"]').remove();a(".clear-all",d).addClass("h-hide");k.find(".js-default-checked").prop("checked",!0);a.each(g,function(n,w){n=a('input[name="{0}"][value="{1}"]'.format(n,w),k);n.length&&(n.prop("checked",!0).trigger("change",[!0,f.data.page]),l=!0)});l||(k.first().data("bypass-filter-display",!0).trigger("change", 3058[!0,f.data.page]).data("bypass-filter-display",null),d.addClass("h-hide"))}}else g=a(c).closest(".ui-tabs"),d=b.tabParamAsQueryString?g.find('.ui-tabs-nav > li >
3058 a[href*="{0}"]'.format(f.data.tab)):g.find('.ui-tabs-nav > li > a[data-url-path="'+f.data.tab+'"]'),d.parent().hasClass("ui-tabs-active")?(g=e.getSelectedFilters(a(".toolbar-filter-overlay",c)),d=a(".conversation-toolbar .filter-wrapper",c).data("object-instance")||e,vBulletin.areJsonObjectsEqual(g,f.data.filters)||(d.setOption("context", 3059c),d.updatePageNumber(f.data.page),d.applyHistoryFilters(f.data))):(c=d.parent().index(),vBulletin.selectTabByIndex.call(g,c))}},"filter")}this.displayCustomFilterText=function(c,d){v(c,d||a(c).val())};this.isHistoryEnabled=function(){return p.isEnabled()};this.resetFilters=function(c,d,g){if(!g||g instanceof a&&!g.length)g=b.context;var f=a(".filtered-by",g).addClass("h-hide"),h=location.pathname.replace(/\/page[0-9]+/,"");if(b.tabParamAsQueryString){var k=vBulletin.parseQueryString(location.search); 3060k.tab?h+="?tab="+k.tab:k.view&&(h+="?view="+k.view)}a(".clear-all",f).addClass("h-hide");a(".filter-text",f).remove();e.resetFilterForms(g);if(!c)if(p.isEnabled()){f.data("reset",!0);e.updatePageNumber(1);k=e.getSelectedFilters(a("form.toolbar-filter-overlay",g));if(d){var l=a(".toolbar-search-form .js-filter-search",g).val("");delete k[l.attr("name")];e.setOption("customFilter",k)}e.forceApplyFilters();y={from:"filter",page:1,tab:b.tabParamAsQueryString?"#"+f.closest(".ui-tabs-panel").attr("id"): 3061vBulletin.getSelectedTabHashOrPath(f.closest(".ui-tabs"),!1),filters:k};p.pushState(y,document.title,h)}else b.allowHistory&&(location.href=h);"function"==typeof b.afterResetFilters&&b.afterResetFilters.apply(this,arguments);return e};this.applyHistoryFilters=function(c){if(c&&c.filters&&!a.isEmptyObject(c.filters)){var d=b.tabParamAsQueryString?a(c.tab):a('.ui-tabs .ui-tabs-panel[data-url-path="'+c.tab+'"]'),g=a(".toolbar-filter-overlay",d);"undefined"!=typeof e.lastFilters&&delete e.lastFilters; 3062e.resetFilters(!0,!1,d);a.each(c.filters,function(l,n){l=a('[name="'+l+'"]',g);"hidden"==l.attr("type")?l.val(n):"radio"==l.attr("type")&&n!=c.filtervalue&&l.filter('[value="'+n+'"]').prop("checked",!0)});var f=vBulletin.parseQueryString(location.href),h=!0,k=function(){a(".toolbar-search-form .js-filter-search",d).val("")};a.isEmptyObject(f)?k():a.each(f,function(l,n){var w=a('.filter-options-list input[name="{0}"][value="{1}"]'.format(l,n),g);w.length?c.filtername==l&&c.filtervalue==n?(h=!1,w.prop("checked", 3063!0).trigger("change",[!0])):v(w.get(0)):(w=a('.toolbar-search-form .js-toolbar-search-inner input[name="{0}"]'.format(l),d),w.length&&n?(v(w.get(0),n),w.val(n)):k())});h&&(e.setOption("customFilter",c.filters),e.forceApplyFilters(),e.setOption("customFilter",null))}return e};this.forceApplyFilters=function(){"undefined"!=typeof e.lastFilters&&delete e.lastFilters;u=!0;e.applyFilters(!1,!0);return e};this.applyFilters=function(c,d,g,f){if("function"==typeof b.beforeApplyFilters&&!1===b.beforeApplyFilters.apply(this, 3064arguments))return e;var h=a(".toolbar-filter-overlay",b.context);d&&clearTimeout(t);var k={filters:b.customFilter?b.customFilter:e.getSelectedFilters(h),isAjaxTemplateRender:!0,isAjaxTemplateRenderWithData:!0};if(a.isEmptyObject(k.filters))return e;c&&(k.filters.checkSince=r,k.filters.pagenum=1);f?u=!0:h.find('input[name="result-id"]').val(0).length&&(k.filters["result-id"]=0);if("undefined"!=typeof this.lastFilters&&vBulletin.areJsonObjectsEqual(this.lastFilters.filters,k.filters)&&!c)return e;this.lastFilters= 3065k;var l=a(".conversation-empty",b.context),n=a(".conversation-toolbar-wrapper",b.context);n.addClass("h-disabled");l.addClass("h-invisible");c&&window.vBulletin.loadingIndicator.suppressNextAjaxIndicator();var w=vBulletin.normalizeAjaxUrl(h.attr("action"))||vBulletin.getAjaxBaseurl()+"/activity/get",E=h.closest(".conversation-toolbar-wrapper").find('form.pagenav-form input[name="article_display_columns"]');1==E.length&&(k.article_display_columns=E.val());var z=a(".conversation-list",b.context);vBulletin.AJAX({url:w, 3066data:k,api_error:function(m){m=m[0];z.addClass("h-hide");m=vBulletin.phrase.get(m);l.html((m||"").replace(/<br\s*\/*>/g," ")).removeClass("h-hide h-invisible")},success:function(m){l.addClass("h-hide");if(c)!x&&0<m.total&&!a("body").hasClass("edit-mode")&&(a(".new-conversations-strip span",b.context).html(m.total),a(".new-conversations-strip",b.context).fadeIn("slow")),0==a(".conversation-list li.list-item",b.context).length&&l.removeClass("h-hide");else{var A=a(".js-conversation-showmore",b.context); 3067a(".new-conversations-strip",b.context).hide();if((0<m.total_with_sticky||0<m.total)&&m.template){m.resultId&&(a('input[name="result-id"]',h).val(m.resultId).length&&this.lastFilters&&
3067(this.lastFilters.filters["result-id"]=m.resultId),b.pagination&&b.pagination.updateResultId(m.resultId));g?z.append(m.template):(l.addClass("h-hide"),z.html(m.template).removeClass("h-hide"));m.fixFlexGrid&&vBulletin.initFlexGridFixLastRowAll();var B=k.filters,C=parseInt(B.maxpages);B=parseInt(B.pagenum);var D=m.pageinfo; 3068C=C&&B>=C||D&&(B>=parseInt(D.totalpages)||!1===D.showseemore);A.toggleClass("h-hide",C)}else g||(l.removeClass("h-hide"),z.addClass("h-hide").empty());0==m.total_with_sticky&&A.addClass("h-hide");u&&b.scrollToTop&&(A=b.scrollToTop instanceof a?b.scrollToTop:a(b.scrollToTop),0<A.length&&a("body,html").animate({scrollTop:A.offset().top},"slow"));r=m.lastDate;"function"==typeof b.onContentLoad&&b.onContentLoad.apply(z.get(0),[m]);m.pageinfo&&(e.updatePageNumber(m.pageinfo.pagenumber||1),b.pagination&& 3069"function"==typeof b.pagination.updatePageInfo&&(b.pagination.setOption("context",b.context),b.pagination.updatePageInfo(m.pageinfo,!0)));vBulletin.inlinemod&&"function"==typeof vBulletin.inlinemod.init&&0<a(".moderationmenu_container",b.context).length&&vBulletin.inlinemod.init(b.context);a(document).trigger("vb-filterposts",{parentOfInsertedHtml:z})}x&&=!1},error_phrase:"unable_to_contact_server_please_try_again",complete:function(){n.removeClass("h-disabled");l.removeClass("h-invisible");!x&&b.autoCheck&& 3070t&&(t=setTimeout(e.checkNewConversations,b.checkInterval))}});return e};this.updatePageNumber=function(c){c=Number(c);0<c&&a('form.toolbar-filter-overlay input[name="pagenum"]',b.context).val(c);return e};this.checkNewConversations=function(){a("body").hasClass("edit-mode")||(console.log("Checking for new activity since "+r),e.applyFilters(!0));return e};this.toggleNewConversations=function(c){c?(b.autoCheck=!0,t=setTimeout(e.checkNewConversations,b.checkInterval)):(b.autoCheck=!1,clearTimeout(t)); 3071return e};this.hideFilterOverlay=function(){a(".conversation-toolbar-wrapper .toolbar-filter-overlay",b.context).filter(":visible").each(function(){a(this).prev(".conversation-toolbar").find(".toolbar-filter").triggerHandler("click.conversation_filter",[0])});return e};this.getOption=function(c){return b[c]};this.setOption=function(c,d){b[c]=d;return e};b.autoCheck&&(r=pageData.current_server_datetime,t=setTimeout(e.checkNewConversations,b.checkInterval))};vBulletin.conversation.displaySelectedFilterText= 3072function(q,v,e){var r=a(q);if(1!=r.data("bypass-filter-display")){e=e||r.closest(".conversation-toolbar-wrapper");var t=a(".filtered-by",e).removeClass("h-hide").find(".filter-text-wrapper").show(),x=a(".filter-text[data-filter-name={0}]".format(q.name),t);if("radio"==q.type){v=r.next("span").html();var u=a('<div class="filter-text" data-filter-name="{0}" data-filter-value="{1}"><span title="{2}">{3}</span><span class="js-remove-filter b-icon b-icon__x-circle"></span></div>'.format(q.name,vBulletin.htmlEntities(q.value), 3073r.closest(".filter-options").prev(".filter-header").html()+" - "+v,("filter_new_topics"==q.name||"filter_depth"==q.name||-1!=q.value.indexOf("_all")&&"time_all"!=q.value?(r.closest("li").find(".filter-header").html()||"")+" - ":"")+v))}else"text"==q.type&&(v="""+JShtmlEncode(v)+""",u=a('<div class="filter-text" data-filter-name="{0}" data-filter-value="{1}"><span title="{2}">{3}</span><span class="js-remove-filter b-icon b-icon__x-circle"></span></div>'.format(q.name,vBulletin.htmlEntities(q.value), 3074r.data("filter-name")+": "+v,v)).data("filter-type","text"),(r=r.attr("class").match(/js-.*/))&&u.data("filter-js-selector","."+r[0]));if(0<x.length)x.replaceWith(u);else{var b=[],p=!1;a(".toolbar-filter-overlay > ul > li",e).each(function(){b.push(a("input:first",this).attr("name"))});a(".filter-text",t).each(function(){var y=a(this);if(a.inArray(q.name,b)<a.inArray(y.attr("data-filter-name"),b))return y.before(u),p=!0,!1});p||t.append(u);1<a(".filter-text",t).length&&t.next(".clear-all").removeClass("h-hide")}}}})(jQuery); 3075; 3076 3077// ***************************
3078// js.compressed/conversationcommon.js 3079// *************************** 3080vBulletin.precache("answer_must_be_approved_published compare_versions edit_conversation error_loading_post error_saving_vote flag_a_post no_one_voted onbeforeunload_message_while_editing_post people_who_liked please_enter_your_reason_why_you_want_to_flag_this_post send_report the_report_has_been_sent topic_answered you_have_a_pending_edit_unsaved".split(" "),[]);vBulletin.ensureObj("conversation"); 3081$.extend(vBulletin.conversation,function(a,p){function E(b){var c=a(this),e,d=c.closest(".conversation-list");0<c.closest(".js-comments").length&&(e="comment");var f=a(".edit-conversation-container form",d);if(0<f.length)vBulletin.warning("edit_conversation","you_have_a_pending_edit_unsaved",function(){vBulletin.animateScrollTop(f.closest(".js-post").offset().top,{duration:"slow"})});else{vBulletin.loadingIndicator.show();b.preventDefault();var h=c.parent().attr("data-node-id"),g="comment"==e?c.closest(".js-comment"): 3082c.closest(".js-post__content-wrapper");var q=d.hasClass("thread-view")?"thread":d.hasClass("full-activity-view")?"full-activity-stream":d.hasClass("activity-view")?"activity-stream":"stream";e=e||g.attr("data-node-type")||"";b=a(".js-show-post-link",g).text()||"1";var B="comment"!=e||"thread"!=q&&1!=d.closest(".blog-conversation-content-widget").length?Number(b.replace("#",""))-1:Number(b.replace("#",""));var z=function(m,t,v,w){var r=a(".edit-conversation-container form",g).data("content-type"); 3083!1===vBulletin.triggerHandler.apply(w.get(0),["afterSave",a(document),m])?(a("body").trigger(r+"_editform_onunload",[g]),window.vBulletin.loadingIndicator.hide()):(t=pageData,t["posts-perpage"]=vBulletin.conversation.POSTS_PER_PAGE,"thread"==q&&(t["comments-perpage"]=vBulletin.conversation.COMMENTS_PER_PAGE),m&&vBulletin.ajaxtools.hasError(m.warnings,"warning_spam_post")?vBulletin.ajaxtools.showApiError(m.warnings,m,{title_phrase:"warning",after_error:function(){m.warningReturnUrl?location.href=m.warningReturnUrl: 3084window.location.reload(!0)}}):a.post(vBulletin.getAjaxBaseurl()+"/create-content/loadnode",{nodeid:h,view:q,index:B,page:t,type:e,isAjaxTemplateRender:!0,isAjaxTemplateRenderWithData:!0},function(l){if(l.error)openAlertDialog({title:vBulletin.phrase.get("conversation"),message:vBulletin.phrase.get(l.error),iconType:"error"});else{var n=w.closest(".js-content-entry").data("current-channelid"),u=w.find('input[name="parentid"]:checked').val();if(0<n&&0<u&&n!=u)location.reload(!0);else{a("body").trigger(r+ 3085"_editform_onunload",[g]);n=a(l.template);u=c.closest(".js-post");var y=u.parent();u.replaceWith(n);n=y.find(".js-post").filter((O,F)=>a(F).data("node-id")==h);l.hasOwnProperty("template_article_title_info")&&(u=a(".js-update-article-title-info"),y=a(l.template_article_title_info),0<u.length&&u.empty().append(y));a("body").trigger(r+"_newcontent_onload",[n]);a(document).trigger("vb-loadnode",{insertedHtml:n,context:"conversationcommon"});n.hasClass("js-conversation-starter")&&(u=a(".js-post-title", 3086n).first().text(),y=u+" - "+vBulletin.options.get("bbtitle"),"topic_url"in l&&(l=pageData.baseurl+l.topic_url,l!=location.href&&window.history.replaceState({},y,l)),document.title=y,a(".page-title-widget .js-main-title").text(u));a(".js-select-box",n).selectBox();vBulletin.animateScrollTop(n.offset().top,{duration:"slow"})}}},"json").error(function(){openAlertDialog({title:vBulletin.phrase.get("conversation"),message:vBulletin.phrase.get("error_loading_post"),iconType:"error"})}).complete(function(){window.vBulletin.loadingIndicator.hide()}))}; 3087a.post(vBulletin.getAjaxBaseurl()+"/create-content/loadeditor",{nodeid:h,type:e,view:q,isAjaxTemplateRender:!0},function(m,t){if(t)vBulletin.error("edit_conversation",t[0]);else{var v=function(){if("undefined"==typeof vBulletin.upload||"undefined"==typeof vBulletin.tagEditor||"undefined"==typeof vBulletin.contentEntryBox.init)vBulletin.ckeditor.loadScripts("",{},v);else{g.addClass("b-post--edit");g.find(".js-post__content").first().addClass("b-post__content--edit");g.find(".b-post__footer").first().addClass("b-post__footer--edit"); 3088$container=g.find(".edit-conversation-container").first();
3088g.closest(".js-album-detail").find(".conversation-body, .profile-media-uploadphotos, .js-photo-preview").addClass("h-hide-imp");vBulletin.contentEntryBox.init();vBulletin.hv.init($container.find(".js-human-verification"));vBulletin.contentEntryBox.setDefaultTab($container.find(".js-content-entry").first());$container.show();vBulletin.loadingIndicator.hide();var r=$container.find(".js-attach-list");vBulletin.upload.initializePhotoUpload(g); 3089var l=".js-post[data-node-id={0}] .tag-editor-container .tag-input".format(h);$tagEditorBox=a(l);0<$tagEditorBox.length&&"undefined"!=typeof vBulletin.tagEditor&&new vBulletin.tagEditor.instance(l);0<r.data("attach-count")&&(r=$container.find(".b-toolbar__item").filter(function(){return"b-content-entry-panel__content--attachment"==a(this).data("panel")}),r.hasClass("b-toolbar__item--active")||r.trigger("click"));vBulletin.contentEntryBox.afterPanelChange(g);vBulletin.flatpickr&&vBulletin.flatpickr.initPickers()}}; 3090console.log("Edit mode: Adding Content Entry UI to DOM (contains parsed post text in the .js-editor-parsed-text element)");a(".edit-conversation-container",g).first().hide().html(m);var w=a(".edit-conversation-container form",g).data("content-type");a(window).off("beforeunload.editPost").on("beforeunload.editPost",function(){return vBulletin.phrase.get("onbeforeunload_message_while_editing_post")});a("body").trigger(w+"_editform_onload",[g,v]);vBulletin.ajaxForm.apply(a("form.js-contententry-form", 3091g),[{dataType:"json",success:z,beforeSerialize:function(r){console.log("ajaxForm beforeSerialize (vBulletin.conversation.editPost)");r.trigger("beforeSave");return!1===a("body").triggerHandler(w+"_editform_onbeforeserialize",[r])?!1:!0},beforeSubmit:function(r,l,n){if(!1===vBulletin.contentEntryBox.validateForm.apply(l,[n]))return!1;a(window).off("beforeunload.editPost");window.vBulletin.loadingIndicator.show();return!0},complete:function(){window.vBulletin.loadingIndicator.hide();console.log("ajaxForm complete (vBulletin.conversation.editPost)")}}])}}, 3092"json").error(function(m,t,v){openAlertDialog({title:vBulletin.phrase.get("edit_conversation"),message:"HTTP {0} - {1}".format(m.status,v),iconType:"error"})}).complete(function(m,t,v){window.vBulletin.loadingIndicator.hide()})}}function C(b,c=3){var e=0,d=a("ul.poll li",b),f=parseInt(d.css("line-height"),10);d.each(function(h){a(this).removeClass("h-hide");h=a(this).height();e+=h/f;e>c?a(this).addClass("h-hide"):a(this).css("display","")});d=e>c;a(".view-more-ctrl",b).toggleClass("h-hide",!d).next(".js-button-group").toggleClass("h-hide", 3093d).next(".view-less-ctrl").addClass("h-hide")}function A(b){return b.closest(".js-post").data("node-id")}function G(){var b=a(this),c=b.data("post-ip");b.data("post-host");k.register(["ip_info","ip_address_is","host_name_is","no_ip_found"]);c?(openAlertDialog({title:k.get("ip_info"),message:k.get("ip_address_is")+": "+c+"<br />"+k.get("host_name_is")+': <span class="ip-host-name loading">...</span>',iconType:"none"}),p.AJAX({call:"/ajax/api/node/getHostName",data:{ip:c},success:function(e){a(".ip-host-name").removeClass("loading").html(e)}})): 3094p.alert("ip_info","no_ip_found");return!1}function H(){var b=a(this).closest(".js-post"),c=b.data("node-id");a("body").css("cursor","wait");if(a(this).hasClass("voted")){var e="unvote";var d="vote_cap";var f=!1}else e="vote",d="unvote_cap",f=!0;p.AJAX({call:"/ajax/api/reputation/"+e,data:{nodeid:c},success:function(h){b.find(".votecount").html(h.votes);b.find(".js-post-control__vote").toggleClass("voted",f).find(".b-post-control__label").text(k.get(d))},complete:function(){a("body").css("cursor", 3095"default")},title_phrase:"error_saving_vote"})}function I(){var b=a(this),c=A(b);J.apply(b,"qtip-whovoted",{content:{title:{text:k.get("people_who_liked"),button:!0},text:function(e,d){p.AJAX({call:"/ajax/api/reputation/fetchWhovoted",data:{nodeid:c},success:function(f){if(1>f.length)var h=k.get("no_one_voted");else{h="<ul>";for(x in f){var g=pageData.baseurl+f[x].profileurl,q=pageData.baseurl_core+"/"+(f[x].avatarurl?f[x].avatarurl:"image.php?u="+f[x].userid+"&type=profile"),B=a("<img>").attr("src", 3096q).attr("alt",f[x].username),z=a("<a>").attr("href",g).addClass("avatar"),m=a("<a>").attr("href",g).addClass("username").html(f[x].musername);q=a("<li>").addClass("whovoteditem");var t=a("<div>").addClass("usertitle").html(f[x].usertitle);z.append(B);q.append(z);q.append(m);f[x].doshowdisplayname&&(g=a("<div>").addClass("usertitle").append(a("<a>").attr("href",g).html(f[x].username)),q.append(g));q.append(t);h+=a("<div>").append(q).html()}h+="</ul>"}console.log(h);d.set("content.text",h)}});return k.get("working_ellipsis")}}, 3097show:{event:"click",ready:!0},hide:{event:"unfocus",fixed:!0}})}function K(){var b=A(a(this)),c=D({title:k.get("flag_a_post"),message:k.get("please_enter_your_reason_why_you_want_to_flag_this_post"),buttonLabel:{okLabel:k.get("send_report"),cancelLabel:k.get("cancel")},multiline:!0,validation:{callback:D.validationString,showError:!0},onClickOK:function(e){a("body").css("cursor","wait");p.AJAX({call:"/report/report",data:{reason:e,reportnodeid:b},success:function(d){c.dialog("close");p.alert("flag_a_post", 3098"the_report_has_been_sent")}
3098,complete:function(){a("body").css("cursor","default")},error_phrase:"unable_to_contact_server_please_try_again",title_phrase:"flag_a_post"});return!1}});return!1}function L(){var b=a(this).closest(".js-comment-entry__parent").find(".js-comment-entry");b.slideToggle("fast",function(){var c=a(this).find(".js-comment-entry__textbox");c.is(":visible")&&c.trigger("focus")});b.find(".js-comment-entry__cancel").offon("click.convocom",function(c){b.slideToggle();return!1});return!1} 3099function M(){function b(d,f,h){h.isAjaxTemplateRenderWithData=!0;p.AJAX({call:"/ajax/render/"+f,data:h,success:function(g){d.removeClass("loading").find(".dialog-content .message").html(g.template).end().dialog("option","position",{of:window})},after_error:function(){d.dialog("close")}})}var c=A(a(this)),e=openConfirmDialog({title:k.get("post_history"),message:k.get("loading")+"...",width:800,dialogClass:"post-history-dialog dialog-container dialog-box loading",buttonLabel:{yesLabel:k.get("compare_versions"), 3100noLabel:k.get("cancel")},onAfterClose:function(){if("btnConfirmDialogYes"==this.id){var d=e.find(".post-history-form");a("#btnConfirmDialogYes").hide();var f=openConfirmDialog({title:k.get("post_history"),message:k.get("loading")+"...",width:800,dialogClass:"post-history-comparison-dialog dialog-container dialog-box loading",buttonLabel:{yesLabel:k.get("compare_versions"),noLabel:k.get("close")},onAfterClose:function(){a("#btnConfirmDialogYes").show()}});d={oldpost:d.find("input:radio[name=old]:checked").val()|| 31011,newpost:d.find("input:radio[name=new]:checked").val()||1,nodeid:c};b(f,"post_history_form",d)}}});b(e,"post_history_form",{nodeid:c})}function N(){var b=a(this),c=A(b);b=!b.closest(".js-post").hasClass("isanswer");var e=vBulletin.getSelectedFilters(a(".toolbar-filter-overlay"));a("body").css("cursor","wait");p.AJAX({call:"/create-content/setExclusiveAnswer",data:{nodeid:c,set:b?1:0,searchFilters:e,isAjaxTemplateRender:!0,isAjaxTemplateRenderWithData:!0},success:function(d){a(".js-post.isanswer").toggleClass("isanswer", 3102!1);d.answers&&0<d.answers.length&&d.answers.forEach(g=>{a(".js-post[data-node-id="+parseInt(g,10)+"]").toggleClass("isanswer",!0)});let f=a(".js-post.pinned-answer");f.length&&f.hide("slow",()=>{f.remove()});if(d.template){var h=a(".js-conversation-starter");d=a(d.template);d.hide();d.insertAfter(h).show("slow")}},complete:function(){a("body").css("cursor","default")},error_phrase:"unable_to_contact_server_please_try_again",title_phrase:"setasanswer"});return!1}var k=p.phrase,J=p.qtip,D=p.openPromptDialog; 3103return{initContentEvents:function(b){b.offon("click.convocom",".js-post-control__ip-address",G);b.offon("click.convocom",".js-post-control__vote",function(c){H.apply(this,[c]);return!1});b.offon("click.convocom",".js-bubble-flyout",function(c){I.apply(c.target,[c]);c.stopPropagation();return!1});b.offon("click.convocom",".js-post-control__edit",E);b.offon("click.convocom",".js-post-control__flag",K);b.offon("click.convocom",".js-post-control__comment",L);b.offon("click.convocom",".js-post__history", 3104M);b.offon("click.convocom",".js-post-control__answer",N)},initPollEvents:function(b){b.offon("click.convocom",".list-item-poll .view-more-ctrl",function(c){var e=a(this).closest("form.poll");c=e.find("ul.poll");a(this).addClass("h-hide");c.css("max-height","none").find("li.h-hide").slideDown(100,function(){e.find(".js-button-group").removeClass("h-hide").next(".view-less-ctrl").removeClass("h-hide");p.animateScrollTop(e.offset().top,{duration:"fast"})});return!1});b.offon("click.convocom",".list-item-poll .view-less-ctrl", 3105function(c){c=a(this).closest("form.poll");C(c,3);c.find("ul.poll").css("max-height","").find("li.h-hide").slideUp(100);return!1})},limitVisiblePollOptionsInAPost:C}}(jQuery,vBulletin)); 3106; 3107 3108// ***************************
3109// js.compressed/channel_conversation.js 3110// *************************** 3111vBulletin.precache(["closed","this_topic_is_closed"],[]); 3112(function(b){if(!vBulletin.pageHasSelectors([".forum-channel-content-widget",".blog-channel-content-widget",".sg-channel-content-widget",".search-results-widget .topic-list-container"]))return!1;var x={};vBulletin.conversation.editTopicTitle=function(h){h=b(h.target).closest(".js-topic-item");var a=h.find(".js-topic-wrapper"),k=h.data("node-id");h.data("can-edit-title")&&!x[k]&&(x[k]="edit",0==a.find(".js-loading-icon").length&&b('<img class="loading-icon js-loading-icon" src="'+pageData.baseurl+ 3113'/images/misc/progress.gif" />').appendTo(a),a.find(".js-loading-icon").show(),vBulletin.AJAX({call:"/create-content/loadtitleedit",data:{nodeid:k,isAjaxTemplateRender:!0},success:function(c){a.find(".js-topic-title").hide();a.find(".js-loading-icon").hide();a.find(".js-topic-title").after(c);c=a.find(".js-topic-title-edit");c.data("original-title",c.val());var l=30;a.find(".js-prefix, .js-post-icon, .js-topic-prefix, .js-go-to-first-unread").each(function(){l+=b(this).outerWidth(!0)});c.outerWidth(c.outerWidth()- 3114l);a.find(".js-topic-title-edit-form").on("submit",vBulletin.conversation.saveTopicTitle);c.on("blur",vBulletin.conversation.saveTopicTitle);c.trigger("select").trigger("focus")}}))};vBulletin.conversation.saveTopicTitle=function(h){h.preventDefault();var a=b(h.target).closest(".js-topic-wrapper");h=a.find(".js-topic-title-edit-form");var k=h.find(".js-node-id").val(),c=h.find(".js-topic-title-edit").val();"save"!=x[k]&&(x[k]="save",a.find(".js-topic-title-edit").data("original-title")==c?(a.find(".js-loading-icon").remove(), 3115a.find(".js-topic-title-edit-form").remove(),a.find(".js-topic-title").show(),x[k]=!1):(a.find(".js-loading-icon").appendTo(h).show(),vBulletin.AJAX({call:"/create-content/savetitleedit",data:{nodeid:k,title:c},success:function(l){a.find(".js-topic-title-edit-form").remove();a.find(".js-topic-title").html(l.title).show()},complete:function(){a.find(".js-loading-icon").remove();x[k]=!1}})))};vBulletin.conversation.openOrCloseTopic=function(h){h.stopPropagation();var a=b(this),k=a.closest(".js-topic-item"), 3116c=k.find(".js-topic-wrapper");h=k.data("node-id");var l=k.hasClass("closed");0==c.find(".js-loading-icon").length&&b('<img class="loading-icon js-loading-icon" src="'+pageData.baseurl+'/images/misc/progress.gif" />').appendTo(c);var r=c.find(".js-loading-icon");r.show();vBulletin.AJAX({call:"/ajax/api/node/"+(l?"openNode":"closeNode"),data:{nodeid:h},error_phrase:"error_open_close_topic",api_error:function(d){var f=vBulletin.ajaxtools;if(f.hasError(d,"inlinemodauth_required"))return!0;f.logApiError(d)}, 3117complete:function(){r.hide()},success:function(d){k.toggleClass("closed",!l);d=a.attr("title")||"";var f=vBulletin.phrase.get("this_topic_is_closed");subStrIndex=d.indexOf(f);l&&0<=subStrIndex?(d=(d.slice(0,subStrIndex)+d.slice(subStrIndex+f.length)).trim(),a.attr("title",d)):!l&&0>subStrIndex&&a.attr("title",f+" "+d);d=c.find(".js-prefix");f=[];var v=vBulletin.phrase.get("closed");if(d.length){var g=d.text().trim();":"==g.charAt(g.length-1)&&(g=g.substring(0,g.length-1));0<g.length&&(f=g.split(", ")); 3118if(!l)f.push(v);else if(0<f.length)for(g=f.length-1;0<=g;g--)f[g]==v&&f.splice(g,1)}else d=b('<span class="prefix js-prefix"></span>'),g=c.find(".js-go-to-first-unread"),g.length?d.insertAfter(g):d.prependTo(c),l||f.push(v);d.text(f.join(", ")+": ");d.toggle(0!=f.length)}})};b(function(){vBulletin.conversation=vBulletin.conversation||{};var h=vBulletin.tabtools,a=b(".channel-content-widget .channel-conversation-list-wrapper"),k=b("#media-tab",a),c,l,r,d,f,v,g,F,z=!0,G,t=a.find(".widget-tabs-nav .ui-tabs-nav > li"), 3119A=t.filter(".ui-tabs-active"),B=A.index(),y="1"==t.parent().data("allow-history"),I=new vBulletin.history.instance(y);-1==B&&(B=0,A=t.first());var C=A.find("> a").attr("href");var H=function(e){return a.offset().top+(a.outerHeight()-parseFloat(a.css("border-bottom-width")))-e.height()},D=function(e,u){var w=u.filter;u.pagination&&u.pagination.setOption("context",e);
3119w.setOption("context",e);"undefined"!=typeof w.lastFilters&&0<b(".conversation-empty:not(.h-hide)",e).length&&delete w.lastFilters},E= 3120function(e,u,w,m,n,q,p){q=b(".conversation-list",e);return h.newTab(e,u,w,m,n,q,p,b.noop,y)};h.initTabs(a,I,t,y,B,C,[d,l,v],!0,function(e,u,w){var m=b(w),n="#"+m.prop("id");e=C==n;"#activity-stream-tab"!=n&&"#article-tab"!=n&&r&&d.toggleNewConversations(!1);"#topic-tab"!=n&&c&&l.toggleNewConversations(!1);if("#activity-stream-tab"==n||"#article-tab"==n)r?D(m,r):(r=E(m,a,!0,!0,e,null),d=r.filter),d.applyFilters(!1,!0);else if("#subscribed-tab"==n)f?D(m,f):(f=E(m,a,!0,!0,e,null),v=f.filter),v.applyFilters(!1, 3121!1);else if("#topic-tab"==n)c?D(m,c):(c=E(m,a,!0,!0,e,function(){vBulletin.markreadcheck()}),l=c.filter),l.applyFilters(!1,!0);else if("#media-tab"==n){if(g)z=!0;else{g=b(".conversation-toolbar-wrapper.scrolltofixed-floating",k);F=new vBulletin.scrollToFixed({element:g,limit:H(g)});var q=new vBulletin.history.instance(y);if(q.isEnabled()){e=q.getState();if(!e||b.isEmptyObject(e.data))e={from:"filter",page:1,tab:n,filters:vBulletin.getSelectedFilters(b("form.toolbar-filter-overlay",m))},q.setDefaultState(e, 3122document.title,location.href);q.setStateChange(function(p,J,K){p=q.getState();"filter"==p.data.from&&(q.log(p.data,p.title,p.url),n!=p.data.tab?vBulletin.selectTabByIndex.call(b(u).closest(".ui-tabs-nav"),u.
3122index()):(p=b('.media-filter-overlay input[name="filter_time"][value="{0}"]'.format(p.data.filters.filter_time),m).prop("checked",!0),p.hasClass("js-default-checked")&&p.prop("defaultChecked")?b(".filtered-by .x",m).trigger("click"):p.trigger("change",[!0])))},"filter")}C==n&&(z=!1)}z&&0==b("#profileMediaDetailContainer .js-album-detail", 3123m).length&&(G||=vBulletin.media.calculatePhotosPerPage(vBulletin.media.TARGET_PHOTOS_PERPAGE),vBulletin.media.loadGalleryById({nodeid:-2,channelid:pageData.channelid,pageno:1,dateFilter:b(".filter-options input[name=filter_time]:checked",m).val()||"time_lastweek",perpage:G},!0,{complete:function(){b(".profile-toolbar .media-toolbar-filter",k).removeClass("h-hide");F.updateLimit(H(g))}}))}});t=b(".conversation-list",a);vBulletin.conversation.initPollEvents(t);vBulletin.conversation.initContentEvents(t); 3124t.off("click",".js-comment-entry__post").on("click",".js-comment-entry__post",function(e){vBulletin.conversation.postComment.apply(this,[e,function(){d.updatePageNumber(1).applyFilters(!1,!0)}])});vBulletin.conversation.bindEditFormEventHandlers("all");b(document).offon("dblclick",".js-cell-topic a",e=>e.stopPropagation());b(document).offon("dblclick",".js-cell-topic",vBulletin.conversation.editTopicTitle);b(document).offon("dblclick",".js-open-close-topic",vBulletin.conversation.openOrCloseTopic)})})(jQuery); 3125; 3126 3127// ***************************
3128// js.compressed/tabs.js 3129// *************************** 3130/*/ 3131 3132/* 3133 This is intended to be self contained and should not refer to the 3134 vBulletin object, pageData or other framework. 3135 3136 The filters for the toolbars are intimately connected to the tabs and are so included here. 3137 Not calling it tabfiltertools for brevity. 3138 3139 This depends on the jquery ui tabs widget 3140*/ 3141vBulletin.tabtools=function(t,y,F,G,H){function z(a){var b=$(".conversation-toolbar-wrapper",a);return"1"==(b.length?b:a).data("allow-history")}function A(a,b,l,f,n){var d=location.pathname.replace(/\/$/,"").replace(/\/page[0-9]+/,""),c=$(".toolbar-filter-overlay",a),k=I(c,!0);c=$(".pagenav-form .js-pagenum",a).val()||1;var p=$(".toolbar-search-form .js-filter-search",a).val()||"",e=$(a).closest(".canvas-widget"),g=z(a);g=new y.instance(g);e=e.data("widget-default-tab")||e.find(".ui-tabs-nav > li:first-child a").attr("href"); 3142$.isEmptyObject(k)&&$(".conversation-toolbar .js-button-filters",a).each(function(){var h=$(".js-button-filter.js-checked:not(.js-default-checked)",this);h.length&&(k[h.data("filter-name")]=h.data("filter-name"))});l||(a=new RegExp("\\/("+f.join("|")+")/?$"),d=(a=d.match(a))?d.replace(new RegExp(a[0]),"/"+b):d+("/"+b));1<c&&g.isEnabled()&&(d+="/page"+c);l&&b&&e!="#"+b&&(k.tab=b,g.isEnabled()||(d+="?tab="+b));if(!g.isEnabled())return d+(n?"#"+n:"");p&&(k.q=p);b=$.param(k);return d+(b?"?"+b:"")+(n? 3143"#"+n:"")}function J(a,b,l,f,n,d){var c=$(this);if(c.length){var k=a instanceof y.instance;if(k&&a.isEnabled()){var p=d.create;d.create=function(g,h){var q=B(location.search,["_"]),w=Object.keys(q).length,u=K(c,f),v=a.getState();!(f&&1<w&&"undefined"!=typeof q.tab||!f&&0<w)||v&&!$.isEmptyObject(v.data)||a.setDefaultState({from:"tabs",tab:u},document.title,location.href);a.setStateChange(function(m){m=a.getState();if("tabs"==m.data.from){a.log(m.data,m.title,m.url);var C=l(m.data.tab),x=B(m.url,["tab", 3144"_"]);if(c.tabs("option","selected")!=C)L.call(c,C),$.isEmptyObject(x)||$(window).trigger("statechange.filter",["tabs",x]);else if($.isEmptyObject(x)){var r;m.data.tab&&(r=f?$(m.data.tab):$('.ui-tabs .ui-tabs-panel[data-url-path="'+m.data.tab+'"]'));r=r&&r.length&&r||$(c.closest(".canvas-widget").data("widget-default-tab"));m=$(".toolbar-filter-overlay .filter-options .js-default-checked",r);m.length?(m.prop("checked",!0).first().data("bypass-filter-display",!0).trigger("change",[!0]).data("bypass-filter-display", 3145null),$(".filtered-by",r).addClass("h-hide").find(".filter-text-wrapper").empty()):$(".conversation-toolbar .js-default-checked",r).first().trigger("click",[!0])}else $(window).trigger("statechange.filter",["tabs",x])}},"tabs");p.call(c[0],g,h)}}if(b&&k){var e=d.beforeActivate;d.beforeActivate=function(g,h){var q=h.newPanel,w=h.newTab;if(!1===e.call(this,g,h))return!1;h=f?q.attr("id"):w.find(".ui-tabs-anchor").data("url-path");var u=void 0;f||(u=[],c.find(".ui-tabs-nav > li > a, .widget-tabs-panel").each(function(v, 3146m){v=$(this).data("url-path");-1==$.inArray(v,u)&&u.push(v)}));if(!a.isEnabled())return q=A(q,h,f,u,n),location.href=q,!1;c.data("noPushState")?c.data("noPushState",null):(g={from:"tabs",tab:"#"+h},q=A(q,h,f,u),a.pushState(g,document.title,q))}}c.tabs(d)}return c}function D(a,b){return a.offset().top+(a.outerHeight()-parseFloat(a.css("border-bottom-width")))-b.height()}function M(a,b,l,f,n,d){f=$(".conversation-toolbar-wrapper.scrolltofixed-floating",a);var c=null,k=null,p=null;b&&0<f.length&&(c= 3147new H({element:f,limit:D(b,f)}));l&&(p=new G({context:a,allowHistory:n,onPageChanged:function(e,g){k.updatePageNumber(e);g||k.applyFilters(!1,!0,!1,!0)}}));k=new F({context:a,autoCheck:!1,scrollToTop:b,pagination:p,allowHistory:n,onContentLoad:d});return{$bar:f,$floating:c,pagination:p,filter:k}}function N(a){a.css("border-bottom","").filter(".stream-view.activity-view").find(".list-item-poll form.poll").each(function(b,l){$(this).is(":visible")&&$(".view-less-ctrl",this).hasClass("h-hide")&&O(this, 31483)})}function E(a){a&&(P(a),N(a))}var B=t.parseQueryString,P=t.truncatePostContent,O=t.conversation.limitVisiblePollOptionsInAPost,K=t.getSelectedTabHashOrPath,I=t.getSelectedFilters,L=t.selectTabByIndex;ensureFun=t.ensureFun;return{initTabs:function(a,b,l,f,n,d,c,k,p){l.removeClass("ui-state-disabled");J.call(a,b,f,function(e){e=e||d;return l.filter('li:has(a[href*="'+e+'"])').first().index()},k,a.find(".js-module-top-anchor").prop("id"),{active:n,beforeActivate:function(e,g){for(var h;h<c.length;h++)c[h]&& 3149c[h].hideFilterOverlay()},create:function(e,g){p($(this),g.tab,g.panel)},activate:function(e,g){p($(this),g.newTab,g.newPanel)}})},newTab:function(a,b,l,f,n,d,c,k,p){var e=M(a,b,l,f,p,function(){e.$floating&&e.$floating.updateLimit(D(b,e.$bar));E(d);ensureFun(c)()});n&&(l=e.filter,E(d),ensureFun(k)(),l.lastFilters={filters:l.getSelectedFilters($(".toolbar-filter-overlay",a))});return e},tabAllowHistory:z}}(vBulletin,vBulletin.history,vBulletin.conversation.filter,vBulletin.pagination,vBulletin.scrollToFixed); 3150; 3151 3152// ***************************
3153// js.compressed/link.js 3154// *************************** 3155vBulletin.precache(["attach_link","please_enter_link_url"],[]);(function(a){a(function(){vBulletin.conversation.bindEditFormEventHandlers("link");a(".b-content-entry .b-content-entry-panel__content--link").each(function(){a("body").trigger("link_editform_onload",[a(this)])})})})(jQuery); 3156; 3157 3158// ***************************
3159// js.compressed/media.js 3160// *************************** 3161vBulletin.precache(["saving"],["commentminchars"]);vBulletin.ensureObj("media"); 3162$.extend(vBulletin.media,function(c){function A(a){m&&m.length||(m=c("#mediaCurrentPage",a),p=c("#mediaPageCount",a),q=c("#mediaPreviousPage",a),v=c("#mediaNextPage",a))}function n(a){c("body").css("cursor","wait");var b=c(".js-profile-media-container",g);vBulletin.AJAX({call:"/ajax/render/profile_media_content",data:{userid:b.data("user-id"),pageno:a,perpage:b.data("perpage"),isAjaxTemplateRenderWithData:!0},success:function(d){c("#mediacontent").html(d.template);c("#profileMediaDetailContainer").empty(); 3163c("#mediacontent").removeClass("h-hide");x(!1);f.currentMediaPage=a;r(c("#mediaList"),f.currentMediaPage);vBulletin.isScrolledIntoView(c("#profileTabs .profile-tabs-nav"))||c("html,body").animate({scrollTop:c("#profileTabs .profile-tabs-nav").offset().top},"slow")},complete:function(){c("body").css("cursor","auto")},title_phrase:"profile_media"})}function B(a){var b=a.currentTarget.id;if(c("#profileMediaDetailContainer").is(":visible"))return E(a),!1;"mediaCurrentPage"==b?(a=parseInt(m.val(),10), 31640<a&&a<=parseInt(p.html(),10)?(n(a),y(a)):m.val(f.currentMediaPage)):"mediaPreviousPage"==b?1<f.currentMediaPage?(a=f.currentMediaPage-1,n(a),y(a)):q.addClass("h-disabled"):"mediaNextPage"==b&&(f.currentMediaPage<parseInt(p.html(),10)?(a=f.currentMediaPage+1,n(a),y(a)):v.addClass("h-disabled"));return!1}function y(a){var b=vBulletin.makePaginatedUrl(location.href,a);k.isEnabled()?(a={from:"media_filter",page:a||1,tab:g.data("url-path")?g.data("url-path"):"#"+g.attr("id")},k.pushState(a,document.title, 3165b)):t&&(location.href=b)}function E(a){if(!f.currentNodeId&&!f.currentUserId)return!1;a=a.currentTarget.id;var b=f.currentGalleryPage,d={pageno:null,perpage:vBulletin.media.calculatePhotosPerPage(vBulletin.media.TARGET_PHOTOS_PERPAGE)};if("mediaCurrentPage"==a){var e=parseInt(m.val(),10);if(0>=e||e>parseInt(p.html(),10))return m.val(b),!1}else if("mediaPreviousPage"==a)if(1<b)e=b-1;else return q.addClass("h-disabled"),!1;else if("mediaNextPage"==a)if(b<parseInt(p.html(),10))e=b+1;else return v.addClass("h-disabled"), 3166!1;d.pageno=e;u(d);return!1}function x(a){c("#profileMediaDetailContainer").toggleClass("h-hide",!a);c("#profileMediaContainer").toggleClass("h-hide",a);c(".media-tab .profile-toolbar .toolset-left > li").toggleClass("h-hide-imp",!a).has(".profile-media-upload, .profile-media-createvideo").toggleClass("h-hide-imp",a);q.closest("pagenav-controls").toggleClass("h-hide",a)}function r(a,b){a=Number(a.data("totalpages"))||Math.max(b,1);c(".media-tab .pagenav-controls-container");q.toggleClass("h-disabled", 31671>=b);v.toggleClass("h-disabled",b>=a);m.val(b);p.text(a)}function u(a,b,d){var e=c("#profileMediaDetailContainer");b={nodeid:f.currentNodeId,userid:f.currentUserId,channelid:f.currentChannelid,pageno:1,dateFilter:g.find(".media-filter-overlay input[name=filter_time]:checked").val(),albumid:0};var h=c(".media-tab");a=c.extend({},b,a);if(!isNaN(a.nodeid)){let w;if(0!=a.nodeid){w=-1==a.nodeid?"profile_media_videolist":"profile_textphotodetail";c("body").css("cursor","wait");0==e.closest(".media-tab").length&& 3168h.append(f.profileMediaDetailContainer);c("#profileMediaContainer").closest(".tab").find("li.list-item-gallery").remove();var l=a.pageno;b={nodeid:a.nodeid,userid:a.userid,channelid:a.channelid,pageno:l,albumid:a.albumid,isAjaxTemplateRenderWithData:!0};a.dateFilter&&(b.dateFilter=a.dateFilter);a.perpage&&(b.perpage=a.perpage);vBulletin.AJAX({call:"/ajax/render/"+w,data:b,success:function(F){f.currentNodeId=a.nodeid;f.currentUserId=a.userid;f.currentGalleryPage=l;e.html(F.template);e.addClass("list-item").attr("data-nodeid", 3169a.nodeid);c(".profile-media-uploadphotos",e).on("click",G);x(!0);a.perpage&&(h.data("perpage",a.perpage),h.data("callbacks",d));vBulletin.initFlexGridFixLastRowAll();-1==a.nodeid?r(c(".media-video-list",e),l):r(c(".js-album-detail",e),l);c(".profile-toolbar .media-toolbar-filter").removeClass("h-hide");d&&"function"==typeof d.success&&d.success()},after_error:function(){d&&"function"==typeof d.error&&d.error()},complete:function(){c("body").css("cursor","auto");d&&"function"==typeof d.complete&&d.complete()}, 3170title_phrase:"profile_media"})}}}function G(a){c(document).data("gallery-container",c(this).closest(".
3170js-album-detail"));var b=vBulletin.upload.getUploadedPhotosDlg(!1);(a=b.data("nodeid"))&&!isNaN(parseInt(a))&&vBulletin.AJAX({call:"/ajax/render/media_addphotos",data:{nodeid:a,isAjaxTemplateRenderWithData:!0},success:function(d){b.html(d.template);vBulletin.upload.initializePhotoUpload(b.parent());d=b.find(".js-save-button");d.off("click").on("click",H);b.find(".js-cancel-button").off("click").on("click", 3171function(e){b.dialog("close")});vBulletin.upload.relocateLastInRowClass(b.find(".photo-item-wrapper"));0<c(".photo-display .photo-item-wrapper:not(.h-hide)",b).length?(vBulletin.upload.setUploadButtonText(b,"upload_more"),d.show()):d.hide();b.dialog("open");vBulletin.upload.adjustPhotoDialogForScrollbar(b)},after_error:function(){b.dialog("close")},title_phrase:"profile_media"})}function I(a){a=C(c(this));a.pageno=1;a.perpage=vBulletin.media.calculatePhotosPerPage(vBulletin.media.TARGET_PHOTOS_PERPAGE); 3172f.currentFilter=a;u(a)}function H(a){var b=c(a.target).closest(".profile-media-photoupload-dialog"),d=c(a.target).closest("form");if(0<d.length){c(a.target).closest(".photo-display-container").find(".photo-item-wrapper:not(.h-hide)").each(function(h,l){h=parseInt(c(l).find(".filedataid").val(),10);isNaN(h)||(d.append('<input type="hidden" name="filedataid[]" value="'+h+'"/>'),c('<input type="hidden" name="title_'+h+'" />').val(c(l).find("textarea").val()).appendTo(d))});var e=c("button",d).prop("disabled", 3173!0);vBulletin.AJAX({url:d.attr("action"),data:d.serializeArray(),success:function(){b.dialog("close");n(f.currentMediaPage)},complete:function(){e.prop("disabled",!1)},title_phrase:"profile_media"})}else b.dialog("close")}function C(a){var b;c("#profileMediaContainer").is(":visible")?b=c("#profileMediaContainer"):c("#profileMediaDetailContainer").is(":visible")&&(b=c("#profileMediaDetailContainer"));a={nodeid:parseInt(a.data("nodeid"),10)||parseInt(b.attr("data-nodeid"),10),userid:parseInt(b.data("userid"), 317410),channelid:parseInt(b.data("channelid"),10),albumid:parseInt(a.data("albumid"),10)};isNaN(a.channelid)&&(a.channelid=0);isNaN(a.nodeid)&&(a.nodeid=0);0<a.nodeid?a.userid=0:isNaN(a.userid)&&(a.userid=0);isNaN(a.albumid)&&(a.albumid=0);return a}function J(){var a=c("#profileMediaDetailContainer");let b=parseInt(a.data("channelid"),10),d=parseInt(a.data("nodeid"),10),e=a.find(".js-album-detail");a=parseInt(a.find(".albumSlideShowPageNo").val()||1,10);b&&d&&(f.currentNodeId=d,f.currentChannelid=b, 3175r(e,a),D=!0)}if(!vBulletin.pageHasSelectors(["#media-tab",".album-widget"]))return!1;var g=c("#media-tab"),m,p,q,v,t,k,z,f={mediaTypeFilter:!1,currentMediaPage:1,currentGalleryPage:1,currentNodeId:0,currentUserId:0,currentChannelid:0,profileMediaDetailContainer:!1},D=!1;c(document).on("vb-instrument",a=>{A(c(a.target))});A(g);f.currentMediaPage=Number(m.val())||1;vBulletin.media.calculatePhotosPerPage=function(a){a=a||50;if(D)return a;var b=c("#profileMediaDetailContainer").is(":visible");b||c("#profileMediaDetailContainer").removeClass("h-hide"); 3176var d=Math.floor(c("#profileMediaDetailContainer").width()/128);b||c("#profileMediaDetailContainer").addClass("h-hide");return 0==a%d||a<=d?a:a-a%d};vBulletin.media.setHistoryStateChange=function(){t="1"==g.find(".conversation-toolbar-wrapper").data("allow-history");k=new vBulletin.history.instance(t);k.isEnabled()&&k.setStateChange(function(a){var b=k.getState();if("media_filter"==b.data.from){k.log(b.data,b.title,b.url);a=g.closest(".ui-tabs");var d=a.find(".ui-tabs-nav > li").filter('li:has(a[href*="#{0}"])'.format(g.attr("id"))); 3177d.hasClass("ui-tabs-active")?n(b.data.page):(b=d.index(),vBulletin.selectTabByIndex.call(a,b))}},"media_filter")};c(function(){c(document).off("click","#mediaList .albumLink").on("click","#mediaList .albumLink",I);var a=!1;g.off("click",".profile-media-createvideo, .profile-media-upload").on("click",".profile-media-createvideo, .profile-media-upload",function(b){var d=c(this).hasClass("profile-media-upload")?"gallery":"video";a||(a=c(b.target).closest(".ui-widget-content").find(".profileMediaEditContainer").dialog({modal:!0, 3178autoOpen:!1,width:800,title:vBulletin.phrase.get("profile_media"),resizable:!1,
3178closeOnEscape:!1,showCloseButton:!1,dialogClass:"dialog-container dialog-box edit-media-upload-dialog js-profile-media",close:function(){c(document).data("gallery-container",null)}}),vBulletin.ckeditor.initEditor(a.find(".js-ckeditor-init-on-focus")),vBulletin.upload.initializePhotoUpload(a));a.off("dialogopen").on("dialogopen",function(e,h){a.find('.b-toolbar__item[data-panel="b-content-entry-panel__content--{0}"]:not(.b-toolbar__item--active)'.format(d)).trigger("click"); 3179vBulletin.ckeditor.initEditorComponents(a);c(document).data("gallery-container",c(this).find(".b-content-entry-panel__content--"+d))}).dialog("open")});g.off("click",".profile-media-backbtn").on("click",".profile-media-backbtn",function(b){c(".profile-toolbar .media-toolbar-filter").addClass("h-hide");x(!1);c(this).closest(".conversation-toolbar-wrapper").find(".filtered-by").addClass("h-hide").find(".filter-text-wrapper").empty();r(c("#mediaList"),f.currentMediaPage)});g.offon("change","#mediaCurrentPage", 3180B);g.offon("click","#mediaPreviousPage, #mediaNextPage",B);f.profileMediaDetailContainer=c("#profileMediaDetailContainer").clone();c(document).off("afterSave",".js-album-detail .js-post__content-wrapper .js-content-entry form").on("afterSave",".js-album-detail .js-post__content-wrapper .js-content-entry form",function(b,d){u(f.currentFilter);return!1});c(document).off("afterCancel",".js-album-detail .js-post__content-wrapper .js-content-entry form").on("afterCancel",".js-album-detail .js-post__content-wrapper .js-content-entry form", 3181function(b){c(b.currentTarget).closest(".js-album-detail").find(".conversation-body, .profile-media-uploadphotos, .js-photo-preview").removeClass("h-hide-imp");return!0});c(document).off("afterSave",".js-profile-media .js-content-entry form").on("afterSave",".js-profile-media .js-content-entry form",function(b,d){if("b-content-entry-panel__content--gallery"==c(".b-toolbar__item--active",this).data("panel")){b=c("#mediaList");var e=Number(b.data("totalpages"));b=0==Number(b.data("totalcount"))%vBulletin.media.ALBUMS_PERPAGE? 3182e+1:e;d.alert&&vBulletin.alert("media",d.alert,"alert");n(b)}else n(1);return!1});g.length&&(vBulletin.media.setHistoryStateChange(),z=g.closest(".canvas-widget").find(".js-module-top-anchor").attr("id"),g.off("click",".media-toolbar-filter").on("click",".media-toolbar-filter",function(b){c(".filter-wrapper",this).toggleClass("selected");c(".arrow .vb-icon",this).toggleClass("vb-icon-triangle-down-wide vb-icon-triangle-up-wide");c(b.target).closest(".conversation-toolbar-wrapper").find(".toolbar-filter-overlay").slideToggle("slow", 3183function(){if(c(this).is(":visible")){c("body").off("click.media_filter").on("click.media_filter",function(e){0==c(e.target).closest(".toolbar-filter-overlay").length&&0==c(e.target).closest(".toolbar-filter").length&&(c("body").off("click.media_filter"),c(".media-toolbar-filter").trigger("click"))});var d={};vBulletin.isScrolledIntoView(this,d)||c("html,body").animate({scrollTop:"+="+Math.abs(d.bottom)},"fast")}else c("body").off("click.media_filter")})}),c("form.media-filter-overlay",g).trigger("reset"), 3184g.offon("change",".media-filter-overlay input[type=radio]",function(b,d){if(!k.isEnabled()&&t){var e=vBulletin.makePaginatedUrl(location.href,1);location.href=vBulletin.makeFilterUrl(e,this.name,this.value,h,z);return!0}b=C(c(b.target));var h=c(".media-tab");h.data("perpage")&&(b.perpage=h.data("perpage"));u(b,!0,h.data("callbacks"));c(this).data("bypass-filter-display")||vBulletin.conversation.displaySelectedFilterText(this,this.value);if(k.isEnabled()&&!d){e=vBulletin.getSelectedFilters(c("form.toolbar-filter-overlay", 3185h));d=this.name;b=this.value;var l=c(".conversation-toolbar-wrapper .filtered-by",h),w={from:"filter",page:1,tab:h.data("url-path")?h.data("url-path"):"#"+h.attr("id"),filters:e,filtervalue:b,filtername:d};l.data("reset")?e=location.pathname.replace(/\/page[0-9]+/,""):(e=vBulletin.makePaginatedUrl(location.href,1),e=vBulletin.makeFilterUrl(e,d,b,h));k.pushState(w,document.title,e);l.data("reset",null)}}),g.offon("click",".filtered-by .js-remove-filter",function(b){b=c(this).closest(".filtered-by"); 3186var d=c(this).closest(".filter-text"),e=d.data("filter-name");if(!k.isEnabled()&&t)return location.href=vBulletin.makeFilterUrl(location.href,e,d.data("filter-value"),g,z),!1;$defaultSelectedFilter=c(".toolbar-filter-overlay .filter-options input[name={0}]".format(e),g).prop("checked",!1).filter(".js-default-checked");d.remove();d=b.find(".filter-text").length;0==d?(b.addClass("h-hide"),b.data("reset",!0)):1==d&&b.find(".clear-all").addClass("h-hide");1==$defaultSelectedFilter.length&&($defaultSelectedFilter.data("bypass-filter-display", 3187!0),$defaultSelectedFilter.trigger("click"),$defaultSelectedFilter.data("bypass-filter-display",null))}),c("#profileMediaContainer").length||J());vBulletin.initFlexGridFixLastRowAll()});return{loadGalleryById:u}}(jQuery)); 3188; 3189 3190// ***************************
3191// js.compressed/sb_activity.js 3192// *************************** 3193vBulletin.precache(["blog_memberblogLabel","forum"],[]); 3194(function(b){if(!vBulletin.pageHasSelectors([".forum-activity-stream-widget",".bloghome-widget",".search-widget"]))return!1;b(function(){vBulletin.conversation=vBulletin.conversation||{};var x=vBulletin.tabtools,h=b(".activity-stream-widget"),y,q,z,p,k,C,D;if(h.hasClass("forum-activity-stream-widget")||h.hasClass("bloghome-widget")){var l=h.find(".widget-tabs-nav .ui-tabs-nav > li"),A=l.filter(".ui-tabs-active"),B=A.index(),t={},E="1"==l.parent().data("allow-history"),Q=new vBulletin.history.instance(E), 3195F=!1,G=null,H=null;-1==B&&(B=0,A=l.first());var r=A.find("> a").attr("href");var I=function(c,a){var f=a.filter;a.pagination&&a.pagination.setOption("context",c);f.setOption("context",c);"undefined"!=typeof f.lastFilters&&0<b(".conversation-empty:not(.h-hide)",c).length&&delete f.lastFilters},J=function(c,a,f,e,d,g,m){var n=b(".conversation-list",c);return x.newTab(c,a,e,d,g,n,m,b.noop,f)},L=function(c,a){vBulletin.conversation.filter({context:a,autoCheck:!1,scrollToTop:c,pagination:!1,allowHistory:!1, 3196tabParamAsQueryString:!0,beforeApplyFilters:function(){K();return!1},afterResetFilters:function(){K()}})},M=function(c){var a=b(".toolbar-pagenav",c);0<a.length&&new vBulletin.pagination({context:c,allowHistory:void 0,onPageChanged:function(f,e){if(!e){e=b(".
3196js-button-filter-my.js-checked",c).data("filter-value");var d=b(".js-button-filter-display-blogs.js-checked",c).data("filter-value"),g=a.closest(".activity-stream-widget");u(g,c,f,e,!1,!0,d)}}})},N=function(c,a){vBulletin.memberChannel.updateToolbarPagination(c); 3197vBulletin.memberChannel.updateToolbarButtonPressState(c);a&&L(b(".bloghome-widget"),b("#memberblog-tab"));a=c.find(".js-button-filter-display-blogs.js-checked").data("filter-value")||"display_grid";c.find(".js-flexgrid").toggleClass("b-groupgrid b-flexgrid","display_grid"==a);vBulletin.initFlexGridFixLastRowAll(!0);vBulletin.initFrameImagesWithColor()},K=function(){var c=b("#memberblog-tab .js-pagenum").val()||1,a=b(".js-button-filter-my.js-checked").data("filter-value"),f=b(".js-button-filter-display-blogs.js-checked").data("filter-value"); 3198u(G,H,c,a,!1,!1,f)},u=function(c,a,f,e,d,g,m){f=f||1;e=e||"show_all";m=m||"display_grid";var n=vBulletin.makePaginatedUrl(location.href,f);!d&&k.isEnabled()&&(n=vBulletin.makeFilterUrl(n,"filter_blogs",e,a),d=k.getState(),k[d&&d.data&&d.data.from&&"filter_blogs"!=d.data.from?"setDefaultState":"pushState"]({from:"filter_blogs",page:f,filters:{filter_blogs:e}},document.title,n));n={tab:a.prop("id"),filter_blogs:"show_all"==e?void 0:e,display_blogs:"display_grid"==m?void 0:m};var w=b(".toolbar-filter-overlay", 3199a);d=w.find('input[name="filter_sort"]:checked').val();w=w.find('input[name="filter_order"]:checked').val();vBulletin.AJAX({call:"/ajax/render/blogmember_tab",data:{from:f,my:e,display_blogs:m,noToolbar:g,page:n,blogChannelId:c.data("blog-channel-id"),sort_field:d,sort_order:w},error_phrase:"unable_to_contact_server_please_try_again",success:function(v){var O=b(v);O.filter(".conversation-toolbar-wrapper").length?(a.html(v),M(a),v=vBulletin.Responsive.ChannelContent,v.cloneAndMoveToolbarButtons(), 3200v.initToolbarShrink()):(b(".blogmember-list",a).hide().replaceWith(O).show(),b(".conversation-toolbar-wrapper",a).removeClass("h-hide"));N(c,!F);F=!0}})};x.initTabs(h,Q,l,E,B,r,[p,q],!0,function(c,a,f){G=c;H=f;var e=b(f);a="#"+e.prop("id");f=r==a;a in t||(t[a]=x.tabAllowHistory(e));p&&"#activity-stream-tab"!=a&&"#article-tab"!=a&&p.toggleNewConversations(!1);q&&"#subscribed-tab"==a&&q.toggleNewConversations(!1);if("#memberblog-tab"==a){e.off("click",".js-button-filter").on("click",".js-button-filter", 3201function(d,g){d=b(this);var m=b(".js-button-filter-my.js-checked").data("filter-value"),n=b(".js-button-filter-display-blogs.js-checked").data("filter-value");d.is(".js-button-filter-my")?(m=d.data("filter-value"),b(".js-button-filter-my").removeClass("js-checked")):(n=d.data("filter-value"),b(".js-button-filter-display-blogs").removeClass("js-checked"));d.addClass("js-checked");u(c,e,1,m,g,!0,n)});L(b(".bloghome-widget"),b("#memberblog-tab"));if(!k&&(k=vBulletin.history.instance(t[a]),k.isEnabled())){f= 3202k.getState();if(!f||b.isEmptyObject(f.data))f={from:"filter_blogs",page:Number(b(".pagenav-form .defaultpage",e).val())||1,tab:a,filters:{filter_blogs:b(".js-button-filter-my.js-checked",e).data("filter-value"),filter_display_blogs:b(".js-button-filter-display-blogs.js-checked",e).data("filter-value")}},k.setDefaultState(f,document.title,location.href);k.setStateChange(function(d){d=k.getState();if("filter_blogs"==d.data.from||"display_blogs"==d.data.from){k.log(d.data,d.title,d.url);var g=c.tabs("option", 3203"selected");c.find(".ui-tabs-nav > li").eq(g).find("a").attr("href")!=d.data.tab?(d=getTabIndexByHash(d.data.tab),vBulletin.selectTabByIndex.call(c,d)):u(c,e,d.data.page,d.data.filters.filter_blogs,!0,!0,d.data.filters.display_blogs)}},"filter")}r==a&&M(e);N(c,!1);if(!b(".conversation-list",e).hasClass("dataLoaded")){if(r==a&&!D)return D=!0,!1;b(".conversation-empty",e).addClass("h-hide");u(c,e)}}else if("#activity-stream-tab"==a||"#article-tab"==a)p?I(e,z):(z=J(e,h,t[a],!0,!0,f,null),p=z.filter), 3204p.applyFilters(!1,!0);else if("#subscribed-tab"==a)q?I(e,y):(y=J(e,h,t[a],!0,!0,f,null),q=y.filter),q.applyFilters(!1,!0);else if("#forum-tab"==a){if(e.hasClass("dataLoaded"))return r==a&&vBulletin.markreadcheck(),!1;if(r==a&&!C)return C=!0,!1;b(".conversation-empty",e).addClass("h-hide");vBulletin.AJAX({call:"/ajax/render/display_Forums_tab",data:{isAjaxTemplateRenderWithData:!0},success:function(d){e.html(d.template).addClass(function(){var g=b(".conversation-empty",this);if(0==g.length)return"dataLoaded"; 3205g.removeClass("h-hide");return""})},complete:function(){vBulletin.markreadcheck()}})}});var P=0;h.find(".ui-tabs-nav li").each(function(){P+=b(this).width()});l=h.find(".ui-tabs-nav").width();P>l&&h.find(".widget-tabs-nav, .module-title").height(h.find(".ui-tabs-nav").height())}vBulletin.truncatePostContent(".search-widget");l=b(".conversation-list",h);vBulletin.conversation.initPollEvents(l);vBulletin.conversation.initContentEvents(l);l.off("click",".js-comment-entry__post").on("click",".js-comment-entry__post", 3206function(c){vBulletin.conversation.postComment.apply(this,[c,function(){p.updatePageNumber(1).applyFilters(!1,!0)}])});vBulletin.conversation.bindEditFormEventHandlers("all")})})(jQuery); 3207; 3208 3209// ***************************
3210// js.compressed/hv.js 3211// *************************** 3212(function(c){function f(b){c(".humanverify_image",b).each(function(){var a=c(this),d=c(".refresh_imagereg",a);d.off("click").on("click",a,g);c(".imagereg",a).off("click").on("click",a,g);d.removeClass("h-hide")})}function g(b){var a=b.data;c(".progress_imagereg",a).removeClass("h-hide");vBulletin.AJAX({call:"/ajax/api/hv/generateToken",success:function(d){d=d.hash;c("input.hash",a).val(d);c(".imagereg",a).attr("src",pageData.baseurl+"/hv/image?hash="+d);c(".imageregt",a).val("")},api_error:function(){}, 3213complete:function(){c(".progress_imagereg",a).addClass("h-hide")}});return!1}vBulletin.ensureObj("hv");vBulletin.hv.resetOnError=function(b,a,d){var e=vBulletin.ajaxtools;return e.hasError(b,/humanverify_.*_wronganswer/)?(d.after_error=vBulletin.ajaxtools.runBeforeCallback(d.after_error,function(){vBulletin.hv.reset(!0)}),e.showApiError(b,a,d),!1):!0};vBulletin.hv.reset=function(b){var a=c(".humanverify.humanverify_image");if(0<a.length)a.find(".refresh_imagereg").trigger("click"),b&&a.find(".imageregt").trigger("focus"); 3214else if(0<c(".js-humanverify-recaptcha2").length&&"undefined"!=typeof grecaptcha&&"function"==typeof grecaptcha.reset)grecaptcha.reset();else{var d=c(".humanverify.humanverify_question");0<d.length&&vBulletin.AJAX({call:"/ajax/render/humanverify",data:{action:"register",isAjaxTemplateRenderWithData:!0},success:function(e){e=c(e.template);d.replaceWith(e);b&&e.find(".answer").trigger("focus")}})}};
3214vBulletin.hv.show=function(b){var a=b.find(".imagereg");b.removeClass("h-hide");a.height()!=a.attr("height")&& 3215b.find(".refresh_imagereg").trigger("click")};vBulletin.hv.init=function(b){f(b)};window.recaptcha2callback=function(b){c(".js-humanverify-recaptcha2-response").val(b)};c(function(){f(c(document))})})(jQuery); 3216; 3217 3218// ***************************
3219// js.compressed/css_b_comp_menu_horizontal.js 3220// *************************** 3221vBulletin.precache(["more_options","advanced_search","search","more"],[]); 3222vBulletin.CompMenuHorizontal=function(e){function k(a,b,c){a.each(function(){var f=e(this);e.each(b,function(d,g){f.is("."+g)&&(f.removeClass(g),d=f.data("removed-classes")||[],-1==e.inArray(g,d)&&d.push(g),f.data("removed-classes",d))});e.each(c,function(d,g){f.is("."+g)||(f.addClass(g),d=f.data("added-classes")||[],-1==e.inArray(g,d)&&d.push(g),f.data("added-classes",d))})})}function p(a){a.each(function(){var b=e(this),c=b.data("added-classes")||[],f=b.data("removed-classes")||[];c.length&&b.removeClass(c.join(" ")); 3223f.length&&b.addClass(f.join(" "))})}function n(a){v.push(a)}function w(a,b,c){e.each(v,function(f,d){d(a,b,c)})}function A(a,b,c){a.is(".js-comp-menu-dropdown__content--main-menu")&&("dropdown"==c?(c=a.find(".current").addClass("b-comp-menu-dropdown__content-item--current"),b.addClass("b-comp-menu-dropdown--main-menu").find(".js-comp-menu-dropdown__trigger").addClass("b-comp-menu-dropdown__trigger--icon-trigger").html('<span class="b-icon b-icon__hamburger b-comp-menu-dropdown__trigger-icon"></span>'), 3224a.find("li").first().addClass("b-comp-menu-dropdown__content-item--divider"),b='<li class="js-search-item b-comp-menu-dropdown__content-item--no-hover js-comp-menu-dropdown__content-maintain-menu"><form action="'+e("#searchForm").attr("action")+'"><input type="text" autocomplete="off" class="b-form-input__input search-term" placeholder="'+vBulletin.phrase.get("search")+'..." name="q"><button title="'+vBulletin.phrase.get("search")+'" class="search-btn" type="submit"><span class="b-icon b-icon__search b-icon--show-on-xsmall"></span></button></form></li><li class="js-search-item"><a href="'+ 3225pageData.baseurl+'/search">'+vBulletin.phrase.get("advanced_search")+"</a></li>",e(b).prependTo(a),e(".js-channel-subtabbar-list li").addClass("js-subtabbar-item b-comp-menu-dropdown__content-item--indent1").insertAfter(c),e(".js-channel-subtabbar").addClass("h-hide")):(a.find("li").removeClass("b-comp-menu-dropdown__content-item--divider b-comp-menu-dropdown__content-item--current b-comp-menu-dropdown__content-item--indent1"),a.find(".js-search-item").remove(),a.find(".js-subtabbar-item").appendTo(e(".js-channel-subtabbar-list")), 3226e(".js-channel-subtabbar").removeClass("h-hide")))}function B(a,b,c){a.is(".js-footer-nav-list")&&("dropdown"==c?(k(a,["h-right"],[]),k(b,[],["js-select-on-xsmall"]),b=e("<li></li>").append(b).appendTo(".js-footer-chooser-list"),a.data("vb-remove-li",b)):(a.insertAfter(".js-footer-chooser-list"),a.data("vb-remove-li").remove()))}function C(a,b,c){"dropdown"==c?(c=a.find(".js-comp-menu--exclude-from-dropdown"),0<c.length&&(b=e("<ul />").addClass(a.get(0).className).removeClass("js-comp-menu-horizontal js-comp-menu--dropdown-on-xsmall js-comp-menu--dropdown-on-small b-comp-menu-dropdown--inactive").insertAfter(b), 3227a.data("vb-exclude-item-container",b),c.each(function(f,d){f=e(this);e("<li />").addClass("js-excluded-item-marker h-hide-imp").data("vb-excluded-item",f).insertAfter(f)}),c.appendTo(b))):(b=a.data("vb-exclude-item-container"),c=a.find(".js-excluded-item-marker"),b&&b.length&&0<b.length&&0<c.length&&(c.each(function(f,d){f=e(this);f.data("vb-excluded-item").insertAfter(f)}),c.remove(),a.data("vb-exclude-item-container",!1),b.remove()))}function D(a,b,c){function f(l){l=e(this).closest("li");h.removeClass("b-comp-menu-dropdown__content-item--current ui-tabs-active ui-state-active ui-state-hover ui-state-default"); 3228l.addClass("b-comp-menu-dropdown__content-item--current")}if(a.is(".js-module-tab-menu")){var d=a.closest(".widget-tabs-nav, .js-widget-tabs-nav"),g=d.find(".module-title, .js-module-title"),h=a.find("li"),m=h.filter(".ui-state-active"),q=a.find("a");d.addClass("js-widget-tabs-nav");g.addClass("js-module-title");"dropdown"==c?((a.is(".js-profile-tabs-nav")||a.is(".js-subscribe-tabs-nav"))&&e("<div />").addClass("js-profile-menu-wrapper widget-tabs-nav").insertAfter(a).append(b).append(a),k(a,["ui-tabs-nav", 3229"ui-helper-reset","ui-helper-clearfix","ui-widget-header","ui-corner-all"],[]),k(b,[],["js-select-when-dropdown"]),k(d,["widget-tabs-nav"],["widget-tabs-nav-background"]),k(g,["module-title"],[]),k(h,"ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all ui-corner-bottom ui-corner-top ui-corner-right ui-corner-left ui-corner-br ui-corner-bl ui-corner-tr ui-corner-tl".split(" "),[]),k(q,["ui-tabs-anchor","h-block"],[]),m.length?m.addClass("b-comp-menu-dropdown__content-item--current"): 3230setTimeout(function(){h.filter(".ui-state-active").addClass("b-comp-menu-dropdown__content-item--current");var l=a.next(".vb-select-el"),x=0;if(l&&l.length){h.each(function(E,F){x=E;if(e(F).is(".ui-state-active"))return!1});var y=l.is(".selectBox");y&&l.selectBox("destroy");l.find(".js-noop-label").remove();l.get(0).selectedIndex=x;y&&l.selectBox()}},0),h.removeClass("ui-state-default ui-tabs-active ui-state-active ui-state-hover"),q.off("click.vbmoduletabs").on("click.vbmoduletabs",f),b.data("add-classe
3230s-to-select-el", 3231"h-margin-vert-m h-margin-horiz-xl")):(h.filter(function(){return"true"==e(this).attr("aria-selected")}).removeClass("b-comp-menu-dropdown__content-item--current").addClass("ui-tabs-active ui-state-active"),q.off("click.vbmoduletabs"),p(d),p(g),c=a.parent(),c.is(".js-profile-menu-wrapper")&&(a.insertAfter(c),b.insertAfter(c),c.remove()))}}function G(a,b,c){if(a.is(".js-tabbed-pane__tabs")){var f=a.find("li"),d=f.filter(".b-tabbed-pane__tab--selected");a.find("a");"dropdown"==c?(e("<div />").addClass("js-tabbed-pane__tabs-wrapper b-tabbed-pane_tabs b-tabbed-pane__tabs--standard").insertAfter(a).append(b).append(a), 3232k(a.parent(),[],["js-comp-menu-dropdown__content"]),k(b,[],["js-select-when-dropdown"]),k(f,[],["b-comp-menu-dropdown__content-item"]),d.addClass("b-comp-menu-dropdown__content-item--current"),b.data("add-classes-to-select-el","h-margin-horiz-xl h-margin-vert-m")):(f.removeClass("b-comp-menu-dropdown__content-item--current"),c=a.parent(),c.is(".js-tabbed-pane__tabs-wrapper")&&(a.insertAfter(c),b.insertAfter(c),c.remove()))}}function H(a,b,c){a.is(".js-groupblog-admin-menu")&&(a.closest(".js-blog-admin-left"), 3233a=a.find("li").filter(".sgAdminActive, .blogAdminActive"),"dropdown"==c&&(k(b,[],["js-select-on-xsmall"]),a.addClass("b-comp-menu-dropdown__content-item--current")))}function I(a,b,c){if(a.is(".js-sharing-menu")){var f=a.find("li");"dropdown"==c?(c=a.prevAll(".userinfo"),1==c.length&&(b.appendTo(c),a.data("vb-moved-to-userinfo","1")),k(a,["b-sharing-menu--horizontal"],[]),k(b,[],["h-align-bottom"]),k(f,[],["b-comp-menu-dropdown__content-item--no-hover","js-comp-menu-dropdown__content-maintain-menu"])): 3234("1"==a.data("vb-moved-to-userinfo")&&(c=b.parent(".userinfo"),a.insertAfter(c).data("vb-moved-to-userinfo","0")),p(f))}}function t(a,b){if("dropdown"==b){var c=a.data("dropdown-icon-classes")||"",f=c?" b-comp-menu-dropdown__trigger--icon-trigger":"";f=(a.data("dropdown-trigger-classes")||"")+f;var d=a.data("dropdown-trigger-phrase")||"more_options",g=a.data("dropdown-menu-classes")||"",h=e('<div class="b-comp-menu-dropdown js-comp-menu-dropdown '+g+'"> <div class="b-comp-menu-dropdown__trigger js-comp-menu-dropdown__trigger js-button '+ 3235f+'" tabindex="0"> <span class="'+c+' b-comp-menu-dropdown__trigger-icon"> '+vBulletin.phrase.get(d)+" </span> </div> </div>");h.insertAfter(a);w(a,h,b);c=a.find("li");f=a.find("a");e.each(["h-right","h-left"],function(q,l){a.is("."+l)&&h.addClass(l)});b=a.data("dropdown-content-classes");var m=["b-comp-menu-dropdown__content","js-comp-menu-dropdown__content"];b=b?b.split(" "):[];e.each(b,function(q,l){m.push(l)});k(a,"h-margin-top-s h-right b-comp-menu-horizontal channel-tabbar-list h-hide-on-small nav-list".split(" "), 3236m);k(c,["h-margin-top-xs","b-post-control","b-post-control--responsive"],["b-comp-menu-dropdown__content-item"]);k(f,["h-left"],["h-block"]);a.appendTo(h);vBulletin.CompMenuDropdown.init()}else vBulletin.CompMenuDropdown.updateMenuAsSelectElement(),c=a.find("li"),f=a.find("a"),p(a),p(c),p(f),h=a.closest(".js-comp-menu-dropdown"),vBulletin.CompMenuDropdown.setMenuColumnCount(h,a,1),a.removeClass("b-comp-menu-dropdown__content--left b-comp-menu-dropdown__content--right"),a.insertAfter(h),w(a,h,b),(b= 3237a.next(".vb-select-el"))&&b.length&&b.selectBox("destroy").remove(),h.remove()}function z(a,b){r()}function J(a){var b=[a,a.parent()],c=!1;e.each(b,function(f,d){if(d.is(".js-shrink-event-parent")&&"need_shrink"==vBulletin.Responsive.Debounce.checkElementShrinkRequirement(d))return c=!0,!1});a.is(".js-comp-menu-dropdown__content--main-menu")&&!c&&"need_shrink"==vBulletin.Responsive.Debounce.checkElementShrinkRequirement(e(".js-channel-subtabbar-list"))&&(c=!0);return c}function r(){var a=e(".js-comp-menu-horizontal"); 3238if(a.length){var b=e("body"),c=b.is(".l-small"),f=b.is(".l-xsmall");a.each(function(d){d=e(this);var g=d.find("li").not(".b-post-control--disabled").length,h=!0,m=!1;d.data("is-dropdown-menu")&&d.closest(".js-comp-menu-dropdown").is(".b-comp-menu-dropdown--open")&&(h=!1);h&&(d.data("is-dropdown-menu")&&(t(d,"horizontal"),d.data("is-dropdown-menu","")),m=J(d));(c&&d.is(".js-comp-menu--dropdown-on-small")||f&&d.is(".js-comp-menu--dropdown-on-xsmall")||m)&&0<g?d.data("is-dropdown-menu")||(t(d,"dropdown"), 3239d.data("is-dropdown-menu","1")):d.data("is-dropdown-menu")&&(t(d,"horizontal"),d.data("is-dropdown-menu",""))})}}var u=vBulletin.ensureObj("jsexec.css_b_comp_menu_horizontal",{exec:0,init:0});u.exec++;var v=[];e(function(){vBulletin.phrase.register(e("[data-dropdown-trigger-phrase]").map(function(a,b){return e(b).data("dropdown-trigger-phrase")}).get());n(A);n(B);n(C);n(D);n(G);n(H);n(I);r();1>u.init&&(vBulletin.Responsive.Debounce.registerCallback(r),e(document).on("vb-loadnewposts",z),e(document).on("vb-filterposts", 3240z));u.init++});return{registerMenuChangeFilter:n,checkHorizontalMenuState:r,convertDropdownProgressive:function(a){if
3240(!(1>a.$children.length||1!=a.$parent.length)){a.needsShrink=a.needsShrink||function(){return"need_shrink"==vBulletin.Responsive.Debounce.checkElementShrinkRequirement(a.$parent)};a.copyChild=a.copyChild||function(g){var h=g.find("> a");g=e('<a href="#"></a>');g.html(h.html());g.attr("href",h.attr("href"));g.on("click",function(){h.trigger("click");return!1});return g};var b=a.$children.filter(function(){return""!= 3241e(this).text()});if(!(1>b.length)){var c=a.$parent.find(".js-progressive-dropdown-menu");if(1>c.length){c=e('<li class="b-top-menu__item js-shrink-event-child js-progressive-dropdown-menu h-hide-imp"> \t<div class="b-comp-menu-dropdown b-comp-menu-dropdown--sitebuilder js-comp-menu-dropdown">\t\t<div class="b-comp-menu-dropdown__trigger js-comp-menu-dropdown__trigger js-button" tabindex="0"> \t\t\t<span class="b-icon b-icon__ellipsis b-comp-menu-dropdown__trigger-icon">'+vBulletin.phrase.get("more")+ 3242'</span> \t\t</div> \t\t<ul class="b-comp-menu-dropdown__content js-comp-menu-dropdown__content"> \t\t</ul> \t</div> </li>');c.insertAfter(b.last());var f=c.find(".js-comp-menu-dropdown__content");b.each(function(g,h){h=e(this);var m=a.copyChild(h);e('<li class="b-comp-menu-dropdown__content-item h-hide-imp"></li>').append(m).appendTo(f).data("vb-progressive-item-num",g);h.data("vb-progressive-item-num",g)});vBulletin.CompMenuDropdown.init()}var d=c.find(".b-comp-menu-dropdown__content-item");if(a.removeMenu|| 3243!a.needsShrink())b.removeClass("h-hide-imp"),c.addClass("h-hide-imp"),d.addClass("h-hide-imp");!a.removeMenu&&a.needsShrink()&&b.reverse().each(function(){var g=e(this),h=g.data("vb-progressive-item-num"),m=d.filter(function(){return e(this).data("vb-progressive-item-num")==h});m.removeClass("h-hide-imp b-comp-menu-dropdown__content-item--first");g.addClass("h-hide-imp");c.removeClass("h-hide-imp");if(!a.needsShrink())return m.addClass("b-comp-menu-dropdown__content-item--first"),!1})}}}}}(jQuery); 3244; 3245 3246// ***************************
3247// js.compressed/css_b_comp_menu_dropdown.js 3248// *************************** 3249vBulletin.CompMenuDropdown=function(c){function z(a){c(a.target).closest(".js-comp-menu-dropdown").length||y(c(".js-comp-menu-dropdown"))}function M(){function a(f){e=new Date;h=f.originalEvent.touches[0].pageX;m=f.originalEvent.touches[0].pageY;g=l=0}function b(f){l=h-f.originalEvent.touches[0].pageX;g=m-f.originalEvent.touches[0].pageY}function d(f){400>=new Date-e&&!l&&!g&&z.call(this,f)}var e=!1,h,m,l,g;c(document).off("touchstart",a).on("touchstart",a).off("touchmove",b).on("touchmove",b).off("touchend", 3250d).on("touchend",d)}function D(a){var b=c(a.target).closest(".js-comp-menu-dropdown");b.is(".b-comp-menu-dropdown--open")?y(b):N(b);a=c(".js-comp-menu-dropdown").filter(function(){return c(this).get(0)!=b.get(0)});y(a);return!1}function E(a){a=c(a.target).closest(".js-comp-menu-dropdown");a.length&&a.is(".b-comp-menu-dropdown--open")&&y(a)}function F(a){a=c(a.target);a.closest(".js-comp-menu-dropdown").find(".js-comp-menu-dropdown__trigger-text").text(a.text())}function A(a,b,d){var e=b.find(".b-comp-menu-dropdown__content-item"); 3251d=Math.min(d,4);if(1<d){b.addClass("b-comp-menu-dropdown__content--"+d+"-column");b=!a.is(".b-comp-menu-dropdown--open");var h="",m="";e.removeClass("b-comp-menu-dropdown__content-item--column-first b-comp-menu-dropdown__content-item--column-trailing");b&&a.addClass("b-comp-menu-dropdown--open");e.each(function(){var l=c(this).position();l=parseInt(l.top,10);""===h&&(h=l);""===m&&(m=l);h=Math.min(h,l);m=Math.max(m,l)});e.each(function(){var l=c(this),g=l.position();parseInt(g.top,10)<=h&&l.addClass("b-comp-menu-dropdown__content-item--column-first")}); 3252e=e.last();e.position().top<m&&e.addClass("b-comp-menu-dropdown__content-item--column-trailing");b&&a.removeClass("b-comp-menu-dropdown--open")}else{for(a=4;1<a;)b.removeClass("b-comp-menu-dropdown__content--"+a+"-column"),--a;e.removeClass("b-comp-menu-dropdown__content-item--column-first b-comp-menu-dropdown__content-item--column-trailing")}}function G(a,b){if(a.is(".b-comp-menu-dropdown--open")){var d=b.outerHeight();b=b.outerWidth()}else a.addClass("b-comp-menu-dropdown--open"),d=b.outerHeight(), 3253b=b.outerWidth(),a.removeClass("b-comp-menu-dropdown--open");return{width:b,height:d}}function H(a){var b=c(window),d=b.width(),e=b.height(),h=b.scrollLeft(),m=c(document).height();a.each(function(l,g){var f=c(g),r=f.offset(),u=f.find(".js-comp-menu-dropdown__trigger").outerHeight();l=f.find(".js-comp-menu-dropdown__trigger").outerWidth();g=f.find(".js-comp-menu-dropdown__content");var k=g.find(".b-comp-menu-dropdown__content-item");g.css("width","auto");A(f,g,1);var n=G(f,g),p=n.height;n=n.width; 3254k=Math.max(Math.min(Math.floor(k.length/15),4),1);p=Math.ceil(p/(e-100));n=Math.floor((d-0)/n);n=Math.max(n,1);k=Math.max(k,p);k=Math.min(k,4);k=Math.min(k,n);A(f,g,k);n=G(f,g);p=n.height;n=n.width;k=g.css("margin-top");var v=parseInt(k,10),q=r.top;k=q>=p;var t=m-q>=u+p+v;r=r.left-h+l;u=d-r+l;p=r>=n;v=u>=n;q=[];k&&!t?(f.addClass("b-comp-menu-dropdown--direction-up"),q.push("Forced up")):t&&!k&&(f.removeClass("b-comp-menu-dropdown--direction-up"),q.push("Forced down"));k=f="";var w=t=0,x=0;p&&!v?(g.removeClass("b-comp-menu-dropdown__content--left").addClass("b-comp-menu-dropdown__content--right"), 3255f="right",k="left",q.push("Forced right alignment (opens left)")):v&&!p?(g.removeClass("b-comp-menu-dropdown__content--right").addClass("b-comp-menu-dropdown__content--left"),f="left",k="right",q.push("Forced left alignment (opens right)")):v||p||(r>=u?(g.removeClass("b-comp-menu-dropdown__content--left").addClass("b-comp-menu-dropdown__content--right"),f="right",k="left",w=n-r,x=u-l,t=Math.min(w,x),q.push("Forced right alignment (opens left) (More space on left)")):(g.removeClass("b-comp-menu-dropdown__content--right").addClass("b-comp-menu-dropdown__content--left"), 3256f="left",k="right",w=n-u,x=r-l,t=Math.min(w,x),q.push("Forced left alignment (opens right) (More space on right)")));f&&k&&(0<t?g.css(f,"-"+t+"px"):g.css(f,"0"),g.css(k,"auto"));x<w&&g.css("width",d).find(".b-comp-menu-dropdown__content-item").addClass("ellipsis").find("> a").addClass("ellipsis")})}function I(){var a=c(".js-comp-menu-dropdown").filter(function(){return c(this).is(".b-comp-menu-dropdown--open")});H(a)}function B(){var a=c(".js-select-on-xsmall, .js-select-on-small, .js-select-when-dropdown"), 3257b=c("body").is(".l-small"),d=c("body").is(".l-xsmall");a.each(function(){var e=c(this),h=0<e.next(".vb-select-el").length,m=e.is(".js-select-when-dropdown")||e.is(".js-select-on-xsmall")&&d||e.is(".js-select-on-small")&&b;m&&!h?(J(e).removeClass("h-hide-imp").selectBox(),e.addClass("h-hide-imp")):!m&&h&&(J(e).selectBox("destroy").addClass("h-hide-imp"),e.removeClass("h-hide-imp"))})}function J(a){var b=a.next(".vb-select-el");b.length||(b=c('<select class="vb-select-el"></select>'),1!=a.find(".b-comp-menu-dropdown__content-item.b-comp-menu-dropdown__content-item--current").length&& 3258c("<option></option>").addClass("js-noop-label").text(a.find(".js-comp-menu-dropdown__trigger").text()).appendTo(b),a.find(".js-comp-menu-dropdown__content .b-comp-menu-dropdown__content-item").each(function(d,e){var h=c(this);e=h.is(".b-comp-menu-dropdown__content-item--current");var m=h.find("> a");h=m.html()||h.html();c("<option></option>").html(h).data("vb-option-link",m).appendTo(b);e&&(b.get(0).selectedIndex=d)}),b.addClass("b-comp-menu-dropdown__select").on("change",function(d){d=d.target; 3259idx=d.selectedIndex;opt=d.options[idx];(linkHref=($link=c(opt).data("vb-option-link"))?$link.attr("href"):null)&&"#"!=linkHref.substr(0,1)?window.location.href=linkHref:($link.one("click",function(e){var h=$link.data("href");h&&(window.location.href=h,e.preventDefault())}),$link.trigger("click"))}
3259).insertAfter(a),(a=a.data("add-classes-to-select-el"))&&b.addClass(a));return b}function K(){c(".js-select-on-xsmall, .js-select-on-small").each(function(){var a=c(this).data("vb-select-el");a&&(a=a.nextAll(".selectBox"), 3260a=a.not(a.first()),a.remove())})}function N(a){a.each(function(b,d){b=c(this).closest(".conversation-toolbar");1==b.length&&b.height(b.height())});a.addClass("b-comp-menu-dropdown--open");H(a);a.find(".js-comp-menu-dropdown__trigger-arrow").removeClass("b-icon--disabled")}function y(a){a.removeClass("b-comp-menu-dropdown--open");a.find(".js-comp-menu-dropdown__trigger-arrow").addClass("b-icon--disabled")}function L(){var a=c(".js-comp-menu-dropdown__trigger").filter(function(){return"1"!=c(this).data("comp-menu-dropdown-initialized")}); 3261a.off("click",D).on("click",D).attr("tabindex","0").addClass("js-button").data("comp-menu-dropdown-initialized","1");c(document).off("click",z).on("click",z);M();var b=c();a.each(function(d,e){d=c(e);d.is(".b-comp-menu-dropdown__trigger--arrow")&&1>d.find(".js-comp-menu-dropdown__trigger-arrow").length&&c('<span class="vb-icon b-icon__arrow-down-s b-icon--disabled js-comp-menu-dropdown__trigger-arrow h-align-middle"></span>').appendTo(d);d=d.parents(".js-shrink-event-parent");d.length&&(b=b.add(d))}); 3262b.length&&vBulletin.Responsive.Debounce.checkShrinkEvent(b);c(".js-comp-menu-dropdown").removeClass("b-comp-menu-dropdown--open-on-hover");B();c(document).off("vb-filterposts",K).on("vb-filterposts",K);c(".b-comp-menu-dropdown__content-item:not(.js-comp-menu-dropdown__content-maintain-menu)").filter(function(){return"1"!=c(this).data("comp-menu-dropdown__content-close-menu-initialized")}).off("click",E).on("click",E).attr("data-comp-menu-dropdown__content-close-menu-initialized","1");c(".js-comp-menu-dropdown--display-current").off("click", 3263".b-comp-menu-dropdown__content-item",F).on("click",".b-comp-menu-dropdown__content-item",F);1>C.init&&(vBulletin.Responsive.Debounce.registerCallback(I),vBulletin.Responsive.Debounce.registerCallback(B));C.init++}var C=vBulletin.ensureObj("jsexec.css_b_comp_menu_dropdown",{exec:0,init:0});C.exec++;c(L);return{init:L,updateMenuFormat:I,updateMenuAsSelectElement:B,setMenuColumnCount:A}}(jQuery); 3264; 3265 3266// ***************************
3267// js.compressed/pmchat.js 3268// *************************** 3269vBulletin.precache(["error","pmchat_close_button_label","pmchat_idle_disconnected_message","pmchat_idle_disconnected_title","pmchat_reconnect_button_label"],["pmchat_enabled","pmchat_header_polling_interval","pmchat_chat_polling_idle_timeout","pmchat_chat_polling_min_interval","pmchat_chat_polling_max_interval"]); 3270(function(b){function da(g){g=g.hasOwnProperty("messageid")?"?messageid="+encodeURIComponent(g.messageid):"?aboutNodeid="+encodeURIComponent(g.aboutNodeid)+"&toUserid="+encodeURIComponent(g.toUserid);return""==g?"#":ja+g}function ea(g){var v;g=g.hasOwnProperty("url")?g.url:da(g);"#"!=g&&((v=window.open(g,"_blank","width=600,height=700,resizable=yes,scrollbars=yes,status=yes"))&&!v.closed&&"undefined"!=typeof v.closed||window.open(g+queryString))}function ka(){function g(f){var h=f[Object.keys(f)[0]]; 3271h=h&&h.orderListForJs||[];var q=h.length,r=!1,A={};if(0<q)n.find(".js-pmchat__submenu__ephemeral").remove();else return!1;for(var B=0;B<q;B++){var t=h[B];if(f.hasOwnProperty(t)){var k=f[t];var y=Q.clone(!0);var I=y.find(".js-pmchat__submenu__link"),E="js-pmchat__messagefinder__"+t;y.removeClass("h-hide-imp");I.attr("data-starter",t).prop("title",k.previewtext).attr("href",da({messageid:t}));y.find(".js-pmchat__submenu__title").html(k.title);0==k.msgread&&y.addClass("b-comp-menu-dropdown__content-item--unread"); 3272y.addClass(E);y.insertBefore(F);(y=0<J&&(!w.hasOwnProperty(t)||w[t].publishdate!=k.publishdate||w[t].userid!=k.userid)&&0==k.msgread&&k.userid!=pageData.userid)&&(r=!0);A[t]={publishdate:k.publishdate,userid:k.userid,title:k.title,previewtext:k.previewtext,findmehelper:E,isNew:y}}}w=A;J=K;0<F.prev(".b-comp-menu-dropdown__content-item").length?F.next(".b-comp-menu-dropdown__content-item").addClass("b-comp-menu-dropdown__content-item--divider").removeClass("b-comp-menu-dropdown__content-item--first"): 3273F.next(".b-comp-menu-dropdown__content-item").removeClass("b-comp-menu-dropdown__content-item--divider").addClass("b-comp-menu-dropdown__content-item--first");r&&v()}function v(){console.log("New Messages found in polling! Notifying user");if(C.find(".js-comp-menu-dropdown").hasClass("b-comp-menu-dropdown--open")){var f=[];for(h in w)w.hasOwnProperty(h)&&w[h].isNew&&f.push("."+w[h].findmehelper);if(0<f.length){var h=f.join(", ");var q=b(h),r=setInterval(function(){q.toggleClass("b-comp-menu-dropdown__content-item--unread-alert")}, 3274100);setTimeout(function(){clearInterval(r);q.removeClass("b-comp-menu-dropdown__content-item--unread-alert")},3E3)}}else C.find(".js-comp-menu-dropdown").addClass("b-comp-menu-dropdown--alert")}function V(){x+=60;x>=L&&M()}function M(){clearTimeout(N);x>=L?console.log("Header polling stopped due to idle timeout. (idle time: "+x+"s)"):N=setTimeout(W,1E3*u)}function W(){M();console.log("Polled for header data!"+Date.now());R()}function S(f,h,q){f.length&&(f.text()!=h&&(f.text(h),f.toggleClass("h-hide-imp", 32750>=h)),q&&f.parents().eq(1).toggleClass("h-hide-imp",0>=h))}function R(f){O?"function"==typeof f&&T&&T.always(f):(O=!0,l.removeClass("h-hide-imp"),vBulletin.loadingIndicator.suppressNextAjaxIndicator(),T=vBulletin.AJAX({call:"/chat/loadheaderdata",success:function(h){var q=h.headerCounts;S(X,q.messages);S(aa,q.totalcount);Y.each(function(){var r=b(this),A=r.data("folderid")||0;S(r,q.details&&q.details[A]&&q.details[A].count||0,!0)});b.isEmptyObject(h.messages)||g(h.messages)},api_error:vBulletin.ajaxtools.logApiError, 3276error:vBulletin.ajaxtools.logAjaxError,complete:[function(){O=!1;l.addClass("h-hide-imp");K=Date.now()},f]}))}var C=b(".js-pmchat__dropdown"),X=C.find(".js-pmchat__messages-count"),aa=b(".notifications-count").not(".js-pmchat__messages-count").not("[data-folderid]"),Y=b(".notifications-count[data-folderid]").not(".js-pmchat__messages-count"),n=C.find(".js-pmchat__dropdown-submenu"),Q=n.find(".js-pmchat__dropdown__single-pm-template").removeClass("js-pmchat__dropdown__single-pm-template"),F=n.find(".js-pmchat__insert-marker"), 3277l=b(".js-pmchat__dropdown-submenu").find(".js-pmchat__submenu__loading-icon");C.find(".js-pmchat__header-data");var u=vBulletin.options.get("pmchat_header_polling_interval")||30,x=0,L=vBulletin.options.get("pmchat_chat_polling_idle_timeout")||300,K=0,w={},J=0,O=!1,T=null,ba=b.debounce(100,function(){"function"==typeof vBulletin.CompMenuDropdown.updateMenuFormat&&vBulletin.CompMenuDropdown.updateMenuFormat()});n.off("click").on("click",".js-pmchat__submenu__link",function(){var f={},h=b(this).attr("href"); 3278"#"!=h?f.url=h:f.messageid=b(this).data("starter");ea(f);b(this).parent().removeClass("b-comp-menu-dropdown__content-item--unread");return!1});b(".js-pmchat-reload-header").on("click",function(f){C.find(".js-comp-menu-dropdown").removeClass("b-comp-menu-dropdown--alert");x=0;Date.now()-K<1E3*u?console.log("PM Load aborted: less than "+u+" seconds since last load."):(M(),R(ba))});(function(){console.log("Idle detection enabled");setInterval(V,6E4);b(document).on("click keypress scroll",function(f){x= 32790})})();var N=setTimeout(W,1E3*u)}function la(){function g(){var d=b(".js-pmchat__insert-marker").offset().top,c=b(".js-pm-content-entry-container"),e=c.outerHeight();c="fixed"==c.css("position");var a=b(window).outerHeight();(!c||d>a-e)&&vBulletin.animateScrollTop(d)}function v(d){if(f)console.log("Nothing to load, awaiting first message.");else if(D.messagesLoading)console.log("loadNewMessages() rejected: Still awaiting messages from a previous call.");else{console.log("loadNewMessages() executing."); 3280var c=[];F.find(".js-pmchat__post-wrapper").each(function(e,a){e=parseInt(b(a).data("publishdate")||0,10);var m=parseInt(b(a).data("nodeid")||0,10);e>J&&(J=e,O=m);0<m&&c.push(m);J>e&&b(a).removeClass("js-pmchat__post-wrapper")});D.messagesLoading=!0;vBulletin.loadingIndicator.suppressNextAjaxIndicator();vBulletin.AJAX({call:"/chat/loadnewmessages",data:{parentid:x,newreplyid:d,lastpublishdate:J,lastnodeid:O,loadednodes:c},success:function(e){E=(E+1)%10;e.html&&""!==e.html?(U[E]=1,I=Date.now(),console.log("loadNewMessages(): Inserting new messages."), 3281b(e.html).insertBefore(T),g()):(U[E]=-1,console.log("loadNewMessages(): No new messages."))},error:function(e){console.log("loadNewMessages(): Error loading new PMs. Ajax result:");console.log(e)}
3281,complete:function(e){window.vBulletin.loadingIndicator.hide();D.messagesLoading=!1;D.queued&&(D.queued=!1,window.vBulletin.loadingIndicator.show(),setTimeout(v,0));V()}})}}function V(){clearTimeout(q);var d=Date.now(),c=d-I,e=d-h,a=0<U[E],m=U.reduce(function(p,z){return p+z})/10;0<I?a?(k>A&&(k=A),--k,I> 3282r&&(r=I)):k-=1*m:k+=1;k<B?k=B:k>t&&(k=t);h=d;Z&&(Z=!1,r=d);a=(d-r)/1E3;console.log("Idle time: "+a+"s. (timeout: "+y+"s)");a>=y?(console.log("Polling for messages stopped due to idle timeout. Idle start time: "+r+" time now: "+d),W(),r=d):(q=setTimeout(M,1E3*k),console.log("Polling for messages complete. Next poll in "+k+"seconds. Time since last poll: "+e/1E3+"s, since last hit: "+c/1E3+"s."))}function M(){V();v()}function W(){if(null==N){var d={title:vBulletin.phrase.get("pmchat_idle_disconnected_title"), 3283message:vBulletin.phrase.get("pmchat_idle_disconnected_message"),width:"50%",buttonLabel:{yesLabel:vBulletin.phrase.get("pmchat_reconnect_button_label"),noLabel:vBulletin.phrase.get("pmchat_close_button_label")},onClickYes:function(){r=Date.now();k=A;M()},onClickNo:function(){window.close()}};N=openConfirmDialog(d)}else N.dialog("open")}function S(d){d?(ma.remove(),fa.remove(),l.attr("data-message-type","pm-reply"),History.replaceState({},w,pageData.baseurl_pmchat+"?messageid="+d),R(d)):console.log("Missing nodeid for loadParticipants()")}
3283 3284function R(d,c){vBulletin.AJAX({call:"/chat/loadparticipants",data:{nodeid:d},success:function(e){var a=b(".js-pmchat__participants-insert-marker");e.participants_html&&""!=e.participants_html&&a.length&&(a.html(e.participants_html),P.trigger("event-js-content-change"));Q.hasClass("h-hide")&&(Q.removeClass("h-hide"),ha.trigger("click"),ca.removeClass("h-hide"));e.phrase&&""!=e.phrase&&b(".js-participants-count-phrase").text(e.phrase);e.title&&""!=e.title&&b(document).find("title").html(e.title);if(c&& 3285c.success&&"function"==typeof c.success)return c.success.apply(this,[e])},complete:function(e,a,m){if(c&&c.complete&&"function"==typeof c.complete)return c.complete.apply(this,[e,a,m])},error:function(e,a,m){console.log("/ajax/chat/loadparticipants failed!");console.log("----------------");console.log("jqXHR:");console.dir(e);console.log("text status:");console.dir(a);console.log("error thrown:");console.dir(m);console.log("----------------")}})}function C(d){var c=b(this).attr("href");c.startsWith("#")|| 3286(d.preventDefault(),(d=window.open(c,"_blank"))&&!d.closed&&"undefined"!=typeof d.closed||window.open(c))}function X(d){ca.animate({height:"toggle"},{duration:"fast",start:function(){P.trigger("event-js-element-resize-start")},progress:function(c,e,a){P.trigger("event-js-element-resize")},complete:function(){P.trigger("event-js-element-resize")}});d.preventDefault()}function aa(){var d=function(p){var z=0<P.height();if(p.data&&p.data.command)switch(p.data.command){case "open":G.removeClass("h-hide"); 3287break;case "close":G.addClass("h-hide");break;default:z?G.toggleClass("h-hide"):G.removeClass("h-hide")}else G.toggleClass("h-hide");z?P.trigger("event-js-element-resize"):X(p);p.preventDefault()},c={},e=b(".js-participants-add-recipients-input"),a=new vBulletin_Autocomplete(e,{apiClass:"user",afterAdd:function(p,z,H){"undefined"!=typeof H&&"undefined"!=typeof H.id&&H.id&&(c[z]=H.id)},delimiter:" ; "}),m=function(p){a.clearElements();p.data?p.data.command="close":p.data={command:"close"};d(p)};console.log({addRecipientsAutoComplete:a}); 3288ia.off("click").on("click",{command:"toggle"},d);G.find(".js-add-recipients-cancel").off("click").on("click",{command:"close"},m);G.find(".js-add-recipients-submit").off("click").on("click",function(p){var z=a.getInputField(),H=z.val();H&&(z.val(""),a.addElement(H,H));z=a.getValues();vBulletin.AJAX({call:"/ajax/api/content_privatemessage/addPMRecipientsByUsernames",data:{pmid:x,usernames:z,usernamesToIds:c},success:function(oa){R(x,{success:function(){m(p);D.messagesLoading?D.queued=!0:v()},complete:function(){window.vBulletin.loadingIndicator.hide()}})}})})} 3289function Y(d){function c(){if("fixed"==a.css("position")){m.removeClass("h-hide");var p=a.outerHeight()-30;m.css("height",p+"px")}else m.addClass("h-hide")}var e=d+"-replacement",a=b("."+d),m=b("."+e);0==m.length&&(m=b("<div />").addClass(e).insertAfter(a));b(c);b(document).off("click",c).on("click",c);vBulletin.Responsive.Debounce.registerCallback(c);CKEDITOR.on("instanceReady",function(p){c();p.editor.on("focus",function(){setTimeout(function(){c()},0)})});a.on("event-js-element-resize",c)}var n= 3290b(".js-pmchat__container"),Q=b(".js-pmchat__participants"),F=n.find(".js-pmchat__thread-container"),l=n.find("form"),u=n.find(".js-pmchat__data");n=parseInt(u.data("pmchannelid"),10);var x=parseInt(u.data("parentid"),10),L=parseInt(u.data("pm_messageid"),10),K=parseInt(u.data("to_userid"),10),w=u.data("pm_title"),J=0,O=0,T=b(".js-pmchat__insert-marker"),ba=F.find(".js-pmchat__thread-placeholder"),N,f=!1;n!=x&&0<L||(f=!0);var h=0,q,r=Date.now(),A,B=vBulletin.options.get("pmchat_chat_polling_min_interval")|| 32911,t=vBulletin.options.get("pmchat_chat_polling_max_interval")||30;t<B&&(n=t,t=B,B=n);var k=A=(10*B+1*t)/11;var y=vBulletin.options.get("pmchat_chat_polling_idle_timeout")||300,I=0,E=9,U=[];for(n=0;10>n;++n)U[n]=0;var D={messagesLoading:!1,queued:!1},Z=!1,ha=b(".js-participants-collapser-ui"),ca=b(".js-participants-collapsible"),P=ca.find(".js-vbscroller-wrapper"),ia=b(".js-participants-show-add-recipients-ui"),G=b(".js-participants-add-recipients-wrapper"),ma=l.find(".js-wrapper-contententry_title"), 3292fa=l.find(".js-wrapper-contententry__msgRecipients");new vBulletin_Autocomplete(b(".privatemessage_author"),{apiClass:"user",delimiter:" ; "});b(".js-pm-content-entry-container .js-pmchat-submit").off("click").on("click",function(d){function c(a,m,p){b("<input>").attr({type:"hidden",name:m,value:p}).appendTo(a)}var e=b(this);e.prop("disabled",!0);r=Date.now();f?(0==l.find('input[name="msgRecipients"]').length&&K?(console.log({msg:"sentto input added with prefill:",to_userid:K}),c(l,"sentto[]",K)): 3293console.log({msg:'User editable input[name="msgRecipients"] was found. Prefilled sentto skipped.'}),0==l.find('input[name="title"]').length?(console.log({msg:"title input added with prefill:",pm_title:w}),c(l,"title",w)):console.log({msg:'User editable input[name="title"] was found. Prefilled title skipped.'})):(d=l.find('input[name="respondto"]'),0<d.length?d.val(L):c(l,"respondto",L),0==l.find('input[name="msgtype"]').length&&c(l,"msgtype","message"));f&&ba.addClass("h-hide");vBulletin.loadingIndicator.show(); 3294vBulletin.AJAX({url:l.attr("action"),data:l.serialize(),success:function(a){a.nodeId&&(a=parseInt(a.nodeId,10),f&&(l.find('input[name="parentid"]').val(a),u.data("parentid",a),u.data("pm_messageid",a),u.attr("data-parentid",a),u.attr("data-pm_messageid",a),x=L=a,f=!1,S(a)),console.log("==================NEW MESSAGE POSTED, LOADING NEW MESSAGES!"),D.messagesLoading?D.queued=!0:v(a),vBulletin.contentEntryBox.resetForm(l,!1,function(){var m=l.attr("ck-editorid")||b(".js-editor",l).attr("id");m=vBulletin.ckeditor.getEditor(m); 3295vBulletin.hv.reset();m.focus()}))},api_error:vBulletin.hv.resetOnError,complete:function(a){vBulletin.loadingIndicator.hide();e.prop("disabled",!1)}});return!1});n="a:not('.js-pmchat-ignoreanchor')";var na=`.js-namecard-html ${n}`;vBulletin.options.get("usenamecard")&&(n+=":not([data-vbnamecard])",b("body").on("click",na,C));F.on("click",n,C);Q.on("click",n,C);b("body").on("click","a.js-pmchat-ignoreanchor",function(d){d.preventDefault()});ha.off("click").on("click",X);0<ia.length&&0<G.length&&aa(); 3296b(".js-pm-content-entry-container .js-button").enable();g();M();(function(){b(document).on("click keypress scroll",function(c){Z=!0});var d=l.attr("ck-editorid")||b(".js-editor",l).attr("id");b("#"+d).on("afterInit",function(){var c=vBulletin.ckeditor.getEditor(d);c.on("contentDom",function(){function e(){Z=!0}var a=c.editable();null!=a&&(a.attachListener(a,"keypress",e),a.attachListener(a,"click",e),a.attachListener(a,"focus",e))})})})();window.setTimeout(function(){var d=l.attr("ck-editorid")|| 3297b(".js-editor",l).attr("id");b("#"+d).on("afterInit",function(){var c=vBulletin.ckeditor.getEditor(d);if(c){console.log("Setting predefined starter PM text: "+u.data("pm_textprefill"));var e=u.data("pm_textprefill");e&&(e+=" ");c.setData(e,function(){vBulletin.ckeditor.fixTableFunctionality.call(vBulletin.ckeditor,{},c);var a=fa.find(".autocompleteHelper");0<a.length?a.trigger("focus"):c.focus();e&&(a=c.createRange(),a.moveToPosition(a.root,CKEDITOR.POSITION_BEFORE_END),c.getSelection().selectRanges([a])); 3298g()})}else console.log("Editor not found, cannot set predefined starter PM text")})},0);Y("js-pm-content-entry-container");Y("js-pmchat__header");(function(){var d=b("#debug-information");if(1==d.length){function c(){b("body").is(".l-xsmall")?d.appendTo("body"):d.insertBefore(".js-pm-content-entry-container")}c();vBulletin.Responsive.Debounce.registerCallback(c)}})()}var ja=pageData.baseurl_pmchat;
3298(function(){b(function(){b("body").off("click",".js-pmchat-link").on("click",".js-pmchat-link",function(v){v.preventDefault(); 3299v={url:b(this).attr("href")};ea(v);return!1});var g=b(".js-pmchat__dropdown");0<g.length?g.attr("data-initialized")?console.log("PM Dropdown already initialized. Skipping re-init."):(console.log("Initializing PM Dropdown!"),g.attr("data-initialized",!0),ka()):console.log("PM Dropdown not detected, skipping init.");g=b(".js-pmchat__container");0<g.length?g.attr("data-initialized")?console.log("PM Chat window already initialized. Skipping re-init."):(console.log("Initializing PM Chat window!"),g.attr("data-initialized", 3300!0),la()):console.log("PM Chat window not detected, skipping init.")})})()})(jQuery); 3301; 3302 3303// ***************************
3304// js.compressed/module-search2.js 3305// *************************** 3306(function(e){function z(a){var c=a.find(".js-widget-search2-nodelist-item"),b=0,f=a.find(".js-fixed-event-year-header"),n=a.find(".js-year-header");0==f.length&&(f=e("<li />").addClass("js-fixed-event-year-header b-event__listyear b-event__listyear--fixed h-hide").prependTo(a));e.each(n,function(g,d){g=e(d);g.next().hasClass("js-widget-search2-nodelist-item")||g.remove()});e.each(c,function(g,d){g=e(d);d=parseInt(g.data("start-year"),10);var l=g.prev(".js-year-header");d>b&&(l.length||e("<li />").addClass("js-year-header b-event__listyear").text(d).data("start-year", 3307d).insertBefore(g),b=d)})}function A(a){var c=a.find(".js-widget-search2-nodelist-item"),b=a.data("search-max-page")||!1,f=a.data("loaded-pages")||{};c.removeClass("b-event--lastchild h-hide");z(a);a.find(".js-loading").appendTo(a);a.find(".js-no-more-items").appendTo(a);b&&f.hasOwnProperty(b)&&a.find(".js-no-more-items").removeClass("h-hide");c=a.height();b=a.scrollTop();a.height("auto");f=a.height();a.height(c);a.scrollTop(b);a.data("full-height",f)}function E(a,c){var b=c.$anchorItem&&c.$anchorItem.offset().top|| 33080;c=c.anchorItemPreviousTop-b;a.scrollTop();a.scrollTop(a.scrollTop()-c)}function F(a){var c=a.find(".js-widget-search2-nodelist-item"),b={},f=a.offset().top,n=f+a.height(),g=!1,d=!1,l,k=Number.POSITIVE_INFINITY,h,p=0;e.each(c,function(m,q){m=e(q);q=m.hasClass("h-hide");var u=m.offset().top,v=u+m.height(),x=m.data("nodeid");b["nodeid"+x]=!0;g=!q&&!(v<=f||n<=u);d=f<=u;"undefined"==typeof l&&g&&d&&(l=m,k=l.data("page"));g&&(h=m,p=h.data("page"))});return{$items:c,haveNodeids:b,$firstVisibleItem:l,firstVisiblePage:k, 3309$lastVisibleItem:h,lastVisiblePage:p,$anchorItem:h,anchorItemPreviousTop:h&&h.offset().top||0}}function B(a){a=e(a.target);var c=a.scrollTop();a.data("full-height");var b=a.position().top,f=a.height(),n=a.find(".js-widget-search2-nodelist-item");f=n.slice(-5).first().position().top-b<f;var g=n.slice(0,5).last();g=g.position().top-b+g.height()>b;var d=a.find(".js-fixed-event-year-header");if(0<c){var l=0;e.each(n,function(k,h){k=e(h);h=k.position().top-b;var p=k.height();if(0<h+p)return l=k.data("start-year"), 3310!1});d.css({top:b,width:n.first().width()}).text(l).removeClass("h-hide")}else d.addClass("h-hide");f?C(a,"bottom"):g&&C(a,"top")}function D(){e(".js-widget-search2").each(function(a,c){c=e(c);a=c.find(".js-fixed-event-year-header");c=c.find(".js-widget-search2-nodelist-item").first();a.css("width",c.width())})}function C(a,c){if(!r){r=!0;var b=a.closest(".js-widget-search2"),f=b.data("widget-id"),n=b.data("widget-instance-id"),g=a.data("search-max-page")||Number.POSITIVE_INFINITY,d=a.data("loaded-pages")|| 3311{};e.isEmptyObject(d)&&(b=b.data("current-page"),d={},d[b]=b,a.data("loaded-pages",d));var l=Object.keys(d).sort(function(k,h){return parseInt(k,10)-parseInt(h,10)});if("bottom"==c){if(b=d[l[l.length-1]]+1,g<b){r=!1;return}}else if("top"==c){if(b=d[l[0]]-1,1>b){r=!1;return}}else{r=!1;return}a.find(".js-loading").removeClass("h-hide");vBulletin.AJAX({call:"/ajax/render/widget_search2",data:{widgetinstanceid:n,widgetid:f,currentPage:b},success:function(k){var h=e(k).filter(".js-widget-search2"),p=h.find(".js-widget-search2-nodelist"), 3312m=p.find(".js-widget-search2-nodelist-item");k=F(a);var q=k.$items,u=q.first(),v=q.length,x=k.haveNodeids;p=p.data("search-has-more");h=h.data("current-page");d[h]=h;a.data("loaded-pages",d);p||a.data("search-max-page",h);e.each(m,function(w,y){w=e(y);y=w.data("nodeid");"undefined"==typeof x["nodeid"+y]&&("bottom"==c?a.append(w):"top"==c&&u.before(w),v++)});if(200<v){var t;m=a.find(".js-widget-search2-nodelist-item");"bottom"==c?t=d[l[0]]:"top"==c&&(t=d[l[l.length-1]]);m=m.filter("[data-page='"+t+ 3313"']");if(t<=k.firstVisiblePage||t>=k.lastVisiblePage)m.remove(),delete d[t],a.data("loaded-pages",d)}A(a);E(a,k)},complete:function(){a.find(".js-loading").addClass("h-hide");r=!1}})}}var r=!1;e(function(){var a=e(".js-widget-search2");a.length&&e.each(a,function(c,b){c=e(b);if("1"!=c.data("vb-continuous-scroll-initialized")){b=c.find(".js-widget-search2-nodelist");if(b.data("search-has-more")||b.find(".js-widget-search2-nodelist-item.h-hide").length){z(b);var f=b.parents(".js-show-on-tabs-create.h-hide"); 3314f.length&&f.removeClass("h-hide");b.css({height:b.height(),overflowY:"scroll"});f.length&&f.addClass("h-hide")}A(b);b.off("scroll",B).on("scroll",B);e(window).off("resize",D).on("resize",D);c.attr("vb-continuous-scroll-initialized","1")}})})})(jQuery); 3315; 3316 3317// ***************************
3318// js.compressed/module-tabbedcontainer.js 3319// *************************** 3320(function(b){function f(a){if("1"!=a.data("vb-tabbedcontainer-tabs-initialized")){var d=a.data("default-tab")||0;a.tabs({create:function(c,e){a.find(".js-tabs-loading-placeholder").remove();a.find(".js-show-on-tabs-create").removeClass("h-hide");a.tabs("option","active",d)},activate:function(c,e){e.newPanel.find(".js-parent-tab-render-listener").trigger("parent-tab-render")}});a.attr("data-vb-tabbedcontainer-tabs-initialized","1")}}b(function(){var a=b(".js-tabbedcontainer-widget-tab-wrapper");a.length&& 3321b.each(a,function(d,c){f(b(c))})})})(jQuery); 3322; 3323
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.