From f612b33a68e1a912121e3c9bdff3b481306a449e Mon Sep 17 00:00:00 2001 From: Marco Janc Date: Tue, 21 Feb 2017 02:29:23 +0100 Subject: [PATCH 01/19] Responsive, normalization, resize, load syncField - **responsive** useful for for mobile switching between portrait and landscape - **keep aspect ratio** responsive mode - **normalize data to target dimension** for different applications and resolutions the data in syncField / database is normalized to a targeted dimension - **allow resizing of signature if responsive** on resize signature is not cleared but resized accordingly - **init signature based on sync field** useful for ajax responses to redraw it --- jquery.signature.js | 216 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 198 insertions(+), 18 deletions(-) diff --git a/jquery.signature.js b/jquery.signature.js index 8174950..a221fe7 100644 --- a/jquery.signature.js +++ b/jquery.signature.js @@ -5,10 +5,22 @@ Available under the MIT (http://keith-wood.name/licence.html) license. Please attribute the author if you use it. */ +/* + + Following features added by Marco Janc (marcojanc{at}hotmail.com) February 2017: + + - responsive + - data normalization + - signature resizing + - signature loading by synchronized field */ + (function($) { // Hide scope, no $ conflict var signatureOverrides = { + // last canvas dimension for resizing + origDim : null, + // Global defaults for signature options: { distance: 0, // Minimum distance for a drag @@ -21,7 +33,11 @@ var signatureOverrides = { guidelineIndent: 10, // Guide line indent from the edges notAvailable: 'Your browser doesn\'t support signing', // Error message when no canvas syncField: null, // Selector for synchronised text field - change: null // Callback when signature changed + change: null, // Callback when signature changed + responsive : false, // Turns responsive features on, if screen resolution changes the element is resized and current signature redrawn + aspectRatio : null, // Aspect ratio on responsive resizing + keepSignature : false, // if true the signature is kept on resolution change + dataDim : null, // Optional json dimension data is normalized to }, /* Initialise a new signature area. */ @@ -46,23 +62,102 @@ var signatureOverrides = { } this.ctx = this.canvas.getContext('2d'); } + + // resize on window resize + if (this.options.responsive) + { + this.resize = true; + + var that = this; + var element = this.element; + + $(window).on("resize", function () { $('#' + element[0].id).signature('resizeResponsive'); }); + + // resize canvas on init if parent has percentage-width like 100% + // need timeout since width will be set to 0 or 100px since DOM not yet ready + // unnecessary if element width, height would be set as property + window.setTimeout(function () + { + var canvas = $(that.canvas); + + that.drawSyncField(); + that._initOrigDim(); + + element.signature('resizeResponsive'); + }, 500); + } + else + { + this.drawSyncField(); + this._initOrigDim(); + } + this._refresh(true); this._mouseInit(); }, + + /* Saves initial dimension for signature resizing */ + _initOrigDim : function() + { + // save original dimension for resizing + if (this.options.keepSignature) + { + var canvas = $(this.canvas); + this.origDim = [canvas.width(), canvas.height()]; + } + }, /* Refresh the appearance of the signature area. @param init (boolean, internal) true if initialising */ _refresh: function(init) { if (this.resize) { var parent = $(this.canvas); - $('div', this.canvas).css({width: parent.width(), height: parent.height()}); + var parentHeight = parent.height(); + + var width = this.element.width(); + var height = this.element.height(); + + // if no aspect ratio specified deduct it from element + var aspectRatio = this.options.aspectRatio; + if (!aspectRatio) + aspectRatio = this.element.width() / this.element.height(); + + // responsive resizing + height = Math.round(width / aspectRatio); + parentHeight = Math.round(width / aspectRatio); + + parent.attr('width', width); + parent.attr('height', height); + $('div', this.canvas).css({width: parent.width(), height: parentHeight}); + } + this._initMainCtx(); + + this.clear(init); + }, + + /* + * Redraw signature + */ + resizeResponsive: function() + { + if (this.options.responsive) + { + // redraw image after resize + var json = this.toJSON(); + this.resize = true; + this._refresh(false); + this.draw(json); } - this.ctx.fillStyle = this.options.background; - this.ctx.strokeStyle = this.options.color; - this.ctx.lineWidth = this.options.thickness; + }, + + /* Initializes the context with the main option */ + _initMainCtx: function() { + var options = this.options; + this.ctx.fillStyle = options.background; + this.ctx.strokeStyle = options.color; + this.ctx.lineWidth = options.thickness; this.ctx.lineCap = 'round'; this.ctx.lineJoin = 'round'; - this.clear(init); }, /* Clear the signature area. @@ -82,16 +177,17 @@ var signatureOverrides = { this.ctx.restore(); } this.lines = []; - if (!init) { + if (!init) this._changed(); - } }, /* Synchronise changes and trigger change event. @param event (Event) the triggering event */ _changed: function(event) { - if (this.options.syncField) { - $(this.options.syncField).val(this.toJSON()); + if (this.options.syncField) + { + var json = this.lines.length == 0 ? null : this._toNormalizedJSON(this.options.dataDim); + $(this.options.syncField).val(json); } this._trigger('change', event, {}); }, @@ -114,6 +210,44 @@ var signatureOverrides = { _mouseCapture: function(event) { return !this.options.disabled; }, + + /* + * Get data point for mouse event + * @param event (Event) the triggering mouse event */ + _mouseGetPoint : function(event) + { + var x = event.clientX - this.offset.left; + var y = event.clientY - this.offset.top; + + return [this._round(x), this._round(y)]; + }, + + /* + * @param encode + * @param x X-coordinate + * @param y Y-coordinate + * @param dim Dimension to normalize to if responsive + */ + _convertPoint : function(encode, x, y, dim) + { + var canvas = $(this.canvas); + + if (dim) + { + if (encode) + { + x = (x / canvas.width()) * dim[0]; + y = (y / canvas.height()) * dim[1]; + } + else + { + x = (x / dim[0]) * canvas.width(); + y = (y / dim[1]) * canvas.height(); + } + } + + return [this._round(x), this._round(y)]; + }, /* Start a new line. @param event (Event) the triggering mouse event */ @@ -121,8 +255,8 @@ var signatureOverrides = { this.offset = this.element.offset(); this.offset.left -= document.documentElement.scrollLeft || document.body.scrollLeft; this.offset.top -= document.documentElement.scrollTop || document.body.scrollTop; - this.lastPoint = [this._round(event.clientX - this.offset.left), - this._round(event.clientY - this.offset.top)]; + + this.lastPoint = this._mouseGetPoint(event); this.curLine = [this.lastPoint]; this.lines.push(this.curLine); }, @@ -130,8 +264,7 @@ var signatureOverrides = { /* Track the mouse. @param event (Event) the triggering mouse event */ _mouseDrag: function(event) { - var point = [this._round(event.clientX - this.offset.left), - this._round(event.clientY - this.offset.top)]; + var point = this._mouseGetPoint(event); this.curLine.push(point); this.ctx.beginPath(); this.ctx.moveTo(this.lastPoint[0], this.lastPoint[1]); @@ -162,12 +295,21 @@ var signatureOverrides = { /* Convert the captured lines to JSON text. @return (string) the JSON text version of the lines */ toJSON: function() { + return this._toNormalizedJSON(this.origDim); + }, + + /* Convert the captured lines to JSON text. + * @param Resizing dimension if responsive + @return (string) the JSON text version of the lines */ + _toNormalizedJSON : function(dim) + { + var that = this; return '{"lines":[' + $.map(this.lines, function(line) { return '[' + $.map(line, function(point) { - return '[' + point + ']'; + return '[' + that._convertPoint(true, point[0], point[1], dim) + ']'; }) + ']'; }) + ']}'; - }, + }, /* Convert the captured lines to SVG text. @return (string) the SVG text version of the lines */ @@ -187,25 +329,62 @@ var signatureOverrides = { ' \n \n\n'; }, + /* draw signature from synchronized field */ + drawSyncField : function() + { + if (this.options.syncField) + { + var json = $(this.options.syncField).val(); + if (json.trim() != "") + this._draw(json, this.options.dataDim); + } + }, + /* Draw a signature from its JSON description. @param sigJSON (object) object with attribute lines being an array of arrays of points or (string) text version of the JSON */ draw: function(sigJSON) { + this._draw(sigJSON, this.origDim); + this._changed(); + }, + + + /* Draw a signature from its JSON description and the given dimension. + * + @param sigJSON (object) object with attribute lines + being an array of arrays of points or + (string) text version of the JSON + @param dimension*/ + _draw : function(sigJSON, dim) { this.clear(true); if (typeof sigJSON === 'string') { - sigJSON = $.parseJSON(sigJSON); + try { + sigJSON = $.parseJSON(sigJSON); + } + catch(err) { + return; + } } + this.lines = sigJSON.lines || []; var ctx = this.ctx; + var that = this; + + // init context - if responsive options were lost + this._initMainCtx(); + $.each(this.lines, function() { ctx.beginPath(); + $.each(this, function(i) { + var point = that._convertPoint(false, this[0], this[1], dim); + this[0] = point[0]; + this[1] = point[1]; ctx[i === 0 ? 'moveTo' : 'lineTo'](this[0], this[1]); }); ctx.stroke(); }); - this._changed(); }, /* Determine whether or not any drawing has occurred. @@ -248,5 +427,6 @@ $.widget('kbw.signature', $.ui.mouse, signatureOverrides); // Make some things more accessible $.kbw.signature.options = $.kbw.signature.prototype.options; +$.kbw.signature.origDim = $.kbw.signature.prototype.origDim; })(jQuery); From 214c8222f585305a38d1d3d60158a57a4eeeb9cb Mon Sep 17 00:00:00 2001 From: Marco Janc Date: Tue, 21 Feb 2017 02:34:46 +0100 Subject: [PATCH 02/19] Demo for new responsive features --- demo/index.html | 142 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 demo/index.html diff --git a/demo/index.html b/demo/index.html new file mode 100644 index 0000000..9da3f87 --- /dev/null +++ b/demo/index.html @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + +
+ +

1. Data range normalization

+ + +

+ Dimension of input canvas is 600 x 300. Create a point exactly at right bottom corner 600 x 300. + With data normalization active, the final json point is 400 x 200 instead. +

+

+ This is useful in case you capture data from multiple applications or have responsive layout like on a mobile + device where you switch between landscape and portrait view and want to save normalized data. +

+ +

Json

+ + +

Input

+
+ + + + +

2. Responsive - width

+ +

+ Responsive behavior activated with fixed height. +

+ +
+ + + +

3. Responsive - width + height

+ +

+ Responsive behavior activated with dynamic height using aspect ratio. + Useful when switching between landscape and portrait view on mobile device. +

+ +
+ + + +

4. Responsive - width + height + signature resizing

+ +

+ Responsive behavior activated with dynamic height using aspect ratio. + Useful when switching between landscape and portrait view on mobile device. + Best seen if a square is drawn in the middle or a dot in bottom right corner and window is resized. +

+ +
+ + + + +

5. All features

+ +

Json

+ + +

Input

+ +
+ + + +
+ + From 44effb4293774ed488e613ae08a2e83a6550168f Mon Sep 17 00:00:00 2001 From: Marco Janc Date: Tue, 21 Feb 2017 02:41:40 +0100 Subject: [PATCH 03/19] use cdn resources --- demo/index.html | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/demo/index.html b/demo/index.html index 9da3f87..8bc7130 100644 --- a/demo/index.html +++ b/demo/index.html @@ -4,15 +4,21 @@ - - - - + + + + + + + + - + + + From 5459b59c3f37bf50a76526889ecf379f6708c8b5 Mon Sep 17 00:00:00 2001 From: Marco Janc Date: Tue, 21 Feb 2017 02:44:05 +0100 Subject: [PATCH 04/19] Create core.js --- test/resources/primefaces/core.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/resources/primefaces/core.js diff --git a/test/resources/primefaces/core.js b/test/resources/primefaces/core.js new file mode 100644 index 0000000..df3cb6a --- /dev/null +++ b/test/resources/primefaces/core.js @@ -0,0 +1,7 @@ +(function(a){if(a.PrimeFaces){a.PrimeFaces.debug("PrimeFaces already loaded, ignoring duplicate execution.");return}var b={escapeClientId:function(c){return"#"+c.replace(/:/g,"\\:")},cleanWatermarks:function(){$.watermark.hideAll()},showWatermarks:function(){$.watermark.showAll()},getWidgetById:function(e){for(var d in b.widgets){var c=b.widgets[d];if(c&&c.id===e){return c}}return null},addSubmitParam:function(d,f){var e=$(this.escapeClientId(d));for(var c in f){e.append('')}return this},submit:function(e,d){var c=$(this.escapeClientId(e));if(d){c.attr("target",d)}c.submit().children("input.ui-submit-param").remove()},attachBehaviors:function(d,c){$.each(c,function(f,e){d.bind(f,function(g){e.call(d,g)})})},getCookie:function(c){return $.cookie(c)},setCookie:function(d,e,c){$.cookie(d,e,c)},deleteCookie:function(d,c){$.removeCookie(d,c)},cookiesEnabled:function(){var c=(navigator.cookieEnabled)?true:false;if(typeof navigator.cookieEnabled==="undefined"&&!c){document.cookie="testcookie";c=(document.cookie.indexOf("testcookie")!==-1)?true:false}return(c)},skinInput:function(c){c.hover(function(){$(this).addClass("ui-state-hover")},function(){$(this).removeClass("ui-state-hover")}).focus(function(){$(this).addClass("ui-state-focus")}).blur(function(){$(this).removeClass("ui-state-focus")});c.attr("role","textbox").attr("aria-disabled",c.is(":disabled")).attr("aria-readonly",c.prop("readonly"));if(c.is("textarea")){c.attr("aria-multiline",true)}return this},skinButton:function(c){c.mouseover(function(){var e=$(this);if(!c.prop("disabled")){e.addClass("ui-state-hover")}}).mouseout(function(){$(this).removeClass("ui-state-active ui-state-hover")}).mousedown(function(){var e=$(this);if(!c.prop("disabled")){e.addClass("ui-state-active").removeClass("ui-state-hover")}}).mouseup(function(){$(this).removeClass("ui-state-active").addClass("ui-state-hover")}).focus(function(){$(this).addClass("ui-state-focus")}).blur(function(){$(this).removeClass("ui-state-focus ui-state-active")}).keydown(function(f){if(f.which===$.ui.keyCode.SPACE||f.which===$.ui.keyCode.ENTER||f.which===$.ui.keyCode.NUMPAD_ENTER){$(this).addClass("ui-state-active")}}).keyup(function(){$(this).removeClass("ui-state-active")});var d=c.attr("role");if(!d){c.attr("role","button")}c.attr("aria-disabled",c.prop("disabled"));return this},skinSelect:function(c){c.mouseover(function(){var d=$(this);if(!d.hasClass("ui-state-focus")){d.addClass("ui-state-hover")}}).mouseout(function(){$(this).removeClass("ui-state-hover")}).focus(function(){$(this).addClass("ui-state-focus").removeClass("ui-state-hover")}).blur(function(){$(this).removeClass("ui-state-focus ui-state-hover")});return this},isIE:function(c){return b.env.isIE(c)},info:function(c){if(this.logger){this.logger.info(c)}},debug:function(c){if(this.logger){this.logger.debug(c)}},warn:function(c){if(this.logger){this.logger.warn(c)}if(b.isDevelopmentProjectStage()&&a.console){console.log(c)}},error:function(c){if(this.logger){this.logger.error(c)}if(b.isDevelopmentProjectStage()&&a.console){console.log(c)}},isDevelopmentProjectStage:function(){return b.settings.projectStage==="Development"},setCaretToEnd:function(d){if(d){d.focus();var e=d.value.length;if(e>0){if(d.setSelectionRange){d.setSelectionRange(0,e)}else{if(d.createTextRange){var c=d.createTextRange();c.collapse(true);c.moveEnd("character",1);c.moveStart("character",1);c.select()}}}}},changeTheme:function(g){if(g&&g!==""){var h=$('link[href*="'+b.RESOURCE_IDENTIFIER+'/theme.css"]');if(h.length===0){h=$('link[href*="'+b.RESOURCE_IDENTIFIER+'=theme.css"]')}var f=h.attr("href"),e=f.split("&")[0],d=e.split("ln=")[1],c=f.replace(d,"primefaces-"+g);h.attr("href",c)}},escapeRegExp:function(c){return this.escapeHTML(c.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"))},escapeHTML:function(c){return c.replace(/&/g,"&").replace(//g,">")},clearSelection:function(){if(a.getSelection){if(a.getSelection().empty){a.getSelection().empty()}else{if(a.getSelection().removeAllRanges){a.getSelection().removeAllRanges()}}}else{if(document.selection&&document.selection.empty){try{document.selection.empty()}catch(c){}}}},getSelection:function(){var c="";if(a.getSelection){c=a.getSelection()}else{if(document.getSelection){c=document.getSelection()}else{if(document.selection){c=document.selection.createRange().text}}}return c},hasSelection:function(){return this.getSelection().length>0},cw:function(d,e,c){this.createWidget(d,e,c)},createWidget:function(d,f,c){c.widgetVar=f;if(this.widget[d]){var e=this.widgets[f];if(e&&(e.constructor===this.widget[d])){e.refresh(c)}else{this.widgets[f]=new this.widget[d](c);if(this.settings.legacyWidgetNamespace){a[f]=this.widgets[f]}}}else{b.error("Widget not available: "+d)}},getFacesResource:function(f,e,c){if(f.indexOf("/")===0){f=f.substring(1,f.length)}var d=$('script[src*="/'+b.RESOURCE_IDENTIFIER+'/core.js"]').attr("src");if(!d){d=$('script[src*="'+b.RESOURCE_IDENTIFIER+'=core.js"]').attr("src")}d=d.replace("core.js",f);d=d.replace("ln=primefaces","ln="+e);if(c){var h=new RegExp("[?&]v=([^&]*)").exec(d)[1];d=d.replace("v="+h,"v="+c)}var g=a.location.protocol+"//"+a.location.host;return d.indexOf(g)>=0?d:g+d},inArray:function(c,e){for(var d=0;de){d.scrollTop(c+h-e+i)}}},calculateScrollbarWidth:function(){if(!this.scrollbarWidth){if(b.env.browser.msie){var e=$('').css({position:"absolute",top:-1000,left:-1000}).appendTo("body"),d=$('').css({position:"absolute",top:-1000,left:-1000}).appendTo("body");this.scrollbarWidth=e.width()-d.width();e.add(d).remove()}else{var c=$("
").css({width:100,height:100,overflow:"auto",position:"absolute",top:-1000,left:-1000}).prependTo("body").append("
").find("div").css({width:"100%",height:200});this.scrollbarWidth=100-c.width();c.parent().remove()}}return this.scrollbarWidth},bcn:function(d,e,g){if(g){for(var c=0;c=0;d--){var c=this.deferredRenders[d];if(c.widget===e){this.deferredRenders.splice(d,1)}}},invokeDeferredRenders:function(c){var g=[];for(var f=0;f=0&&/(rv)(?::| )([\w.]+)/.exec(h)||h.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(h)||[];var f=/(ipad)/.exec(h)||/(iphone)/.exec(h)||/(android)/.exec(h)||/(windows phone)/.exec(h)||/(win)/.exec(h)||/(mac)/.exec(h)||/(linux)/.exec(h)||/(cros)/i.exec(h)||[];return{browser:g[3]||g[1]||"",version:g[2]||"0",platform:f[0]||""}};a=jQuery.uaMatch(window.navigator.userAgent);d={};if(a.browser){d[a.browser]=true;d.version=a.version;d.versionNumber=parseInt(a.version)}if(a.platform){d[a.platform]=true}if(d.android||d.ipad||d.iphone||d["windows phone"]){d.mobile=true}if(d.cros||d.mac||d.linux||d.win){d.desktop=true}if(d.chrome||d.opr||d.safari){d.webkit=true}if(d.rv){var e="msie";a.browser=e;d[e]=true}if(d.opr){var c="opera";a.browser=c;d[c]=true}if(d.safari&&d.android){var b="android";a.browser=b;d[b]=true}d.name=a.browser;d.platform=a.platform;this.browser=d;$.browser=d}},isIE:function(a){return(a===undefined)?this.browser.msie:(this.browser.msie&&parseInt(this.browser.version,10)===a)},isLtIE:function(a){return(this.browser.msie)?parseInt(this.browser.version,10)')}},loadScripts:function(b){var a=function(){var c=b.shift();if(c){PrimeFaces.getScript(c,a)}};a()},getContent:function(c){var b="";for(var a=0;a0){f.val(e)}else{c.append('')}}}},updateHead:function(d){var b=$.ajaxSetup()["cache"];$.ajaxSetup()["cache"]=true;var a=new RegExp("]*>","gi").exec(d)[0];var c=d.indexOf(a)+a.length;$("head").html(d.substring(c,d.lastIndexOf("")));$.ajaxSetup()["cache"]=b},updateBody:function(b){var c=new RegExp("]*>","gi").exec(b)[0];var a=b.indexOf(c)+c.length;$("body").html(b.substring(a,b.lastIndexOf("")))},updateElement:function(d,b,c){if(d.indexOf(PrimeFaces.VIEW_STATE)!==-1){PrimeFaces.ajax.Utils.updateFormStateInput(PrimeFaces.VIEW_STATE,b,c)}else{if(d.indexOf(PrimeFaces.CLIENT_WINDOW)!==-1){PrimeFaces.ajax.Utils.updateFormStateInput(PrimeFaces.CLIENT_WINDOW,b,c)}else{if(d===PrimeFaces.VIEW_ROOT){var a=PrimeFaces.ajax.Utils;window.PrimeFaces=null;a.updateHead(b);a.updateBody(b)}else{if(d===PrimeFaces.ajax.VIEW_HEAD){PrimeFaces.ajax.Utils.updateHead(b)}else{if(d===PrimeFaces.ajax.VIEW_BODY){PrimeFaces.ajax.Utils.updateBody(b)}else{if(d===$("head")[0].id){PrimeFaces.ajax.Utils.updateHead(b)}else{$(PrimeFaces.escapeClientId(d)).replaceWith(b)}}}}}}}},Queue:{delays:{},requests:new Array(),xhrs:new Array(),offer:function(a){if(a.delay){var b=null,d=this,b=(typeof(a.source)==="string")?a.source:$(a.source).attr("id"),c=function(){return setTimeout(function(){d.requests.push(a);if(d.requests.length===1){PrimeFaces.ajax.Request.send(a)}},a.delay)};if(this.delays[b]){clearTimeout(this.delays[b].timeout);this.delays[b].timeout=c()}else{this.delays[b]={timeout:c()}}}else{this.requests.push(a);if(this.requests.length===1){PrimeFaces.ajax.Request.send(a)}}},poll:function(){if(this.isEmpty()){return null}var b=this.requests.shift(),a=this.peek();if(a){PrimeFaces.ajax.Request.send(a)}return b},peek:function(){if(this.isEmpty()){return null}return this.requests[0]},isEmpty:function(){return this.requests.length===0},addXHR:function(a){this.xhrs.push(a)},removeXHR:function(b){var a=$.inArray(b,this.xhrs);if(a>-1){this.xhrs.splice(a,1)}},abortAll:function(){for(var a=0;a0){n='form[action="'+v+'"]';v=t.val()}PrimeFaces.debug("URL to post "+v+".");var m=PrimeFaces.ajax.Request.extractParameterNamespace(b);PrimeFaces.ajax.Request.addParam(g,PrimeFaces.PARTIAL_REQUEST_PARAM,true,m);PrimeFaces.ajax.Request.addParam(g,PrimeFaces.PARTIAL_SOURCE_PARAM,f,m);if(e.resetValues){PrimeFaces.ajax.Request.addParam(g,PrimeFaces.RESET_VALUES_PARAM,true,m)}if(e.ignoreAutoUpdate){PrimeFaces.ajax.Request.addParam(g,PrimeFaces.IGNORE_AUTO_UPDATE_PARAM,true,m)}if(e.skipChildren===false){PrimeFaces.ajax.Request.addParam(g,PrimeFaces.SKIP_CHILDREN_PARAM,false,m)}var s=PrimeFaces.ajax.Request.resolveComponentsForAjaxCall(e,"process");if(e.fragmentId){s.push(e.fragmentId)}var a="@none";if(s.length>0){a=s.join(" ")}else{var j=PrimeFaces.ajax.Request.resolveComponentsForAjaxCall(e,"process");j=$.trim(j);if(j===""){a="@all"}}if(a!=="@none"){PrimeFaces.ajax.Request.addParam(g,PrimeFaces.PARTIAL_PROCESS_PARAM,a,m)}var d=PrimeFaces.ajax.Request.resolveComponentsForAjaxCall(e,"update");if(e.fragmentId&&e.fragmentUpdate){d.push(e.fragmentId)}if(d.length>0){PrimeFaces.ajax.Request.addParam(g,PrimeFaces.PARTIAL_UPDATE_PARAM,d.join(" "),m)}if(e.event){PrimeFaces.ajax.Request.addParam(g,PrimeFaces.BEHAVIOR_EVENT_PARAM,e.event,m);var l=e.event;if(e.event==="valueChange"){l="change"}else{if(e.event==="action"){l="click"}}PrimeFaces.ajax.Request.addParam(g,PrimeFaces.PARTIAL_EVENT_PARAM,l,m)}else{PrimeFaces.ajax.Request.addParam(g,f,f,m)}if(e.params){PrimeFaces.ajax.Request.addParams(g,e.params,m)}if(e.ext&&e.ext.params){PrimeFaces.ajax.Request.addParams(g,e.ext.params,m)}if(e.partialSubmit&&a.indexOf("@all")===-1){var p=false,h=e.partialSubmitFilter||":input";if(a.indexOf("@none")===-1){for(var q=0;q0){var d=a.val();PrimeFaces.ajax.Request.addParam(f,b,d,e)}},extractParameterNamespace:function(c){var a=c.children("input[name*='"+PrimeFaces.VIEW_STATE+"']");if(a&&a.length>0){var b=a[0].name;if(b.length>PrimeFaces.VIEW_STATE.length){return b.substring(0,b.indexOf(PrimeFaces.VIEW_STATE))}}return null}},Response:{handle:function(h,e,m,b){var n=h.getElementsByTagName("partial-response")[0];for(var g=0;g0&&c.is("input")&&$.isFunction($.fn.getSelection)){f=c.getSelection()}for(var d=0;d0){if(g=="@none"||g=="@all"){continue}if(g.indexOf("@")==-1){e=e.add($(document.getElementById(g)))}else{if(g.indexOf("@widgetVar(")==0){var f=g.substring(11,g.length-1);var d=PrimeFaces.widgets[f];if(d){e=e.add($(document.getElementById(d.id)))}else{PrimeFaces.error('Widget for widgetVar "'+f+'" not avaiable')}}else{if(g.indexOf("@(")==0){e=e.add($(g.substring(2,g.length-1)))}}}}}}return e},resolveComponents:function(l){var k=PrimeFaces.expressions.SearchExpressionFacade.splitExpressions(l),c=[];if(k){for(var g=0;g0){if(m.indexOf("@")==-1||m=="@none"||m=="@all"){if(!PrimeFaces.inArray(c,m)){c.push(m)}}else{if(m.indexOf("@widgetVar(")==0){var d=m.substring(11,m.length-1),h=PrimeFaces.widgets[d];if(h){if(!PrimeFaces.inArray(c,h.id)){c.push(h.id)}}else{PrimeFaces.error('Widget for widgetVar "'+d+'" not avaiable')}}else{if(m.indexOf("@(")==0){var b=$(m.substring(2,m.length-1));for(var e=0;e Date: Tue, 21 Feb 2017 02:44:25 +0100 Subject: [PATCH 05/19] Create components-mobile.js --- test/resources/primefaces/components-mobile.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/resources/primefaces/components-mobile.js diff --git a/test/resources/primefaces/components-mobile.js b/test/resources/primefaces/components-mobile.js new file mode 100644 index 0000000..0193ee7 --- /dev/null +++ b/test/resources/primefaces/components-mobile.js @@ -0,0 +1,15 @@ +$(document).on("pfAjaxStart",function(){$.mobile.loading("show")});$(document).on("pfAjaxComplete",function(){$.mobile.loading("hide")});PrimeFaces.confirm=function(a){if(PrimeFaces.confirmDialog){PrimeFaces.confirmSource=(typeof(a.source)==="string")?$(PrimeFaces.escapeClientId(a.source)):$(a.source);PrimeFaces.confirmDialog.showMessage(a)}else{PrimeFaces.warn("No global confirmation dialog available.")}};PrimeFaces.Mobile={navigate:function(e,a){a.changeHash=a.changeHash||false;var d=$(e);if(d.hasClass("ui-lazypage")){var b=e.substring(1),c={source:b,process:b,update:b,params:[{name:b+"_lazyload",value:true}],oncomplete:function(){$(e).page();$("body").pagecontainer("change",e,a)}};PrimeFaces.ajax.Request.handle(c)}else{$("body").pagecontainer("change",e,a)}}}; +PrimeFaces.widget.AccordionPanel=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.tabs=this.jq.children(".ui-collapsible");this.headers=this.tabs.children(".ui-collapsible-heading");this.contents=this.tabs.children(".ui-collapsible-content");this.stateHolder=$(this.jqId+"_active");this.initActive();this.bindEvents();if(this.cfg.dynamic&&this.cfg.cache){this.markLoadedPanels()}},initActive:function(){if(this.cfg.multiple){var a=this.stateHolder.val().split(",");for(var b=0;b=0){this.markAsLoaded(this.tabs.eq(this.cfg.active[a]))}}}else{if(this.cfg.active>=0){this.markAsLoaded(this.tabs.eq(this.cfg.active))}}},select:function(b){var c=this.tabs.eq(b);if(this.cfg.onTabChange){var a=this.cfg.onTabChange.call(this,c);if(a===false){return false}}var d=this.cfg.dynamic&&!this.isLoaded(c);if(this.cfg.multiple){this.addToSelection(b)}else{this.cfg.active=b}this.saveState();if(d){this.loadDynamicTab(c)}else{this.show(c);this.fireTabChangeEvent(c)}return true},show:function(a){var c=a.children(".ui-collapsible-heading"),b=a.children(".ui-collapsible-content");if(!this.cfg.multiple){this.close(this.tabs.filter(":not(.ui-collapsible-collapsed)"))}a.removeClass("ui-collapsible-collapsed").attr("aria-expanded",true);c.removeClass("ui-collapsible-heading-collapsed").children(".ui-collapsible-heading-toggle").removeClass("ui-icon-plus").addClass("ui-icon-minus");b.removeClass("ui-collapsible-content-collapsed").attr("aria-hidden",false).show();PrimeFaces.invokeDeferredRenders(this.id)},close:function(a){a.addClass("ui-collapsible-collapsed").attr("aria-expanded",false);a.children(".ui-collapsible-heading").addClass("ui-collapsible-heading-collapsed").children(".ui-collapsible-heading-toggle").addClass("ui-collapsible-heading-collapsed").removeClass("ui-icon-minus").addClass("ui-icon-plus");a.children(".ui-collapsible-content").attr("aria-hidden",true).addClass("ui-collapsible-content-collapsed").attr("aria-hidden",true).hide()},unselect:function(a){this.close(this.tabs.eq(a));this.removeFromSelection(a);this.saveState();if(this.hasBehavior("tabClose")){this.fireTabCloseEvent(tab)}},addToSelection:function(a){this.cfg.active.push(a)},removeFromSelection:function(a){this.cfg.active=$.grep(this.cfg.active,function(b){return(b!==a)})},saveState:function(){if(this.cfg.multiple){this.stateHolder.val(this.cfg.active.join(","))}else{this.stateHolder.val(this.cfg.active)}},loadDynamicTab:function(b){var c=this,a={source:this.id,process:this.id,update:this.id,params:[{name:this.id+"_contentLoad",value:true},{name:this.id+"_newTab",value:b.attr("id")},{name:this.id+"_tabindex",value:b.index()}],onsuccess:function(f,d,e){PrimeFaces.ajax.Response.handle(f,d,e,{widget:c,handle:function(g){b.find("> .ui-collapsible-content > p").html(g);if(this.cfg.cache){this.markAsLoaded(b)}}});return true},oncomplete:function(){c.show(b)}};if(this.hasBehavior("tabChange")){this.cfg.behaviors.tabChange.call(this,a)}else{PrimeFaces.ajax.AjaxRequest(a)}},fireTabChangeEvent:function(b){if(this.hasBehavior("tabChange")){var c=this.cfg.behaviors.tabChange,a={params:[{name:this.id+"_newTab",value:b.attr("id")},{name:this.id+"_tabindex",value:parseInt(b.index())}]};c.call(this,a)}},fireTabCloseEvent:function(b){var c=this.cfg.behaviors.tabClose,a={params:[{name:this.id+"_tabId",value:b.attr("id")},{name:this.id+"_tabindex",value:parseInt(b.index())}]};c.call(this,a)},markAsLoaded:function(a){a.data("loaded",true)},isLoaded:function(a){return a.data("loaded")===true},hasBehavior:function(a){if(this.cfg.behaviors){return this.cfg.behaviors[a]!=undefined}return false}}); +PrimeFaces.widget.AutoComplete=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.cfg.minLength=(this.cfg.minLength!==undefined)?this.cfg.minLength:1;this.cfg.delay=(this.cfg.delay!==undefined)?this.cfg.delay:300;this.inputContainer=this.jq.children(".ui-input-search");this.input=$(this.jqId+"_input");this.hinput=$(this.jqId+"_hinput");this.clearIcon=this.inputContainer.children(".ui-input-clear");this.cfg.pojo=(this.hinput.length===1);this.panel=this.jq.children(".ui-controlgroup");this.itemContainer=this.panel.children(".ui-controlgroup-controls");this.bindEvents();this.input.data(PrimeFaces.CLIENT_ID_DATA,this.id);this.hinput.data(PrimeFaces.CLIENT_ID_DATA,this.id)},bindEvents:function(){var a=this;this.input.on("keyup.autoComplete",function(c){var b=a.input.val();if(b.length===0){a.hide()}else{a.showClearIcon()}if(b.length>=a.cfg.minLength){if(a.timeout){clearTimeout(a.timeout)}a.timeout=setTimeout(function(){a.search(b)},a.cfg.delay)}});this.clearIcon.on("click.autoComplete",function(b){a.input.val("");a.hinput.val("");a.hide()})},bindDynamicEvents:function(){var a=this;this.items.on("click.autoComplete",function(c){var b=$(this),d=b.attr("data-item-value");a.input.val(b.attr("data-item-label")).focus();if(a.cfg.pojo){a.hinput.val(d)}a.fireItemSelectEvent(c,d);a.hide()})},search:function(c){if(c===undefined||c===null){return}var d=this,b={source:this.id,process:this.id,update:this.id,formId:this.cfg.formId,onsuccess:function(g,e,f){PrimeFaces.ajax.Response.handle(g,e,f,{widget:d,handle:function(h){this.itemContainer.html(h);this.showSuggestions()}});return true}};b.params=[{name:this.id+"_query",value:c}];if(this.hasBehavior("query")){var a=this.cfg.behaviors.query;a.call(this,b)}else{PrimeFaces.ajax.Request.handle(b)}},show:function(){this.panel.removeClass("ui-screen-hidden")},hide:function(){this.panel.addClass("ui-screen-hidden");this.hideClearIcon()},showSuggestions:function(){this.items=this.itemContainer.children(".ui-autocomplete-item");this.bindDynamicEvents();if(this.items.length){this.items.first().addClass("ui-first-child");this.items.last().addClass("ui-last-child");if(this.panel.is(":hidden")){this.show()}}else{if(this.cfg.emptyMessage){var a='
'+this.cfg.emptyMessage+"
";this.itemContainer.html(a)}else{this.hide()}}},fireItemSelectEvent:function(b,c){if(this.hasBehavior("itemSelect")){var a={params:[{name:this.id+"_itemSelect",value:c}]};this.cfg.behaviors.itemSelect.call(this,a)}},hasBehavior:function(a){if(this.cfg.behaviors){return this.cfg.behaviors[a]!==undefined}return false},showClearIcon:function(){this.clearIcon.removeClass("ui-input-clear-hidden")},hideClearIcon:function(){this.clearIcon.addClass("ui-input-clear-hidden")}}); +PrimeFaces.widget.Calendar=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.cfg.inline=!this.cfg.popup;this.input=$(this.jqId+"_input");var b=this;this.configureLocale();this.cfg.beforeShowDay=function(c){if(b.cfg.preShowDay){return b.cfg.preShowDay(c)}else{if(b.cfg.disabledWeekends){return $.datepicker.noWeekends(c)}else{return[true,""]}}};this.bindEvents();if(!this.cfg.disabled){this.input.date(this.cfg)}this.input.data(PrimeFaces.CLIENT_ID_DATA,this.id)},refresh:function(a){this.init(a)},configureLocale:function(){var a=PrimeFaces.locales[this.cfg.locale];if(a){for(var b in a){if(a.hasOwnProperty(b)){this.cfg[b]=a[b]}}}},bindEvents:function(){var a=this;this.cfg.onSelect=function(){a.fireDateSelectEvent();setTimeout(function(){a.input.date("addMobileStyle")},0)}},fireDateSelectEvent:function(){if(this.cfg.behaviors){var a=this.cfg.behaviors.dateSelect;if(a){a.call(this)}}},setDate:function(a){this.input.date("setDate",a)},getDate:function(){return this.input.date("getDate")},enable:function(){this.input.date("enable")},disable:function(){this.input.date("disable")}}); +PrimeFaces.widget.DataList=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.list=$(this.jqId+"_list");this.content=this.jq.children(".ui-datalist-content");this.list.listview();this.items=this.list.children("li");if(this.content.prevAll("[class^='ui-bar']").length){this.jq.addClass("ui-datalist-topbar")}if(this.content.nextAll("[class^='ui-bar']").length){this.jq.addClass("ui-datalist-bottombar")}this.bindEvents()},bindEvents:function(){if(this.cfg.paginator){this.bindPaginator()}if(this.cfg.behaviors){var a=this;$.each(this.cfg.behaviors,function(b,c){a.items.on(b,function(){var d={params:[{name:a.id+"_item",value:$(this).index()}]};c.call(a,d)})})}},bindPaginator:function(){var a=this;this.cfg.paginator.paginate=function(b){a.paginate(b)};this.paginator=new PrimeFaces.widget.Paginator(this.cfg.paginator)},paginate:function(d){var c=this,b={source:this.id,update:this.id,process:this.id,formId:this.cfg.formId,params:[{name:this.id+"_pagination",value:true},{name:this.id+"_first",value:d.first},{name:this.id+"_rows",value:d.rows}],onsuccess:function(g,e,f){PrimeFaces.ajax.Response.handle(g,e,f,{widget:c,handle:function(h){this.content.html(h);this.list=$(this.jqId+"_list");this.list.listview()}});return true},oncomplete:function(){c.paginator.cfg.page=d.page;c.paginator.updateUI()}};if(this.hasBehavior("page")){var a=this.cfg.behaviors.page;a.call(this,b)}else{PrimeFaces.ajax.Request.handle(b)}},getPaginator:function(){return this.paginator},hasBehavior:function(a){if(this.cfg.behaviors){return this.cfg.behaviors[a]!==undefined}return false}}); +PrimeFaces.widget.DataGrid=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.content=$(this.jqId+"_content");this.bindEvents()},bindEvents:function(){if(this.cfg.paginator){this.bindPaginator()}},bindPaginator:function(){var a=this;this.cfg.paginator.paginate=function(b){a.paginate(b)};this.paginator=new PrimeFaces.widget.Paginator(this.cfg.paginator)},paginate:function(d){var c=this,b={source:this.id,update:this.id,process:this.id,formId:this.cfg.formId,params:[{name:this.id+"_pagination",value:true},{name:this.id+"_first",value:d.first},{name:this.id+"_rows",value:d.rows}],onsuccess:function(g,e,f){PrimeFaces.ajax.Response.handle(g,e,f,{widget:c,handle:function(h){this.content.html(h)}});return true},oncomplete:function(){c.paginator.cfg.page=d.page;c.paginator.updateUI()}};if(this.hasBehavior("page")){var a=this.cfg.behaviors.page;a.call(this,b)}else{PrimeFaces.ajax.Request.handle(b)}},getPaginator:function(){return this.paginator},hasBehavior:function(a){if(this.cfg.behaviors){return this.cfg.behaviors[a]!==undefined}return false}}); +PrimeFaces.widget.DataTable=PrimeFaces.widget.BaseWidget.extend({SORT_ORDER:{ASCENDING:1,DESCENDING:-1,UNSORTED:0},init:function(a){this._super(a);this.thead=$(this.jqId+"_head");this.tbody=$(this.jqId+"_data");this.bindEvents()},bindEvents:function(){if(this.cfg.paginator){this.bindPaginator()}this.bindSortEvents();if(this.cfg.selectionMode){this.bindSelection()}this.bindMobileEvents()},bindPaginator:function(){var a=this;this.cfg.paginator.paginate=function(b){a.paginate(b)};this.paginator=new PrimeFaces.widget.Paginator(this.cfg.paginator)},bindSortEvents:function(){var e=this;this.sortableColumns=this.thead.find("> tr > th.ui-sortable-column");for(var b=0;b1){var h=e.sortableColumns.eq(parseInt(j[0])),g=parseInt(j[1]);h.data("sortorder",g);h.trigger("click.dataTable")}})}},bindMobileEvents:function(){if(this.cfg.behaviors){var b=this,a="> tr:not(.ui-datatable-empty-message)";$.each(this.cfg.behaviors,function(c,d){b.tbody.off(c,a).on(c,a,null,function(){var f=b.getRowMeta($(this));var e={params:[{name:b.id+"_rowkey",value:f.key}]};d.call(b,e)})})}},shouldSort:function(a){if(this.isEmpty()){return false}return $(a.target).is("th,span")},paginate:function(d){var c=this,b={source:this.id,update:this.id,process:this.id,formId:this.cfg.formId,params:[{name:this.id+"_pagination",value:true},{name:this.id+"_first",value:d.first},{name:this.id+"_rows",value:d.rows},{name:this.id+"_encodeFeature",value:true}],onsuccess:function(g,e,f){PrimeFaces.ajax.Response.handle(g,e,f,{widget:c,handle:function(h){this.updateData(h)}});return true},oncomplete:function(){c.paginator.cfg.page=d.page;c.paginator.updateUI()}};if(this.hasBehavior("page")){var a=this.cfg.behaviors.page;a.call(this,b)}else{PrimeFaces.ajax.Request.handle(b)}},sort:function(d,a){var e=this,b={source:this.id,update:this.id,process:this.id,params:[{name:this.id+"_sorting",value:true},{name:this.id+"_skipChildren",value:true},{name:this.id+"_encodeFeature",value:true},{name:this.id+"_sortKey",value:d.attr("id")},{name:this.id+"_sortDir",value:a}],onsuccess:function(h,f,g){PrimeFaces.ajax.Response.handle(h,f,g,{widget:e,handle:function(i){this.updateData(i);if(this.paginator){this.paginator.setPage(0,true)}this.sortableColumns.filter(".ui-column-sorted").data("sortorder",this.SORT_ORDER.UNSORTED).removeClass("ui-column-sorted").find(".ui-sortable-column-icon").removeClass("ui-icon-arrow-d ui-icon-arrow-u").addClass("ui-icon-bars");d.data("sortorder",a).addClass("ui-column-sorted");var j=d.find(".ui-sortable-column-icon");if(a===this.SORT_ORDER.DESCENDING){j.removeClass("ui-icon-bars ui-icon-arrow-u").addClass("ui-icon-arrow-d")}else{if(a===this.SORT_ORDER.ASCENDING){j.removeClass("ui-icon-bars ui-icon-arrow-d").addClass("ui-icon-arrow-u")}}}});return true},oncomplete:function(h,f,g){if(e.paginator&&g&&e.paginator.cfg.rowCount!==g.totalRecords){e.paginator.setTotalRecords(g.totalRecords)}}};b.params.push({name:this.id+"_sortKey",value:d.attr("id")});b.params.push();if(this.hasBehavior("sort")){var c=this.cfg.behaviors.sort;c.call(this,b)}else{PrimeFaces.ajax.Request.handle(b)}},bindSelection:function(){var b=this;this.selectionHolder=$(this.jqId+"_selection");this.rowSelector="> tr.ui-datatable-selectable";var a=this.selectionHolder.val();this.selection=(a==="")?[]:a.split(",");this.tbody.off("click.dataTable",this.rowSelector).on("click.dataTable",this.rowSelector,null,function(c){b.onRowClick(c,this)})},onRowClick:function(c,b){if($(c.target).is("td,span:not(.ui-c)")){var d=$(b),a=d.hasClass("ui-bar-b");if(a){this.unselectRow(d)}else{if(this.cfg.selectionMode==="single"){this.unselectAllRows()}this.selectRow(d)}}},selectRow:function(b,a){var d=this.findRow(b),c=this.getRowMeta(d);d.addClass("ui-bar-b");this.addSelection(c.key);this.writeSelections();if(!a){this.fireRowSelectEvent(c.key,"rowSelect")}},unselectRow:function(b,a){var d=this.findRow(b),c=this.getRowMeta(d);d.removeClass("ui-bar-b");this.removeSelection(c.key);this.writeSelections();if(!a){this.fireRowUnselectEvent(c.key,"rowUnselect")}},unselectAllRows:function(){this.tbody.children("tr.ui-bar-b").removeClass("ui-bar-b");this.selection=[];this.writeSelections()},fireRowSelectEvent:function(d,a){if(this.cfg.behaviors){var c=this.cfg.behaviors[a];if(c){var b={params:[{name:this.id+"_instantSelectedRowKey",value:d}]};c.call(this,b)}}},fireRowUnselectEvent:function(d,b){if(this.cfg.behaviors){var a=this.cfg.behaviors[b];if(a){var c={params:[{name:this.id+"_instantUnselectedRowKey",value:d}]};a.call(this,c)}}},writeSelections:function(){this.selectionHolder.val(this.selection.join(","))},findRow:function(a){var b=a;if(PrimeFaces.isNumber(a)){b=this.tbody.children("tr:eq("+a+")")}return b},removeSelection:function(a){this.selection=$.grep(this.selection,function(b){return b!=a})},addSelection:function(a){if(!this.isSelected(a)){this.selection.push(a)}},getRowMeta:function(b){var a={index:b.data("ri"),key:b.attr("data-rk")};return a},isSelected:function(a){return PrimeFaces.inArray(this.selection,a)},isEmpty:function(){return this.tbody.children("tr.ui-datatable-empty-message").length===1},updateData:function(a){this.tbody.html(a);this.postUpdateData()},postUpdateData:function(){if(this.cfg.draggableRows){this.makeRowsDraggable()}},hasBehavior:function(a){if(this.cfg.behaviors){return this.cfg.behaviors[a]!=undefined}return false}}); +PrimeFaces.widget.Dialog=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.popupElement=this.jq.children(".ui-popup");this.mask=this.jq.prev(".ui-popup-screen");this.content=this.popupElement.children(".ui-content");this.header=this.popupElement.children(".ui-header");this.closeIcon=this.header.children(".ui-icon-delete");var b=this.mask.prev(".ui-popup-screen");if(b.length){b.remove()}this.popupElement.popup({positionTo:"window",dismissible:false,overlayTheme:"b",enhanced:true});this.bindEvents()},bindEvents:function(){var a=this;this.closeIcon.on("click",function(b){a.hide();b.preventDefault()})},show:function(){this.popupElement.popup("open",{transition:this.cfg.showEffect})},hide:function(){this.popupElement.popup("close")}});PrimeFaces.widget.ConfirmDialog=PrimeFaces.widget.Dialog.extend({init:function(a){this._super(a);this.title=this.header.children(".ui-title");this.message=this.content.children(".ui-title");if(this.cfg.global){PrimeFaces.confirmDialog=this;this.content.find(".ui-confirmdialog-yes").on("click.ui-confirmdialog",function(c){if(PrimeFaces.confirmSource){var b=new Function("event",PrimeFaces.confirmSource.data("pfconfirmcommand"));b.call(PrimeFaces.confirmSource.get(0),c);PrimeFaces.confirmDialog.hide();PrimeFaces.confirmSource=null}c.preventDefault()});this.jq.find(".ui-confirmdialog-no").on("click.ui-confirmdialog",function(b){PrimeFaces.confirmDialog.hide();PrimeFaces.confirmSource=null;b.preventDefault()})}},applyFocus:function(){this.jq.find(":button,:submit").filter(":visible:enabled").eq(0).focus()},showMessage:function(a){if(a.header){this.title.text(a.header)}if(a.message){this.message.text(a.message)}this.show()}}); +PrimeFaces.widget.InputText=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.input=this.jq.children("input");this.cfg.enhanced=true;this.cfg.clearBtn=true;this.input.textinput(this.cfg)}});PrimeFaces.widget.InputTextarea=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.cfg.enhanced=true;this.cfg.autogrow=false;this.jq.textinput(this.cfg)}});PrimeFaces.widget.Password=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.input=this.jq.children("input");this.cfg.enhanced=true;this.cfg.clearBtn=true;this.input.textinput(this.cfg)}});PrimeFaces.widget.SelectOneButton=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.controlGroup=this.jq.children(".ui-controlgroup-controls");this.buttons=this.controlGroup.find("> .ui-radio > label.ui-btn");this.bindEvents()},bindEvents:function(){var a=this;this.buttons.on("click.selectOneButton",function(c){var b=$(this);if(!b.hasClass("ui-btn-active")){a.select(b)}})},select:function(a){this.buttons.filter(".ui-btn-active").removeClass("ui-btn-active").next().prop("checked",false);a.addClass("ui-btn-active").next().prop("checked",true).change()}});PrimeFaces.widget.SelectManyButton=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.controlGroup=this.jq.children(".ui-controlgroup-controls ");this.buttons=this.controlGroup.find("> .ui-checkbox > label.ui-btn");this.bindEvents()},bindEvents:function(){var a=this;this.buttons.on("click.selectManyButton",function(){var b=$(this);if(b.hasClass("ui-btn-active")){a.unselect(b)}else{a.select(b)}})},select:function(a){a.addClass("ui-btn-active").next().prop("checked",true).change()},unselect:function(a){a.removeClass("ui-btn-active").next().prop("checked",false).change()}});PrimeFaces.widget.InputSlider=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.jq.slider()}});PrimeFaces.widget.RangeSlider=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.jq.attr("data-role","rangeslider");this.jq.rangeslider()}});PrimeFaces.widget.UISwitch=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.input=this.jq.children("input");this.cfg.enhanced=true;this.input.flipswitch(this.cfg)}});PrimeFaces.widget.InputSwitch=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.input=this.jq.children("input");this.cfg.enhanced=true;this.input.flipswitch(this.cfg)}});PrimeFaces.widget.SelectOneMenu=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.jq.children("select").selectmenu(this.cfg)}});PrimeFaces.widget.SelectOneRadio=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.jq.controlgroup()}});PrimeFaces.widget.SelectManyCheckbox=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.jq.controlgroup()}});PrimeFaces.widget.SelectBooleanCheckbox=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.label=this.jq.children("label");this.input=this.jq.children(":checkbox");this.bindEvents()},bindEvents:function(){var a=this;this.label.on("click.selectBooleanCheckbox",function(){a.toggle()})},toggle:function(){if(this.input.prop("checked")){this.uncheck()}else{this.check()}},check:function(){this.label.removeClass("ui-checkbox-off").addClass("ui-checkbox-on")},uncheck:function(){this.label.removeClass("ui-checkbox-on").addClass("ui-checkbox-off")}});PrimeFaces.widget.SelectCheckboxMenu=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.cfg.nativeMenu=false;this.jq.children("select").selectmenu(this.cfg)}}); +PrimeFaces.widget.Growl=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.initOptions(a);this.jq.popup({positionTo:"window",theme:"b",overlayTheme:"b"});this.container=$(this.jqId+"-popup");this.popupContainer=this.container.find("> div.ui-popup");this.popupContainer.append("

");this.messageContainer=this.popupContainer.children("p");this.placeholder=$(this.jqId+"-placeholder");this.popupContainer.removeAttr("id");this.placeholder.attr("id",this.id);this.show(this.cfg.msgs)},initOptions:function(a){this.cfg=a;this.cfg.sticky=this.cfg.sticky||false;this.cfg.life=this.cfg.life||6000;this.cfg.escape=(this.cfg.escape===false)?false:true},refresh:function(a){this.initOptions(a);this.show(a.msgs)},show:function(a){var b=this;this.removeAll();if(a.length){$.each(a,function(c,d){b.renderMessage(d)});this.jq.popup("open",{transition:"pop"});if(!this.cfg.sticky){this.setRemovalTimeout()}}},removeAll:function(){this.messageContainer.children().remove()},renderMessage:function(f){var b='
';b+='
';b+='
';b+='
';b+='
';b+="
";var d=$(b),a=d.children(".ui-growl-severity"),c=d.find("> .ui-growl-message > .ui-growl-summary"),e=d.find("> .ui-growl-message > .ui-growl-detail");a.children("a").addClass(this.getSeverityIcon(f.severity));if(this.cfg.escape){c.text(f.summary);e.text(f.detail)}else{c.html(f.summary);e.html(f.detail)}this.messageContainer.append(d)},getSeverityIcon:function(a){var b;switch(a){case"info":b="ui-icon-info";break;break;case"warn":b="ui-icon-alert";break;break;case"error":b="ui-icon-delete";break;break;case"fatal":b="ui-icon-delete";break;break}return b},setRemovalTimeout:function(){var a=this;if(this.timeout){clearTimeout(this.timeout)}this.timeout=setTimeout(function(){a.jq.popup("close")},this.cfg.life)}}); +PrimeFaces.widget.PlainMenu=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.items=this.jq.children("li");this.items.filter(":first-child").addClass("ui-first-child");this.items.filter(":last-child").addClass("ui-last-child")}});PrimeFaces.widget.TabMenu=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.links=this.jq.find("a.ui-link");this.links.eq(this.cfg.activeIndex).addClass("ui-btn-active");this.jq.navbar()}}); +PrimeFaces.widget.Paginator=PrimeFaces.widget.BaseWidget.extend({init:function(a){this.cfg=a;this.jq=$();var b=this;$.each(this.cfg.id,function(c,d){b.jq=b.jq.add($(PrimeFaces.escapeClientId(d)))});this.controlGroups=this.jq.find("> .ui-controlgroup > .ui-controlgroup-controls");this.pageLinks=this.controlGroups.children(".ui-paginator-page");this.firstLink=this.controlGroups.children(".ui-paginator-first");this.prevLink=this.controlGroups.children(".ui-paginator-prev");this.nextLink=this.controlGroups.children(".ui-paginator-next");this.endLink=this.controlGroups.children(".ui-paginator-last");this.cfg.rows=(this.cfg.rows===0)?this.cfg.rowCount:this.cfg.rows;this.cfg.pageCount=Math.ceil(this.cfg.rowCount/this.cfg.rows)||1;this.cfg.pageLinks=this.cfg.pageLinks||10;this.cfg.currentPageTemplate=this.cfg.currentPageTemplate||"({currentPage} of {totalPages})";this.bindEvents()},bindEvents:function(){var a=this;this.bindPageLinkEvents();this.firstLink.click(function(){PrimeFaces.clearSelection();if(!$(this).hasClass("ui-state-disabled")){a.setPage(0)}});this.prevLink.click(function(){PrimeFaces.clearSelection();if(!$(this).hasClass("ui-state-disabled")){a.setPage(a.cfg.page-1)}});this.nextLink.click(function(){PrimeFaces.clearSelection();if(!$(this).hasClass("ui-state-disabled")){a.setPage(a.cfg.page+1)}});this.endLink.click(function(){PrimeFaces.clearSelection();if(!$(this).hasClass("ui-state-disabled")){a.setPage(a.cfg.pageCount-1)}})},bindPageLinkEvents:function(){var a=this;this.pageLinks.on("click.paginator",function(c){var b=$(this);if(!b.hasClass("ui-state-disabled")&&!b.hasClass("ui-btn-active")){a.setPage(parseInt(b.text())-1)}})},updateUI:function(){if(this.cfg.page===0){this.disableElement(this.firstLink);this.disableElement(this.prevLink)}else{this.enableElement(this.firstLink);this.enableElement(this.prevLink)}if(this.cfg.page===(this.cfg.pageCount-1)){this.disableElement(this.nextLink);this.disableElement(this.endLink)}else{this.enableElement(this.nextLink);this.enableElement(this.endLink)}this.updatePageLinks()},updatePageLinks:function(){var g,a,f,c=0;this.cfg.pageCount=Math.ceil(this.cfg.rowCount/this.cfg.rows)||1;var e=Math.min(this.cfg.pageLinks,this.cfg.pageCount);g=Math.max(0,Math.ceil(this.cfg.page-((e)/2)));a=Math.min(this.cfg.pageCount-1,g+e-1);f=this.cfg.pageLinks-(a-g+1);g=Math.max(0,g-f);for(var d=g;d<=a;d++){var b="ui-paginator-page ui-btn";if(this.cfg.page===d){b+=" ui-btn-active"}this.pageLinks.eq(c).attr("class",b).text(d+1);this.pageLinks.eq(parseInt(c+(this.pageLinks.length/2))).attr("class",b).text(d+1);c++}},setPage:function(c,a){if(c>=0&&c
');this.content=this.jq.children("div.ui-panel-inner")}this.bindEvents()},bindEvents:function(){var a=this;if(this.cfg.target){if(this.cfg.showEvent===this.cfg.hideEvent){this.cfg.target.on(this.cfg.showEvent,function(b){a.toggle()})}else{this.cfg.target.on(this.cfg.showEvent,function(b){a.show()}).on(this.cfg.hideEffect,function(b){a.hide()})}}},show:function(){if(!this.loaded&&this.cfg.dynamic){this.loadContents()}else{this._show()}},_show:function(){this.jq.panel("open");if(this.cfg.onShow){this.cfg.onShow.call(this)}},hide:function(){this.jq.panel("close");if(this.cfg.onHide){this.cfg.onHide.call(this)}},toggle:function(){if(this.isVisible()){this.hide()}else{this.show()}},loadContents:function(){var b=this,a={source:this.id,process:this.id,update:this.id,params:[{name:this.id+"_contentLoad",value:true}],onsuccess:function(e,c,d){PrimeFaces.ajax.Response.handle(e,c,d,{widget:b,handle:function(f){this.content.html(f);this.loaded=true}});return true},oncomplete:function(){b._show()}};PrimeFaces.ajax.Request.handle(a)},isVisible:function(){this.jq.is(":visible")}}); +PrimeFaces.widget.Panel=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.header=this.jq.children(".ui-panel-m-titlebar");this.content=this.jq.children(".ui-panel-m-content");this.onshowHandlers=this.onshowHandlers||{};this.bindEvents()},bindEvents:function(){var a=this;if(this.cfg.toggleable){this.toggler=this.header.children(".ui-panel-m-titlebar-icon");this.toggleStateHolder=$(this.jqId+"_collapsed");this.toggler.on("click",function(b){a.toggle();b.preventDefault()})}},toggle:function(){if(this.content.is(":visible")){this.collapse()}else{this.expand()}},collapse:function(){this.toggleState(true,"ui-icon-minus","ui-icon-plus");this.content.hide()},expand:function(){this.toggleState(false,"ui-icon-plus","ui-icon-minus");this.content.show();this.invokeOnshowHandlers()},toggleState:function(c,b,a){this.toggler.removeClass(b).addClass(a);this.cfg.collapsed=c;this.toggleStateHolder.val(c);this.fireToggleEvent()},fireToggleEvent:function(){if(this.cfg.behaviors){var a=this.cfg.behaviors.toggle;if(a){a.call(this)}}},addOnshowHandler:function(b,a){this.onshowHandlers[b]=a},invokeOnshowHandlers:function(){for(var b in this.onshowHandlers){if(this.onshowHandlers.hasOwnProperty(b)){var a=this.onshowHandlers[b];if(a.call()){delete this.onshowHandlers[b]}}}}}); +PrimeFaces.widget.TabView=PrimeFaces.widget.BaseWidget.extend({GRID_MAP:{"2":"a","3":"b","4":"c","5":"d"},BLOCK_MAP:{"0":"a","1":"b","2":"c","3":"d","4":"e"},init:function(a){this._super(a);this.navbar=this.jq.children(".ui-navbar");this.navContainer=this.navbar.children(".ui-tabs-nav");this.headers=this.navContainer.children(".ui-tabs-header");this.panelContainer=this.jq.children(".ui-tabs-panels");this.stateHolder=$(this.jqId+"_activeIndex");this.cfg.selected=parseInt(this.stateHolder.val());this.onshowHandlers=this.onshowHandlers||{};this.initGrid();this.bindEvents();if(this.cfg.dynamic&&this.cfg.cache){this.markAsLoaded(this.panelContainer.children().eq(this.cfg.selected))}},initGrid:function(){var b=this.headers.length;this.navContainer.addClass("ui-grid-"+this.GRID_MAP[b.toString()]);for(var a=0;a Date: Tue, 21 Feb 2017 02:44:59 +0100 Subject: [PATCH 06/19] Create jquery-plugins.js --- test/resources/primefaces/jquery-plugins.js | 369 ++++++++++++++++++++ 1 file changed, 369 insertions(+) create mode 100644 test/resources/primefaces/jquery-plugins.js diff --git a/test/resources/primefaces/jquery-plugins.js b/test/resources/primefaces/jquery-plugins.js new file mode 100644 index 0000000..faba5a0 --- /dev/null +++ b/test/resources/primefaces/jquery-plugins.js @@ -0,0 +1,369 @@ +/*! jQuery UI - v1.11.0 - 2014-07-22 +* http://jqueryui.com +* Includes: core.js, widget.js, mouse.js, position.js, draggable.js, droppable.js, resizable.js, selectable.js, sortable.js, datepicker.js, slider.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ +(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(jQuery)}}(function(y){ +/*! + * jQuery UI Core 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/category/ui-core/ + */ +y.ui=y.ui||{};y.extend(y.ui,{version:"1.11.0",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,UP:38}});y.fn.extend({scrollParent:function(){var N=this.css("position"),M=N==="absolute",O=this.parents().filter(function(){var P=y(this);if(M&&P.css("position")==="static"){return false}return(/(auto|scroll)/).test(P.css("overflow")+P.css("overflow-y")+P.css("overflow-x"))}).eq(0);return N==="fixed"||!O.length?y(this[0].ownerDocument||document):O},uniqueId:(function(){var M=0;return function(){return this.each(function(){if(!this.id){this.id="ui-id-"+(++M)}})}})(),removeUniqueId:function(){return this.each(function(){if(/^ui-id-\d+$/.test(this.id)){y(this).removeAttr("id")}})}});function n(O,M){var Q,P,N,R=O.nodeName.toLowerCase();if("area"===R){Q=O.parentNode;P=Q.name;if(!O.href||!P||Q.nodeName.toLowerCase()!=="map"){return false}N=y("img[usemap=#"+P+"]")[0];return !!N&&o(N)}return(/input|select|textarea|button|object/.test(R)?!O.disabled:"a"===R?O.href||M:M)&&o(O)}function o(M){return y.expr.filters.visible(M)&&!y(M).parents().addBack().filter(function(){return y.css(this,"visibility")==="hidden"}).length}y.extend(y.expr[":"],{data:y.expr.createPseudo?y.expr.createPseudo(function(M){return function(N){return !!y.data(N,M)}}):function(O,N,M){return !!y.data(O,M[3])},focusable:function(M){return n(M,!isNaN(y.attr(M,"tabindex")))},tabbable:function(O){var M=y.attr(O,"tabindex"),N=isNaN(M);return(N||M>=0)&&n(O,!N)}});if(!y("").outerWidth(1).jquery){y.each(["Width","Height"],function(O,M){var N=M==="Width"?["Left","Right"]:["Top","Bottom"],P=M.toLowerCase(),R={innerWidth:y.fn.innerWidth,innerHeight:y.fn.innerHeight,outerWidth:y.fn.outerWidth,outerHeight:y.fn.outerHeight};function Q(U,T,S,V){y.each(N,function(){T-=parseFloat(y.css(U,"padding"+this))||0;if(S){T-=parseFloat(y.css(U,"border"+this+"Width"))||0}if(V){T-=parseFloat(y.css(U,"margin"+this))||0}});return T}y.fn["inner"+M]=function(S){if(S===undefined){return R["inner"+M].call(this)}return this.each(function(){y(this).css(P,Q(this,S)+"px")})};y.fn["outer"+M]=function(S,T){if(typeof S!=="number"){return R["outer"+M].call(this,S)}return this.each(function(){y(this).css(P,Q(this,S,true,T)+"px")})}})}if(!y.fn.addBack){y.fn.addBack=function(M){return this.add(M==null?this.prevObject:this.prevObject.filter(M))}}if(y("").data("a-b","a").removeData("a-b").data("a-b")){y.fn.removeData=(function(M){return function(N){if(arguments.length){return M.call(this,y.camelCase(N))}else{return M.call(this)}}})(y.fn.removeData)}y.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());y.fn.extend({focus:(function(M){return function(N,O){return typeof N==="number"?this.each(function(){var P=this;setTimeout(function(){y(P).focus();if(O){O.call(P)}},N)}):M.apply(this,arguments)}})(y.fn.focus),disableSelection:(function(){var M="onselectstart" in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(M+".ui-disableSelection",function(N){N.preventDefault()})}})(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(P){if(P!==undefined){return this.css("zIndex",P)}if(this.length){var N=y(this[0]),M,O;while(N.length&&N[0]!==document){M=N.css("position");if(M==="absolute"||M==="relative"||M==="fixed"){O=parseInt(N.css("zIndex"),10);if(!isNaN(O)&&O!==0){return O}}N=N.parent()}}return 0}});y.ui.plugin={add:function(N,O,Q){var M,P=y.ui[N].prototype;for(M in Q){P.plugins[M]=P.plugins[M]||[];P.plugins[M].push([O,Q[M]])}},call:function(M,P,O,N){var Q,R=M.plugins[P];if(!R){return}if(!N&&(!M.element[0].parentNode||M.element[0].parentNode.nodeType===11)){return}for(Q=0;Q",options:{disabled:false,create:null},_createWidget:function(M,N){N=y(N||this.defaultElement||this)[0];this.element=y(N);this.uuid=C++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=y.widget.extend({},this.options,this._getCreateOptions(),M);this.bindings=y();this.hoverable=y();this.focusable=y();if(N!==this){y.data(N,this.widgetFullName,this);this._on(true,this.element,{remove:function(O){if(O.target===N){this.destroy()}}});this.document=y(N.style?N.ownerDocument:N.document||N);this.window=y(this.document[0].defaultView||this.document[0].parentWindow)}this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:y.noop,_getCreateEventData:y.noop,_create:y.noop,_init:y.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(y.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:y.noop,widget:function(){return this.element},option:function(P,Q){var M=P,R,O,N;if(arguments.length===0){return y.widget.extend({},this.options)}if(typeof P==="string"){M={};R=P.split(".");P=R.shift();if(R.length){O=M[P]=y.widget.extend({},this.options[P]);for(N=0;N=this.options.distance)},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}}); +/*! + * jQuery UI Position 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/position/ + */ +(function(){y.ui=y.ui||{};var T,W,U=Math.max,Z=Math.abs,X=Math.round,O=/left|center|right/,R=/top|center|bottom/,M=/[\+\-]\d+(\.[\d]+)?%?/,V=/^\w+/,N=/%$/,Q=y.fn.position;function Y(ac,ab,aa){return[parseFloat(ac[0])*(N.test(ac[0])?ab/100:1),parseFloat(ac[1])*(N.test(ac[1])?aa/100:1)]}function S(aa,ab){return parseInt(y.css(aa,ab),10)||0}function P(ab){var aa=ab[0];if(aa.nodeType===9){return{width:ab.width(),height:ab.height(),offset:{top:0,left:0}}}if(y.isWindow(aa)){return{width:ab.width(),height:ab.height(),offset:{top:ab.scrollTop(),left:ab.scrollLeft()}}}if(aa.preventDefault){return{width:0,height:0,offset:{top:aa.pageY,left:aa.pageX}}}return{width:ab.outerWidth(),height:ab.outerHeight(),offset:ab.offset()}}y.position={scrollbarWidth:function(){if(T!==undefined){return T}var ab,aa,ad=y("
"),ac=ad.children()[0];y("body").append(ad);ab=ac.offsetWidth;ad.css("overflow","scroll");aa=ac.offsetWidth;if(ab===aa){aa=ad[0].clientWidth}ad.remove();return(T=ab-aa)},getScrollInfo:function(ae){var ad=ae.isWindow||ae.isDocument?"":ae.element.css("overflow-x"),ac=ae.isWindow||ae.isDocument?"":ae.element.css("overflow-y"),ab=ad==="scroll"||(ad==="auto"&&ae.width0?"right":"center",vertical:az<0?"top":aC>0?"bottom":"middle"};if(ahU(Z(aC),Z(az))){ay.important="horizontal"}else{ay.important="vertical"}ak.using.call(this,aB,ay)}}ap.offset(y.extend(at,{using:ax}))})};y.ui.position={fit:{left:function(ae,ad){var ac=ad.within,ag=ac.isWindow?ac.scrollLeft:ac.offset.left,ai=ac.width,af=ae.left-ad.collisionPosition.marginLeft,ah=ag-af,ab=af+ad.collisionWidth-ai-ag,aa;if(ad.collisionWidth>ai){if(ah>0&&ab<=0){aa=ae.left+ah+ad.collisionWidth-ai-ag;ae.left+=ah-aa}else{if(ab>0&&ah<=0){ae.left=ag}else{if(ah>ab){ae.left=ag+ai-ad.collisionWidth}else{ae.left=ag}}}}else{if(ah>0){ae.left+=ah}else{if(ab>0){ae.left-=ab}else{ae.left=U(ae.left-af,ae.left)}}}},top:function(ad,ac){var ab=ac.within,ah=ab.isWindow?ab.scrollTop:ab.offset.top,ai=ac.within.height,af=ad.top-ac.collisionPosition.marginTop,ag=ah-af,ae=af+ac.collisionHeight-ai-ah,aa;if(ac.collisionHeight>ai){if(ag>0&&ae<=0){aa=ad.top+ag+ac.collisionHeight-ai-ah;ad.top+=ag-aa}else{if(ae>0&&ag<=0){ad.top=ah}else{if(ag>ae){ad.top=ah+ai-ac.collisionHeight}else{ad.top=ah}}}}else{if(ag>0){ad.top+=ag}else{if(ae>0){ad.top-=ae}else{ad.top=U(ad.top-af,ad.top)}}}}},flip:{left:function(ag,af){var ae=af.within,ak=ae.offset.left+ae.scrollLeft,an=ae.width,ac=ae.isWindow?ae.scrollLeft:ae.offset.left,ah=ag.left-af.collisionPosition.marginLeft,al=ah-ac,ab=ah+af.collisionWidth-an-ac,aj=af.my[0]==="left"?-af.elemWidth:af.my[0]==="right"?af.elemWidth:0,am=af.at[0]==="left"?af.targetWidth:af.at[0]==="right"?-af.targetWidth:0,ad=-2*af.offset[0],aa,ai;if(al<0){aa=ag.left+aj+am+ad+af.collisionWidth-an-ak;if(aa<0||aa0){ai=ag.left-af.collisionPosition.marginLeft+aj+am+ad-ac;if(ai>0||Z(ai)aj&&(ab<0||ab0){al=af.top-ae.collisionPosition.marginTop+ai+ao+ac-aa;if((af.top+ai+ao+ac)>ag&&(al>0||Z(al)10&&ad<11;ae.innerHTML="";ag.removeChild(ae)})()})();var D=y.ui.position; +/*! + * jQuery UI Draggable 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/draggable/ + */ +y.widget("ui.draggable",y.ui.mouse,{version:"1.11.0",widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false,drag:null,start:null,stop:null},_create:function(){if(this.options.helper==="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}if(this.options.addClasses){this.element.addClass("ui-draggable")}if(this.options.disabled){this.element.addClass("ui-draggable-disabled")}this._setHandleClassName();this._mouseInit()},_setOption:function(M,N){this._super(M,N);if(M==="handle"){this._setHandleClassName()}},_destroy:function(){if((this.helper||this.element).is(".ui-draggable-dragging")){this.destroyOnClear=true;return}this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._removeHandleClassName();this._mouseDestroy()},_mouseCapture:function(O){var M=this.document[0],P=this.options;try{if(M.activeElement&&M.activeElement.nodeName.toLowerCase()!=="body"){y(M.activeElement).blur()}}catch(N){}if(this.helper||P.disabled||y(O.target).closest(".ui-resizable-handle").length>0){return false}this.handle=this._getHandle(O);if(!this.handle){return false}y(P.iframeFix===true?"iframe":P.iframeFix).each(function(){y("
").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(y(this).offset()).appendTo("body")});return true},_mouseStart:function(M){var N=this.options;this.helper=this._createHelper(M);this.helper.addClass("ui-draggable-dragging");this._cacheHelperProportions();if(y.ui.ddmanager){y.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offsetParent=this.helper.offsetParent();this.offsetParentCssPosition=this.offsetParent.css("position");this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.scroll=false;y.extend(this.offset,{click:{left:M.pageX-this.offset.left,top:M.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(M,false);this.originalPageX=M.pageX;this.originalPageY=M.pageY;(N.cursorAt&&this._adjustOffsetFromHelper(N.cursorAt));this._setContainment();if(this._trigger("start",M)===false){this._clear();return false}this._cacheHelperProportions();if(y.ui.ddmanager&&!N.dropBehaviour){y.ui.ddmanager.prepareOffsets(this,M)}this._mouseDrag(M,true);if(y.ui.ddmanager){y.ui.ddmanager.dragStart(this,M)}return true},_mouseDrag:function(M,O){if(this.offsetParentCssPosition==="fixed"){this.offset.parent=this._getParentOffset()}this.position=this._generatePosition(M,true);this.positionAbs=this._convertPositionTo("absolute");if(!O){var N=this._uiHash();if(this._trigger("drag",M,N)===false){this._mouseUp({});return false}this.position=N.position}this.helper[0].style.left=this.position.left+"px";this.helper[0].style.top=this.position.top+"px";if(y.ui.ddmanager){y.ui.ddmanager.drag(this,M)}return false},_mouseStop:function(N){var M=this,O=false;if(y.ui.ddmanager&&!this.options.dropBehaviour){O=y.ui.ddmanager.drop(this,N)}if(this.dropped){O=this.dropped;this.dropped=false}if((this.options.revert==="invalid"&&!O)||(this.options.revert==="valid"&&O)||this.options.revert===true||(y.isFunction(this.options.revert)&&this.options.revert.call(this.element,O))){y(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){if(M._trigger("stop",N)!==false){M._clear()}})}else{if(this._trigger("stop",N)!==false){this._clear()}}return false},_mouseUp:function(M){y("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});if(y.ui.ddmanager){y.ui.ddmanager.dragStop(this,M)}this.element.focus();return y.ui.mouse.prototype._mouseUp.call(this,M)},cancel:function(){if(this.helper.is(".ui-draggable-dragging")){this._mouseUp({})}else{this._clear()}return this},_getHandle:function(M){return this.options.handle?!!y(M.target).closest(this.element.find(this.options.handle)).length:true},_setHandleClassName:function(){this._removeHandleClassName();y(this.options.handle||this.element).addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.element.find(".ui-draggable-handle").addBack().removeClass("ui-draggable-handle")},_createHelper:function(N){var O=this.options,M=y.isFunction(O.helper)?y(O.helper.apply(this.element[0],[N])):(O.helper==="clone"?this.element.clone().removeAttr("id"):this.element);if(!M.parents("body").length){M.appendTo((O.appendTo==="parent"?this.element[0].parentNode:O.appendTo))}if(M[0]!==this.element[0]&&!(/(fixed|absolute)/).test(M.css("position"))){M.css("position","absolute")}return M},_adjustOffsetFromHelper:function(M){if(typeof M==="string"){M=M.split(" ")}if(y.isArray(M)){M={left:+M[0],top:+M[1]||0}}if("left" in M){this.offset.click.left=M.left+this.margins.left}if("right" in M){this.offset.click.left=this.helperProportions.width-M.right+this.margins.left}if("top" in M){this.offset.click.top=M.top+this.margins.top}if("bottom" in M){this.offset.click.top=this.helperProportions.height-M.bottom+this.margins.top}},_isRootNode:function(M){return(/(html|body)/i).test(M.tagName)||M===this.document[0]},_getParentOffset:function(){var N=this.offsetParent.offset(),M=this.document[0];if(this.cssPosition==="absolute"&&this.scrollParent[0]!==M&&y.contains(this.scrollParent[0],this.offsetParent[0])){N.left+=this.scrollParent.scrollLeft();N.top+=this.scrollParent.scrollTop()}if(this._isRootNode(this.offsetParent[0])){N={top:0,left:0}}return{top:N.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:N.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition!=="relative"){return{top:0,left:0}}var M=this.element.position(),N=this._isRootNode(this.scrollParent[0]);return{top:M.top-(parseInt(this.helper.css("top"),10)||0)+(!N?this.scrollParent.scrollTop():0),left:M.left-(parseInt(this.helper.css("left"),10)||0)+(!N?this.scrollParent.scrollLeft():0)}},_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 O,Q,N,P=this.options,M=this.document[0];this.relative_container=null;if(!P.containment){this.containment=null;return}if(P.containment==="window"){this.containment=[y(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,y(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,y(window).scrollLeft()+y(window).width()-this.helperProportions.width-this.margins.left,y(window).scrollTop()+(y(window).height()||M.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if(P.containment==="document"){this.containment=[0,0,y(M).width()-this.helperProportions.width-this.margins.left,(y(M).height()||M.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if(P.containment.constructor===Array){this.containment=P.containment;return}if(P.containment==="parent"){P.containment=this.helper[0].parentNode}Q=y(P.containment);N=Q[0];if(!N){return}O=Q.css("overflow")!=="hidden";this.containment=[(parseInt(Q.css("borderLeftWidth"),10)||0)+(parseInt(Q.css("paddingLeft"),10)||0),(parseInt(Q.css("borderTopWidth"),10)||0)+(parseInt(Q.css("paddingTop"),10)||0),(O?Math.max(N.scrollWidth,N.offsetWidth):N.offsetWidth)-(parseInt(Q.css("borderRightWidth"),10)||0)-(parseInt(Q.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(O?Math.max(N.scrollHeight,N.offsetHeight):N.offsetHeight)-(parseInt(Q.css("borderBottomWidth"),10)||0)-(parseInt(Q.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=Q},_convertPositionTo:function(N,P){if(!P){P=this.position}var M=N==="absolute"?1:-1,O=this._isRootNode(this.scrollParent[0]);return{top:(P.top+this.offset.relative.top*M+this.offset.parent.top*M-((this.cssPosition==="fixed"?-this.offset.scroll.top:(O?0:this.offset.scroll.top))*M)),left:(P.left+this.offset.relative.left*M+this.offset.parent.left*M-((this.cssPosition==="fixed"?-this.offset.scroll.left:(O?0:this.offset.scroll.left))*M))}},_generatePosition:function(N,T){var M,U,V,P,O=this.options,S=this._isRootNode(this.scrollParent[0]),R=N.pageX,Q=N.pageY;if(!S||!this.offset.scroll){this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}}if(T){if(this.containment){if(this.relative_container){U=this.relative_container.offset();M=[this.containment[0]+U.left,this.containment[1]+U.top,this.containment[2]+U.left,this.containment[3]+U.top]}else{M=this.containment}if(N.pageX-this.offset.click.leftM[2]){R=M[2]+this.offset.click.left}if(N.pageY-this.offset.click.top>M[3]){Q=M[3]+this.offset.click.top}}if(O.grid){V=O.grid[1]?this.originalPageY+Math.round((Q-this.originalPageY)/O.grid[1])*O.grid[1]:this.originalPageY;Q=M?((V-this.offset.click.top>=M[1]||V-this.offset.click.top>M[3])?V:((V-this.offset.click.top>=M[1])?V-O.grid[1]:V+O.grid[1])):V;P=O.grid[0]?this.originalPageX+Math.round((R-this.originalPageX)/O.grid[0])*O.grid[0]:this.originalPageX;R=M?((P-this.offset.click.left>=M[0]||P-this.offset.click.left>M[2])?P:((P-this.offset.click.left>=M[0])?P-O.grid[0]:P+O.grid[0])):P}if(O.axis==="y"){R=this.originalPageX}if(O.axis==="x"){Q=this.originalPageY}}return{top:(Q-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition==="fixed"?-this.offset.scroll.top:(S?0:this.offset.scroll.top))),left:(R-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition==="fixed"?-this.offset.scroll.left:(S?0:this.offset.scroll.left)))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!==this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false;if(this.destroyOnClear){this.destroy()}},_trigger:function(M,N,O){O=O||this._uiHash();y.ui.plugin.call(this,M,[N,O,this],true);if(M==="drag"){this.positionAbs=this._convertPositionTo("absolute")}return y.Widget.prototype._trigger.call(this,M,N,O)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});y.ui.plugin.add("draggable","connectToSortable",{start:function(N,P,O){var Q=O.options,M=y.extend({},P,{item:O.element});O.sortables=[];y(Q.connectToSortable).each(function(){var R=y(this).sortable("instance");if(R&&!R.options.disabled){O.sortables.push({instance:R,shouldRevert:R.options.revert});R.refreshPositions();R._trigger("activate",N,M)}})},stop:function(N,P,O){var M=y.extend({},P,{item:O.element});y.each(O.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;O.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=this.shouldRevert}this.instance._mouseStop(N);this.instance.options.helper=this.instance.options._helper;if(O.options.helper==="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",N,M)}})},drag:function(N,P,O){var M=this;y.each(O.sortables,function(){var Q=false,R=this;this.instance.positionAbs=O.positionAbs;this.instance.helperProportions=O.helperProportions;this.instance.offset.click=O.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){Q=true;y.each(O.sortables,function(){this.instance.positionAbs=O.positionAbs;this.instance.helperProportions=O.helperProportions;this.instance.offset.click=O.offset.click;if(this!==R&&this.instance._intersectsWith(this.instance.containerCache)&&y.contains(R.instance.element[0],this.instance.element[0])){Q=false}return Q})}if(Q){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=y(M).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return P.helper[0]};N.target=this.instance.currentItem[0];this.instance._mouseCapture(N,true);this.instance._mouseStart(N,true,true);this.instance.offset.click.top=O.offset.click.top;this.instance.offset.click.left=O.offset.click.left;this.instance.offset.parent.left-=O.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=O.offset.parent.top-this.instance.offset.parent.top;O._trigger("toSortable",N);O.dropped=this.instance.element;O.currentItem=O.element;this.instance.fromOutside=O}if(this.instance.currentItem){this.instance._mouseDrag(N)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",N,this.instance._uiHash(this.instance));this.instance._mouseStop(N,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}O._trigger("fromSortable",N);O.dropped=false}}})}});y.ui.plugin.add("draggable","cursor",{start:function(O,P,M){var N=y("body"),Q=M.options;if(N.css("cursor")){Q._cursor=N.css("cursor")}N.css("cursor",Q.cursor)},stop:function(N,O,M){var P=M.options;if(P._cursor){y("body").css("cursor",P._cursor)}}});y.ui.plugin.add("draggable","opacity",{start:function(O,P,M){var N=y(P.helper),Q=M.options;if(N.css("opacity")){Q._opacity=N.css("opacity")}N.css("opacity",Q.opacity)},stop:function(N,O,M){var P=M.options;if(P._opacity){y(O.helper).css("opacity",P._opacity)}}});y.ui.plugin.add("draggable","scroll",{start:function(N,O,M){if(M.scrollParent[0]!==M.document[0]&&M.scrollParent[0].tagName!=="HTML"){M.overflowOffset=M.scrollParent.offset()}},drag:function(P,Q,O){var R=O.options,N=false,M=O.document[0];if(O.scrollParent[0]!==M&&O.scrollParent[0].tagName!=="HTML"){if(!R.axis||R.axis!=="x"){if((O.overflowOffset.top+O.scrollParent[0].offsetHeight)-P.pageY=0;Z--){X=P.snapElements[Z].left;U=X+P.snapElements[Z].width;T=P.snapElements[Z].top;ae=T+P.snapElements[Z].height;if(aaU+ac||Nae+ac||!y.contains(P.snapElements[Z].item.ownerDocument,P.snapElements[Z].item)){if(P.snapElements[Z].snapping){(P.options.snap.release&&P.options.snap.release.call(P.element,Y,y.extend(P._uiHash(),{snapItem:P.snapElements[Z].item})))}P.snapElements[Z].snapping=false;continue}if(W.snapMode!=="inner"){M=Math.abs(T-N)<=ac;ad=Math.abs(ae-O)<=ac;R=Math.abs(X-aa)<=ac;S=Math.abs(U-ab)<=ac;if(M){V.position.top=P._convertPositionTo("relative",{top:T-P.helperProportions.height,left:0}).top-P.margins.top}if(ad){V.position.top=P._convertPositionTo("relative",{top:ae,left:0}).top-P.margins.top}if(R){V.position.left=P._convertPositionTo("relative",{top:0,left:X-P.helperProportions.width}).left-P.margins.left}if(S){V.position.left=P._convertPositionTo("relative",{top:0,left:U}).left-P.margins.left}}Q=(M||ad||R||S);if(W.snapMode!=="outer"){M=Math.abs(T-O)<=ac;ad=Math.abs(ae-N)<=ac;R=Math.abs(X-ab)<=ac;S=Math.abs(U-aa)<=ac;if(M){V.position.top=P._convertPositionTo("relative",{top:T,left:0}).top-P.margins.top}if(ad){V.position.top=P._convertPositionTo("relative",{top:ae-P.helperProportions.height,left:0}).top-P.margins.top}if(R){V.position.left=P._convertPositionTo("relative",{top:0,left:X}).left-P.margins.left}if(S){V.position.left=P._convertPositionTo("relative",{top:0,left:U-P.helperProportions.width}).left-P.margins.left}}if(!P.snapElements[Z].snapping&&(M||ad||R||S||Q)){(P.options.snap.snap&&P.options.snap.snap.call(P.element,Y,y.extend(P._uiHash(),{snapItem:P.snapElements[Z].item})))}P.snapElements[Z].snapping=(M||ad||R||S||Q)}}});y.ui.plugin.add("draggable","stack",{start:function(O,P,M){var N,R=M.options,Q=y.makeArray(y(R.stack)).sort(function(T,S){return(parseInt(y(T).css("zIndex"),10)||0)-(parseInt(y(S).css("zIndex"),10)||0)});if(!Q.length){return}N=parseInt(y(Q[0]).css("zIndex"),10)||0;y(Q).each(function(S){y(this).css("zIndex",N+S)});this.css("zIndex",(N+Q.length))}});y.ui.plugin.add("draggable","zIndex",{start:function(O,P,M){var N=y(P.helper),Q=M.options;if(N.css("zIndex")){Q._zIndex=N.css("zIndex")}N.css("zIndex",Q.zIndex)},stop:function(N,O,M){var P=M.options;if(P._zIndex){y(O.helper).css("zIndex",P._zIndex)}}});var I=y.ui.draggable; +/*! + * jQuery UI Droppable 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/droppable/ + */ +y.widget("ui.droppable",{version:"1.11.0",widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var N,O=this.options,M=O.accept;this.isover=false;this.isout=true;this.accept=y.isFunction(M)?M:function(P){return P.is(M)};this.proportions=function(){if(arguments.length){N=arguments[0]}else{return N?N:N={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}}};this._addToManager(O.scope);O.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(M){y.ui.ddmanager.droppables[M]=y.ui.ddmanager.droppables[M]||[];y.ui.ddmanager.droppables[M].push(this)},_splice:function(M){var N=0;for(;N=N)&&(O<(N+P))}return function(Z,T,X){if(!T.offset){return false}var R,S,P=(Z.positionAbs||Z.position.absolute).left,W=(Z.positionAbs||Z.position.absolute).top,O=P+Z.helperProportions.width,V=W+Z.helperProportions.height,Q=T.offset.left,Y=T.offset.top,N=Q+T.proportions().width,U=Y+T.proportions().height;switch(X){case"fit":return(Q<=P&&O<=N&&Y<=W&&V<=U);case"intersect":return(Q=Y&&W<=U)||(V>=Y&&V<=U)||(WU))&&((P>=Q&&P<=N)||(O>=Q&&O<=N)||(PN));default:return false}}})();y.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(P,R){var O,N,M=y.ui.ddmanager.droppables[P.options.scope]||[],Q=R?R.type:null,S=(P.currentItem||P.element).find(":data(ui-droppable)").addBack();droppablesLoop:for(O=0;O0){return true}P[M]=1;O=(P[M]>0);P[M]=0;return O},_create:function(){var S,N,Q,O,M,P=this,R=this.options;this.element.addClass("ui-resizable");y.extend(this,{_aspectRatio:!!(R.aspectRatio),aspectRatio:R.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:R.helper||R.ghost||R.animate?R.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(y("
").css({position:this.element.css("position"),width: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=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});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({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=R.handles||(!y(".ui-resizable-handle",this.element).length?"e,s,se":{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"});if(this.handles.constructor===String){if(this.handles==="all"){this.handles="n,e,s,w,se,sw,ne,nw"}S=this.handles.split(",");this.handles={};for(N=0;N
");O.css({zIndex:R.zIndex});if("se"===Q){O.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[Q]=".ui-resizable-"+Q;this.element.append(O)}}this._renderAxis=function(X){var U,V,T,W;X=X||this.element;for(U in this.handles){if(this.handles[U].constructor===String){this.handles[U]=this.element.children(this.handles[U]).first().show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){V=y(this.handles[U],this.element);W=/sw|ne|nw|se|n|s/.test(U)?V.outerHeight():V.outerWidth();T=["padding",/ne|nw|n/.test(U)?"Top":/se|sw|s/.test(U)?"Bottom":/^e$/.test(U)?"Right":"Left"].join("");X.css(T,W);this._proportionallyResize()}if(!y(this.handles[U]).length){continue}}};this._renderAxis(this.element);this._handles=y(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!P.resizing){if(this.className){O=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}P.axis=O&&O[1]?O[1]:"se"}});if(R.autoHide){this._handles.hide();y(this.element).addClass("ui-resizable-autohide").mouseenter(function(){if(R.disabled){return}y(this).removeClass("ui-resizable-autohide");P._handles.show()}).mouseleave(function(){if(R.disabled){return}if(!P.resizing){y(this).addClass("ui-resizable-autohide");P._handles.hide()}})}this._mouseInit()},_destroy:function(){this._mouseDestroy();var N,M=function(O){y(O).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){M(this.element);N=this.element;this.originalElement.css({position:N.css("position"),width:N.outerWidth(),height:N.outerHeight(),top:N.css("top"),left:N.css("left")}).insertAfter(N);N.remove()}this.originalElement.css("resize",this.originalResizeStyle);M(this.originalElement);return this},_mouseCapture:function(O){var N,P,M=false;for(N in this.handles){P=y(this.handles[N])[0];if(P===O.target||y.contains(P,O.target)){M=true}}return !this.options.disabled&&M},_mouseStart:function(N){var R,O,Q,P=this.options,M=this.element;this.resizing=true;this._renderProxy();R=this._num(this.helper.css("left"));O=this._num(this.helper.css("top"));if(P.containment){R+=y(P.containment).scrollLeft()||0;O+=y(P.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:R,top:O};this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:M.width(),height:M.height()};this.originalSize=this._helper?{width:M.outerWidth(),height:M.outerHeight()}:{width:M.width(),height:M.height()};this.originalPosition={left:R,top:O};this.sizeDiff={width:M.outerWidth()-M.width(),height:M.outerHeight()-M.height()};this.originalMousePosition={left:N.pageX,top:N.pageY};this.aspectRatio=(typeof P.aspectRatio==="number")?P.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);Q=y(".ui-resizable-"+this.axis).css("cursor");y("body").css("cursor",Q==="auto"?this.axis+"-resize":Q);M.addClass("ui-resizable-resizing");this._propagate("start",N);return true},_mouseDrag:function(M){var Q,N=this.helper,R={},P=this.originalMousePosition,S=this.axis,U=(M.pageX-P.left)||0,T=(M.pageY-P.top)||0,O=this._change[S];this.prevPosition={top:this.position.top,left:this.position.left};this.prevSize={width:this.size.width,height:this.size.height};if(!O){return false}Q=O.apply(this,[M,U,T]);this._updateVirtualBoundaries(M.shiftKey);if(this._aspectRatio||M.shiftKey){Q=this._updateRatio(Q,M)}Q=this._respectSize(Q,M);this._updateCache(Q);this._propagate("resize",M);if(this.position.top!==this.prevPosition.top){R.top=this.position.top+"px"}if(this.position.left!==this.prevPosition.left){R.left=this.position.left+"px"}if(this.size.width!==this.prevSize.width){R.width=this.size.width+"px"}if(this.size.height!==this.prevSize.height){R.height=this.size.height+"px"}N.css(R);if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}if(!y.isEmptyObject(R)){this._trigger("resize",M,this.ui())}return false},_mouseStop:function(P){this.resizing=false;var O,M,N,S,V,R,U,Q=this.options,T=this;if(this._helper){O=this._proportionallyResizeElements;M=O.length&&(/textarea/i).test(O[0].nodeName);N=M&&this._hasScroll(O[0],"left")?0:T.sizeDiff.height;S=M?0:T.sizeDiff.width;V={width:(T.helper.width()-S),height:(T.helper.height()-N)};R=(parseInt(T.element.css("left"),10)+(T.position.left-T.originalPosition.left))||null;U=(parseInt(T.element.css("top"),10)+(T.position.top-T.originalPosition.top))||null;if(!Q.animate){this.element.css(y.extend(V,{top:U,left:R}))}T.helper.height(T.size.height);T.helper.width(T.size.width);if(this._helper&&!Q.animate){this._proportionallyResize()}}y("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",P);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(O){var Q,P,N,S,M,R=this.options;M={minWidth:this._isNumber(R.minWidth)?R.minWidth:0,maxWidth:this._isNumber(R.maxWidth)?R.maxWidth:Infinity,minHeight:this._isNumber(R.minHeight)?R.minHeight:0,maxHeight:this._isNumber(R.maxHeight)?R.maxHeight:Infinity};if(this._aspectRatio||O){Q=M.minHeight*this.aspectRatio;N=M.minWidth/this.aspectRatio;P=M.maxHeight*this.aspectRatio;S=M.maxWidth/this.aspectRatio;if(Q>M.minWidth){M.minWidth=Q}if(N>M.minHeight){M.minHeight=N}if(PR.width),V=this._isNumber(R.height)&&O.minHeight&&(O.minHeight>R.height),N=this.originalPosition.left+this.originalSize.width,T=this.position.top+this.size.height,Q=/sw|nw|w/.test(U),M=/nw|ne|n/.test(U);if(P){R.width=O.minWidth}if(V){R.height=O.minHeight}if(W){R.width=O.maxWidth}if(S){R.height=O.maxHeight}if(P&&Q){R.left=N-O.minWidth}if(W&&Q){R.left=N-O.maxWidth}if(V&&M){R.top=T-O.minHeight}if(S&&M){R.top=T-O.maxHeight}if(!R.width&&!R.height&&!R.left&&R.top){R.top=null}else{if(!R.width&&!R.height&&!R.top&&R.left){R.left=null}}return R},_proportionallyResize:function(){if(!this._proportionallyResizeElements.length){return}var P,N,R,M,Q,O=this.helper||this.element;for(P=0;P");this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++N.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(N,M){return{width:this.originalSize.width+M}},w:function(O,M){var N=this.originalSize,P=this.originalPosition;return{left:P.left+M,width:N.width-M}},n:function(P,N,M){var O=this.originalSize,Q=this.originalPosition;return{top:Q.top+M,height:O.height-M}},s:function(O,N,M){return{height:this.originalSize.height+M}},se:function(O,N,M){return y.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[O,N,M]))},sw:function(O,N,M){return y.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[O,N,M]))},ne:function(O,N,M){return y.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[O,N,M]))},nw:function(O,N,M){return y.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[O,N,M]))}},_propagate:function(N,M){y.ui.plugin.call(this,N,[M,this.ui()]);(N!=="resize"&&this._trigger(N,M,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition,prevSize:this.prevSize,prevPosition:this.prevPosition}}});y.ui.plugin.add("resizable","animate",{stop:function(P){var U=y(this).resizable("instance"),R=U.options,O=U._proportionallyResizeElements,M=O.length&&(/textarea/i).test(O[0].nodeName),N=M&&U._hasScroll(O[0],"left")?0:U.sizeDiff.height,T=M?0:U.sizeDiff.width,Q={width:(U.size.width-T),height:(U.size.height-N)},S=(parseInt(U.element.css("left"),10)+(U.position.left-U.originalPosition.left))||null,V=(parseInt(U.element.css("top"),10)+(U.position.top-U.originalPosition.top))||null;U.element.animate(y.extend(Q,V&&S?{top:V,left:S}:{}),{duration:R.animateDuration,easing:R.animateEasing,step:function(){var W={width:parseInt(U.element.css("width"),10),height:parseInt(U.element.css("height"),10),top:parseInt(U.element.css("top"),10),left:parseInt(U.element.css("left"),10)};if(O&&O.length){y(O[0]).css({width:W.width,height:W.height})}U._updateCache(W);U._propagate("resize",P)}})}});y.ui.plugin.add("resizable","containment",{start:function(){var U,O,W,M,T,P,X,V=y(this).resizable("instance"),S=V.options,R=V.element,N=S.containment,Q=(N instanceof y)?N.get(0):(/parent/.test(N))?R.parent().get(0):N;if(!Q){return}V.containerElement=y(Q);if(/document/.test(N)||N===document){V.containerOffset={left:0,top:0};V.containerPosition={left:0,top:0};V.parentData={element:y(document),left:0,top:0,width:y(document).width(),height:y(document).height()||document.body.parentNode.scrollHeight}}else{U=y(Q);O=[];y(["Top","Right","Left","Bottom"]).each(function(Z,Y){O[Z]=V._num(U.css("padding"+Y))});V.containerOffset=U.offset();V.containerPosition=U.position();V.containerSize={height:(U.innerHeight()-O[3]),width:(U.innerWidth()-O[1])};W=V.containerOffset;M=V.containerSize.height;T=V.containerSize.width;P=(V._hasScroll(Q,"left")?Q.scrollWidth:T);X=(V._hasScroll(Q)?Q.scrollHeight:M);V.parentData={element:Q,left:W.left,top:W.top,width:P,height:X}}},resize:function(N,X){var T,Z,S,Q,U=y(this).resizable("instance"),P=U.options,W=U.containerOffset,V=U.position,Y=U._aspectRatio||N.shiftKey,M={top:0,left:0},O=U.containerElement,R=true;if(O[0]!==document&&(/static/).test(O.css("position"))){M=W}if(V.left<(U._helper?W.left:0)){U.size.width=U.size.width+(U._helper?(U.position.left-W.left):(U.position.left-M.left));if(Y){U.size.height=U.size.width/U.aspectRatio;R=false}U.position.left=P.helper?W.left:0}if(V.top<(U._helper?W.top:0)){U.size.height=U.size.height+(U._helper?(U.position.top-W.top):U.position.top);if(Y){U.size.width=U.size.height*U.aspectRatio;R=false}U.position.top=U._helper?W.top:0}U.offset.left=U.parentData.left+U.position.left;U.offset.top=U.parentData.top+U.position.top;T=Math.abs((U._helper?U.offset.left-M.left:(U.offset.left-W.left))+U.sizeDiff.width);Z=Math.abs((U._helper?U.offset.top-M.top:(U.offset.top-W.top))+U.sizeDiff.height);S=U.containerElement.get(0)===U.element.parent().get(0);Q=/relative|absolute/.test(U.containerElement.css("position"));if(S&&Q){T-=Math.abs(U.parentData.left)}if(T+U.size.width>=U.parentData.width){U.size.width=U.parentData.width-T;if(Y){U.size.height=U.size.width/U.aspectRatio;R=false}}if(Z+U.size.height>=U.parentData.height){U.size.height=U.parentData.height-Z;if(Y){U.size.width=U.size.height*U.aspectRatio;R=false}}if(!R){U.position.left=X.prevPosition.left;U.position.top=X.prevPosition.top;U.size.width=X.prevSize.width;U.size.height=X.prevSize.height}},stop:function(){var R=y(this).resizable("instance"),N=R.options,S=R.containerOffset,M=R.containerPosition,O=R.containerElement,P=y(R.helper),U=P.offset(),T=P.outerWidth()-R.sizeDiff.width,Q=P.outerHeight()-R.sizeDiff.height;if(R._helper&&!N.animate&&(/relative/).test(O.css("position"))){y(this).css({left:U.left-M.left-S.left,width:T,height:Q})}if(R._helper&&!N.animate&&(/static/).test(O.css("position"))){y(this).css({left:U.left-M.left-S.left,width:T,height:Q})}}});y.ui.plugin.add("resizable","alsoResize",{start:function(){var M=y(this).resizable("instance"),O=M.options,N=function(P){y(P).each(function(){var Q=y(this);Q.data("ui-resizable-alsoresize",{width:parseInt(Q.width(),10),height:parseInt(Q.height(),10),left:parseInt(Q.css("left"),10),top:parseInt(Q.css("top"),10)})})};if(typeof(O.alsoResize)==="object"&&!O.alsoResize.parentNode){if(O.alsoResize.length){O.alsoResize=O.alsoResize[0];N(O.alsoResize)}else{y.each(O.alsoResize,function(P){N(P)})}}else{N(O.alsoResize)}},resize:function(O,Q){var N=y(this).resizable("instance"),R=N.options,P=N.originalSize,T=N.originalPosition,S={height:(N.size.height-P.height)||0,width:(N.size.width-P.width)||0,top:(N.position.top-T.top)||0,left:(N.position.left-T.left)||0},M=function(U,V){y(U).each(function(){var Y=y(this),Z=y(this).data("ui-resizable-alsoresize"),X={},W=V&&V.length?V:Y.parents(Q.originalElement[0]).length?["width","height"]:["width","height","top","left"];y.each(W,function(aa,ac){var ab=(Z[ac]||0)+(S[ac]||0);if(ab&&ab>=0){X[ac]=ab||null}});Y.css(X)})};if(typeof(R.alsoResize)==="object"&&!R.alsoResize.nodeType){y.each(R.alsoResize,function(U,V){M(U,V)})}else{M(R.alsoResize)}},stop:function(){y(this).removeData("resizable-alsoresize")}});y.ui.plugin.add("resizable","ghost",{start:function(){var N=y(this).resizable("instance"),O=N.options,M=N.size;N.ghost=N.originalElement.clone();N.ghost.css({opacity:0.25,display:"block",position:"relative",height:M.height,width:M.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof O.ghost==="string"?O.ghost:"");N.ghost.appendTo(N.helper)},resize:function(){var M=y(this).resizable("instance");if(M.ghost){M.ghost.css({position:"relative",height:M.size.height,width:M.size.width})}},stop:function(){var M=y(this).resizable("instance");if(M.ghost&&M.helper){M.helper.get(0).removeChild(M.ghost.get(0))}}});y.ui.plugin.add("resizable","grid",{resize:function(){var Y=y(this).resizable("instance"),Q=Y.options,Z=Y.size,S=Y.originalSize,V=Y.originalPosition,aa=Y.axis,N=typeof Q.grid==="number"?[Q.grid,Q.grid]:Q.grid,W=(N[0]||1),U=(N[1]||1),P=Math.round((Z.width-S.width)/W)*W,O=Math.round((Z.height-S.height)/U)*U,T=S.width+P,M=S.height+O,R=Q.maxWidth&&(Q.maxWidthT),ac=Q.minHeight&&(Q.minHeight>M);Q.grid=N;if(X){T=T+W}if(ac){M=M+U}if(R){T=T-W}if(ab){M=M-U}if(/^(se|s|e)$/.test(aa)){Y.size.width=T;Y.size.height=M}else{if(/^(ne)$/.test(aa)){Y.size.width=T;Y.size.height=M;Y.position.top=V.top-O}else{if(/^(sw)$/.test(aa)){Y.size.width=T;Y.size.height=M;Y.position.left=V.left-P}else{if(M-U>0){Y.size.height=M;Y.position.top=V.top-O}else{Y.size.height=U;Y.position.top=V.top+S.height-U}if(T-W>0){Y.size.width=T;Y.position.left=V.left-P}else{Y.size.width=W;Y.position.left=V.left+S.width-W}}}}}});var B=y.ui.resizable; +/*! + * jQuery UI Selectable 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/selectable/ + */ +var d=y.widget("ui.selectable",y.ui.mouse,{version:"1.11.0",options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var N,M=this;this.element.addClass("ui-selectable");this.dragged=false;this.refresh=function(){N=y(M.options.filter,M.element[0]);N.addClass("ui-selectee");N.each(function(){var O=y(this),P=O.offset();y.data(this,"selectable-item",{element:this,$element:O,left:P.left,top:P.top,right:P.left+O.outerWidth(),bottom:P.top+O.outerHeight(),startselected:false,selected:O.hasClass("ui-selected"),selecting:O.hasClass("ui-selecting"),unselecting:O.hasClass("ui-unselecting")})})};this.refresh();this.selectees=N.addClass("ui-selectee");this._mouseInit();this.helper=y("
")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled");this._mouseDestroy()},_mouseStart:function(O){var N=this,M=this.options;this.opos=[O.pageX,O.pageY];if(this.options.disabled){return}this.selectees=y(M.filter,this.element[0]);this._trigger("start",O);y(M.appendTo).append(this.helper);this.helper.css({left:O.pageX,top:O.pageY,width:0,height:0});if(M.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var P=y.data(this,"selectable-item");P.startselected=true;if(!O.metaKey&&!O.ctrlKey){P.$element.removeClass("ui-selected");P.selected=false;P.$element.addClass("ui-unselecting");P.unselecting=true;N._trigger("unselecting",O,{unselecting:P.element})}});y(O.target).parents().addBack().each(function(){var P,Q=y.data(this,"selectable-item");if(Q){P=(!O.metaKey&&!O.ctrlKey)||!Q.$element.hasClass("ui-selected");Q.$element.removeClass(P?"ui-unselecting":"ui-selected").addClass(P?"ui-selecting":"ui-unselecting");Q.unselecting=!P;Q.selecting=P;Q.selected=P;if(P){N._trigger("selecting",O,{selecting:Q.element})}else{N._trigger("unselecting",O,{unselecting:Q.element})}return false}})},_mouseDrag:function(T){this.dragged=true;if(this.options.disabled){return}var Q,S=this,O=this.options,N=this.opos[0],R=this.opos[1],M=T.pageX,P=T.pageY;if(N>M){Q=M;M=N;N=Q}if(R>P){Q=P;P=R;R=Q}this.helper.css({left:N,top:R,width:M-N,height:P-R});this.selectees.each(function(){var U=y.data(this,"selectable-item"),V=false;if(!U||U.element===S.element[0]){return}if(O.tolerance==="touch"){V=(!(U.left>M||U.rightP||U.bottomN&&U.rightR&&U.bottom *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000,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(N,M,O){return(N>=M)&&(N<(M+O))},_isFloating:function(M){return(/left|right/).test(M.css("float"))||(/inline|table-cell/).test(M.css("display"))},_create:function(){var M=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?M.axis==="x"||this._isFloating(this.items[0].item):false;this.offset=this.element.offset();this._mouseInit();this._setHandleClassName();this.ready=true},_setOption:function(M,N){this._super(M,N);if(M==="handle"){this._setHandleClassName()}},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle");y.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle");this._mouseDestroy();for(var M=this.items.length-1;M>=0;M--){this.items[M].item.removeData(this.widgetName+"-item")}return this},_mouseCapture:function(O,P){var M=null,Q=false,N=this;if(this.reverting){return false}if(this.options.disabled||this.options.type==="static"){return false}this._refreshItems(O);y(O.target).parents().each(function(){if(y.data(this,N.widgetName+"-item")===N){M=y(this);return false}});if(y.data(O.target,N.widgetName+"-item")===N){M=y(O.target)}if(!M){return false}if(this.options.handle&&!P){y(this.options.handle,M).find("*").addBack().each(function(){if(this===O.target){Q=true}});if(!Q){return false}}this.currentItem=M;this._removeCurrentsFromItems();return true},_mouseStart:function(P,Q,N){var O,M,R=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(P);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};y.extend(this.offset,{click:{left:P.pageX-this.offset.left,top:P.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(P);this.originalPageX=P.pageX;this.originalPageY=P.pageY;(R.cursorAt&&this._adjustOffsetFromHelper(R.cursorAt));this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!==this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(R.containment){this._setContainment()}if(R.cursor&&R.cursor!=="auto"){M=this.document.find("body");this.storedCursor=M.css("cursor");M.css("cursor",R.cursor);this.storedStylesheet=y("").appendTo(M)}if(R.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",R.opacity)}if(R.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",R.zIndex)}if(this.scrollParent[0]!==document&&this.scrollParent[0].tagName!=="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",P,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!N){for(O=this.containers.length-1;O>=0;O--){this.containers[O]._trigger("activate",P,this._uiHash(this))}}if(y.ui.ddmanager){y.ui.ddmanager.current=this}if(y.ui.ddmanager&&!R.dropBehaviour){y.ui.ddmanager.prepareOffsets(this,P)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(P);return true},_mouseDrag:function(Q){var O,P,N,S,R=this.options,M=false;this.position=this._generatePosition(Q);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){if(this.scrollParent[0]!==document&&this.scrollParent[0].tagName!=="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-Q.pageY=0;O--){P=this.items[O];N=P.item[0];S=this._intersectsWithPointer(P);if(!S){continue}if(P.instance!==this.currentContainer){continue}if(N!==this.currentItem[0]&&this.placeholder[S===1?"next":"prev"]()[0]!==N&&!y.contains(this.placeholder[0],N)&&(this.options.type==="semi-dynamic"?!y.contains(this.element[0],N):true)){this.direction=S===1?"down":"up";if(this.options.tolerance==="pointer"||this._intersectsWithSides(P)){this._rearrange(Q,P)}else{break}this._trigger("change",Q,this._uiHash());break}}this._contactContainers(Q);if(y.ui.ddmanager){y.ui.ddmanager.drag(this,Q)}this._trigger("sort",Q,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(O,Q){if(!O){return}if(y.ui.ddmanager&&!this.options.dropBehaviour){y.ui.ddmanager.drop(this,O)}if(this.options.revert){var N=this,R=this.placeholder.offset(),M=this.options.axis,P={};if(!M||M==="x"){P.left=R.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)}if(!M||M==="y"){P.top=R.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)}this.reverting=true;y(this.helper).animate(P,parseInt(this.options.revert,10)||500,function(){N._clear(O)})}else{this._clear(O,Q)}return false},cancel:function(){if(this.dragging){this._mouseUp({target:null});if(this.options.helper==="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var M=this.containers.length-1;M>=0;M--){this.containers[M]._trigger("deactivate",null,this._uiHash(this));if(this.containers[M].containerCache.over){this.containers[M]._trigger("out",null,this._uiHash(this));this.containers[M].containerCache.over=0}}}if(this.placeholder){if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!=="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}y.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){y(this.domPosition.prev).after(this.currentItem)}else{y(this.domPosition.parent).prepend(this.currentItem)}}return this},serialize:function(O){var M=this._getItemsAsjQuery(O&&O.connected),N=[];O=O||{};y(M).each(function(){var P=(y(O.item||this).attr(O.attribute||"id")||"").match(O.expression||(/(.+)[\-=_](.+)/));if(P){N.push((O.key||P[1]+"[]")+"="+(O.key&&O.expression?P[1]:P[2]))}});if(!N.length&&O.key){N.push(O.key+"=")}return N.join("&")},toArray:function(O){var M=this._getItemsAsjQuery(O&&O.connected),N=[];O=O||{};M.each(function(){N.push(y(O.item||this).attr(O.attribute||"id")||"")});return N},_intersectsWith:function(X){var O=this.positionAbs.left,N=O+this.helperProportions.width,V=this.positionAbs.top,U=V+this.helperProportions.height,P=X.left,M=P+X.width,Y=X.top,T=Y+X.height,Z=this.offset.click.top,S=this.offset.click.left,R=(this.options.axis==="x")||((V+Z)>Y&&(V+Z)P&&(O+S)X[this.floating?"width":"height"])){return Q}else{return(P0?"down":"up")},_getDragHorizontalDirection:function(){var M=this.positionAbs.left-this.lastPositionAbs.left;return M!==0&&(M>0?"right":"left")},refresh:function(M){this._refreshItems(M);this._setHandleClassName();this.refreshPositions();return this},_connectWith:function(){var M=this.options;return M.connectWith.constructor===String?[M.connectWith]:M.connectWith},_getItemsAsjQuery:function(M){var O,N,T,Q,R=[],P=[],S=this._connectWith();if(S&&M){for(O=S.length-1;O>=0;O--){T=y(S[O]);for(N=T.length-1;N>=0;N--){Q=y.data(T[N],this.widgetFullName);if(Q&&Q!==this&&!Q.options.disabled){P.push([y.isFunction(Q.options.items)?Q.options.items.call(Q.element):y(Q.options.items,Q.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),Q])}}}}P.push([y.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):y(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);function U(){R.push(this)}for(O=P.length-1;O>=0;O--){P[O][0].each(U)}return y(R)},_removeCurrentsFromItems:function(){var M=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=y.grep(this.items,function(O){for(var N=0;N=0;Q--){V=y(T[Q]);for(O=V.length-1;O>=0;O--){R=y.data(V[O],this.widgetFullName);if(R&&R!==this&&!R.options.disabled){P.push([y.isFunction(R.options.items)?R.options.items.call(R.element[0],M,{item:this.currentItem}):y(R.options.items,R.element),R]);this.containers.push(R)}}}}for(Q=P.length-1;Q>=0;Q--){U=P[Q][1];N=P[Q][0];for(O=0,W=N.length;O=0;O--){P=this.items[O];if(P.instance!==this.currentContainer&&this.currentContainer&&P.item[0]!==this.currentItem[0]){continue}N=this.options.toleranceElement?y(this.options.toleranceElement,P.item):P.item;if(!M){P.width=N.outerWidth();P.height=N.outerHeight()}Q=N.offset();P.left=Q.left;P.top=Q.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(O=this.containers.length-1;O>=0;O--){Q=this.containers[O].element.offset();this.containers[O].containerCache.left=Q.left;this.containers[O].containerCache.top=Q.top;this.containers[O].containerCache.width=this.containers[O].element.outerWidth();this.containers[O].containerCache.height=this.containers[O].element.outerHeight()}}return this},_createPlaceholder:function(N){N=N||this;var M,O=N.options;if(!O.placeholder||O.placeholder.constructor===String){M=O.placeholder;O.placeholder={element:function(){var Q=N.currentItem[0].nodeName.toLowerCase(),P=y("<"+Q+">",N.document[0]).addClass(M||N.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");if(Q==="tr"){N.currentItem.children().each(function(){y(" ",N.document[0]).attr("colspan",y(this).attr("colspan")||1).appendTo(P)})}else{if(Q==="img"){P.attr("src",N.currentItem.attr("src"))}}if(!M){P.css("visibility","hidden")}return P},update:function(P,Q){if(M&&!O.forcePlaceholderSize){return}if(!Q.height()){Q.height(N.currentItem.innerHeight()-parseInt(N.currentItem.css("paddingTop")||0,10)-parseInt(N.currentItem.css("paddingBottom")||0,10))}if(!Q.width()){Q.width(N.currentItem.innerWidth()-parseInt(N.currentItem.css("paddingLeft")||0,10)-parseInt(N.currentItem.css("paddingRight")||0,10))}}}}N.placeholder=y(O.placeholder.element.call(N.element,N.currentItem));N.currentItem.after(N.placeholder);O.placeholder.update(N,N.placeholder)},_contactContainers:function(M){var R,P,V,S,T,X,Y,Q,U,O,N=null,W=null;for(R=this.containers.length-1;R>=0;R--){if(y.contains(this.currentItem[0],this.containers[R].element[0])){continue}if(this._intersectsWith(this.containers[R].containerCache)){if(N&&y.contains(this.containers[R].element[0],N.element[0])){continue}N=this.containers[R];W=R}else{if(this.containers[R].containerCache.over){this.containers[R]._trigger("out",M,this._uiHash(this));this.containers[R].containerCache.over=0}}}if(!N){return}if(this.containers.length===1){if(!this.containers[W].containerCache.over){this.containers[W]._trigger("over",M,this._uiHash(this));this.containers[W].containerCache.over=1}}else{V=10000;S=null;U=N.floating||this._isFloating(this.currentItem);T=U?"left":"top";X=U?"width":"height";O=U?"clientX":"clientY";for(P=this.items.length-1;P>=0;P--){if(!y.contains(this.containers[W].element[0],this.items[P].item[0])){continue}if(this.items[P].item[0]===this.currentItem[0]){continue}Y=this.items[P].item.offset()[T];Q=false;if(M[O]-Y>this.items[P][X]/2){Q=true}if(Math.abs(M[O]-Y)this.containment[2]){O=this.containment[2]+this.offset.click.left}if(P.pageY-this.offset.click.top>this.containment[3]){N=this.containment[3]+this.offset.click.top}}if(S.grid){R=this.originalPageY+Math.round((N-this.originalPageY)/S.grid[1])*S.grid[1];N=this.containment?((R-this.offset.click.top>=this.containment[1]&&R-this.offset.click.top<=this.containment[3])?R:((R-this.offset.click.top>=this.containment[1])?R-S.grid[1]:R+S.grid[1])):R;Q=this.originalPageX+Math.round((O-this.originalPageX)/S.grid[0])*S.grid[0];O=this.containment?((Q-this.offset.click.left>=this.containment[0]&&Q-this.offset.click.left<=this.containment[2])?Q:((Q-this.offset.click.left>=this.containment[0])?Q-S.grid[0]:Q+S.grid[0])):Q}}return{top:(N-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+((this.cssPosition==="fixed"?-this.scrollParent.scrollTop():(T?0:M.scrollTop())))),left:(O-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+((this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():T?0:M.scrollLeft())))}},_rearrange:function(Q,P,N,O){N?N[0].appendChild(this.placeholder[0]):P.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction==="down"?P.item[0]:P.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var M=this.counter;this._delay(function(){if(M===this.counter){this.refreshPositions(!O)}})},_clear:function(N,P){this.reverting=false;var M,Q=[];if(!this._noFinalSort&&this.currentItem.parent().length){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]===this.currentItem[0]){for(M in this._storedCSS){if(this._storedCSS[M]==="auto"||this._storedCSS[M]==="static"){this._storedCSS[M]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!P){Q.push(function(R){this._trigger("receive",R,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!==this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!==this.currentItem.parent()[0])&&!P){Q.push(function(R){this._trigger("update",R,this._uiHash())})}if(this!==this.currentContainer){if(!P){Q.push(function(R){this._trigger("remove",R,this._uiHash())});Q.push((function(R){return function(S){R._trigger("receive",S,this._uiHash(this))}}).call(this,this.currentContainer));Q.push((function(R){return function(S){R._trigger("update",S,this._uiHash(this))}}).call(this,this.currentContainer))}}function O(T,R,S){return function(U){S._trigger(T,U,R._uiHash(R))}}for(M=this.containers.length-1;M>=0;M--){if(!P){Q.push(O("deactivate",this,this.containers[M]))}if(this.containers[M].containerCache.over){Q.push(O("out",this,this.containers[M]));this.containers[M].containerCache.over=0}}if(this.storedCursor){this.document.find("body").css("cursor",this.storedCursor);this.storedStylesheet.remove()}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex==="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!P){this._trigger("beforeStop",N,this._uiHash());for(M=0;M"))}y.extend(K.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(M){p(this._defaults,M||{});return this},_attachDatepicker:function(P,M){var Q,O,N;Q=P.nodeName.toLowerCase();O=(Q==="div"||Q==="span");if(!P.id){this.uuid+=1;P.id="dp"+this.uuid}N=this._newInst(y(P),O);N.settings=y.extend({},M||{});if(Q==="input"){this._connectDatepicker(P,N)}else{if(O){this._inlineDatepicker(P,N)}}},_newInst:function(N,M){var O=N[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:O,input:N,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:M,dpDiv:(!M?this.dpDiv:g(y("
")))}},_connectDatepicker:function(O,N){var M=y(O);N.append=y([]);N.trigger=y([]);if(M.hasClass(this.markerClassName)){return}this._attachments(M,N);M.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp);this._autoSize(N);y.data(O,"datepicker",N);if(N.settings.disabled){this._disableDatepicker(O)}},_attachments:function(O,R){var N,Q,M,S=this._get(R,"appendText"),P=this._get(R,"isRTL");if(R.append){R.append.remove()}if(S){R.append=y(""+S+"");O[P?"before":"after"](R.append)}O.unbind("focus",this._showDatepicker);if(R.trigger){R.trigger.remove()}N=this._get(R,"showOn");if(N==="focus"||N==="both"){O.focus(this._showDatepicker)}if(N==="button"||N==="both"){Q=this._get(R,"buttonText");M=this._get(R,"buttonImage");R.trigger=y(this._get(R,"buttonImageOnly")?y("").addClass(this._triggerClass).attr({src:M,alt:Q,title:Q}):y("").addClass(this._triggerClass).html(!M?Q:y("").attr({src:M,alt:Q,title:Q})));O[P?"before":"after"](R.trigger);R.trigger.click(function(){if(y.datepicker._datepickerShowing&&y.datepicker._lastInput===O[0]){y.datepicker._hideDatepicker()}else{if(y.datepicker._datepickerShowing&&y.datepicker._lastInput!==O[0]){y.datepicker._hideDatepicker();y.datepicker._showDatepicker(O[0])}else{y.datepicker._showDatepicker(O[0])}}return false})}},_autoSize:function(S){if(this._get(S,"autoSize")&&!S.inline){var P,N,O,R,Q=new Date(2009,12-1,20),M=this._get(S,"dateFormat");if(M.match(/[DM]/)){P=function(T){N=0;O=0;for(R=0;RN){N=T[R].length;O=R}}return O};Q.setMonth(P(this._get(S,(M.match(/MM/)?"monthNames":"monthNamesShort"))));Q.setDate(P(this._get(S,(M.match(/DD/)?"dayNames":"dayNamesShort")))+20-Q.getDay())}S.input.attr("size",this._formatDate(S,Q).length)}},_inlineDatepicker:function(N,M){var O=y(N);if(O.hasClass(this.markerClassName)){return}O.addClass(this.markerClassName).append(M.dpDiv);y.data(N,"datepicker",M);this._setDate(M,this._getDefaultDate(M),true);this._updateDatepicker(M);this._updateAlternate(M);if(M.settings.disabled){this._disableDatepicker(N)}M.dpDiv.css("display","block")},_dialogDatepicker:function(T,N,R,O,S){var M,W,Q,V,U,P=this._dialogInst;if(!P){this.uuid+=1;M="dp"+this.uuid;this._dialogInput=y("");this._dialogInput.keydown(this._doKeyDown);y("body").append(this._dialogInput);P=this._dialogInst=this._newInst(this._dialogInput,false);P.settings={};y.data(this._dialogInput[0],"datepicker",P)}p(P.settings,O||{});N=(N&&N.constructor===Date?this._formatDate(P,N):N);this._dialogInput.val(N);this._pos=(S?(S.length?S:[S.pageX,S.pageY]):null);if(!this._pos){W=document.documentElement.clientWidth;Q=document.documentElement.clientHeight;V=document.documentElement.scrollLeft||document.body.scrollLeft;U=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(W/2)-100+V,(Q/2)-150+U]}this._dialogInput.css("left",(this._pos[0]+20)+"px").css("top",this._pos[1]+"px");P.settings.onSelect=R;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if(y.blockUI){y.blockUI(this.dpDiv)}y.data(this._dialogInput[0],"datepicker",P);return this},_destroyDatepicker:function(O){var P,M=y(O),N=y.data(O,"datepicker");if(!M.hasClass(this.markerClassName)){return}P=O.nodeName.toLowerCase();y.removeData(O,"datepicker");if(P==="input"){N.append.remove();N.trigger.remove();M.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else{if(P==="div"||P==="span"){M.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(P){var Q,O,M=y(P),N=y.data(P,"datepicker");if(!M.hasClass(this.markerClassName)){return}Q=P.nodeName.toLowerCase();if(Q==="input"){P.disabled=false;N.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(Q==="div"||Q==="span"){O=M.children("."+this._inlineClass);O.children().removeClass("ui-state-disabled");O.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",false)}}this._disabledInputs=y.map(this._disabledInputs,function(R){return(R===P?null:R)})},_disableDatepicker:function(P){var Q,O,M=y(P),N=y.data(P,"datepicker");if(!M.hasClass(this.markerClassName)){return}Q=P.nodeName.toLowerCase();if(Q==="input"){P.disabled=true;N.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(Q==="div"||Q==="span"){O=M.children("."+this._inlineClass);O.children().addClass("ui-state-disabled");O.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",true)}}this._disabledInputs=y.map(this._disabledInputs,function(R){return(R===P?null:R)});this._disabledInputs[this._disabledInputs.length]=P},_isDisabledDatepicker:function(N){if(!N){return false}for(var M=0;M-1)}},_doKeyUp:function(O){var M,P=y.datepicker._getInst(O.target);if(P.input.val()!==P.lastVal){try{M=y.datepicker.parseDate(y.datepicker._get(P,"dateFormat"),(P.input?P.input.val():null),y.datepicker._getFormatConfig(P));if(M){y.datepicker._setDateFromField(P);y.datepicker._updateAlternate(P);y.datepicker._updateDatepicker(P)}}catch(N){}}return true},_showDatepicker:function(N){N=N.target||N;if(N.nodeName.toLowerCase()!=="input"){N=y("input",N.parentNode)[0]}if(y.datepicker._isDisabledDatepicker(N)||y.datepicker._lastInput===N){return}var P,T,O,R,S,M,Q;P=y.datepicker._getInst(N);if(y.datepicker._curInst&&y.datepicker._curInst!==P){y.datepicker._curInst.dpDiv.stop(true,true);if(P&&y.datepicker._datepickerShowing){y.datepicker._hideDatepicker(y.datepicker._curInst.input[0])}}T=y.datepicker._get(P,"beforeShow");O=T?T.apply(N,[N,P]):{};if(O===false){return}p(P.settings,O);P.lastVal=null;y.datepicker._lastInput=N;y.datepicker._setDateFromField(P);if(y.datepicker._inDialog){N.value=""}if(!y.datepicker._pos){y.datepicker._pos=y.datepicker._findPos(N);y.datepicker._pos[1]+=N.offsetHeight}R=false;y(N).parents().each(function(){R|=y(this).css("position")==="fixed";return !R});S={left:y.datepicker._pos[0],top:y.datepicker._pos[1]};y.datepicker._pos=null;P.dpDiv.empty();P.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});y.datepicker._updateDatepicker(P);S=y.datepicker._checkOffset(P,S,R);P.dpDiv.css({position:(y.datepicker._inDialog&&y.blockUI?"static":(R?"fixed":"absolute")),display:"none",left:S.left+"px",top:S.top+"px"});if(!P.inline){M=y.datepicker._get(P,"showAnim");Q=y.datepicker._get(P,"duration");y.datepicker._datepickerShowing=true;if(y.effects&&y.effects.effect[M]){P.dpDiv.show(M,y.datepicker._get(P,"showOptions"),Q)}else{P.dpDiv[M||"show"](M?Q:null)}if(y.datepicker._shouldFocusInput(P)){P.input.focus()}y.datepicker._curInst=P}},_updateDatepicker:function(O){this.maxRows=4;j=O;O.dpDiv.empty().append(this._generateHTML(O));this._attachHandlers(O);O.dpDiv.find("."+this._dayOverClass+" a");var Q,M=this._getNumberOfMonths(O),P=M[1],N=17;O.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");if(P>1){O.dpDiv.addClass("ui-datepicker-multi-"+P).css("width",(N*P)+"em")}O.dpDiv[(M[0]!==1||M[1]!==1?"add":"remove")+"Class"]("ui-datepicker-multi");O.dpDiv[(this._get(O,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(O.yearshtml){Q=O.yearshtml;setTimeout(function(){if(Q===O.yearshtml&&O.yearshtml){O.dpDiv.find("select.ui-datepicker-year:first").replaceWith(O.yearshtml)}Q=O.yearshtml=null},0)}},_shouldFocusInput:function(M){return M.input&&M.input.is(":visible")&&!M.input.is(":disabled")&&!M.input.is(":focus")},_checkOffset:function(R,P,O){var Q=R.dpDiv.outerWidth(),U=R.dpDiv.outerHeight(),T=R.input?R.input.outerWidth():0,M=R.input?R.input.outerHeight():0,S=document.documentElement.clientWidth+(O?0:y(document).scrollLeft()),N=document.documentElement.clientHeight+(O?0:y(document).scrollTop());P.left-=(this._get(R,"isRTL")?(Q-T):0);P.left-=(O&&P.left===R.input.offset().left)?y(document).scrollLeft():0;P.top-=(O&&P.top===(R.input.offset().top+M))?y(document).scrollTop():0;P.left-=Math.min(P.left,(P.left+Q>S&&S>Q)?Math.abs(P.left+Q-S):0);P.top-=Math.min(P.top,(P.top+U>N&&N>U)?Math.abs(U+M):0);return P},_findPos:function(P){var M,O=this._getInst(P),N=this._get(O,"isRTL");while(P&&(P.type==="hidden"||P.nodeType!==1||y.expr.filters.hidden(P))){P=P[N?"previousSibling":"nextSibling"]}M=y(P).offset();return[M.left,M.top]},_hideDatepicker:function(O){var N,R,Q,M,P=this._curInst;if(!P||(O&&P!==y.data(O,"datepicker"))){return}if(this._datepickerShowing){N=this._get(P,"showAnim");R=this._get(P,"duration");Q=function(){y.datepicker._tidyDialog(P)};if(y.effects&&(y.effects.effect[N]||y.effects[N])){P.dpDiv.hide(N,y.datepicker._get(P,"showOptions"),R,Q)}else{P.dpDiv[(N==="slideDown"?"slideUp":(N==="fadeIn"?"fadeOut":"hide"))]((N?R:null),Q)}if(!N){Q()}this._datepickerShowing=false;M=this._get(P,"onClose");if(M){M.apply((P.input?P.input[0]:null),[(P.input?P.input.val():""),P])}this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(y.blockUI){y.unblockUI();y("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(M){M.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(N){if(!y.datepicker._curInst){return}var M=y(N.target),O=y.datepicker._getInst(M[0]);if(((M[0].id!==y.datepicker._mainDivId&&M.parents("#"+y.datepicker._mainDivId).length===0&&!M.hasClass(y.datepicker.markerClassName)&&!M.closest("."+y.datepicker._triggerClass).length&&y.datepicker._datepickerShowing&&!(y.datepicker._inDialog&&y.blockUI)))||(M.hasClass(y.datepicker.markerClassName)&&y.datepicker._curInst!==O)){y.datepicker._hideDatepicker()}},_adjustDate:function(Q,P,O){var N=y(Q),M=this._getInst(N[0]);if(this._isDisabledDatepicker(N[0])){return}this._adjustInstDate(M,P+(O==="M"?this._get(M,"showCurrentAtPos"):0),O);this._updateDatepicker(M)},_gotoToday:function(P){var M,O=y(P),N=this._getInst(O[0]);if(this._get(N,"gotoCurrent")&&N.currentDay){N.selectedDay=N.currentDay;N.drawMonth=N.selectedMonth=N.currentMonth;N.drawYear=N.selectedYear=N.currentYear}else{M=new Date();N.selectedDay=M.getDate();N.drawMonth=N.selectedMonth=M.getMonth();N.drawYear=N.selectedYear=M.getFullYear()}this._notifyChange(N);this._adjustDate(O);if(N.input){N.input.trigger("blur")}},_selectMonthYear:function(Q,M,P){var O=y(Q),N=this._getInst(O[0]);N["selected"+(P==="M"?"Month":"Year")]=N["draw"+(P==="M"?"Month":"Year")]=parseInt(M.options[M.selectedIndex].value,10);this._notifyChange(N);this._adjustDate(O)},_selectDay:function(R,P,M,Q){var N,O=y(R);if(y(Q).hasClass(this._unselectableClass)||this._isDisabledDatepicker(O[0])){return}N=this._getInst(O[0]);N.selectedDay=N.currentDay=y("a",Q).html();N.selectedMonth=N.currentMonth=P;N.selectedYear=N.currentYear=M;this._selectDate(R,this._formatDate(N,N.currentDay,N.currentMonth,N.currentYear))},_clearDate:function(N){var M=y(N);this._selectDate(M,"")},_selectDate:function(Q,M){var N,P=y(Q),O=this._getInst(P[0]);M=(M!=null?M:this._formatDate(O));if(O.input){O.input.val(M)}this._updateAlternate(O);N=this._get(O,"onSelect");if(N){N.apply((O.input?O.input[0]:null),[M,O])}else{if(O.input){O.input.trigger("change")}}if(O.inline){this._updateDatepicker(O)}else{this._hideDatepicker();this._lastInput=O.input[0];if(typeof(O.input[0])!=="object"){O.input.focus()}this._lastInput=null}},_updateAlternate:function(Q){var P,O,M,N=this._get(Q,"altField");if(N){P=this._get(Q,"altFormat")||this._get(Q,"dateFormat");O=this._getDate(Q);M=this.formatDate(P,O,this._getFormatConfig(Q));y(N).each(function(){y(this).val(M)})}},noWeekends:function(N){var M=N.getDay();return[(M>0&&M<6),""]},iso8601Week:function(M){var N,O=new Date(M.getTime());O.setDate(O.getDate()+4-(O.getDay()||7));N=O.getTime();O.setMonth(0);O.setDate(1);return Math.floor(Math.round((N-O)/86400000)/7)+1},parseDate:function(ac,X,ae){if(ac==null||X==null){throw"Invalid arguments"}X=(typeof X==="object"?X.toString():X+"");if(X===""){return null}var P,Z,N,ad=0,S=(ae?ae.shortYearCutoff:null)||this._defaults.shortYearCutoff,O=(typeof S!=="string"?S:new Date().getFullYear()%100+parseInt(S,10)),V=(ae?ae.dayNamesShort:null)||this._defaults.dayNamesShort,ag=(ae?ae.dayNames:null)||this._defaults.dayNames,M=(ae?ae.monthNamesShort:null)||this._defaults.monthNamesShort,Q=(ae?ae.monthNames:null)||this._defaults.monthNames,R=-1,ah=-1,ab=-1,U=-1,aa=false,af,W=function(aj){var ak=(P+1-1){ah=1;ab=U;do{Z=this._getDaysInMonth(R,ah-1);if(ab<=Z){break}ah++;ab-=Z}while(true)}af=this._daylightSavingAdjust(new Date(R,ah-1,ab));if(af.getFullYear()!==R||af.getMonth()+1!==ah||af.getDate()!==ab){throw"Invalid date"}return af},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*10000000),formatDate:function(V,P,Q){if(!P){return""}var X,Y=(Q?Q.dayNamesShort:null)||this._defaults.dayNamesShort,N=(Q?Q.dayNames:null)||this._defaults.dayNames,T=(Q?Q.monthNamesShort:null)||this._defaults.monthNamesShort,R=(Q?Q.monthNames:null)||this._defaults.monthNames,W=function(Z){var aa=(X+112?M.getHours()+2:0);return M},_setDate:function(S,P,R){var M=!P,O=S.selectedMonth,Q=S.selectedYear,N=this._restrictMinMax(S,this._determineDate(S,P,new Date()));S.selectedDay=S.currentDay=N.getDate();S.drawMonth=S.selectedMonth=S.currentMonth=N.getMonth();S.drawYear=S.selectedYear=S.currentYear=N.getFullYear();if((O!==S.selectedMonth||Q!==S.selectedYear)&&!R){this._notifyChange(S)}this._adjustInstDate(S);if(S.input){S.input.val(M?"":this._formatDate(S))}},_getDate:function(N){var M=(!N.currentYear||(N.input&&N.input.val()==="")?null:this._daylightSavingAdjust(new Date(N.currentYear,N.currentMonth,N.currentDay)));return M},_attachHandlers:function(N){var M=this._get(N,"stepMonths"),O="#"+N.id.replace(/\\\\/g,"\\");N.dpDiv.find("[data-handler]").map(function(){var P={prev:function(){y.datepicker._adjustDate(O,-M,"M")},next:function(){y.datepicker._adjustDate(O,+M,"M")},hide:function(){y.datepicker._hideDatepicker()},today:function(){y.datepicker._gotoToday(O)},selectDay:function(){y.datepicker._selectDay(O,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this);return false},selectMonth:function(){y.datepicker._selectMonthYear(O,this,"M");return false},selectYear:function(){y.datepicker._selectMonthYear(O,this,"Y");return false}};y(this).bind(this.getAttribute("data-event"),P[this.getAttribute("data-handler")])})},_generateHTML:function(aD){var af,ae,ay,ap,Q,aH,aB,au,aK,an,aO,X,Z,Y,N,aG,V,ai,aJ,aw,aP,ah,am,W,R,az,ar,av,at,U,ak,aa,aC,aF,P,aI,aM,aq,ab,aE=new Date(),ag=this._daylightSavingAdjust(new Date(aE.getFullYear(),aE.getMonth(),aE.getDate())),aL=this._get(aD,"isRTL"),aN=this._get(aD,"showButtonPanel"),ax=this._get(aD,"hideIfNoPrevNext"),al=this._get(aD,"navigationAsDateFormat"),ac=this._getNumberOfMonths(aD),T=this._get(aD,"showCurrentAtPos"),ao=this._get(aD,"stepMonths"),aj=(ac[0]!==1||ac[1]!==1),O=this._daylightSavingAdjust((!aD.currentDay?new Date(9999,9,9):new Date(aD.currentYear,aD.currentMonth,aD.currentDay))),S=this._getMinMaxDate(aD,"min"),ad=this._getMinMaxDate(aD,"max"),M=aD.drawMonth-T,aA=aD.drawYear;if(M<0){M+=12;aA--}if(ad){af=this._daylightSavingAdjust(new Date(ad.getFullYear(),ad.getMonth()-(ac[0]*ac[1])+1,ad.getDate()));af=(S&&afaf){M--;if(M<0){M=11;aA--}}}aD.drawMonth=M;aD.drawYear=aA;ae=this._get(aD,"prevText");ae=(!al?ae:this.formatDate(ae,this._daylightSavingAdjust(new Date(aA,M-ao,1)),this._getFormatConfig(aD)));ay=(this._canAdjustMonth(aD,-1,aA,M)?"
"+ae+"":(ax?"":""+ae+""));ap=this._get(aD,"nextText");ap=(!al?ap:this.formatDate(ap,this._daylightSavingAdjust(new Date(aA,M+ao,1)),this._getFormatConfig(aD)));Q=(this._canAdjustMonth(aD,+1,aA,M)?""+ap+"":(ax?"":""+ap+""));aH=this._get(aD,"currentText");aB=(this._get(aD,"gotoCurrent")&&aD.currentDay?O:ag);aH=(!al?aH:this.formatDate(aH,aB,this._getFormatConfig(aD)));au=(!aD.inline?"":"");aK=(aN)?"
"+(aL?au:"")+(this._isInRange(aD,aB)?"":"")+(aL?"":au)+"
":"";an=parseInt(this._get(aD,"firstDay"),10);an=(isNaN(an)?0:an);aO=this._get(aD,"showWeek");X=this._get(aD,"dayNames");Z=this._get(aD,"dayNamesMin");Y=this._get(aD,"monthNames");N=this._get(aD,"monthNamesShort");aG=this._get(aD,"beforeShowDay");V=this._get(aD,"showOtherMonths");ai=this._get(aD,"selectOtherMonths");aJ=this._getDefaultDate(aD);aw="";aP;for(ah=0;ah1){switch(W){case 0:ar+=" ui-datepicker-group-first";az=" ui-corner-"+(aL?"right":"left");break;case ac[1]-1:ar+=" ui-datepicker-group-last";az=" ui-corner-"+(aL?"left":"right");break;default:ar+=" ui-datepicker-group-middle";az="";break}}ar+="'>"}ar+="
"+(/all|left/.test(az)&&ah===0?(aL?Q:ay):"")+(/all|right/.test(az)&&ah===0?(aL?ay:Q):"")+this._generateMonthYearHeader(aD,M,aA,S,ad,ah>0||W>0,Y,N)+"
";av=(aO?"":"");for(aP=0;aP<7;aP++){at=(aP+an)%7;av+=""}ar+=av+"";U=this._getDaysInMonth(aA,M);if(aA===aD.selectedYear&&M===aD.selectedMonth){aD.selectedDay=Math.min(aD.selectedDay,U)}ak=(this._getFirstDayOfMonth(aA,M)-an+7)%7;aa=Math.ceil((ak+U)/7);aC=(aj?this.maxRows>aa?this.maxRows:aa:aa);this.maxRows=aC;aF=this._daylightSavingAdjust(new Date(aA,M,1-ak));for(P=0;P";aI=(!aO?"":"");for(aP=0;aP<7;aP++){aM=(aG?aG.apply((aD.input?aD.input[0]:null),[aF]):[true,""]);aq=(aF.getMonth()!==M);ab=(aq&&!ai)||!aM[0]||(S&&aFad);aI+="";aF.setDate(aF.getDate()+1);aF=this._daylightSavingAdjust(aF)}ar+=aI+""}M++;if(M>11){M=0;aA++}ar+="
"+this._get(aD,"weekHeader")+"=5?" class='ui-datepicker-week-end'":"")+">"+Z[at]+"
"+this._get(aD,"calculateWeek")(aF)+""+(aq&&!V?" ":(ab?""+aF.getDate()+"":""+aF.getDate()+""))+"
"+(aj?""+((ac[0]>0&&W===ac[1]-1)?"
":""):"");am+=ar}aw+=am}aw+=aK;aD._keyEvent=false;return aw},_generateMonthYearHeader:function(Q,O,Y,S,W,Z,U,M){var ad,N,ae,ab,R,aa,X,T,P=this._get(Q,"changeMonth"),af=this._get(Q,"changeYear"),ag=this._get(Q,"showMonthAfterYear"),V="
",ac="";if(Z||!P){ac+=""+U[O]+""}else{ad=(S&&S.getFullYear()===Y);N=(W&&W.getFullYear()===Y);ac+=""}if(!ag){V+=ac+(Z||!(P&&af)?" ":"")}if(!Q.yearshtml){Q.yearshtml="";if(Z||!af){V+=""+Y+""}else{ab=this._get(Q,"yearRange").split(":");R=new Date().getFullYear();aa=function(ai){var ah=(ai.match(/c[+\-].*/)?Y+parseInt(ai.substring(1),10):(ai.match(/[+\-].*/)?R+parseInt(ai,10):parseInt(ai,10)));return(isNaN(ah)?R:ah)};X=aa(ab[0]);T=Math.max(X,aa(ab[1]||""));X=(S?Math.max(X,S.getFullYear()):X);T=(W?Math.min(T,W.getFullYear()):T);Q.yearshtml+="";V+=Q.yearshtml;Q.yearshtml=null}}V+=this._get(Q,"yearSuffix");if(ag){V+=(Z||!(P&&af)?" ":"")+ac}V+="
";return V},_adjustInstDate:function(P,S,R){var O=P.drawYear+(R==="Y"?S:0),Q=P.drawMonth+(R==="M"?S:0),M=Math.min(P.selectedDay,this._getDaysInMonth(O,Q))+(R==="D"?S:0),N=this._restrictMinMax(P,this._daylightSavingAdjust(new Date(O,Q,M)));P.selectedDay=N.getDate();P.drawMonth=P.selectedMonth=N.getMonth();P.drawYear=P.selectedYear=N.getFullYear();if(R==="M"||R==="Y"){this._notifyChange(P)}},_restrictMinMax:function(P,N){var O=this._getMinMaxDate(P,"min"),Q=this._getMinMaxDate(P,"max"),M=(O&&NQ?Q:M)},_notifyChange:function(N){var M=this._get(N,"onChangeMonthYear");if(M){M.apply((N.input?N.input[0]:null),[N.selectedYear,N.selectedMonth+1,N])}},_getNumberOfMonths:function(N){var M=this._get(N,"numberOfMonths");return(M==null?[1,1]:(typeof M==="number"?[1,M]:M))},_getMinMaxDate:function(N,M){return this._determineDate(N,this._get(N,M+"Date"),null)},_getDaysInMonth:function(M,N){return 32-this._daylightSavingAdjust(new Date(M,N,32)).getDate()},_getFirstDayOfMonth:function(M,N){return new Date(M,N,1).getDay()},_canAdjustMonth:function(P,R,O,Q){var M=this._getNumberOfMonths(P),N=this._daylightSavingAdjust(new Date(O,Q+(R<0?R:M[0]*M[1]),1));if(R<0){N.setDate(this._getDaysInMonth(N.getFullYear(),N.getMonth()))}return this._isInRange(P,N)},_isInRange:function(Q,O){var N,T,P=this._getMinMaxDate(Q,"min"),M=this._getMinMaxDate(Q,"max"),U=null,R=null,S=this._get(Q,"yearRange");if(S){N=S.split(":");T=new Date().getFullYear();U=parseInt(N[0],10);R=parseInt(N[1],10);if(N[0].match(/[+\-].*/)){U+=T}if(N[1].match(/[+\-].*/)){R+=T}}return((!P||O.getTime()>=P.getTime())&&(!M||O.getTime()<=M.getTime())&&(!U||O.getFullYear()>=U)&&(!R||O.getFullYear()<=R))},_getFormatConfig:function(M){var N=this._get(M,"shortYearCutoff");N=(typeof N!=="string"?N:new Date().getFullYear()%100+parseInt(N,10));return{shortYearCutoff:N,dayNamesShort:this._get(M,"dayNamesShort"),dayNames:this._get(M,"dayNames"),monthNamesShort:this._get(M,"monthNamesShort"),monthNames:this._get(M,"monthNames")}},_formatDate:function(P,M,Q,O){if(!M){P.currentDay=P.selectedDay;P.currentMonth=P.selectedMonth;P.currentYear=P.selectedYear}var N=(M?(typeof M==="object"?M:this._daylightSavingAdjust(new Date(O,Q,M))):this._daylightSavingAdjust(new Date(P.currentYear,P.currentMonth,P.currentDay)));return this.formatDate(this._get(P,"dateFormat"),N,this._getFormatConfig(P))}});function g(N){var M="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return N.delegate(M,"mouseout",function(){y(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!==-1){y(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!==-1){y(this).removeClass("ui-datepicker-next-hover")}}).delegate(M,"mouseover",function(){if(!y.datepicker._isDisabledDatepicker(j.inline?N.parent()[0]:j.input[0])){y(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");y(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!==-1){y(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!==-1){y(this).addClass("ui-datepicker-next-hover")}}})}function p(O,N){y.extend(O,N);for(var M in N){if(N[M]==null){O[M]=N[M]}}return O}y.fn.datepicker=function(N){if(!this.length){return this}if(!y.datepicker.initialized){y(document).mousedown(y.datepicker._checkExternalClick);y.datepicker.initialized=true}if(y("#"+y.datepicker._mainDivId).length===0){y("body").append(y.datepicker.dpDiv)}var M=Array.prototype.slice.call(arguments,1);if(typeof N==="string"&&(N==="isDisabled"||N==="getDate"||N==="widget")){return y.datepicker["_"+N+"Datepicker"].apply(y.datepicker,[this[0]].concat(M))}if(N==="option"&&arguments.length===2&&typeof arguments[1]==="string"){return y.datepicker["_"+N+"Datepicker"].apply(y.datepicker,[this[0]].concat(M))}return this.each(function(){typeof N==="string"?y.datepicker["_"+N+"Datepicker"].apply(y.datepicker,[this].concat(M)):y.datepicker._attachDatepicker(this,N)})};y.datepicker=new K();y.datepicker.initialized=false;y.datepicker.uuid=new Date().getTime();y.datepicker.version="1.11.0";var u=y.datepicker; +/*! + * jQuery UI Slider 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/slider/ + */ +var f=y.widget("ui.slider",y.ui.mouse,{version:"1.11.0",widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this._refresh();this._setOption("disabled",this.options.disabled);this._animateOff=false},_refresh:function(){this._createRange();this._createHandles();this._setupEvents();this._refreshValue()},_createHandles:function(){var P,M,N=this.options,R=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),Q="",O=[];M=(N.values&&N.values.length)||1;if(R.length>M){R.slice(M).remove();R=R.slice(0,M)}for(P=R.length;P").appendTo(this.element);N="ui-slider-range ui-widget-header ui-corner-all"}else{this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""})}this.range.addClass(N+((M.range==="min"||M.range==="max")?" ui-slider-range-"+M.range:""))}else{if(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)},_destroy:function(){this.handles.remove();if(this.range){this.range.remove()}this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all");this._mouseDestroy()},_mouseCapture:function(O){var S,V,N,Q,U,W,R,M,T=this,P=this.options;if(P.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();S={x:O.pageX,y:O.pageY};V=this._normValueFromMouse(S);N=this._valueMax()-this._valueMin()+1;this.handles.each(function(X){var Y=Math.abs(V-T.values(X));if((N>Y)||(N===Y&&(X===T._lastChangedValue||T.values(X)===P.min))){N=Y;Q=y(this);U=X}});W=this._start(O,U);if(W===false){return false}this._mouseSliding=true;this._handleIndex=U;Q.addClass("ui-state-active").focus();R=Q.offset();M=!y(O.target).parents().addBack().is(".ui-slider-handle");this._clickOffset=M?{left:0,top:0}:{left:O.pageX-R.left-(Q.width()/2),top:O.pageY-R.top-(Q.height()/2)-(parseInt(Q.css("borderTopWidth"),10)||0)-(parseInt(Q.css("borderBottomWidth"),10)||0)+(parseInt(Q.css("marginTop"),10)||0)};if(!this.handles.hasClass("ui-state-hover")){this._slide(O,U,V)}this._animateOff=true;return true},_mouseStart:function(){return true},_mouseDrag:function(O){var M={x:O.pageX,y:O.pageY},N=this._normValueFromMouse(M);this._slide(O,this._handleIndex,N);return false},_mouseStop:function(M){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(M,this._handleIndex);this._change(M,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false},_detectOrientation:function(){this.orientation=(this.options.orientation==="vertical")?"vertical":"horizontal"},_normValueFromMouse:function(N){var M,Q,P,O,R;if(this.orientation==="horizontal"){M=this.elementSize.width;Q=N.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{M=this.elementSize.height;Q=N.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}P=(Q/M);if(P>1){P=1}if(P<0){P=0}if(this.orientation==="vertical"){P=1-P}O=this._valueMax()-this._valueMin();R=this._valueMin()+P*O;return this._trimAlignValue(R)},_start:function(O,N){var M={handle:this.handles[N],value:this.value()};if(this.options.values&&this.options.values.length){M.value=this.values(N);M.values=this.values()}return this._trigger("start",O,M)},_slide:function(Q,P,O){var M,N,R;if(this.options.values&&this.options.values.length){M=this.values(P?0:1);if((this.options.values.length===2&&this.options.range===true)&&((P===0&&O>M)||(P===1&&O1){this.options.values[N]=this._trimAlignValue(Q);this._refreshValue();this._change(null,N);return}if(arguments.length){if(y.isArray(arguments[0])){P=this.options.values;M=arguments[0];for(O=0;O=this._valueMax()){return this._valueMax()}var M=(this.options.step>0)?this.options.step:1,O=(P-this._valueMin())%M,N=P-O;if(Math.abs(O)*2>=M){N+=(O>0)?M:(-M)}return parseFloat(N.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var R,Q,U,S,V,P=this.options.range,O=this.options,T=this,N=(!this._animateOff)?O.animate:false,M={};if(this.options.values&&this.options.values.length){this.handles.each(function(W){Q=(T.values(W)-T._valueMin())/(T._valueMax()-T._valueMin())*100;M[T.orientation==="horizontal"?"left":"bottom"]=Q+"%";y(this).stop(1,1)[N?"animate":"css"](M,O.animate);if(T.options.range===true){if(T.orientation==="horizontal"){if(W===0){T.range.stop(1,1)[N?"animate":"css"]({left:Q+"%"},O.animate)}if(W===1){T.range[N?"animate":"css"]({width:(Q-R)+"%"},{queue:false,duration:O.animate})}}else{if(W===0){T.range.stop(1,1)[N?"animate":"css"]({bottom:(Q)+"%"},O.animate)}if(W===1){T.range[N?"animate":"css"]({height:(Q-R)+"%"},{queue:false,duration:O.animate})}}}R=Q})}else{U=this.value();S=this._valueMin();V=this._valueMax();Q=(V!==S)?(U-S)/(V-S)*100:0;M[this.orientation==="horizontal"?"left":"bottom"]=Q+"%";this.handle.stop(1,1)[N?"animate":"css"](M,O.animate);if(P==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[N?"animate":"css"]({width:Q+"%"},O.animate)}if(P==="max"&&this.orientation==="horizontal"){this.range[N?"animate":"css"]({width:(100-Q)+"%"},{queue:false,duration:O.animate})}if(P==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[N?"animate":"css"]({height:Q+"%"},O.animate)}if(P==="max"&&this.orientation==="vertical"){this.range[N?"animate":"css"]({height:(100-Q)+"%"},{queue:false,duration:O.animate})}}},_handleEvents:{keydown:function(Q){var R,O,N,P,M=y(Q.target).data("ui-slider-handle-index");switch(Q.which){case y.ui.keyCode.HOME:case y.ui.keyCode.END:case y.ui.keyCode.PAGE_UP:case y.ui.keyCode.PAGE_DOWN:case y.ui.keyCode.UP:case y.ui.keyCode.RIGHT:case y.ui.keyCode.DOWN:case y.ui.keyCode.LEFT:Q.preventDefault();if(!this._keySliding){this._keySliding=true;y(Q.target).addClass("ui-state-active");R=this._start(Q,M);if(R===false){return}}break}P=this.options.step;if(this.options.values&&this.options.values.length){O=N=this.values(M)}else{O=N=this.value()}switch(Q.which){case y.ui.keyCode.HOME:N=this._valueMin();break;case y.ui.keyCode.END:N=this._valueMax();break;case y.ui.keyCode.PAGE_UP:N=this._trimAlignValue(O+((this._valueMax()-this._valueMin())/this.numPages));break;case y.ui.keyCode.PAGE_DOWN:N=this._trimAlignValue(O-((this._valueMax()-this._valueMin())/this.numPages));break;case y.ui.keyCode.UP:case y.ui.keyCode.RIGHT:if(O===this._valueMax()){return}N=this._trimAlignValue(O+P);break;case y.ui.keyCode.DOWN:case y.ui.keyCode.LEFT:if(O===this._valueMin()){return}N=this._trimAlignValue(O-P);break}this._slide(Q,M,N)},keyup:function(N){var M=y(N.target).data("ui-slider-handle-index");if(this._keySliding){this._keySliding=false;this._stop(N,M);this._change(N,M);y(N.target).removeClass("ui-state-active")}}}}); +/*! + * jQuery UI Effects 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/category/effects-core/ + */ +var i="ui-effects-";y.effects={effect:{}}; +/*! + * jQuery Color Animations v2.1.2 + * https://github.com/jquery/jquery-color + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * Date: Wed Jan 16 08:47:09 2013 -0600 + */ +(function(aa,P){var W="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",T=/^([\-+])=\s*(\d+\.?\d*)/,S=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(ab){return[ab[1],ab[2],ab[3],ab[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(ab){return[ab[1]*2.55,ab[2]*2.55,ab[3]*2.55,ab[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(ab){return[parseInt(ab[1],16),parseInt(ab[2],16),parseInt(ab[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(ab){return[parseInt(ab[1]+ab[1],16),parseInt(ab[2]+ab[2],16),parseInt(ab[3]+ab[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(ab){return[ab[1],ab[2]/100,ab[3]/100,ab[4]]}}],Q=aa.Color=function(ac,ad,ab,ae){return new aa.Color.fn.parse(ac,ad,ab,ae)},V={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},Z={"byte":{floor:true,max:255},percent:{max:1},degrees:{mod:360,floor:true}},Y=Q.support={},N=aa("

")[0],M,X=aa.each;N.style.cssText="background-color:rgba(1,1,1,.5)";Y.rgba=N.style.backgroundColor.indexOf("rgba")>-1;X(V,function(ab,ac){ac.cache="_"+ab;ac.props.alpha={idx:3,type:"percent",def:1}});function U(ac,ae,ad){var ab=Z[ae.type]||{};if(ac==null){return(ad||!ae.def)?null:ae.def}ac=ab.floor?~~ac:parseFloat(ac);if(isNaN(ac)){return ae.def}if(ab.mod){return(ac+ab.mod)%ab.mod}return 0>ac?0:ab.maxan.mod/2){ak+=an.mod}else{if(ak-aj>an.mod/2){ak-=an.mod}}}ab[al]=U((aj-ak)*ai+ak,ao)}});return this[ae](ab)},blend:function(ae){if(this._rgba[3]===1){return this}var ad=this._rgba.slice(),ac=ad.pop(),ab=Q(ae)._rgba;return Q(aa.map(ad,function(af,ag){return(1-ac)*ab[ag]+ac*af}))},toRgbaString:function(){var ac="rgba(",ab=aa.map(this._rgba,function(ad,ae){return ad==null?(ae>2?1:0):ad});if(ab[3]===1){ab.pop();ac="rgb("}return ac+ab.join()+")"},toHslaString:function(){var ac="hsla(",ab=aa.map(this.hsla(),function(ad,ae){if(ad==null){ad=ae>2?1:0}if(ae&&ae<3){ad=Math.round(ad*100)+"%"}return ad});if(ab[3]===1){ab.pop();ac="hsl("}return ac+ab.join()+")"},toHexString:function(ab){var ac=this._rgba.slice(),ad=ac.pop();if(ab){ac.push(~~(ad*255))}return"#"+aa.map(ac,function(ae){ae=(ae||0).toString(16);return ae.length===1?"0"+ae:ae}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}});Q.fn.parse.prototype=Q.fn;function O(ad,ac,ab){ab=(ab+1)%1;if(ab*6<1){return ad+(ac-ad)*ab*6}if(ab*2<1){return ac}if(ab*3<2){return ad+(ac-ad)*((2/3)-ab)*6}return ad}V.hsla.to=function(ad){if(ad[0]==null||ad[1]==null||ad[2]==null){return[null,null,null,ad[3]]}var ab=ad[0]/255,ag=ad[1]/255,ah=ad[2]/255,aj=ad[3],ai=Math.max(ab,ag,ah),ae=Math.min(ab,ag,ah),ak=ai-ae,al=ai+ae,ac=al*0.5,af,am;if(ae===ai){af=0}else{if(ab===ai){af=(60*(ag-ah)/ak)+360}else{if(ag===ai){af=(60*(ah-ab)/ak)+120}else{af=(60*(ab-ag)/ak)+240}}}if(ak===0){am=0}else{if(ac<=0.5){am=ak/al}else{am=ak/(2-al)}}return[Math.round(af)%360,am,ac,aj==null?1:aj]};V.hsla.from=function(af){if(af[0]==null||af[1]==null||af[2]==null){return[null,null,null,af[3]]}var ae=af[0]/360,ad=af[1],ac=af[2],ab=af[3],ag=ac<=0.5?ac*(1+ad):ac+ad-ac*ad,ah=2*ac-ag;return[Math.round(O(ah,ag,ae+(1/3))*255),Math.round(O(ah,ag,ae)*255),Math.round(O(ah,ag,ae-(1/3))*255),ab]};X(V,function(ac,ae){var ad=ae.props,ab=ae.cache,ag=ae.to,af=ae.from;Q.fn[ac]=function(al){if(ag&&!this[ab]){this[ab]=ag(this._rgba)}if(al===P){return this[ab].slice()}var ai,ak=aa.type(al),ah=(ak==="array"||ak==="object")?al:arguments,aj=this[ab].slice();X(ad,function(am,ao){var an=ah[ak==="object"?am:ao.idx];if(an==null){an=aj[ao.idx]}aj[ao.idx]=U(an,ao)});if(af){ai=Q(af(aj));ai[ab]=aj;return ai}else{return Q(aj)}};X(ad,function(ah,ai){if(Q.fn[ah]){return}Q.fn[ah]=function(am){var ao=aa.type(am),al=(ah==="alpha"?(this._hsla?"hsla":"rgba"):ac),ak=this[al](),an=ak[ai.idx],aj;if(ao==="undefined"){return an}if(ao==="function"){am=am.call(this,an);ao=aa.type(am)}if(am==null&&ai.empty){return this}if(ao==="string"){aj=T.exec(am);if(aj){am=an+parseFloat(aj[2])*(aj[1]==="+"?1:-1)}}ak[ai.idx]=am;return this[al](ak)}})});Q.hook=function(ac){var ab=ac.split(" ");X(ab,function(ad,ae){aa.cssHooks[ae]={set:function(ai,aj){var ag,ah,af="";if(aj!=="transparent"&&(aa.type(aj)!=="string"||(ag=R(aj)))){aj=Q(ag||aj);if(!Y.rgba&&aj._rgba[3]!==1){ah=ae==="backgroundColor"?ai.parentNode:ai;while((af===""||af==="transparent")&&ah&&ah.style){try{af=aa.css(ah,"backgroundColor");ah=ah.parentNode}catch(ak){}}aj=aj.blend(af&&af!=="transparent"?af:"_default")}aj=aj.toRgbaString()}try{ai.style[ae]=aj}catch(ak){}}};aa.fx.step[ae]=function(af){if(!af.colorInit){af.start=Q(af.elem,ae);af.end=Q(af.end);af.colorInit=true}aa.cssHooks[ae].set(af.elem,af.start.transition(af.end,af.pos))}})};Q.hook(W);aa.cssHooks.borderColor={expand:function(ac){var ab={};X(["Top","Right","Bottom","Left"],function(ae,ad){ab["border"+ad+"Color"]=ac});return ab}};M=aa.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery);(function(){var N=["add","remove","toggle"],O={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};y.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(Q,R){y.fx.step[R]=function(S){if(S.end!=="none"&&!S.setAttr||S.pos===1&&!S.setAttr){jQuery.style(S.elem,R,S.end);S.setAttr=true}}});function P(U){var R,Q,S=U.ownerDocument.defaultView?U.ownerDocument.defaultView.getComputedStyle(U,null):U.currentStyle,T={};if(S&&S.length&&S[0]&&S[S[0]]){Q=S.length;while(Q--){R=S[Q];if(typeof S[R]==="string"){T[y.camelCase(R)]=S[R]}}}else{for(R in S){if(typeof S[R]==="string"){T[R]=S[R]}}}return T}function M(Q,S){var U={},R,T;for(R in S){T=S[R];if(Q[R]!==T){if(!O[R]){if(y.fx.step[R]||!isNaN(parseFloat(T))){U[R]=T}}}}return U}if(!y.fn.addBack){y.fn.addBack=function(Q){return this.add(Q==null?this.prevObject:this.prevObject.filter(Q))}}y.effects.animateClass=function(Q,R,U,T){var S=y.speed(R,U,T);return this.queue(function(){var X=y(this),V=X.attr("class")||"",W,Y=S.children?X.find("*").addBack():X;Y=Y.map(function(){var Z=y(this);return{el:Z,start:P(this)}});W=function(){y.each(N,function(Z,aa){if(Q[aa]){X[aa+"Class"](Q[aa])}})};W();Y=Y.map(function(){this.end=P(this.el[0]);this.diff=M(this.start,this.end);return this});X.attr("class",V);Y=Y.map(function(){var ab=this,Z=y.Deferred(),aa=y.extend({},S,{queue:false,complete:function(){Z.resolve(ab)}});this.el.animate(this.diff,aa);return Z.promise()});y.when.apply(y,Y.get()).done(function(){W();y.each(arguments,function(){var Z=this.el;y.each(this.diff,function(aa){Z.css(aa,"")})});S.complete.call(X[0])})})};y.fn.extend({addClass:(function(Q){return function(S,R,U,T){return R?y.effects.animateClass.call(this,{add:S},R,U,T):Q.apply(this,arguments)}})(y.fn.addClass),removeClass:(function(Q){return function(S,R,U,T){return arguments.length>1?y.effects.animateClass.call(this,{remove:S},R,U,T):Q.apply(this,arguments)}})(y.fn.removeClass),toggleClass:(function(Q){return function(T,S,R,V,U){if(typeof S==="boolean"||S===undefined){if(!R){return Q.apply(this,arguments)}else{return y.effects.animateClass.call(this,(S?{add:T}:{remove:T}),R,V,U)}}else{return y.effects.animateClass.call(this,{toggle:T},S,R,V)}}})(y.fn.toggleClass),switchClass:function(Q,S,R,U,T){return y.effects.animateClass.call(this,{add:S,remove:Q},R,U,T)}})})();(function(){y.extend(y.effects,{version:"1.11.0",save:function(P,Q){for(var O=0;O").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),O={width:P.width(),height:P.height()},S=document.activeElement;try{S.id}catch(R){S=document.body}P.wrap(T);if(P[0]===S||y.contains(P[0],S)){y(S).focus()}T=P.parent();if(P.css("position")==="static"){T.css({position:"relative"});P.css({position:"relative"})}else{y.extend(Q,{position:P.css("position"),zIndex:P.css("z-index")});y.each(["top","left","bottom","right"],function(U,V){Q[V]=P.css(V);if(isNaN(parseInt(Q[V],10))){Q[V]="auto"}});P.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}P.css(O);return T.css(Q).show()},removeWrapper:function(O){var P=document.activeElement;if(O.parent().is(".ui-effects-wrapper")){O.parent().replaceWith(O);if(O[0]===P||y.contains(O[0],P)){y(P).focus()}}return O},setTransition:function(P,R,O,Q){Q=Q||{};y.each(R,function(T,S){var U=P.cssUnit(S);if(U[0]>0){Q[S]=U[0]*O+U[1]}});return Q}});function M(P,O,Q,R){if(y.isPlainObject(P)){O=P;P=P.effect}P={effect:P};if(O==null){O={}}if(y.isFunction(O)){R=O;Q=null;O={}}if(typeof O==="number"||y.fx.speeds[O]){R=Q;Q=O;O={}}if(y.isFunction(Q)){R=Q;Q=null}if(O){y.extend(P,O)}Q=Q||O.duration;P.duration=y.fx.off?0:typeof Q==="number"?Q:Q in y.fx.speeds?y.fx.speeds[Q]:y.fx.speeds._default;P.complete=R||O.complete;return P}function N(O){if(!O||typeof O==="number"||y.fx.speeds[O]){return true}if(typeof O==="string"&&!y.effects.effect[O]){return true}if(y.isFunction(O)){return true}if(typeof O==="object"&&!O.effect){return true}return false}y.fn.extend({effect:function(){var Q=M.apply(this,arguments),S=Q.mode,O=Q.queue,P=y.effects.effect[Q.effect];if(y.fx.off||!P){if(S){return this[S](Q.duration,Q.complete)}else{return this.each(function(){if(Q.complete){Q.complete.call(this)}})}}function R(V){var W=y(this),U=Q.complete,X=Q.mode;function T(){if(y.isFunction(U)){U.call(W[0])}if(y.isFunction(V)){V()}}if(W.is(":hidden")?X==="hide":X==="show"){W[X]();T()}else{P.call(W[0],Q,T)}}return O===false?this.each(R):this.queue(O||"fx",R)},show:(function(O){return function(Q){if(N(Q)){return O.apply(this,arguments)}else{var P=M.apply(this,arguments);P.mode="show";return this.effect.call(this,P)}}})(y.fn.show),hide:(function(O){return function(Q){if(N(Q)){return O.apply(this,arguments)}else{var P=M.apply(this,arguments);P.mode="hide";return this.effect.call(this,P)}}})(y.fn.hide),toggle:(function(O){return function(Q){if(N(Q)||typeof Q==="boolean"){return O.apply(this,arguments)}else{var P=M.apply(this,arguments);P.mode="toggle";return this.effect.call(this,P)}}})(y.fn.toggle),cssUnit:function(O){var P=this.css(O),Q=[];y.each(["em","px","%","pt"],function(R,S){if(P.indexOf(S)>0){Q=[parseFloat(P),S]}});return Q}})})();(function(){var M={};y.each(["Quad","Cubic","Quart","Quint","Expo"],function(O,N){M[N]=function(P){return Math.pow(P,O+2)}});y.extend(M,{Sine:function(N){return 1-Math.cos(N*Math.PI/2)},Circ:function(N){return 1-Math.sqrt(1-N*N)},Elastic:function(N){return N===0||N===1?N:-Math.pow(2,8*(N-1))*Math.sin(((N-1)*80-7.5)*Math.PI/15)},Back:function(N){return N*N*(3*N-2)},Bounce:function(P){var N,O=4;while(P<((N=Math.pow(2,--O))-1)/11){}return 1/Math.pow(4,3-O)-7.5625*Math.pow((N*3-2)/22-P,2)}});y.each(M,function(O,N){y.easing["easeIn"+O]=N;y.easing["easeOut"+O]=function(P){return 1-N(1-P)};y.easing["easeInOut"+O]=function(P){return P<0.5?N(P*2)/2:1-N(P*-2+2)/2}})})();var H=y.effects; +/*! + * jQuery UI Effects Blind 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/blind-effect/ + */ +var J=y.effects.effect.blind=function(O,U){var P=y(this),Y=/up|down|vertical/,X=/up|left|vertical|horizontal/,Z=["position","top","bottom","left","right","height","width"],V=y.effects.setMode(P,O.mode||"hide"),aa=O.direction||"up",R=Y.test(aa),Q=R?"height":"width",W=R?"top":"left",ac=X.test(aa),T={},ab=V==="show",N,M,S;if(P.parent().is(".ui-effects-wrapper")){y.effects.save(P.parent(),Z)}else{y.effects.save(P,Z)}P.show();N=y.effects.createWrapper(P).css({overflow:"hidden"});M=N[Q]();S=parseFloat(N.css(W))||0;T[Q]=ab?M:0;if(!ac){P.css(R?"bottom":"right",0).css(R?"top":"left","auto").css({position:"absolute"});T[W]=ab?S:M+S}if(ab){N.css(Q,0);if(!ac){N.css(W,S+M)}}N.animate(T,{duration:O.duration,easing:O.easing,queue:false,complete:function(){if(V==="hide"){P.hide()}y.effects.restore(P,Z);y.effects.removeWrapper(P);U()}})}; +/*! + * jQuery UI Effects Bounce 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/bounce-effect/ + */ +var F=y.effects.effect.bounce=function(V,U){var M=y(this),N=["position","top","bottom","left","right","height","width"],T=y.effects.setMode(M,V.mode||"effect"),S=T==="hide",ad=T==="show",ae=V.direction||"up",O=V.distance,R=V.times||5,af=R*2+(ad||S?1:0),ac=V.duration/af,X=V.easing,P=(ae==="up"||ae==="down")?"top":"left",W=(ae==="up"||ae==="left"),ab,Q,aa,Y=M.queue(),Z=Y.length;if(ad||S){N.push("opacity")}y.effects.save(M,N);M.show();y.effects.createWrapper(M);if(!O){O=M[P==="top"?"outerHeight":"outerWidth"]()/3}if(ad){aa={opacity:1};aa[P]=0;M.css("opacity",0).css(P,W?-O*2:O*2).animate(aa,ac,X)}if(S){O=O/Math.pow(2,R-1)}aa={};aa[P]=0;for(ab=0;ab1){Y.splice.apply(Y,[1,0].concat(Y.splice(Z,af+1)))}M.dequeue()}; +/*! + * jQuery UI Effects Clip 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/clip-effect/ + */ +var t=y.effects.effect.clip=function(P,S){var Q=y(this),W=["position","top","bottom","left","right","height","width"],V=y.effects.setMode(Q,P.mode||"hide"),Y=V==="show",X=P.direction||"vertical",U=X==="vertical",Z=U?"height":"width",T=U?"top":"left",R={},N,O,M;y.effects.save(Q,W);Q.show();N=y.effects.createWrapper(Q).css({overflow:"hidden"});O=(Q[0].tagName==="IMG")?N:Q;M=O[Z]();if(Y){O.css(Z,0);O.css(T,M/2)}R[Z]=Y?M:0;R[T]=Y?0:M/2;O.animate(R,{queue:false,duration:P.duration,easing:P.easing,complete:function(){if(!Y){Q.hide()}y.effects.restore(Q,W);y.effects.removeWrapper(Q);S()}})}; +/*! + * jQuery UI Effects Drop 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/drop-effect/ + */ +var l=y.effects.effect.drop=function(N,R){var O=y(this),T=["position","top","bottom","left","right","opacity","height","width"],S=y.effects.setMode(O,N.mode||"hide"),V=S==="show",U=N.direction||"left",P=(U==="up"||U==="down")?"top":"left",W=(U==="up"||U==="left")?"pos":"neg",Q={opacity:V?1:0},M;y.effects.save(O,T);O.show();y.effects.createWrapper(O);M=N.distance||O[P==="top"?"outerHeight":"outerWidth"](true)/2;if(V){O.css("opacity",0).css(P,W==="pos"?-M:M)}Q[P]=(V?(W==="pos"?"+=":"-="):(W==="pos"?"-=":"+="))+M;O.animate(Q,{queue:false,duration:N.duration,easing:N.easing,complete:function(){if(S==="hide"){O.hide()}y.effects.restore(O,T);y.effects.removeWrapper(O);R()}})}; +/*! + * jQuery UI Effects Explode 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/explode-effect/ + */ +var E=y.effects.effect.explode=function(Z,Y){var S=Z.pieces?Math.round(Math.sqrt(Z.pieces)):3,N=S,M=y(this),U=y.effects.setMode(M,Z.mode||"hide"),ad=U==="show",Q=M.show().css("visibility","hidden").offset(),aa=Math.ceil(M.outerWidth()/N),X=Math.ceil(M.outerHeight()/S),R=[],ac,ab,O,W,V,T;function ae(){R.push(this);if(R.length===S*N){P()}}for(ac=0;ac").css({position:"absolute",visibility:"visible",left:-ab*aa,top:-ac*X}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:aa,height:X,left:O+(ad?V*aa:0),top:W+(ad?T*X:0),opacity:ad?0:1}).animate({left:O+(ad?0:V*aa),top:W+(ad?0:T*X),opacity:ad?1:0},Z.duration||500,Z.easing,ae)}}function P(){M.css({visibility:"visible"});y(R).remove();if(!ad){M.hide()}Y()}}; +/*! + * jQuery UI Effects Fade 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/fade-effect/ + */ +var G=y.effects.effect.fade=function(P,M){var N=y(this),O=y.effects.setMode(N,P.mode||"toggle");N.animate({opacity:O},{queue:false,duration:P.duration,easing:P.easing,complete:M})}; +/*! + * jQuery UI Effects Fold 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/fold-effect/ + */ +var v=y.effects.effect.fold=function(O,S){var P=y(this),X=["position","top","bottom","left","right","height","width"],U=y.effects.setMode(P,O.mode||"hide"),aa=U==="show",V=U==="hide",ac=O.size||15,W=/([0-9]+)%/.exec(ac),ab=!!O.horizFirst,T=aa!==ab,Q=T?["width","height"]:["height","width"],R=O.duration/2,N,M,Z={},Y={};y.effects.save(P,X);P.show();N=y.effects.createWrapper(P).css({overflow:"hidden"});M=T?[N.width(),N.height()]:[N.height(),N.width()];if(W){ac=parseInt(W[1],10)/100*M[V?0:1]}if(aa){N.css(ab?{height:0,width:ac}:{height:ac,width:0})}Z[Q[0]]=aa?M[0]:ac;Y[Q[1]]=aa?M[1]:0;N.animate(Z,R,O.easing).animate(Y,R,O.easing,function(){if(V){P.hide()}y.effects.restore(P,X);y.effects.removeWrapper(P);S()})}; +/*! + * jQuery UI Effects Highlight 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/highlight-effect/ + */ +var A=y.effects.effect.highlight=function(R,M){var O=y(this),N=["backgroundImage","backgroundColor","opacity"],Q=y.effects.setMode(O,R.mode||"show"),P={backgroundColor:O.css("backgroundColor")};if(Q==="hide"){P.opacity=0}y.effects.save(O,N);O.show().css({backgroundImage:"none",backgroundColor:R.color||"#ffff99"}).animate(P,{queue:false,duration:R.duration,easing:R.easing,complete:function(){if(Q==="hide"){O.hide()}y.effects.restore(O,N);M()}})}; +/*! + * jQuery UI Effects Size 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/size-effect/ + */ +var a=y.effects.effect.size=function(V,U){var Z,S,T,M=y(this),Y=["position","top","bottom","left","right","width","height","overflow","opacity"],X=["position","top","bottom","left","right","overflow","opacity"],W=["width","height","overflow"],Q=["fontSize"],ab=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],N=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],R=y.effects.setMode(M,V.mode||"effect"),aa=V.restore||R!=="effect",ae=V.scale||"both",ac=V.origin||["middle","center"],ad=M.css("position"),O=aa?Y:X,P={height:0,width:0,outerHeight:0,outerWidth:0};if(R==="show"){M.show()}Z={height:M.height(),width:M.width(),outerHeight:M.outerHeight(),outerWidth:M.outerWidth()};if(V.mode==="toggle"&&R==="show"){M.from=V.to||P;M.to=V.from||Z}else{M.from=V.from||(R==="show"?P:Z);M.to=V.to||(R==="hide"?P:Z)}T={from:{y:M.from.height/Z.height,x:M.from.width/Z.width},to:{y:M.to.height/Z.height,x:M.to.width/Z.width}};if(ae==="box"||ae==="both"){if(T.from.y!==T.to.y){O=O.concat(ab);M.from=y.effects.setTransition(M,ab,T.from.y,M.from);M.to=y.effects.setTransition(M,ab,T.to.y,M.to)}if(T.from.x!==T.to.x){O=O.concat(N);M.from=y.effects.setTransition(M,N,T.from.x,M.from);M.to=y.effects.setTransition(M,N,T.to.x,M.to)}}if(ae==="content"||ae==="both"){if(T.from.y!==T.to.y){O=O.concat(Q).concat(W);M.from=y.effects.setTransition(M,Q,T.from.y,M.from);M.to=y.effects.setTransition(M,Q,T.to.y,M.to)}}y.effects.save(M,O);M.show();y.effects.createWrapper(M);M.css("overflow","hidden").css(M.from);if(ac){S=y.effects.getBaseline(ac,Z);M.from.top=(Z.outerHeight-M.outerHeight())*S.y;M.from.left=(Z.outerWidth-M.outerWidth())*S.x;M.to.top=(Z.outerHeight-M.to.outerHeight)*S.y;M.to.left=(Z.outerWidth-M.to.outerWidth)*S.x}M.css(M.from);if(ae==="content"||ae==="both"){ab=ab.concat(["marginTop","marginBottom"]).concat(Q);N=N.concat(["marginLeft","marginRight"]);W=Y.concat(ab).concat(N);M.find("*[width]").each(function(){var ag=y(this),af={height:ag.height(),width:ag.width(),outerHeight:ag.outerHeight(),outerWidth:ag.outerWidth()};if(aa){y.effects.save(ag,W)}ag.from={height:af.height*T.from.y,width:af.width*T.from.x,outerHeight:af.outerHeight*T.from.y,outerWidth:af.outerWidth*T.from.x};ag.to={height:af.height*T.to.y,width:af.width*T.to.x,outerHeight:af.height*T.to.y,outerWidth:af.width*T.to.x};if(T.from.y!==T.to.y){ag.from=y.effects.setTransition(ag,ab,T.from.y,ag.from);ag.to=y.effects.setTransition(ag,ab,T.to.y,ag.to)}if(T.from.x!==T.to.x){ag.from=y.effects.setTransition(ag,N,T.from.x,ag.from);ag.to=y.effects.setTransition(ag,N,T.to.x,ag.to)}ag.css(ag.from);ag.animate(ag.to,V.duration,V.easing,function(){if(aa){y.effects.restore(ag,W)}})})}M.animate(M.to,{queue:false,duration:V.duration,easing:V.easing,complete:function(){if(M.to.opacity===0){M.css("opacity",M.from.opacity)}if(R==="hide"){M.hide()}y.effects.restore(M,O);if(!aa){if(ad==="static"){M.css({position:"relative",top:M.to.top,left:M.to.left})}else{y.each(["top","left"],function(af,ag){M.css(ag,function(ai,ak){var aj=parseInt(ak,10),ah=af?M.to.left:M.to.top;if(ak==="auto"){return ah+"px"}return aj+ah+"px"})})}}y.effects.removeWrapper(M);U()}})}; +/*! + * jQuery UI Effects Scale 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/scale-effect/ + */ +var e=y.effects.effect.scale=function(M,P){var N=y(this),V=y.extend(true,{},M),Q=y.effects.setMode(N,M.mode||"effect"),R=parseInt(M.percent,10)||(parseInt(M.percent,10)===0?0:(Q==="hide"?0:100)),T=M.direction||"both",U=M.origin,O={height:N.height(),width:N.width(),outerHeight:N.outerHeight(),outerWidth:N.outerWidth()},S={y:T!=="horizontal"?(R/100):1,x:T!=="vertical"?(R/100):1};V.effect="size";V.queue=false;V.complete=P;if(Q!=="effect"){V.origin=U||["middle","center"];V.restore=true}V.from=M.from||(Q==="show"?{height:0,width:0,outerHeight:0,outerWidth:0}:O);V.to={height:O.height*S.y,width:O.width*S.x,outerHeight:O.outerHeight*S.y,outerWidth:O.outerWidth*S.x};if(V.fade){if(Q==="show"){V.from.opacity=0;V.to.opacity=1}if(Q==="hide"){V.from.opacity=1;V.to.opacity=0}}N.effect(V)}; +/*! + * jQuery UI Effects Puff 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/puff-effect/ + */ +var L=y.effects.effect.puff=function(T,M){var R=y(this),S=y.effects.setMode(R,T.mode||"hide"),P=S==="hide",Q=parseInt(T.percent,10)||150,O=Q/100,N={height:R.height(),width:R.width(),outerHeight:R.outerHeight(),outerWidth:R.outerWidth()};y.extend(T,{effect:"scale",queue:false,fade:true,mode:S,complete:M,percent:P?Q:100,from:P?N:{height:N.height*O,width:N.width*O,outerHeight:N.outerHeight*O,outerWidth:N.outerWidth*O}});R.effect(T)}; +/*! + * jQuery UI Effects Pulsate 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/pulsate-effect/ + */ +var x=y.effects.effect.pulsate=function(M,Q){var O=y(this),T=y.effects.setMode(O,M.mode||"show"),X=T==="show",U=T==="hide",Y=(X||T==="hide"),V=((M.times||5)*2)+(Y?1:0),P=M.duration/V,W=0,S=O.queue(),N=S.length,R;if(X||!O.is(":visible")){O.css("opacity",0).show();W=1}for(R=1;R1){S.splice.apply(S,[1,0].concat(S.splice(N,V+1)))}O.dequeue()}; +/*! + * jQuery UI Effects Shake 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/shake-effect/ + */ +var r=y.effects.effect.shake=function(U,T){var M=y(this),N=["position","top","bottom","left","right","height","width"],S=y.effects.setMode(M,U.mode||"effect"),ac=U.direction||"left",O=U.distance||20,R=U.times||3,ad=R*2+1,Y=Math.round(U.duration/ad),Q=(ac==="up"||ac==="down")?"top":"left",P=(ac==="up"||ac==="left"),ab={},aa={},Z={},X,V=M.queue(),W=V.length;y.effects.save(M,N);M.show();y.effects.createWrapper(M);ab[Q]=(P?"-=":"+=")+O;aa[Q]=(P?"+=":"-=")+O*2;Z[Q]=(P?"-=":"+=")+O*2;M.animate(ab,Y,U.easing);for(X=1;X1){V.splice.apply(V,[1,0].concat(V.splice(W,ad+1)))}M.dequeue()}; +/*! + * jQuery UI Effects Slide 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/slide-effect/ + */ +var q=y.effects.effect.slide=function(O,S){var P=y(this),U=["position","top","bottom","left","right","width","height"],T=y.effects.setMode(P,O.mode||"show"),W=T==="show",V=O.direction||"left",Q=(V==="up"||V==="down")?"top":"left",N=(V==="up"||V==="left"),M,R={};y.effects.save(P,U);P.show();M=O.distance||P[Q==="top"?"outerHeight":"outerWidth"](true);y.effects.createWrapper(P).css({overflow:"hidden"});if(W){P.css(Q,N?(isNaN(M)?"-"+M:-M):M)}R[Q]=(W?(N?"+=":"-="):(N?"-=":"+="))+M;P.animate(R,{queue:false,duration:O.duration,easing:O.easing,complete:function(){if(T==="hide"){P.hide()}y.effects.restore(P,U);y.effects.removeWrapper(P);S()}})}; +/*! + * jQuery UI Effects Transfer 1.11.0 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/transfer-effect/ + */ +var k=y.effects.effect.transfer=function(N,R){var P=y(this),U=y(N.to),X=U.css("position")==="fixed",T=y("body"),V=X?T.scrollTop():0,W=X?T.scrollLeft():0,M=U.offset(),Q={top:M.top-V,left:M.left-W,height:U.innerHeight(),width:U.innerWidth()},S=P.offset(),O=y("

").appendTo(document.body).addClass(N.className).css({top:S.top-V,left:S.left-W,height:P.innerHeight(),width:P.innerWidth(),position:X?"fixed":"absolute"}).animate(Q,N.duration,N.easing,function(){O.remove();R()})}})); +/*! jQuery Timepicker Addon - v1.6.3 - 2016-04-20 +* http://trentrichardson.com/examples/timepicker +* Copyright (c) 2016 Trent Richardson; Licensed MIT */ +(function(a){if(typeof define==="function"&&define.amd){define(["jquery","jquery-ui"],a)}else{a(jQuery)}}(function($){$.ui.timepicker=$.ui.timepicker||{};if($.ui.timepicker.version){return}$.extend($.ui,{timepicker:{version:"1.6.3"}});var Timepicker=function(){this.regional=[];this.regional[""]={currentText:"Now",closeText:"Done",amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"HH:mm",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",microsecText:"Microsecond",timezoneText:"Time Zone",isRTL:false};this._defaults={showButtonPanel:true,timeOnly:false,timeOnlyShowDate:false,showHour:null,showMinute:null,showSecond:null,showMillisec:null,showMicrosec:null,showTimezone:null,showTime:true,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,stepMicrosec:1,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,microsecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,microsecMax:999,minDateTime:null,maxDateTime:null,maxTime:null,minTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,microsecGrid:0,alwaysSetTime:true,separator:" ",altFieldTimeOnly:true,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,altRedirectFocus:true,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:true,timezoneList:null,addSliderAccess:false,sliderAccessArgs:null,controlType:"slider",oneLine:false,defaultValue:null,parse:"strict",afterInject:null};$.extend(this._defaults,this.regional[""])};$.extend(Timepicker.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,microsec_slider:null,timezone_select:null,maxTime:null,minTime:null,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,microsecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,microsecMaxOriginal:null,ampm:"",formattedDate:"",formattedTime:"",formattedDateTime:"",timezoneList:null,units:["hour","minute","second","millisec","microsec"],support:{},control:null,setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_newInst:function($input,opts){var tp_inst=new Timepicker(),inlineSettings={},fns={},overrides,i;for(var attrName in this._defaults){if(this._defaults.hasOwnProperty(attrName)){var attrValue=$input.attr("time:"+attrName);if(attrValue){try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}}overrides={beforeShow:function(input,dp_inst){if($.isFunction(tp_inst._defaults.evnts.beforeShow)){return tp_inst._defaults.evnts.beforeShow.call($input[0],input,dp_inst,tp_inst)}},onChangeMonthYear:function(year,month,dp_inst){if($.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)){tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],year,month,dp_inst,tp_inst)}},onClose:function(dateText,dp_inst){if(tp_inst.timeDefined===true&&$input.val()!==""){tp_inst._updateDateTime(dp_inst)}if($.isFunction(tp_inst._defaults.evnts.onClose)){tp_inst._defaults.evnts.onClose.call($input[0],dateText,dp_inst,tp_inst)}}};for(i in overrides){if(overrides.hasOwnProperty(i)){fns[i]=opts[i]||this._defaults[i]||null}}tp_inst._defaults=$.extend({},this._defaults,inlineSettings,opts,overrides,{evnts:fns,timepicker:tp_inst});tp_inst.amNames=$.map(tp_inst._defaults.amNames,function(val){return val.toUpperCase()});tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(val){return val.toUpperCase()});tp_inst.support=detectSupport(tp_inst._defaults.timeFormat+(tp_inst._defaults.pickerTimeFormat?tp_inst._defaults.pickerTimeFormat:"")+(tp_inst._defaults.altTimeFormat?tp_inst._defaults.altTimeFormat:""));if(typeof(tp_inst._defaults.controlType)==="string"){if(tp_inst._defaults.controlType==="slider"&&typeof($.ui.slider)==="undefined"){tp_inst._defaults.controlType="select"}tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]}else{tp_inst.control=tp_inst._defaults.controlType}var timezoneList=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840];if(tp_inst._defaults.timezoneList!==null){timezoneList=tp_inst._defaults.timezoneList}var tzl=timezoneList.length,tzi=0,tzv=null;if(tzl>0&&typeof timezoneList[0]!=="object"){for(;tzitp_inst._defaults.hourMax?tp_inst._defaults.hourMax:tp_inst._defaults.hour;tp_inst.minute=tp_inst._defaults.minutetp_inst._defaults.minuteMax?tp_inst._defaults.minuteMax:tp_inst._defaults.minute;tp_inst.second=tp_inst._defaults.secondtp_inst._defaults.secondMax?tp_inst._defaults.secondMax:tp_inst._defaults.second;tp_inst.millisec=tp_inst._defaults.millisectp_inst._defaults.millisecMax?tp_inst._defaults.millisecMax:tp_inst._defaults.millisec;tp_inst.microsec=tp_inst._defaults.microsectp_inst._defaults.microsecMax?tp_inst._defaults.microsecMax:tp_inst._defaults.microsec;tp_inst.ampm="";tp_inst.$input=$input;if(tp_inst._defaults.altField){tp_inst.$altInput=$(tp_inst._defaults.altField);if(tp_inst._defaults.altRedirectFocus===true){tp_inst.$altInput.css({cursor:"pointer"}).focus(function(){$input.trigger("focus")})}}if(tp_inst._defaults.minDate===0||tp_inst._defaults.minDateTime===0){tp_inst._defaults.minDate=new Date()}if(tp_inst._defaults.maxDate===0||tp_inst._defaults.maxDateTime===0){tp_inst._defaults.maxDate=new Date()}if(tp_inst._defaults.minDate!==undefined&&tp_inst._defaults.minDate instanceof Date){tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())}if(tp_inst._defaults.minDateTime!==undefined&&tp_inst._defaults.minDateTime instanceof Date){tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())}if(tp_inst._defaults.maxDate!==undefined&&tp_inst._defaults.maxDate instanceof Date){tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())}if(tp_inst._defaults.maxDateTime!==undefined&&tp_inst._defaults.maxDateTime instanceof Date){tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())}tp_inst.$input.bind("focus",function(){tp_inst._onFocus()});return tp_inst},_addTimePicker:function(dp_inst){var currDT=$.trim((this.$altInput&&this._defaults.altFieldTimeOnly)?this.$input.val()+" "+this.$altInput.val():this.$input.val());this.timeDefined=this._parseTime(currDT);this._limitMinMaxDateTime(dp_inst,false);this._injectTimePicker();this._afterInject()},_parseTime:function(timeString,withDate){if(!this.inst){this.inst=$.datepicker._getInst(this.$input[0])}if(withDate||!this._defaults.timeOnly){var dp_dateFormat=$.datepicker._get(this.inst,"dateFormat");try{var parseRes=parseDateTimeInternal(dp_dateFormat,this._defaults.timeFormat,timeString,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!parseRes.timeObj){return false}$.extend(this,parseRes.timeObj)}catch(err){$.timepicker.log("Error parsing the date/time string: "+err+"\ndate/time string = "+timeString+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+dp_dateFormat);return false}return true}else{var timeObj=$.datepicker.parseTime(this._defaults.timeFormat,timeString,this._defaults);if(!timeObj){return false}$.extend(this,timeObj);return true}},_afterInject:function(){var o=this.inst.settings;if($.isFunction(o.afterInject)){o.afterInject.call(this)}},_injectTimePicker:function(){var $dp=this.inst.dpDiv,o=this.inst.settings,tp_inst=this,litem="",uitem="",show=null,max={},gridSize={},size=null,i=0,l=0;if($dp.find("div.ui-timepicker-div").length===0&&o.showTimepicker){var noDisplay=" ui_tpicker_unit_hide",html='
'+o.timeText+'
";for(i=0,l=this.units.length;i'+o[litem+"Text"]+'
';if(show&&o[litem+"Grid"]>0){html+='
';if(litem==="hour"){for(var h=o[litem+"Min"];h<=max[litem];h+=parseInt(o[litem+"Grid"],10)){gridSize[litem]++;var tmph=$.datepicker.formatTime(this.support.ampm?"hht":"HH",{hour:h},o);html+='"}}else{for(var m=o[litem+"Min"];m<=max[litem];m+=parseInt(o[litem+"Grid"],10)){gridSize[litem]++;html+='"}}html+="
'+tmph+"'+((m<10)?"0":"")+m+"
"}html+="
"}var showTz=o.showTimezone!==null?o.showTimezone:this.support.timezone;html+='
'+o.timezoneText+"
";html+='
';html+="
";var $tp=$(html);if(o.timeOnly===true){$tp.prepend('
'+o.timeOnlyTitle+"
");$dp.find(".ui-datepicker-header, .ui-datepicker-calendar").hide()}for(i=0,l=tp_inst.units.length;i0){size=100*gridSize[litem]*o[litem+"Grid"]/(max[litem]-o[litem+"Min"]);$tp.find(".ui_tpicker_"+litem+" table").css({width:size+"%",marginLeft:o.isRTL?"0":((size/(-2*gridSize[litem]))+"%"),marginRight:o.isRTL?((size/(-2*gridSize[litem]))+"%"):"0",borderCollapse:"collapse"}).find("td").click(function(e){var $t=$(this),h=$t.html(),n=parseInt(h.replace(/[^0-9]/g),10),ap=h.replace(/[^apm]/ig),f=$t.data("for");if(f==="hour"){if(ap.indexOf("p")!==-1&&n<12){n+=12}else{if(ap.indexOf("a")!==-1&&n===12){n=0}}}tp_inst.control.value(tp_inst,tp_inst[f+"_slider"],litem,n);tp_inst._onTimeChange();tp_inst._onSelectHandler()}).css({cursor:"pointer",width:(100/gridSize[litem])+"%",textAlign:"center",overflow:"hidden"})}}this.timezone_select=$tp.find(".ui_tpicker_timezone").append("").find("select");$.fn.append.apply(this.timezone_select,$.map(o.timezoneList,function(val,idx){return $("