diff --git a/dist/jquery.qtip.basic.js b/dist/jquery.qtip.basic.js index 8e9c0300..cbd20526 100644 --- a/dist/jquery.qtip.basic.js +++ b/dist/jquery.qtip.basic.js @@ -9,7 +9,7 @@ * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License * -* Date: Fri Apr 8 19:32:29 2011 +0100 +* Date: Fri Apr 8 19:33:04 2011 +0100 */ "use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/ @@ -335,12 +335,12 @@ function QTip(target, options, id, attr) function detectImages(next) { var images; - function imageLoad(event, i) { + function imageLoad(event) { // If queue is empty after image removal, update tooltip and continue the queue if((images = images.not(this)).length === 0) { self.redraw(); self.reposition(cache.event); - + next(); } } @@ -348,15 +348,17 @@ function QTip(target, options, id, attr) // Find all content images without dimensions, and if no images were found, continue if((images = elem.find('img:not([height]):not([width])')).length === 0) { return imageLoad.call(images); } - // Apply the callback to img events to ensure queue continues no matter what! - images.one(['abort','error','load','unload',''].join('.qtip-image '), imageLoad) - - // Apply a recursive method that polls the image for dimensions every 20ms - .each(function(i, elem) { + // Apply timer to each iamge to poll for dimensions + images.each(function(i, elem) { (function timer(){ + var timers = self.timers.img; + // When the dimensions are found, remove the image from the queue and stop timer - if(elem.height && elem.width) { return imageLoad.call(elem, NULL); } - self.timers.img[i] = setTimeout(timer, 20); + if(elem.height && elem.width) { + clearTimeout(timers[i]); + return imageLoad.call(elem); + } + timer = setTimeout(timers[i], 20); }()); }); } @@ -786,7 +788,9 @@ function QTip(target, options, id, attr) set: function(option, value) { var rmove = /^position\.(my|at|adjust|target|container)|style|content|show\.ready/i, + rdraw = /^content\.(title|attr)|style/i, reposition = FALSE, + redraw = FALSE, checks = self.checks, name; @@ -817,9 +821,12 @@ function QTip(target, options, id, attr) previous = obj[0][ obj[1] ]; obj[0][ obj[1] ] = 'object' === typeof value && value.nodeType ? $(value) : value; - // Set the new params for the callback and test it against reposition + // Set the new params for the callback option[notation] = [obj[0], obj[1], value, previous]; + + // Also check if we need to reposition / redraw reposition = rmove.test(notation) || reposition; + redraw = rdraw.test(notation) || redraw; }); // Re-sanitize options @@ -828,12 +835,15 @@ function QTip(target, options, id, attr) /* * Execute any valid callbacks for the set options * Also set isPositioning/isDrawing so we don't get loads of redundant repositioning - * and redraw calls + * and redraw calls. */ isPositioning = isDrawing = 1; $.each(option, callback); isPositioning = isDrawing = 0; - // Update position on ANY style/position/content change if shown and rendered - if(reposition && tooltip.is(':visible') && self.rendered) { self.reposition(); } + // Update position / redraw if needed + if(tooltip.is(':visible') && self.rendered) { + if(reposition) { self.reposition(); } + if(redraw) { self.redraw(); } + } return self; }, diff --git a/dist/jquery.qtip.css b/dist/jquery.qtip.css index 2e8d653b..b16c7879 100644 --- a/dist/jquery.qtip.css +++ b/dist/jquery.qtip.css @@ -9,7 +9,7 @@ * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License * -* Date: Fri Apr 8 19:32:29 2011 +0100 +* Date: Fri Apr 8 19:33:04 2011 +0100 */ /* Fluid class for determining actual width in IE */ diff --git a/dist/jquery.qtip.js b/dist/jquery.qtip.js index 99aacd1a..b0dc90be 100644 --- a/dist/jquery.qtip.js +++ b/dist/jquery.qtip.js @@ -9,7 +9,7 @@ * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License * -* Date: Fri Apr 8 19:32:29 2011 +0100 +* Date: Fri Apr 8 19:33:04 2011 +0100 */ "use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/ @@ -335,12 +335,12 @@ function QTip(target, options, id, attr) function detectImages(next) { var images; - function imageLoad(event, i) { + function imageLoad(event) { // If queue is empty after image removal, update tooltip and continue the queue if((images = images.not(this)).length === 0) { self.redraw(); self.reposition(cache.event); - + next(); } } @@ -348,15 +348,17 @@ function QTip(target, options, id, attr) // Find all content images without dimensions, and if no images were found, continue if((images = elem.find('img:not([height]):not([width])')).length === 0) { return imageLoad.call(images); } - // Apply the callback to img events to ensure queue continues no matter what! - images.one(['abort','error','load','unload',''].join('.qtip-image '), imageLoad) - - // Apply a recursive method that polls the image for dimensions every 20ms - .each(function(i, elem) { + // Apply timer to each iamge to poll for dimensions + images.each(function(i, elem) { (function timer(){ + var timers = self.timers.img; + // When the dimensions are found, remove the image from the queue and stop timer - if(elem.height && elem.width) { return imageLoad.call(elem, NULL); } - self.timers.img[i] = setTimeout(timer, 20); + if(elem.height && elem.width) { + clearTimeout(timers[i]); + return imageLoad.call(elem); + } + timer = setTimeout(timers[i], 20); }()); }); } @@ -786,7 +788,9 @@ function QTip(target, options, id, attr) set: function(option, value) { var rmove = /^position\.(my|at|adjust|target|container)|style|content|show\.ready/i, + rdraw = /^content\.(title|attr)|style/i, reposition = FALSE, + redraw = FALSE, checks = self.checks, name; @@ -817,9 +821,12 @@ function QTip(target, options, id, attr) previous = obj[0][ obj[1] ]; obj[0][ obj[1] ] = 'object' === typeof value && value.nodeType ? $(value) : value; - // Set the new params for the callback and test it against reposition + // Set the new params for the callback option[notation] = [obj[0], obj[1], value, previous]; + + // Also check if we need to reposition / redraw reposition = rmove.test(notation) || reposition; + redraw = rdraw.test(notation) || redraw; }); // Re-sanitize options @@ -828,12 +835,15 @@ function QTip(target, options, id, attr) /* * Execute any valid callbacks for the set options * Also set isPositioning/isDrawing so we don't get loads of redundant repositioning - * and redraw calls + * and redraw calls. */ isPositioning = isDrawing = 1; $.each(option, callback); isPositioning = isDrawing = 0; - // Update position on ANY style/position/content change if shown and rendered - if(reposition && tooltip.is(':visible') && self.rendered) { self.reposition(); } + // Update position / redraw if needed + if(tooltip.is(':visible') && self.rendered) { + if(reposition) { self.reposition(); } + if(redraw) { self.redraw(); } + } return self; }, @@ -1761,7 +1771,7 @@ QTIP.defaults = { } // Define success handler - function successHandler(content) { + function successHandler(content) { if(selector) { // Create a dummy div to hold the results and grab the selector element content = $('
') diff --git a/dist/jquery.qtip.min.js b/dist/jquery.qtip.min.js index a03e0501..45f3a01f 100644 --- a/dist/jquery.qtip.min.js +++ b/dist/jquery.qtip.min.js @@ -9,5 +9,5 @@ * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License * -* Date: Fri Apr 8 19:32:29 2011 +0100 -*/"use strict",function(a,b,c){function z(b){var c=this,d=b.elements,e=d.tooltip,f=".bgiframe-"+b.id;a.extend(c,{init:function(){d.bgiframe=a(''),d.bgiframe.appendTo(e),e.bind("tooltipmove"+f,c.adjust)},adjust:function(){var a=b.get("dimensions"),c=b.plugins.tip,f=d.tip,g,h;h=parseInt(e.css("border-left-width"),10)||0,h={left:-h,top:-h},c&&f&&(g=c.corner.precedance==="x"?["width","left"]:["height","top"],h[g[1]]-=f[g[0]]()),d.bgiframe.css(h).css(a)},destroy:function(){d.bgiframe.remove(),e.unbind(f)}}),c.init()}function y(c){var f=this,h=c.options.show.modal,i=c.elements,j=i.tooltip,k="#qtip-overlay",l=".qtipmodal",m="tooltipshow"+l+" tooltiphide"+l;c.checks.modal={"^show.modal.(on|blur)$":function(){f.init(),i.overlay.toggle(j.is(":visible"))}},a.extend(f,{init:function(){h.on&&(j.unbind(l).bind(m,function(b,c,d){var e=b.type.replace("tooltip","");a.isFunction(h[e])?h[e].call(i.overlay,d,c):f[e](d)}),f.create(),h.blur===d&&i.overlay.unbind(l+c.id).bind("click"+l+c.id,function(){c.hide.call(c)}),i.overlay.css("cursor",h.blur?"pointer":""))},create:function(){var c=a(k),d;if(c.length){i.overlay=c;return c}d=i.overlay=a("
",{id:k.substr(1),css:{position:"absolute",top:0,left:0,display:"none"},mousedown:function(){return e}}).appendTo(document.body),a(b).bind("resize"+l,function(){d.css({height:Math.max(a(b).height(),a(document).height()),width:Math.max(a(b).width(),a(document).width())})}).trigger("resize");return d},toggle:function(b){var h=i.overlay,k=c.options.show.modal.effect,l=b?"show":"hide",m;h||(h=f.create());if(!h.is(":animated")||b)h.stop(d,e),b&&(m=parseInt(a.css(j[0],"z-index"),10),h.css("z-index",(m||g.zindex)-1)),a.isFunction(k)?k.call(h,b):k===e?h[l]():h.fadeTo(90,b?.7:0,function(){b||a(this).hide()})},show:function(){f.toggle(d)},hide:function(){f.toggle(e)},destroy:function(){var d=i.overlay;d&&(a(k).each(function(){var b=a(this).data("qtip");if(b&&b.id!==b.id&&b.options.show.modal)return d=e}),d?(i.overlay.remove(),a(b).unbind(l)):i.overlay.unbind(l+c.id)),j.unbind(m)}}),f.init()}function x(b,g){function v(a){var b=a.precedance==="y",c=n[b?"width":"height"],d=n[b?"height":"width"],e=a.string().indexOf("center")>-1,f=c*(e?.5:1),g=Math.pow,h=Math.round,i,j,k,l=Math.sqrt(g(f,2)+g(d,2)),m=[p/f*l,p/d*l];m[2]=Math.sqrt(g(m[0],2)-g(p,2)),m[3]=Math.sqrt(g(m[1],2)-g(p,2)),i=l+m[2]+m[3]+(e?0:m[0]),j=i/l,k=[h(j*d),h(j*c)];return{height:k[b?0:1],width:k[b?1:0]}}function u(b){var c=k.titlebar&&b.y==="top",d=c?k.titlebar:k.content,e=a.browser.mozilla,f=e?"-moz-":a.browser.webkit?"-webkit-":"",g=b.y+(e?"":"-")+b.x,h=f+(e?"border-radius-"+g:"border-"+g+"-radius");return parseInt(d.css(h),10)||parseInt(l.css(h),10)||0}function t(a,b,c){b=b?b:a[a.precedance];var d=k.titlebar&&a.y==="top",e=d?k.titlebar:k.content,f="border-"+b+"-width",g=parseInt(e.css(f),10);return(c?g||parseInt(l.css(f),10):g)||0}function s(b,e,f,g){if(k.tip){var h=a.extend({},i.corner),l=f.adjusted,n;i.corner.fixed!==d&&(l.left&&(h.x=h.x==="center"?l.left>0?"left":"right":h.x==="left"?"right":"left"),l.top&&(h.y=h.y==="center"?l.top>0?"top":"bottom":h.y==="top"?"bottom":"top"),h.string()!==m.corner&&(m.top!==l.top||m.left!==l.left)&&(n=i.update(h))),n||(n=i.position(h,0)),n.right!==c&&(n.left=n.right),n.bottom!==c&&(n.top=n.bottom),n.option=Math.max(0,j.offset),f.left-=n.left.charAt?n.option:(n.right?-1:1)*n.left,f.top-=n.top.charAt?n.option:(n.bottom?-1:1)*n.top,m.left=l.left,m.top=l.top,m.corner=h.string()}}var i=this,j=b.options.style.tip,k=b.elements,l=k.tooltip,m={top:0,left:0,corner:""},n={width:j.width,height:j.height},o={},p=j.border||0,q=".qtip-tip",r=a("")[0].getContext;i.corner=f,i.mimic=f,b.checks.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){i.init()||i.destroy(),b.reposition()},"^style.tip.(height|width)$":function(){n={width:j.width,height:j.height},i.create(),i.update(),b.reposition()},"^content.title.text|style.(classes|widget)$":function(){k.tip&&i.update()}},a.extend(i,{init:function(){var b=i.detectCorner()&&(r||a.browser.msie);b&&(i.create(),i.update(),l.unbind(q).bind("tooltipmove"+q,s));return b},detectCorner:function(){var a=j.corner,c=b.options.position,f=c.at,g=c.my.string?c.my.string():c.my;if(a===e||g===e&&f===e)return e;a===d?i.corner=new h.Corner(g):a.string||(i.corner=new h.Corner(a),i.corner.fixed=d);return i.corner.string()!=="centercenter"},detectColours:function(){var c,d,e,f=k.tip.css({backgroundColor:"",border:""}),g=i.corner,h=g[g.precedance],m="border-"+h+"-color",p="border"+h.charAt(0)+h.substr(1)+"Color",q=/rgba?\(0, 0, 0(, 0)?\)|transparent/i,r="background-color",s="transparent",t="ui-tooltip-fluid",u=a(document.body).css("color"),v=b.elements.content.css("color"),w=k.titlebar&&(g.y==="top"||g.y==="center"&&f.position().top+n.height/2+j.offset",{"class":"ui-tooltip-tip"}).css({width:b,height:c}).prependTo(l),r?a("").appendTo(k.tip)[0].getContext("2d").save():(d='',k.tip.html(p?d+=d:d))},update:function(b){var c=k.tip,g=c.children(),l=n.width,m=n.height,q="px solid ",s="px dashed transparent",u=j.mimic,x=Math.round,y,z,A,B,C;b||(b=i.corner),u===e?u=b:(u=new h.Corner(u),u.precedance=b.precedance,u.x==="inherit"?u.x=b.x:u.y==="inherit"?u.y=b.y:u.x===u.y&&(u[b.precedance]=b[b.precedance])),y=u.precedance,i.detectColours(),p=o.border==="transparent"||o.border==="#123456"?0:j.border===d?t(b,f,d):j.border,A=w(u,l,m),C=v(b),c.css(C),b.precedance==="y"?B=[x(u.x==="left"?p:u.x==="right"?C.width-l-p:(C.width-l)/2),x(u.y==="top"?C.height-m:0)]:B=[x(u.x==="left"?C.width-l:0),x(u.y==="top"?p:u.y==="bottom"?C.height-m-p:(C.height-m)/2)],r?(g.attr(C),z=g[0].getContext("2d"),z.restore(),z.save(),z.clearRect(0,0,3e3,3e3),z.translate(B[0],B[1]),z.beginPath(),z.moveTo(A[0][0],A[0][1]),z.lineTo(A[1][0],A[1][1]),z.lineTo(A[2][0],A[2][1]),z.closePath(),z.fillStyle=o.fill,z.strokeStyle=o.border,z.lineWidth=p*2,z.lineJoin="miter",z.miterLimit=100,z.stroke(),z.fill()):(A="m"+A[0][0]+","+A[0][1]+" l"+A[1][0]+","+A[1][1]+" "+A[2][0]+","+A[2][1]+" xe",B[2]=p&&/^(r|b)/i.test(b.string())?parseFloat(a.browser.version,10)===8?2:1:0,g.css({antialias:""+(u.string().indexOf("center")>-1),left:B[0]-B[2]*Number(y==="x"),top:B[1]-B[2]*Number(y==="y"),width:l+p,height:m+p}).each(function(b){var c=a(this);c.attr({coordsize:l+p+" "+(m+p),path:A,fillcolor:o.fill,filled:!!b,stroked:!b}).css({display:p||b?"block":"none"}),!b&&p>0&&c.html()===""&&c.html('')}));return i.position(b,1)},position:function(b,c){var f=k.tip,g={},h=Math.max(0,j.offset),l,m,n;if(j.corner===e||!f)return e;b=b||i.corner,l=b.precedance,m=v(b),n=a.browser.msie&&parseFloat(a.browser.version,10)==8&&p&&/^(b|r)/i.test(b.string())?1:0,a.each(l==="y"?[b.x,b.y]:[b.y,b.x],function(a,c){var e,f;c==="center"?(e=l==="y"?"left":"top",g[e]="50%",g["margin-"+e]=-Math.round(m[l==="y"?"width":"height"]/2)+h):(e=t(b,c,d),f=u(b),g[c]=a||!p?t(b,c)+(a?0:f):h+(f>e?f:0))}),g[b[l]]-=m[l==="x"?"width":"height"]+n,c&&f.css({top:"",bottom:"",left:"",right:"",margin:""}).css(g);return g},destroy:function(){k.tip&&k.tip.remove(),l.unbind(q)}}),i.init()}function w(a,b,c){var d=Math.ceil(b/2),e=Math.ceil(c/2),f={bottomright:[[0,0],[b,c],[b,0]],bottomleft:[[0,0],[b,0],[0,c]],topright:[[0,c],[b,0],[b,c]],topleft:[[0,0],[0,c],[b,c]],topcenter:[[0,c],[d,0],[b,c]],bottomcenter:[[0,0],[b,0],[d,c]],rightcenter:[[0,0],[b,e],[0,c]],leftcenter:[[b,0],[b,c],[0,e]]};f.lefttop=f.bottomright,f.righttop=f.bottomleft,f.leftbottom=f.topright,f.rightbottom=f.topleft;return f[a.string()]}function v(b){var c=this,f=b.elements.tooltip,g=b.options.content.ajax,h=".qtip-ajax",i=/)<[^<]*)*<\/script>/gi,j=d;b.checks.ajax={"^content.ajax":function(a,b,d){b==="ajax"&&(g=d),b==="once"?(f.unbind(h),d&&f.bind("tooltipshow"+h,c.load)):g&&g.url?c.load():f.unbind(h)}},a.extend(c,{init:function(){g&&g.url&&f.bind("tooltipshow"+h,c.load);return c},load:function(d,h){function p(a,c,d){b.set("content.text",c+": "+d),n()}function o(c){l&&(c=a("
").append(c.replace(i,"")).find(l)),b.set("content.text",c),n()}function n(){m&&(f.css("visibility",""),h=e)}if(d.isDefaultPrevented())return c;var j=g.url.indexOf(" "),k=g.url,l,m=g.once&&!g.loading&&h;m&&f.css("visibility","hidden"),j>-1&&(l=k.substr(j),k=k.substr(0,j)),a.ajax(a.extend({success:o,error:p,context:b},g,{url:k}));return c}}),c.init()}function u(b,c){var i,j,k,l,m=a(this),n=a(document.body),o=this===document?n:m,p=m.metadata?m.metadata(c.metadata):f,u=c.metadata.type==="html5"&&p?p[c.metadata.name]:f,v=m.data(c.metadata.name||"qtipopts");try{v=typeof v==="string"?(new Function("return "+v))():v}catch(w){r("Unable to parse HTML5 attribute data: "+v)}l=a.extend(d,{},g.defaults,c,typeof v==="object"?s(v):f,s(u||p)),p&&a.removeData(this,"metadata"),j=l.position,l.id=b;if("boolean"===typeof l.content.text){k=m.attr(l.content.attr);if(l.content.attr!==e&&k)l.content.text=k;else return e}j.container===e&&(j.container=n),j.target===e&&(j.target=o),l.show.target===e&&(l.show.target=o),l.show.solo===d&&(l.show.solo=n),l.hide.target===e&&(l.hide.target=o),l.position.viewport===d&&(l.position.viewport=j.container),j.at=new h.Corner(j.at),j.my=new h.Corner(j.my);if(a.data(this,"qtip"))if(l.overwrite)m.qtip("destroy");else if(l.overwrite===e)return e;a.attr(this,"title")&&(a.attr(this,q,a.attr(this,"title")),this.removeAttribute("title")),i=new t(m,l,b,!!k),a.data(this,"qtip",i),m.bind("remove.qtip",function(){i.destroy()});return i}function t(o,p,r,t){function L(c,d,e,f){f=parseInt(f,10)!==0;var g=".qtip-"+r,h={show:c&&p.show.target[0],hide:d&&p.hide.target[0],tooltip:e&&u.rendered&&A.tooltip[0],content:e&&u.rendered&&A.content[0],container:f&&p.position.container[0]===v?document:p.position.container[0],window:f&&b};u.rendered?a([]).pushStack(a.grep([h.show,h.hide,h.tooltip,h.container,h.content,h.window],function(a){return typeof a==="object"})).unbind(g):c&&p.show.target.unbind(g+"-create")}function K(c,d,f,h){function y(a){z.is(":visible")&&u.reposition(a)}function x(a){if(z.hasClass(l))return e;clearTimeout(u.timers.inactive),u.timers.inactive=setTimeout(function(){u.hide(a)},p.hide.inactive)}function w(b){if(z.hasClass(l))return e;var c=a(b.relatedTarget||b.target),d=c.closest(m)[0]===z[0],f=c[0]===n.show[0];clearTimeout(u.timers.show),clearTimeout(u.timers.hide);if(k.target==="mouse"&&d||p.hide.fixed&&(/mouse(out|leave|move)/.test(b.type)&&(d||f))){b.stopPropagation(),b.preventDefault();return e}p.hide.delay>0?u.timers.hide=setTimeout(function(){u.hide(b)},p.hide.delay):u.hide(b)}function t(a){if(z.hasClass(l))return e;n.show.trigger("qtip-"+r+"-inactive"),clearTimeout(u.timers.show),clearTimeout(u.timers.hide);var b=function(){u.show(a)};p.show.delay>0?u.timers.show=setTimeout(b,p.show.delay):b()}var j=".qtip-"+r,k=p.position,n={show:p.show.target,hide:p.hide.target,container:k.container[0]===v?a(document):k.container,doc:a(document)},q={show:a.trim(""+p.show.event).split(" "),hide:a.trim(""+p.hide.event).split(" ")},s=a.browser.msie&&parseInt(a.browser.version,10)===6;f&&(p.hide.fixed&&(n.hide=n.hide.add(z),z.bind("mouseover"+j,function(){z.hasClass(l)||clearTimeout(u.timers.hide)})),k.target==="mouse"&&k.adjust.mouse&&p.hide.event&&z.bind("mouseleave"+j,function(a){(a.relatedTarget||a.target)!==n.show[0]&&u.hide(a)}),z.bind("mouseenter"+j+" mouseleave"+j,function(a){u[a.type==="mouseenter"?"focus":"blur"](a)})),d&&("number"===typeof p.hide.inactive&&(n.show.bind("qtip-"+r+"-inactive",x),a.each(g.inactiveEvents,function(a,b){n.hide.add(A.tooltip).bind(b+j+"-inactive",x)})),a.each(q.hide,function(b,c){var d=a.inArray(c,q.show),e=a(n.hide);d>-1&&e.add(n.show).length===e.length||c==="unfocus"?(n.show.bind(c+j,function(a){z.is(":visible")?w(a):t(a)}),delete q.show[d]):n.hide.bind(c+j,w)})),c&&a.each(q.show,function(a,b){n.show.bind(b+j,t)}),h&&((k.adjust.resize||k.viewport)&&a(a.event.special.resize?k.viewport:b).bind("resize"+j,y),(k.viewport||s&&z.css("position")==="fixed")&&a(k.viewport).bind("scroll"+j,y),/unfocus/i.test(p.hide.event)&&n.doc.bind("mousedown"+j,function(b){var c=a(b.target);c.parents(m).length===0&&c.add(o).length>1&&z.is(":visible")&&!z.hasClass(l)&&u.hide(b)}),/mouseleave|mouseout/i.test(p.hide.event)&&a(b).bind("blur mouseout",function(a){a.relatedTarget||u.hide(a)}),k.target==="mouse"&&n.doc.bind("mousemove"+j,function(a){k.adjust.mouse&&!z.hasClass(l)&&z.is(":visible")&&u.reposition(a||i)}))}function J(b,c){function g(a){function c(c,d){(b=b.not(this)).length===0&&(u.redraw(),u.reposition(B.event),a())}var b;if((b=d.find("img:not([height]):not([width])")).length===0)return c.call(b);b.one(["abort","error","load","unload",""].join(".qtip-image "),c).each(function(a,b){(function d(){if(b.height&&b.width)return c.call(b,f);u.timers.img[a]=setTimeout(d,20)})()})}var d=A.content;if(!u.rendered||!b)return e;a.isFunction(b)&&(b=b.call(o,u)||""),b.jquery&&b.length>0?d.empty().append(b.css({display:"block"})):d.html(b),u.rendered<0?z.queue("fx",g):(y=0,g(a.noop));return u}function I(b){var c=A.title;if(!u.rendered||!b)return e;a.isFunction(b)&&(b=b.call(o,u)||""),b.jquery&&b.length>0?c.empty().append(b.css({display:"block"})):c.html(b),u.redraw(),u.rendered&&z.is(":visible")&&u.reposition(B.event)}function H(a){var b=A.button,c=A.title;if(!u.rendered)return e;a?(c||G(),F()):b.remove()}function G(){var b=w+"-title";A.titlebar&&E(),A.titlebar=a("
",{"class":j+"-titlebar "+(p.style.widget?"ui-widget-header":"")}).append(A.title=a("
",{id:b,"class":j+"-title","aria-atomic":d})).insertBefore(A.content),p.content.title.button?F():u.rendered&&u.redraw()}function F(){var b=p.content.title.button,c=typeof b==="string",d=c?b:"Close tooltip";A.button&&A.button.remove(),b.jquery?A.button=b:A.button=a("",{"class":"ui-state-default "+(p.style.widget?"":j+"-icon"),title:d,"aria-label":d}).prepend(a("",{"class":"ui-icon ui-icon-close",html:"×"})),A.button.appendTo(A.titlebar).attr("role","button").hover(function(b){a(this).toggleClass("ui-state-hover",b.type==="mouseenter")}).click(function(a){z.hasClass(l)||u.hide(a);return e}).bind("mousedown keydown mouseup keyup mouseout",function(b){a(this).toggleClass("ui-state-active ui-state-focus",b.type.substr(-4)==="down")}),u.redraw()}function E(){A.title&&(A.titlebar.remove(),A.titlebar=A.title=A.button=f,u.reposition())}function D(){var a=p.style.widget;z.toggleClass(k,a),A.content.toggleClass(k+"-content",a),A.titlebar&&A.titlebar.toggleClass(k+"-header",a),A.button&&A.button.toggleClass(j+"-icon",!a)}function C(a){var b=0,c,d=p,e=a.split(".");while(d=d[e[b++]])b0&&!a("#"+i).length&&(z[0].id=i,A.content[0].id=i+"-content",A.title[0].id=i+"-title")},"^content.text$":function(a,b,c){J(c)},"^content.title.text$":function(a,b,c){if(!c)return E();!A.title&&c&&G(),I(c)},"^content.title.button$":function(a,b,c){H(c)},"^position.(my|at)$":function(a,b,c){"string"===typeof c&&(a[b]=new h.Corner(c))},"^position.container$":function(a,b,c){u.rendered&&z.appendTo(c)},"^(show|hide).(event|target|fixed|delay|inactive)$":function(a,b,c,d,e){var f=[1,0,0];f[e[1]==="show"?"push":"unshift"](0),L.apply(u,f),K.apply(u,[1,1,0,0])},"^show.ready$":function(){u.rendered?u.show():u.render(1)},"^style.classes$":function(b,c,d){a.attr(z[0],"class",j+" qtip ui-helper-reset "+d)},"^style.widget|content.title":D,"^events.(render|show|move|hide|focus|blur)$":function(b,c,d){z[(a.isFunction(d)?"":"un")+"bind"]("tooltip"+c,d)}},a.extend(u,{render:function(b){if(u.rendered)return u;var c=p.content.text,f=p.content.title.text,g=a.Event("tooltiprender");a.attr(o[0],"aria-describedby",w),z=A.tooltip=a("
").attr({id:w,"class":j+" qtip ui-helper-reset "+p.style.classes,role:"alert","aria-live":"polite","aria-atomic":e,"aria-describedby":w+"-content","aria-hidden":d}).toggleClass(l,B.disabled).data("qtip",u).appendTo(p.position.container).append(A.content=a("
",{"class":j+"-content",id:w+"-content","aria-atomic":d})),u.rendered=-1,y=1,f&&(G(),I(f)),J(c),u.rendered=d,D(),a.each(p.events,function(b,c){a.isFunction(c)&&z.bind(b==="toggle"?"tooltipshow tooltiphide":"tooltip"+b,c)}),a.each(h,function(){this.initialize==="render"&&this(u)}),K(1,1,1,1),z.queue("fx",function(a){g.originalEvent=B.event,z.trigger(g,[u]),y=0,u.redraw(),(p.show.ready||b)&&u.show(B.event),a()});return u},get:function(a){var b,c;switch(a.toLowerCase()){case"dimensions":b={height:z.outerHeight(),width:z.outerWidth()};break;case"offset":b=h.offset(z,p.position.container);break;default:c=C(a.toLowerCase()),b=c[0][c[1]],b=b.precedance?b.string():b}return b},set:function(b,c){function j(a,b){var c,d,e;for(c in h)for(d in h[c])if(e=(new RegExp(d,"i")).exec(a))b.push(e),h[c][d].apply(u,b)}var f=/^position\.(my|at|adjust|target|container)|style|content|show\.ready/i,g=e,h=u.checks,i;"string"===typeof b?(i=b,b={},b[i]=c):b=a.extend(d,{},b),a.each(b,function(c,d){var e=C(c.toLowerCase()),h;h=e[0][e[1]],e[0][e[1]]="object"===typeof d&&d.nodeType?a(d):d,b[c]=[e[0],e[1],d,h],g=f.test(c)||g}),s(p),x=y=1,a.each(b,j),x=y=0,g&&z.is(":visible")&&u.rendered&&u.reposition();return u},toggle:function(b,c){function j(){b?(a.browser.msie&&z[0].style.removeAttribute("filter"),z.css("overflow","")):z.css({display:"",visibility:"",width:"",opacity:"",left:"",top:""})}if(!u.rendered)if(b)u.render(1);else return u;var d=b?"show":"hide",g=p[d],h=z.is(":visible"),i;(typeof b).search("boolean|number")&&(b=!h);if(h===b)return u;if(c){if(/over|enter/.test(c.type)&&/out|leave/.test(B.event.type)&&c.target===p.show.target[0]&&z.has(c.relatedTarget).length)return u;B.event=a.extend({},c)}i=a.Event("tooltip"+d),i.originalEvent=c?B.event:f,z.trigger(i,[u,90]);if(i.isDefaultPrevented())return u;a.attr(z[0],"aria-hidden",!b),b?(u.focus(c),u.reposition(c),g.solo&&a(m,g.solo).not(z).qtip("hide",i)):(clearTimeout(u.timers.show),u.blur(c)),z.stop(0,1),a.isFunction(g.effect)?(g.effect.call(z,u),z.queue("fx",function(a){j(),a()})):g.effect===e?(z[d](),j.call(z)):z.fadeTo(90,b?1:0,j),b&&g.target.trigger("qtip-"+r+"-inactive");return u},show:function(a){return u.toggle(d,a)},hide:function(a){return u.toggle(e,a)},focus:function(b){if(!u.rendered)return u;var c=a(m),d=parseInt(z[0].style.zIndex,10),e=g.zindex+c.length,f=a.extend({},b),h,i;z.hasClass(n)||(d!==e&&(c.each(function(){this.style.zIndex>d&&(this.style.zIndex=this.style.zIndex-1)}),c.filter("."+n).qtip("blur",f)),i=a.Event("tooltipfocus"),i.originalEvent=f,z.trigger(i,[u,e]),i.isDefaultPrevented()||(z.addClass(n)[0].style.zIndex=e));return u},blur:function(b){var c=a.extend({},b),d;z.removeClass(n),d=a.Event("tooltipblur"),d.originalEvent=c,z.trigger(d,[u]);return u},reposition:function(d,f){if(!u.rendered||x)return u;x=1;var k=p.position.target,l=p.position,m=l.my,n=l.at,o=l.adjust,q=z.outerWidth(),r=z.outerHeight(),s=0,t=0,w=a.Event("tooltipmove"),y=z.css("position")==="fixed",A=l.viewport.jquery?l.viewport:a(b),C={left:0,top:0},D=(u.plugins.tip||{}).corner,E={left:function(a){var b=A.scrollLeft,c=m.x==="left"?q:m.x==="right"?-q:-q/2,d=n.x==="left"?s:n.x==="right"?-s:-s/2,e=D&&D.precedance==="x"?g.defaults.style.tip.width:0,f=b-a-e,h=a+q-A.width-b+e,i=c-(m.precedance==="x"||m.x===m.y?d:0),j=m.x==="center";f>0&&(m.x!=="left"||h>0)?C.left-=i+(j?0:2*o.x):h>0&&(m.x!=="right"||f>0)&&(C.left-=j?-i:i+2*o.x),C.left!==a&&j&&(C.left-=o.x),C.left<0&&-C.left>h&&(C.left=a);return C.left-a},top:function(a){var b=A.scrollTop,c=m.y==="top"?r:m.y==="bottom"?-r:-r/2,d=n.y==="top"?t:n.y==="bottom"?-t:-t/2,e=D&&D.precedance==="y"?g.defaults.style.tip.height:0,f=b-a-e,h=a+r-A.height-b+e,i=c-(m.precedance==="y"||m.x===m.y?d:0),j=m.y==="center";f>0&&(m.y!=="top"||h>0)?C.top-=i+(j?0:2*o.y):h>0&&(m.y!=="bottom"||f>0)&&(C.top-=j?-i:i+2*o.y),C.top!==a&&j&&(C.top-=o.y),C.top<0&&-C.top>h&&(C.top=a);return C.top-a}};f=f===c||!!f,A=A?{elem:A,height:A[(A[0]===b?"h":"outerH")+"eight"](),width:A[(A[0]===b?"w":"outerW")+"idth"](),scrollLeft:A.scrollLeft(),scrollTop:A.scrollTop()}:e;if(k==="mouse")n={x:"left",y:"top"},d=d&&(d.type==="resize"||d.type==="scroll")?B.event:o.mouse||!d||!d.pageX?a.extend({},i):d,C={top:d.pageY,left:d.pageX};else{k==="event"&&(d&&d.target&&d.type!=="scroll"&&d.type!=="resize"?k=B.target=a(d.target):k=B.target),k=a(k).eq(0);if(k.length===0)return u;k[0]===document||k[0]===b?(s=k.width(),t=k.height(),k[0]===b&&(C={top:y?0:A.scrollTop,left:y?0:A.scrollLeft})):k.is("area")&&h.imagemap?C=h.imagemap(k,n):k[0].namespaceURI=="http://www.w3.org/2000/svg"&&h.svg?C=h.svg(k,n):(s=k.outerWidth(),t=k.outerHeight(),C=h.offset(k,l.container)),C.offset&&(s=C.width,t=C.height,C=C.offset),C.left+=n.x==="right"?s:n.x==="center"?s/2:0,C.top+=n.y==="bottom"?t:n.y==="center"?t/2:0}C.left+=o.x+(m.x==="right"?-q:m.x==="center"?-q/2:0),C.top+=o.y+(m.y==="bottom"?-r:m.y==="center"?-r/2:0),l.viewport.jquery&&k[0]!==b&&k[0]!==v?C.adjusted={left:E.left(C.left),top:E.top(C.top)}:C.adjusted={left:0,top:0},z.attr("class",function(b,c){return a.attr(this,"class").replace(/ui-tooltip-pos-\w+/i,"")}).addClass(j+"-pos-"+m.abbreviation()),w.originalEvent=a.extend({},d),z.trigger(w,[u,C,A.elem]);if(w.isDefaultPrevented())return u;delete C.adjusted,f&&isNaN(C.left)&&isNaN(C.top)?a.isFunction(l.effect)&&(l.effect.call(z,u,a.extend({},C)),z.queue(function(b){a(this).css({opacity:"",height:""}),a.browser.msie&&this.style.removeAttribute("filter"),b()})):z.css(C),x=0;return u},redraw:function(){if(u.rendered<1||y)return u;var b=j+"-fluid",c,d,e;y=1,z.css("width","auto").addClass(b),c=z.width()+(a.browser.mozilla?1:0),d=parseInt(z.css("max-width"),10)||0,e=parseInt(z.css("min-width"),10)||0,c=d+e?Math.min(Math.max(c,e),d):c,z.css("width",c).removeClass(b),y=0;return u},disable:function(b){var c=l;"boolean"!==typeof b&&(b=!z.hasClass(c)&&!B.disabled),u.rendered?(z.toggleClass(c,b),a.attr(z[0],"aria-disabled",b)):B.disabled=!!b;return u},enable:function(){return u.disable(e)},destroy:function(){var b=o[0],c=a.attr(b,q);u.rendered&&(z.remove(),a.each(u.plugins,function(){this.destroy&&this.destroy()})),clearTimeout(u.timers.show),clearTimeout(u.timers.hide),L(1,1,1,1),a.removeData(b,"qtip"),c&&(a.attr(b,"title",c),o.removeAttr(q)),o.removeAttr("aria-describedby").unbind(".qtip");return o}})}function s(b){var c;if(!b||"object"!==typeof b)return e;"object"!==typeof b.metadata&&(b.metadata={type:b.metadata});if("content"in b){if("object"!==typeof b.content||b.content.jquery)b.content={text:b.content};c=b.content.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.text=e),"title"in b.content&&("object"!==typeof b.content.title&&(b.content.title={text:b.content.title}),c=b.content.title.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.title.text=e))}"position"in b&&("object"!==typeof b.position&&(b.position={my:b.position,at:b.position})),"show"in b&&("object"!==typeof b.show&&(b.show.jquery?b.show={target:b.show}:b.show={event:b.show})),"hide"in b&&("object"!==typeof b.hide&&(b.hide.jquery?b.hide={target:b.hide}:b.hide={event:b.hide})),"style"in b&&("object"!==typeof b.style&&(b.style={classes:b.style})),a.each(h,function(){this.sanitize&&this.sanitize(b)});return b}function r(){var c=b.console;return c&&(c.error||c.log||a.noop).apply(c,arguments)}var d=!0,e=!1,f=null,g,h,i,j="ui-tooltip",k="ui-widget",l="ui-state-disabled",m="div.qtip."+j,n=j+"-focus",o="-31000px",p="_replacedByqTip",q="oldtitle";g=a.fn.qtip=function(b,h,i){var j=(""+b).toLowerCase(),k=f,l=j==="disable"?[d]:a.makeArray(arguments).slice(1,10),m=l[l.length-1],n=this[0]?a.data(this[0],"qtip"):f;if(!arguments.length&&n||j==="api")return n;if("string"===typeof b){this.each(function(){var b=a.data(this,"qtip");if(!b)return d;m&&m.timeStamp&&(b.cache.event=m);if(j!=="option"&&j!=="options"||!h)b[j]&&b[j].apply(b[j],l);else if(a.isPlainObject(h)||i!==c)b.set(h,i);else{k=b.get(h);return e}});return k!==f?k:this}if("object"===typeof b||!arguments.length){n=s(a.extend(d,{},b));return g.bind.call(this,n,m)}},g.bind=function(b,c){return this.each(function(f){function p(b){function c(){o.render(typeof b==="object"||i.show.ready),k.show.unbind(l.show),k.hide.unbind(l.hide)}if(o.cache.disabled)return e;o.cache.event=a.extend({},b),i.show.delay>0?(clearTimeout(o.timers.show),o.timers.show=setTimeout(c,i.show.delay),l.show!==l.hide&&k.hide.bind(l.hide,function(){clearTimeout(o.timers.show)})):c()}var i,k,l,m=!b.id||b.id===e||b.id.length<1||a("#"+j+"-"+b.id).length?g.nextid++:b.id,n=".qtip-"+m+"-create",o=u.call(this,m,b);if(o===e)return d;i=o.options,a.each(h,function(){this.initialize==="initialize"&&this(o)}),k={show:i.show.target,hide:i.hide.target},l={show:a.trim(""+i.show.event).replace(/ /g,n+" ")+n,hide:a.trim(""+i.hide.event).replace(/ /g,n+" ")+n},i.hide.event==="unfocus"&&(l.hide="mouseleave"+n),k.show.bind(l.show,p),(i.show.ready||i.prerender)&&p(c)})},h=g.plugins={Corner:function(a){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,"center").toLowerCase(),this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase(),this.precedance=a.charAt(0).search(/^(t|b)/)>-1?"y":"x",this.string=function(){return this.precedance==="y"?this.y+this.x:this.x+this.y},this.abbreviation=function(){var a=this.x.substr(0,1),b=this.y.substr(0,1);return a===b?a:a==="c"||a!=="c"&&b!=="c"?b+a:a+b}},offset:function(c,d){function k(a,b){e.left+=b*a.scrollLeft(),e.top+=b*a.scrollTop()}var e=c.offset(),f=d,g=0,i=document.body,j;if(f){do{if(f[0]===i)break;f.css("position")!=="static"&&(j=f.position(),e.left-=j.left+(parseInt(f.css("borderLeftWidth"),10)||0),e.top-=j.top+(parseInt(f.css("borderTopWidth"),10)||0),g++)}while(f=f.offsetParent());(d[0]!==i||g>1)&&k(d,1),h.iOS&&k(a(b),-1)}return e},iOS:parseFloat((""+(/CPU.*OS ([0-9_]{2,3})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,"4_2"])[1]).replace("undefined","3_2").replace("_","."))<4.1,fn:{attr:function(b,c){if(this.length){var d=this[0],e="title",f=a.data(d,"qtip");if(b===e){if(arguments.length<2)return a.attr(d,q);if(typeof f==="object"){f&&f.rendered&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",c),a.fn["attr"+p].apply(this,arguments),a.attr(d,q,a.attr(d,e));return this.removeAttr(e)}}}},clone:function(b){var c=a([]),d="title",e;e=a.fn["clone"+p].apply(this,arguments).filter("[oldtitle]").each(function(){a.attr(this,d,a.attr(this,q)),this.removeAttribute(q)}).end();return e},remove:a.ui?f:function(b,c){a(this).each(function(){c||(!b||a.filter(b,[this]).length)&&a("*",this).add(this).each(function(){a(this).triggerHandler("remove")})})}}},a.each(h.fn,function(b,c){if(!c)return d;var e=a.fn[b+p]=a.fn[b];a.fn[b]=function(){return c.apply(this,arguments)||e.apply(this,arguments)}}),a(b).one("load",function(){var b="mousemove";a(document).bind(b+".qtip",function(a){i={pageX:a.pageX,pageY:a.pageY,type:b}})}),g.version="2.0.0pre",g.nextid=0,g.inactiveEvents="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),g.zindex=15e3,g.defaults={prerender:e,id:e,overwrite:d,content:{text:d,attr:"title",title:{text:e,button:e}},position:{my:"top left",at:"bottom right",target:e,container:e,viewport:e,adjust:{x:0,y:0,mouse:d,resize:d,method:"flip"},effect:d},show:{target:e,event:"mouseenter",effect:d,delay:90,solo:e,ready:e},hide:{target:e,event:"mouseleave",effect:d,delay:0,fixed:e,inactive:e},style:{classes:"",widget:e},events:{render:f,move:f,show:f,hide:f,toggle:f,focus:f,blur:f}},h.ajax=function(a){var b=a.plugins.ajax;return"object"===typeof b?b:a.plugins.ajax=new v(a)},h.ajax.initialize="render",h.ajax.sanitize=function(a){var b=a.content,c;b&&"ajax"in b&&(c=b.ajax,typeof c!=="object"&&(c=a.content.ajax={url:c}),"boolean"!==typeof c.once&&c.once&&(c.once=!!c.once))},a.extend(d,g.defaults,{content:{ajax:{loading:d,once:d}}}),h.tip=function(a){var b=a.plugins.tip;return"object"===typeof b?b:a.plugins.tip=new x(a)},h.tip.initialize="render",h.tip.sanitize=function(a){var b=a.style,c;b&&"tip"in b&&(c=a.style.tip,typeof c!=="object"&&(a.style.tip={corner:c}),/string|boolean/i.test(typeof c.corner)||(c.corner=d),typeof c.width!=="number"&&delete c.width,typeof c.height!=="number"&&delete c.height,typeof c.border!=="number"&&c.border!==d&&delete c.border,typeof c.offset!=="number"&&delete c.offset)},a.extend(d,g.defaults,{style:{tip:{corner:d,mimic:e,width:6,height:6,border:d,offset:0}}}),h.imagemap=function(b,c){function l(a,b){var d=0,e=1,f=1,g=0,h=0,i=a.width,j=a.height;while(i>0&&j>0&&e>0&&f>0){i=Math.floor(i/2),j=Math.floor(j/2),c.x==="left"?e=i:c.x==="right"?e=a.width-i:e+=Math.floor(i/2),c.y==="top"?f=j:c.y==="bottom"?f=a.height-j:f+=Math.floor(j/2),d=b.length;while(d--){if(b.length<2)break;g=b[d][0]-a.offset.left,h=b[d][1]-a.offset.top,(c.x==="left"&&g>=e||c.x==="right"&&g<=e||c.x==="center"&&(ga.width-e)||c.y==="top"&&h>=f||c.y==="bottom"&&h<=f||c.y==="center"&&(ha.height-f))&&b.splice(d,1)}}return{left:b[0][0],top:b[0][1]}}var d=b.attr("shape").toLowerCase(),e=b.attr("coords").split(","),f=[],g=a('img[usemap="#'+b.parent("map").attr("name")+'"]'),h=g.offset(),i={width:0,height:0,offset:{top:1e10,right:0,bottom:0,left:1e10}},j=0,k=0;h.left+=Math.ceil((g.outerWidth()-g.width())/2),h.top+=Math.ceil((g.outerHeight()-g.height())/2);if(d==="poly"){j=e.length;while(j--)k=[parseInt(e[--j],10),parseInt(e[j+1],10)],k[0]>i.offset.right&&(i.offset.right=k[0]),k[0]i.offset.bottom&&(i.offset.bottom=k[1]),k[1]'),d.bgiframe.appendTo(e),e.bind("tooltipmove"+f,c.adjust)},adjust:function(){var a=b.get("dimensions"),c=b.plugins.tip,f=d.tip,g,h;h=parseInt(e.css("border-left-width"),10)||0,h={left:-h,top:-h},c&&f&&(g=c.corner.precedance==="x"?["width","left"]:["height","top"],h[g[1]]-=f[g[0]]()),d.bgiframe.css(h).css(a)},destroy:function(){d.bgiframe.remove(),e.unbind(f)}}),c.init()}function y(c){var f=this,h=c.options.show.modal,i=c.elements,j=i.tooltip,k="#qtip-overlay",l=".qtipmodal",m="tooltipshow"+l+" tooltiphide"+l;c.checks.modal={"^show.modal.(on|blur)$":function(){f.init(),i.overlay.toggle(j.is(":visible"))}},a.extend(f,{init:function(){h.on&&(j.unbind(l).bind(m,function(b,c,d){var e=b.type.replace("tooltip","");a.isFunction(h[e])?h[e].call(i.overlay,d,c):f[e](d)}),f.create(),h.blur===d&&i.overlay.unbind(l+c.id).bind("click"+l+c.id,function(){c.hide.call(c)}),i.overlay.css("cursor",h.blur?"pointer":""))},create:function(){var c=a(k),d;if(c.length){i.overlay=c;return c}d=i.overlay=a("
",{id:k.substr(1),css:{position:"absolute",top:0,left:0,display:"none"},mousedown:function(){return e}}).appendTo(document.body),a(b).bind("resize"+l,function(){d.css({height:Math.max(a(b).height(),a(document).height()),width:Math.max(a(b).width(),a(document).width())})}).trigger("resize");return d},toggle:function(b){var h=i.overlay,k=c.options.show.modal.effect,l=b?"show":"hide",m;h||(h=f.create());if(!h.is(":animated")||b)h.stop(d,e),b&&(m=parseInt(a.css(j[0],"z-index"),10),h.css("z-index",(m||g.zindex)-1)),a.isFunction(k)?k.call(h,b):k===e?h[l]():h.fadeTo(90,b?.7:0,function(){b||a(this).hide()})},show:function(){f.toggle(d)},hide:function(){f.toggle(e)},destroy:function(){var d=i.overlay;d&&(a(k).each(function(){var b=a(this).data("qtip");if(b&&b.id!==b.id&&b.options.show.modal)return d=e}),d?(i.overlay.remove(),a(b).unbind(l)):i.overlay.unbind(l+c.id)),j.unbind(m)}}),f.init()}function x(b,g){function v(a){var b=a.precedance==="y",c=n[b?"width":"height"],d=n[b?"height":"width"],e=a.string().indexOf("center")>-1,f=c*(e?.5:1),g=Math.pow,h=Math.round,i,j,k,l=Math.sqrt(g(f,2)+g(d,2)),m=[p/f*l,p/d*l];m[2]=Math.sqrt(g(m[0],2)-g(p,2)),m[3]=Math.sqrt(g(m[1],2)-g(p,2)),i=l+m[2]+m[3]+(e?0:m[0]),j=i/l,k=[h(j*d),h(j*c)];return{height:k[b?0:1],width:k[b?1:0]}}function u(b){var c=k.titlebar&&b.y==="top",d=c?k.titlebar:k.content,e=a.browser.mozilla,f=e?"-moz-":a.browser.webkit?"-webkit-":"",g=b.y+(e?"":"-")+b.x,h=f+(e?"border-radius-"+g:"border-"+g+"-radius");return parseInt(d.css(h),10)||parseInt(l.css(h),10)||0}function t(a,b,c){b=b?b:a[a.precedance];var d=k.titlebar&&a.y==="top",e=d?k.titlebar:k.content,f="border-"+b+"-width",g=parseInt(e.css(f),10);return(c?g||parseInt(l.css(f),10):g)||0}function s(b,e,f,g){if(k.tip){var h=a.extend({},i.corner),l=f.adjusted,n;i.corner.fixed!==d&&(l.left&&(h.x=h.x==="center"?l.left>0?"left":"right":h.x==="left"?"right":"left"),l.top&&(h.y=h.y==="center"?l.top>0?"top":"bottom":h.y==="top"?"bottom":"top"),h.string()!==m.corner&&(m.top!==l.top||m.left!==l.left)&&(n=i.update(h))),n||(n=i.position(h,0)),n.right!==c&&(n.left=n.right),n.bottom!==c&&(n.top=n.bottom),n.option=Math.max(0,j.offset),f.left-=n.left.charAt?n.option:(n.right?-1:1)*n.left,f.top-=n.top.charAt?n.option:(n.bottom?-1:1)*n.top,m.left=l.left,m.top=l.top,m.corner=h.string()}}var i=this,j=b.options.style.tip,k=b.elements,l=k.tooltip,m={top:0,left:0,corner:""},n={width:j.width,height:j.height},o={},p=j.border||0,q=".qtip-tip",r=a("")[0].getContext;i.corner=f,i.mimic=f,b.checks.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){i.init()||i.destroy(),b.reposition()},"^style.tip.(height|width)$":function(){n={width:j.width,height:j.height},i.create(),i.update(),b.reposition()},"^content.title.text|style.(classes|widget)$":function(){k.tip&&i.update()}},a.extend(i,{init:function(){var b=i.detectCorner()&&(r||a.browser.msie);b&&(i.create(),i.update(),l.unbind(q).bind("tooltipmove"+q,s));return b},detectCorner:function(){var a=j.corner,c=b.options.position,f=c.at,g=c.my.string?c.my.string():c.my;if(a===e||g===e&&f===e)return e;a===d?i.corner=new h.Corner(g):a.string||(i.corner=new h.Corner(a),i.corner.fixed=d);return i.corner.string()!=="centercenter"},detectColours:function(){var c,d,e,f=k.tip.css({backgroundColor:"",border:""}),g=i.corner,h=g[g.precedance],m="border-"+h+"-color",p="border"+h.charAt(0)+h.substr(1)+"Color",q=/rgba?\(0, 0, 0(, 0)?\)|transparent/i,r="background-color",s="transparent",t="ui-tooltip-fluid",u=a(document.body).css("color"),v=b.elements.content.css("color"),w=k.titlebar&&(g.y==="top"||g.y==="center"&&f.position().top+n.height/2+j.offset",{"class":"ui-tooltip-tip"}).css({width:b,height:c}).prependTo(l),r?a("").appendTo(k.tip)[0].getContext("2d").save():(d='',k.tip.html(p?d+=d:d))},update:function(b){var c=k.tip,g=c.children(),l=n.width,m=n.height,q="px solid ",s="px dashed transparent",u=j.mimic,x=Math.round,y,z,A,B,C;b||(b=i.corner),u===e?u=b:(u=new h.Corner(u),u.precedance=b.precedance,u.x==="inherit"?u.x=b.x:u.y==="inherit"?u.y=b.y:u.x===u.y&&(u[b.precedance]=b[b.precedance])),y=u.precedance,i.detectColours(),p=o.border==="transparent"||o.border==="#123456"?0:j.border===d?t(b,f,d):j.border,A=w(u,l,m),C=v(b),c.css(C),b.precedance==="y"?B=[x(u.x==="left"?p:u.x==="right"?C.width-l-p:(C.width-l)/2),x(u.y==="top"?C.height-m:0)]:B=[x(u.x==="left"?C.width-l:0),x(u.y==="top"?p:u.y==="bottom"?C.height-m-p:(C.height-m)/2)],r?(g.attr(C),z=g[0].getContext("2d"),z.restore(),z.save(),z.clearRect(0,0,3e3,3e3),z.translate(B[0],B[1]),z.beginPath(),z.moveTo(A[0][0],A[0][1]),z.lineTo(A[1][0],A[1][1]),z.lineTo(A[2][0],A[2][1]),z.closePath(),z.fillStyle=o.fill,z.strokeStyle=o.border,z.lineWidth=p*2,z.lineJoin="miter",z.miterLimit=100,z.stroke(),z.fill()):(A="m"+A[0][0]+","+A[0][1]+" l"+A[1][0]+","+A[1][1]+" "+A[2][0]+","+A[2][1]+" xe",B[2]=p&&/^(r|b)/i.test(b.string())?parseFloat(a.browser.version,10)===8?2:1:0,g.css({antialias:""+(u.string().indexOf("center")>-1),left:B[0]-B[2]*Number(y==="x"),top:B[1]-B[2]*Number(y==="y"),width:l+p,height:m+p}).each(function(b){var c=a(this);c.attr({coordsize:l+p+" "+(m+p),path:A,fillcolor:o.fill,filled:!!b,stroked:!b}).css({display:p||b?"block":"none"}),!b&&p>0&&c.html()===""&&c.html('')}));return i.position(b,1)},position:function(b,c){var f=k.tip,g={},h=Math.max(0,j.offset),l,m,n;if(j.corner===e||!f)return e;b=b||i.corner,l=b.precedance,m=v(b),n=a.browser.msie&&parseFloat(a.browser.version,10)==8&&p&&/^(b|r)/i.test(b.string())?1:0,a.each(l==="y"?[b.x,b.y]:[b.y,b.x],function(a,c){var e,f;c==="center"?(e=l==="y"?"left":"top",g[e]="50%",g["margin-"+e]=-Math.round(m[l==="y"?"width":"height"]/2)+h):(e=t(b,c,d),f=u(b),g[c]=a||!p?t(b,c)+(a?0:f):h+(f>e?f:0))}),g[b[l]]-=m[l==="x"?"width":"height"]+n,c&&f.css({top:"",bottom:"",left:"",right:"",margin:""}).css(g);return g},destroy:function(){k.tip&&k.tip.remove(),l.unbind(q)}}),i.init()}function w(a,b,c){var d=Math.ceil(b/2),e=Math.ceil(c/2),f={bottomright:[[0,0],[b,c],[b,0]],bottomleft:[[0,0],[b,0],[0,c]],topright:[[0,c],[b,0],[b,c]],topleft:[[0,0],[0,c],[b,c]],topcenter:[[0,c],[d,0],[b,c]],bottomcenter:[[0,0],[b,0],[d,c]],rightcenter:[[0,0],[b,e],[0,c]],leftcenter:[[b,0],[b,c],[0,e]]};f.lefttop=f.bottomright,f.righttop=f.bottomleft,f.leftbottom=f.topright,f.rightbottom=f.topleft;return f[a.string()]}function v(b){var c=this,f=b.elements.tooltip,g=b.options.content.ajax,h=".qtip-ajax",i=/)<[^<]*)*<\/script>/gi,j=d;b.checks.ajax={"^content.ajax":function(a,b,d){b==="ajax"&&(g=d),b==="once"?(f.unbind(h),d&&f.bind("tooltipshow"+h,c.load)):g&&g.url?c.load():f.unbind(h)}},a.extend(c,{init:function(){g&&g.url&&f.bind("tooltipshow"+h,c.load);return c},load:function(d,h){function p(a,c,d){b.set("content.text",c+": "+d),n()}function o(c){l&&(c=a("
").append(c.replace(i,"")).find(l)),b.set("content.text",c),n()}function n(){m&&(f.css("visibility",""),h=e)}if(d.isDefaultPrevented())return c;var j=g.url.indexOf(" "),k=g.url,l,m=g.once&&!g.loading&&h;m&&f.css("visibility","hidden"),j>-1&&(l=k.substr(j),k=k.substr(0,j)),a.ajax(a.extend({success:o,error:p,context:b},g,{url:k}));return c}}),c.init()}function u(b,c){var i,j,k,l,m=a(this),n=a(document.body),o=this===document?n:m,p=m.metadata?m.metadata(c.metadata):f,u=c.metadata.type==="html5"&&p?p[c.metadata.name]:f,v=m.data(c.metadata.name||"qtipopts");try{v=typeof v==="string"?(new Function("return "+v))():v}catch(w){r("Unable to parse HTML5 attribute data: "+v)}l=a.extend(d,{},g.defaults,c,typeof v==="object"?s(v):f,s(u||p)),p&&a.removeData(this,"metadata"),j=l.position,l.id=b;if("boolean"===typeof l.content.text){k=m.attr(l.content.attr);if(l.content.attr!==e&&k)l.content.text=k;else return e}j.container===e&&(j.container=n),j.target===e&&(j.target=o),l.show.target===e&&(l.show.target=o),l.show.solo===d&&(l.show.solo=n),l.hide.target===e&&(l.hide.target=o),l.position.viewport===d&&(l.position.viewport=j.container),j.at=new h.Corner(j.at),j.my=new h.Corner(j.my);if(a.data(this,"qtip"))if(l.overwrite)m.qtip("destroy");else if(l.overwrite===e)return e;a.attr(this,"title")&&(a.attr(this,q,a.attr(this,"title")),this.removeAttribute("title")),i=new t(m,l,b,!!k),a.data(this,"qtip",i),m.bind("remove.qtip",function(){i.destroy()});return i}function t(o,p,r,t){function L(c,d,e,f){f=parseInt(f,10)!==0;var g=".qtip-"+r,h={show:c&&p.show.target[0],hide:d&&p.hide.target[0],tooltip:e&&u.rendered&&A.tooltip[0],content:e&&u.rendered&&A.content[0],container:f&&p.position.container[0]===v?document:p.position.container[0],window:f&&b};u.rendered?a([]).pushStack(a.grep([h.show,h.hide,h.tooltip,h.container,h.content,h.window],function(a){return typeof a==="object"})).unbind(g):c&&p.show.target.unbind(g+"-create")}function K(c,d,f,h){function y(a){z.is(":visible")&&u.reposition(a)}function x(a){if(z.hasClass(l))return e;clearTimeout(u.timers.inactive),u.timers.inactive=setTimeout(function(){u.hide(a)},p.hide.inactive)}function w(b){if(z.hasClass(l))return e;var c=a(b.relatedTarget||b.target),d=c.closest(m)[0]===z[0],f=c[0]===n.show[0];clearTimeout(u.timers.show),clearTimeout(u.timers.hide);if(k.target==="mouse"&&d||p.hide.fixed&&(/mouse(out|leave|move)/.test(b.type)&&(d||f))){b.stopPropagation(),b.preventDefault();return e}p.hide.delay>0?u.timers.hide=setTimeout(function(){u.hide(b)},p.hide.delay):u.hide(b)}function t(a){if(z.hasClass(l))return e;n.show.trigger("qtip-"+r+"-inactive"),clearTimeout(u.timers.show),clearTimeout(u.timers.hide);var b=function(){u.show(a)};p.show.delay>0?u.timers.show=setTimeout(b,p.show.delay):b()}var j=".qtip-"+r,k=p.position,n={show:p.show.target,hide:p.hide.target,container:k.container[0]===v?a(document):k.container,doc:a(document)},q={show:a.trim(""+p.show.event).split(" "),hide:a.trim(""+p.hide.event).split(" ")},s=a.browser.msie&&parseInt(a.browser.version,10)===6;f&&(p.hide.fixed&&(n.hide=n.hide.add(z),z.bind("mouseover"+j,function(){z.hasClass(l)||clearTimeout(u.timers.hide)})),k.target==="mouse"&&k.adjust.mouse&&p.hide.event&&z.bind("mouseleave"+j,function(a){(a.relatedTarget||a.target)!==n.show[0]&&u.hide(a)}),z.bind("mouseenter"+j+" mouseleave"+j,function(a){u[a.type==="mouseenter"?"focus":"blur"](a)})),d&&("number"===typeof p.hide.inactive&&(n.show.bind("qtip-"+r+"-inactive",x),a.each(g.inactiveEvents,function(a,b){n.hide.add(A.tooltip).bind(b+j+"-inactive",x)})),a.each(q.hide,function(b,c){var d=a.inArray(c,q.show),e=a(n.hide);d>-1&&e.add(n.show).length===e.length||c==="unfocus"?(n.show.bind(c+j,function(a){z.is(":visible")?w(a):t(a)}),delete q.show[d]):n.hide.bind(c+j,w)})),c&&a.each(q.show,function(a,b){n.show.bind(b+j,t)}),h&&((k.adjust.resize||k.viewport)&&a(a.event.special.resize?k.viewport:b).bind("resize"+j,y),(k.viewport||s&&z.css("position")==="fixed")&&a(k.viewport).bind("scroll"+j,y),/unfocus/i.test(p.hide.event)&&n.doc.bind("mousedown"+j,function(b){var c=a(b.target);c.parents(m).length===0&&c.add(o).length>1&&z.is(":visible")&&!z.hasClass(l)&&u.hide(b)}),/mouseleave|mouseout/i.test(p.hide.event)&&a(b).bind("blur mouseout",function(a){a.relatedTarget||u.hide(a)}),k.target==="mouse"&&n.doc.bind("mousemove"+j,function(a){k.adjust.mouse&&!z.hasClass(l)&&z.is(":visible")&&u.reposition(a||i)}))}function J(b,c){function f(a){function c(c){(b=b.not(this)).length===0&&(u.redraw(),u.reposition(B.event),a())}var b;if((b=d.find("img:not([height]):not([width])")).length===0)return c.call(b);b.each(function(a,b){(function d(){var e=u.timers.img;if(b.height&&b.width){clearTimeout(e[a]);return c.call(b)}d=setTimeout(e[a],20)})()})}var d=A.content;if(!u.rendered||!b)return e;a.isFunction(b)&&(b=b.call(o,u)||""),b.jquery&&b.length>0?d.empty().append(b.css({display:"block"})):d.html(b),u.rendered<0?z.queue("fx",f):(y=0,f(a.noop));return u}function I(b){var c=A.title;if(!u.rendered||!b)return e;a.isFunction(b)&&(b=b.call(o,u)||""),b.jquery&&b.length>0?c.empty().append(b.css({display:"block"})):c.html(b),u.redraw(),u.rendered&&z.is(":visible")&&u.reposition(B.event)}function H(a){var b=A.button,c=A.title;if(!u.rendered)return e;a?(c||G(),F()):b.remove()}function G(){var b=w+"-title";A.titlebar&&E(),A.titlebar=a("
",{"class":j+"-titlebar "+(p.style.widget?"ui-widget-header":"")}).append(A.title=a("
",{id:b,"class":j+"-title","aria-atomic":d})).insertBefore(A.content),p.content.title.button?F():u.rendered&&u.redraw()}function F(){var b=p.content.title.button,c=typeof b==="string",d=c?b:"Close tooltip";A.button&&A.button.remove(),b.jquery?A.button=b:A.button=a("",{"class":"ui-state-default "+(p.style.widget?"":j+"-icon"),title:d,"aria-label":d}).prepend(a("",{"class":"ui-icon ui-icon-close",html:"×"})),A.button.appendTo(A.titlebar).attr("role","button").hover(function(b){a(this).toggleClass("ui-state-hover",b.type==="mouseenter")}).click(function(a){z.hasClass(l)||u.hide(a);return e}).bind("mousedown keydown mouseup keyup mouseout",function(b){a(this).toggleClass("ui-state-active ui-state-focus",b.type.substr(-4)==="down")}),u.redraw()}function E(){A.title&&(A.titlebar.remove(),A.titlebar=A.title=A.button=f,u.reposition())}function D(){var a=p.style.widget;z.toggleClass(k,a),A.content.toggleClass(k+"-content",a),A.titlebar&&A.titlebar.toggleClass(k+"-header",a),A.button&&A.button.toggleClass(j+"-icon",!a)}function C(a){var b=0,c,d=p,e=a.split(".");while(d=d[e[b++]])b0&&!a("#"+i).length&&(z[0].id=i,A.content[0].id=i+"-content",A.title[0].id=i+"-title")},"^content.text$":function(a,b,c){J(c)},"^content.title.text$":function(a,b,c){if(!c)return E();!A.title&&c&&G(),I(c)},"^content.title.button$":function(a,b,c){H(c)},"^position.(my|at)$":function(a,b,c){"string"===typeof c&&(a[b]=new h.Corner(c))},"^position.container$":function(a,b,c){u.rendered&&z.appendTo(c)},"^(show|hide).(event|target|fixed|delay|inactive)$":function(a,b,c,d,e){var f=[1,0,0];f[e[1]==="show"?"push":"unshift"](0),L.apply(u,f),K.apply(u,[1,1,0,0])},"^show.ready$":function(){u.rendered?u.show():u.render(1)},"^style.classes$":function(b,c,d){a.attr(z[0],"class",j+" qtip ui-helper-reset "+d)},"^style.widget|content.title":D,"^events.(render|show|move|hide|focus|blur)$":function(b,c,d){z[(a.isFunction(d)?"":"un")+"bind"]("tooltip"+c,d)}},a.extend(u,{render:function(b){if(u.rendered)return u;var c=p.content.text,f=p.content.title.text,g=a.Event("tooltiprender");a.attr(o[0],"aria-describedby",w),z=A.tooltip=a("
").attr({id:w,"class":j+" qtip ui-helper-reset "+p.style.classes,role:"alert","aria-live":"polite","aria-atomic":e,"aria-describedby":w+"-content","aria-hidden":d}).toggleClass(l,B.disabled).data("qtip",u).appendTo(p.position.container).append(A.content=a("
",{"class":j+"-content",id:w+"-content","aria-atomic":d})),u.rendered=-1,y=1,f&&(G(),I(f)),J(c),u.rendered=d,D(),a.each(p.events,function(b,c){a.isFunction(c)&&z.bind(b==="toggle"?"tooltipshow tooltiphide":"tooltip"+b,c)}),a.each(h,function(){this.initialize==="render"&&this(u)}),K(1,1,1,1),z.queue("fx",function(a){g.originalEvent=B.event,z.trigger(g,[u]),y=0,u.redraw(),(p.show.ready||b)&&u.show(B.event),a()});return u},get:function(a){var b,c;switch(a.toLowerCase()){case"dimensions":b={height:z.outerHeight(),width:z.outerWidth()};break;case"offset":b=h.offset(z,p.position.container);break;default:c=C(a.toLowerCase()),b=c[0][c[1]],b=b.precedance?b.string():b}return b},set:function(b,c){function l(a,b){var c,d,e;for(c in j)for(d in j[c])if(e=(new RegExp(d,"i")).exec(a))b.push(e),j[c][d].apply(u,b)}var f=/^position\.(my|at|adjust|target|container)|style|content|show\.ready/i,g=/^content\.(title|attr)|style/i,h=e,i=e,j=u.checks,k;"string"===typeof b?(k=b,b={},b[k]=c):b=a.extend(d,{},b),a.each(b,function(c,d){var e=C(c.toLowerCase()),j;j=e[0][e[1]],e[0][e[1]]="object"===typeof d&&d.nodeType?a(d):d,b[c]=[e[0],e[1],d,j],h=f.test(c)||h,i=g.test(c)||i}),s(p),x=y=1,a.each(b,l),x=y=0,z.is(":visible")&&u.rendered&&(h&&u.reposition(),i&&u.redraw());return u},toggle:function(b,c){function j(){b?(a.browser.msie&&z[0].style.removeAttribute("filter"),z.css("overflow","")):z.css({display:"",visibility:"",width:"",opacity:"",left:"",top:""})}if(!u.rendered)if(b)u.render(1);else return u;var d=b?"show":"hide",g=p[d],h=z.is(":visible"),i;(typeof b).search("boolean|number")&&(b=!h);if(h===b)return u;if(c){if(/over|enter/.test(c.type)&&/out|leave/.test(B.event.type)&&c.target===p.show.target[0]&&z.has(c.relatedTarget).length)return u;B.event=a.extend({},c)}i=a.Event("tooltip"+d),i.originalEvent=c?B.event:f,z.trigger(i,[u,90]);if(i.isDefaultPrevented())return u;a.attr(z[0],"aria-hidden",!b),b?(u.focus(c),u.reposition(c),g.solo&&a(m,g.solo).not(z).qtip("hide",i)):(clearTimeout(u.timers.show),u.blur(c)),z.stop(0,1),a.isFunction(g.effect)?(g.effect.call(z,u),z.queue("fx",function(a){j(),a()})):g.effect===e?(z[d](),j.call(z)):z.fadeTo(90,b?1:0,j),b&&g.target.trigger("qtip-"+r+"-inactive");return u},show:function(a){return u.toggle(d,a)},hide:function(a){return u.toggle(e,a)},focus:function(b){if(!u.rendered)return u;var c=a(m),d=parseInt(z[0].style.zIndex,10),e=g.zindex+c.length,f=a.extend({},b),h,i;z.hasClass(n)||(d!==e&&(c.each(function(){this.style.zIndex>d&&(this.style.zIndex=this.style.zIndex-1)}),c.filter("."+n).qtip("blur",f)),i=a.Event("tooltipfocus"),i.originalEvent=f,z.trigger(i,[u,e]),i.isDefaultPrevented()||(z.addClass(n)[0].style.zIndex=e));return u},blur:function(b){var c=a.extend({},b),d;z.removeClass(n),d=a.Event("tooltipblur"),d.originalEvent=c,z.trigger(d,[u]);return u},reposition:function(d,f){if(!u.rendered||x)return u;x=1;var k=p.position.target,l=p.position,m=l.my,n=l.at,o=l.adjust,q=z.outerWidth(),r=z.outerHeight(),s=0,t=0,w=a.Event("tooltipmove"),y=z.css("position")==="fixed",A=l.viewport.jquery?l.viewport:a(b),C={left:0,top:0},D=(u.plugins.tip||{}).corner,E={left:function(a){var b=A.scrollLeft,c=m.x==="left"?q:m.x==="right"?-q:-q/2,d=n.x==="left"?s:n.x==="right"?-s:-s/2,e=D&&D.precedance==="x"?g.defaults.style.tip.width:0,f=b-a-e,h=a+q-A.width-b+e,i=c-(m.precedance==="x"||m.x===m.y?d:0),j=m.x==="center";f>0&&(m.x!=="left"||h>0)?C.left-=i+(j?0:2*o.x):h>0&&(m.x!=="right"||f>0)&&(C.left-=j?-i:i+2*o.x),C.left!==a&&j&&(C.left-=o.x),C.left<0&&-C.left>h&&(C.left=a);return C.left-a},top:function(a){var b=A.scrollTop,c=m.y==="top"?r:m.y==="bottom"?-r:-r/2,d=n.y==="top"?t:n.y==="bottom"?-t:-t/2,e=D&&D.precedance==="y"?g.defaults.style.tip.height:0,f=b-a-e,h=a+r-A.height-b+e,i=c-(m.precedance==="y"||m.x===m.y?d:0),j=m.y==="center";f>0&&(m.y!=="top"||h>0)?C.top-=i+(j?0:2*o.y):h>0&&(m.y!=="bottom"||f>0)&&(C.top-=j?-i:i+2*o.y),C.top!==a&&j&&(C.top-=o.y),C.top<0&&-C.top>h&&(C.top=a);return C.top-a}};f=f===c||!!f,A=A?{elem:A,height:A[(A[0]===b?"h":"outerH")+"eight"](),width:A[(A[0]===b?"w":"outerW")+"idth"](),scrollLeft:A.scrollLeft(),scrollTop:A.scrollTop()}:e;if(k==="mouse")n={x:"left",y:"top"},d=d&&(d.type==="resize"||d.type==="scroll")?B.event:o.mouse||!d||!d.pageX?a.extend({},i):d,C={top:d.pageY,left:d.pageX};else{k==="event"&&(d&&d.target&&d.type!=="scroll"&&d.type!=="resize"?k=B.target=a(d.target):k=B.target),k=a(k).eq(0);if(k.length===0)return u;k[0]===document||k[0]===b?(s=k.width(),t=k.height(),k[0]===b&&(C={top:y?0:A.scrollTop,left:y?0:A.scrollLeft})):k.is("area")&&h.imagemap?C=h.imagemap(k,n):k[0].namespaceURI=="http://www.w3.org/2000/svg"&&h.svg?C=h.svg(k,n):(s=k.outerWidth(),t=k.outerHeight(),C=h.offset(k,l.container)),C.offset&&(s=C.width,t=C.height,C=C.offset),C.left+=n.x==="right"?s:n.x==="center"?s/2:0,C.top+=n.y==="bottom"?t:n.y==="center"?t/2:0}C.left+=o.x+(m.x==="right"?-q:m.x==="center"?-q/2:0),C.top+=o.y+(m.y==="bottom"?-r:m.y==="center"?-r/2:0),l.viewport.jquery&&k[0]!==b&&k[0]!==v?C.adjusted={left:E.left(C.left),top:E.top(C.top)}:C.adjusted={left:0,top:0},z.attr("class",function(b,c){return a.attr(this,"class").replace(/ui-tooltip-pos-\w+/i,"")}).addClass(j+"-pos-"+m.abbreviation()),w.originalEvent=a.extend({},d),z.trigger(w,[u,C,A.elem]);if(w.isDefaultPrevented())return u;delete C.adjusted,f&&isNaN(C.left)&&isNaN(C.top)?a.isFunction(l.effect)&&(l.effect.call(z,u,a.extend({},C)),z.queue(function(b){a(this).css({opacity:"",height:""}),a.browser.msie&&this.style.removeAttribute("filter"),b()})):z.css(C),x=0;return u},redraw:function(){if(u.rendered<1||y)return u;var b=j+"-fluid",c,d,e;y=1,z.css("width","auto").addClass(b),c=z.width()+(a.browser.mozilla?1:0),d=parseInt(z.css("max-width"),10)||0,e=parseInt(z.css("min-width"),10)||0,c=d+e?Math.min(Math.max(c,e),d):c,z.css("width",c).removeClass(b),y=0;return u},disable:function(b){var c=l;"boolean"!==typeof b&&(b=!z.hasClass(c)&&!B.disabled),u.rendered?(z.toggleClass(c,b),a.attr(z[0],"aria-disabled",b)):B.disabled=!!b;return u},enable:function(){return u.disable(e)},destroy:function(){var b=o[0],c=a.attr(b,q);u.rendered&&(z.remove(),a.each(u.plugins,function(){this.destroy&&this.destroy()})),clearTimeout(u.timers.show),clearTimeout(u.timers.hide),L(1,1,1,1),a.removeData(b,"qtip"),c&&(a.attr(b,"title",c),o.removeAttr(q)),o.removeAttr("aria-describedby").unbind(".qtip");return o}})}function s(b){var c;if(!b||"object"!==typeof b)return e;"object"!==typeof b.metadata&&(b.metadata={type:b.metadata});if("content"in b){if("object"!==typeof b.content||b.content.jquery)b.content={text:b.content};c=b.content.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.text=e),"title"in b.content&&("object"!==typeof b.content.title&&(b.content.title={text:b.content.title}),c=b.content.title.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.title.text=e))}"position"in b&&("object"!==typeof b.position&&(b.position={my:b.position,at:b.position})),"show"in b&&("object"!==typeof b.show&&(b.show.jquery?b.show={target:b.show}:b.show={event:b.show})),"hide"in b&&("object"!==typeof b.hide&&(b.hide.jquery?b.hide={target:b.hide}:b.hide={event:b.hide})),"style"in b&&("object"!==typeof b.style&&(b.style={classes:b.style})),a.each(h,function(){this.sanitize&&this.sanitize(b)});return b}function r(){var c=b.console;return c&&(c.error||c.log||a.noop).apply(c,arguments)}var d=!0,e=!1,f=null,g,h,i,j="ui-tooltip",k="ui-widget",l="ui-state-disabled",m="div.qtip."+j,n=j+"-focus",o="-31000px",p="_replacedByqTip",q="oldtitle";g=a.fn.qtip=function(b,h,i){var j=(""+b).toLowerCase(),k=f,l=j==="disable"?[d]:a.makeArray(arguments).slice(1,10),m=l[l.length-1],n=this[0]?a.data(this[0],"qtip"):f;if(!arguments.length&&n||j==="api")return n;if("string"===typeof b){this.each(function(){var b=a.data(this,"qtip");if(!b)return d;m&&m.timeStamp&&(b.cache.event=m);if(j!=="option"&&j!=="options"||!h)b[j]&&b[j].apply(b[j],l);else if(a.isPlainObject(h)||i!==c)b.set(h,i);else{k=b.get(h);return e}});return k!==f?k:this}if("object"===typeof b||!arguments.length){n=s(a.extend(d,{},b));return g.bind.call(this,n,m)}},g.bind=function(b,c){return this.each(function(f){function p(b){function c(){o.render(typeof b==="object"||i.show.ready),k.show.unbind(l.show),k.hide.unbind(l.hide)}if(o.cache.disabled)return e;o.cache.event=a.extend({},b),i.show.delay>0?(clearTimeout(o.timers.show),o.timers.show=setTimeout(c,i.show.delay),l.show!==l.hide&&k.hide.bind(l.hide,function(){clearTimeout(o.timers.show)})):c()}var i,k,l,m=!b.id||b.id===e||b.id.length<1||a("#"+j+"-"+b.id).length?g.nextid++:b.id,n=".qtip-"+m+"-create",o=u.call(this,m,b);if(o===e)return d;i=o.options,a.each(h,function(){this.initialize==="initialize"&&this(o)}),k={show:i.show.target,hide:i.hide.target},l={show:a.trim(""+i.show.event).replace(/ /g,n+" ")+n,hide:a.trim(""+i.hide.event).replace(/ /g,n+" ")+n},i.hide.event==="unfocus"&&(l.hide="mouseleave"+n),k.show.bind(l.show,p),(i.show.ready||i.prerender)&&p(c)})},h=g.plugins={Corner:function(a){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,"center").toLowerCase(),this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase(),this.precedance=a.charAt(0).search(/^(t|b)/)>-1?"y":"x",this.string=function(){return this.precedance==="y"?this.y+this.x:this.x+this.y},this.abbreviation=function(){var a=this.x.substr(0,1),b=this.y.substr(0,1);return a===b?a:a==="c"||a!=="c"&&b!=="c"?b+a:a+b}},offset:function(c,d){function k(a,b){e.left+=b*a.scrollLeft(),e.top+=b*a.scrollTop()}var e=c.offset(),f=d,g=0,i=document.body,j;if(f){do{if(f[0]===i)break;f.css("position")!=="static"&&(j=f.position(),e.left-=j.left+(parseInt(f.css("borderLeftWidth"),10)||0),e.top-=j.top+(parseInt(f.css("borderTopWidth"),10)||0),g++)}while(f=f.offsetParent());(d[0]!==i||g>1)&&k(d,1),h.iOS&&k(a(b),-1)}return e},iOS:parseFloat((""+(/CPU.*OS ([0-9_]{2,3})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,"4_2"])[1]).replace("undefined","3_2").replace("_","."))<4.1,fn:{attr:function(b,c){if(this.length){var d=this[0],e="title",f=a.data(d,"qtip");if(b===e){if(arguments.length<2)return a.attr(d,q);if(typeof f==="object"){f&&f.rendered&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",c),a.fn["attr"+p].apply(this,arguments),a.attr(d,q,a.attr(d,e));return this.removeAttr(e)}}}},clone:function(b){var c=a([]),d="title",e;e=a.fn["clone"+p].apply(this,arguments).filter("[oldtitle]").each(function(){a.attr(this,d,a.attr(this,q)),this.removeAttribute(q)}).end();return e},remove:a.ui?f:function(b,c){a(this).each(function(){c||(!b||a.filter(b,[this]).length)&&a("*",this).add(this).each(function(){a(this).triggerHandler("remove")})})}}},a.each(h.fn,function(b,c){if(!c)return d;var e=a.fn[b+p]=a.fn[b];a.fn[b]=function(){return c.apply(this,arguments)||e.apply(this,arguments)}}),a(b).one("load",function(){var b="mousemove";a(document).bind(b+".qtip",function(a){i={pageX:a.pageX,pageY:a.pageY,type:b}})}),g.version="2.0.0pre",g.nextid=0,g.inactiveEvents="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),g.zindex=15e3,g.defaults={prerender:e,id:e,overwrite:d,content:{text:d,attr:"title",title:{text:e,button:e}},position:{my:"top left",at:"bottom right",target:e,container:e,viewport:e,adjust:{x:0,y:0,mouse:d,resize:d,method:"flip"},effect:d},show:{target:e,event:"mouseenter",effect:d,delay:90,solo:e,ready:e},hide:{target:e,event:"mouseleave",effect:d,delay:0,fixed:e,inactive:e},style:{classes:"",widget:e},events:{render:f,move:f,show:f,hide:f,toggle:f,focus:f,blur:f}},h.ajax=function(a){var b=a.plugins.ajax;return"object"===typeof b?b:a.plugins.ajax=new v(a)},h.ajax.initialize="render",h.ajax.sanitize=function(a){var b=a.content,c;b&&"ajax"in b&&(c=b.ajax,typeof c!=="object"&&(c=a.content.ajax={url:c}),"boolean"!==typeof c.once&&c.once&&(c.once=!!c.once))},a.extend(d,g.defaults,{content:{ajax:{loading:d,once:d}}}),h.tip=function(a){var b=a.plugins.tip;return"object"===typeof b?b:a.plugins.tip=new x(a)},h.tip.initialize="render",h.tip.sanitize=function(a){var b=a.style,c;b&&"tip"in b&&(c=a.style.tip,typeof c!=="object"&&(a.style.tip={corner:c}),/string|boolean/i.test(typeof c.corner)||(c.corner=d),typeof c.width!=="number"&&delete c.width,typeof c.height!=="number"&&delete c.height,typeof c.border!=="number"&&c.border!==d&&delete c.border,typeof c.offset!=="number"&&delete c.offset)},a.extend(d,g.defaults,{style:{tip:{corner:d,mimic:e,width:6,height:6,border:d,offset:0}}}),h.imagemap=function(b,c){function l(a,b){var d=0,e=1,f=1,g=0,h=0,i=a.width,j=a.height;while(i>0&&j>0&&e>0&&f>0){i=Math.floor(i/2),j=Math.floor(j/2),c.x==="left"?e=i:c.x==="right"?e=a.width-i:e+=Math.floor(i/2),c.y==="top"?f=j:c.y==="bottom"?f=a.height-j:f+=Math.floor(j/2),d=b.length;while(d--){if(b.length<2)break;g=b[d][0]-a.offset.left,h=b[d][1]-a.offset.top,(c.x==="left"&&g>=e||c.x==="right"&&g<=e||c.x==="center"&&(ga.width-e)||c.y==="top"&&h>=f||c.y==="bottom"&&h<=f||c.y==="center"&&(ha.height-f))&&b.splice(d,1)}}return{left:b[0][0],top:b[0][1]}}var d=b.attr("shape").toLowerCase(),e=b.attr("coords").split(","),f=[],g=a('img[usemap="#'+b.parent("map").attr("name")+'"]'),h=g.offset(),i={width:0,height:0,offset:{top:1e10,right:0,bottom:0,left:1e10}},j=0,k=0;h.left+=Math.ceil((g.outerWidth()-g.width())/2),h.top+=Math.ceil((g.outerHeight()-g.height())/2);if(d==="poly"){j=e.length;while(j--)k=[parseInt(e[--j],10),parseInt(e[j+1],10)],k[0]>i.offset.right&&(i.offset.right=k[0]),k[0]i.offset.bottom&&(i.offset.bottom=k[1]),k[1]35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('"5n 7U",9(a,b,c){9 z(b){O c=R,d=b.2E,e=d.1n,f=".1U-"+b.1h;a.1i(c,{1S:9(){d.1U=a(\'<4P 1O="1s-1n-1U" 7R="0" 5p="-1" 5q="82:\\\'\\\';" 14="2e:2G; 17:3H; z-43:-1; 2s:5r(4d=0); -5s-2s:"5t:7Q.83.5v(5w=0)";">\'),d.1U.2C(e),e.19("3K"+f,c.2m)},2m:9(){O a=b.44("4S"),c=b.1D.16,f=d.16,g,h;h=1v(e.X("1c-Q-V"),10)||0,h={Q:-h,P:-h},c&&f&&(g=c.1g.1o==="x"?["V","Q"]:["W","P"],h[g[1]]-=f[g[0]]()),d.1U.X(h).X(a)},26:9(){d.1U.1L(),e.1w(f)}}),c.1S()}9 y(c){O f=R,h=c.1W.N.1u,i=c.2E,j=i.1n,k="#1a-1K",l=".5y",m="3q"+l+" 4Q"+l;c.2J.1u={"^N.1u.(2R|1J)$":9(){f.1S(),i.1K.22(j.1X(":2k"))}},a.1i(f,{1S:9(){h.2R&&(j.1w(l).19(m,9(b,c,d){O e=b.1A.24("1n","");a.21(h[e])?h[e].1G(i.1K,d,c):f[e](d)}),f.2i(),h.1J===d&&i.1K.1w(l+c.1h).19("3R"+l+c.1h,9(){c.S.1G(c)}),i.1K.X("7s",h.1J?"5z":""))},2i:9(){O c=a(k),d;T(c.18){i.1K=c;M c}d=i.1K=a("<2n />",{1h:k.2q(1),X:{17:"3H",P:0,Q:0,2e:"55"},3u:9(){M e}}).2C(1B.31),a(b).19("2o"+l,9(){d.X({W:1d.2P(a(b).W(),a(1B).W()),V:1d.2P(a(b).V(),a(1B).V())})}).2c("2o");M d},22:9(b){O h=i.1K,k=c.1W.N.1u.1P,l=b?"N":"S",m;h||(h=f.2i());T(!h.1X(":5B")||b)h.4Z(d,e),b&&(m=1v(a.X(j[0],"z-43"),10),h.X("z-43",(m||g.4a)-1)),a.21(k)?k.1G(h,b):k===e?h[l]():h.51(3A,b?.7:0,9(){b||a(R).S()})},N:9(){f.22(d)},S:9(){f.22(e)},26:9(){O d=i.1K;d&&(a(k).1j(9(){O b=a(R).25("1a");T(b&&b.1h!==b.1h&&b.1W.N.1u)M d=e}),d?(i.1K.1L(),a(b).1w(l)):i.1K.1w(l+c.1h)),j.1w(m)}}),f.1S()}9 x(b,g){9 v(a){O b=a.1o==="y",c=n[b?"V":"W"],d=n[b?"W":"V"],e=a.1k().3P("1q")>-1,f=c*(e?.5:1),g=1d.5F,h=1d.3O,i,j,k,l=1d.3W(g(f,2)+g(d,2)),m=[p/f*l,p/d*l];m[2]=1d.3W(g(m[0],2)-g(p,2)),m[3]=1d.3W(g(m[1],2)-g(p,2)),i=l+m[2]+m[3]+(e?0:m[0]),j=i/l,k=[h(j*d),h(j*c)];M{W:k[b?0:1],V:k[b?1:0]}}9 u(b){O c=k.1x&&b.y==="P",d=c?k.1x:k.U,e=a.1F.5f,f=e?"-5G-":a.1F.4H?"-4H-":"",g=b.y+(e?"":"-")+b.x,h=f+(e?"1c-4k-"+g:"1c-"+g+"-4k");M 1v(d.X(h),10)||1v(l.X(h),10)||0}9 t(a,b,c){b=b?b:a[a.1o];O d=k.1x&&a.y==="P",e=d?k.1x:k.U,f="1c-"+b+"-V",g=1v(e.X(f),10);M(c?g||1v(l.X(f),10):g)||0}9 s(b,e,f,g){T(k.16){O h=a.1i({},i.1g),l=f.3w,n;i.1g.2b!==d&&(l.Q&&(h.x=h.x==="1q"?l.Q>0?"Q":"1m":h.x==="Q"?"1m":"Q"),l.P&&(h.y=h.y==="1q"?l.P>0?"P":"1l":h.y==="P"?"1l":"P"),h.1k()!==m.1g&&(m.P!==l.P||m.Q!==l.Q)&&(n=i.30(h))),n||(n=i.17(h,0)),n.1m!==c&&(n.Q=n.1m),n.1l!==c&&(n.P=n.1l),n.3k=1d.2P(0,j.Y),f.Q-=n.Q.39?n.3k:(n.1m?-1:1)*n.Q,f.P-=n.P.39?n.3k:(n.1l?-1:1)*n.P,m.Q=l.Q,m.P=l.P,m.1g=h.1k()}}O i=R,j=b.1W.14.16,k=b.2E,l=k.1n,m={P:0,Q:0,1g:""},n={V:j.V,W:j.W},o={},p=j.1c||0,q=".1a-16",r=a("<4m />")[0].3I;i.1g=f,i.3n=f,b.2J.16={"^17.1N|14.16.(1g|3n|1c)$":9(){i.1S()||i.26(),b.1V()},"^14.16.(W|V)$":9(){n={V:j.V,W:j.W},i.2i(),i.30(),b.1V()},"^U.15.1p|14.(2Z|2g)$":9(){k.16&&i.30()}},a.1i(i,{1S:9(){O b=i.4l()&&(r||a.1F.2L);b&&(i.2i(),i.30(),l.1w(q).19("3K"+q,s));M b},4l:9(){O a=j.1g,c=b.1W.17,f=c.2f,g=c.1N.1k?c.1N.1k():c.1N;T(a===e||g===e&&f===e)M e;a===d?i.1g=1C h.2w(g):a.1k||(i.1g=1C h.2w(a),i.1g.2b=d);M i.1g.1k()!=="5i"},4n:9(){O c,d,e,f=k.16.X({5I:"",1c:""}),g=i.1g,h=g[g.1o],m="1c-"+h+"-2U",p="1c"+h.39(0)+h.2q(1)+"6e",q=/5J?\\(0, 0, 0(, 0)?\\)|3h/i,r="5K-2U",s="3h",t="1s-1n-5e",u=a(1B.31).X("2U"),v=b.2E.U.X("2U"),w=k.1x&&(g.y==="P"||g.y==="1q"&&f.17().P+n.W/2+j.Y",{"1O":"1s-1n-16"}).X({V:b,W:c}).5L(l),r?a("<4m />").2C(k.16)[0].3I("2d").4h():(d=\'<3E:3V 5M="0,0" 14="2e:4w-2G; 17:3H; 4V:2l(#3r#4v);">\',k.16.2F(p?d+=d:d))},30:9(b){O c=k.16,g=c.6G(),l=n.V,m=n.W,q="3N 5O ",s="3N 5P 3h",u=j.3n,x=1d.3O,y,z,A,B,C;b||(b=i.1g),u===e?u=b:(u=1C h.2w(u),u.1o=b.1o,u.x==="3f"?u.x=b.x:u.y==="3f"?u.y=b.y:u.x===u.y&&(u[b.1o]=b[b.1o])),y=u.1o,i.4n(),p=o.1c==="3h"||o.1c==="#5Q"?0:j.1c===d?t(b,f,d):j.1c,A=w(u,l,m),C=v(b),c.X(C),b.1o==="y"?B=[x(u.x==="Q"?p:u.x==="1m"?C.V-l-p:(C.V-l)/2),x(u.y==="P"?C.W-m:0)]:B=[x(u.x==="Q"?C.V-l:0),x(u.y==="P"?p:u.y==="1l"?C.W-m-p:(C.W-m)/2)],r?(g.13(C),z=g[0].3I("2d"),z.5E(),z.4h(),z.5S(0,0,4p,4p),z.5T(B[0],B[1]),z.5U(),z.5V(A[0][0],A[0][1]),z.4q(A[1][0],A[1][1]),z.4q(A[2][0],A[2][1]),z.81(),z.5W=o.2M,z.5X=o.1c,z.5Y=p*2,z.7X="4u",z.7W=60,z.57(),z.2M()):(A="m"+A[0][0]+","+A[0][1]+" l"+A[1][0]+","+A[1][1]+" "+A[2][0]+","+A[2][1]+" 61",B[2]=p&&/^(r|b)/i.1E(b.1k())?3Z(a.1F.2X,10)===8?2:1:0,g.X({7T:""+(u.1k().3P("1q")>-1),Q:B[0]-B[2]*59(y==="x"),P:B[1]-B[2]*59(y==="y"),V:l+p,W:m+p}).1j(9(b){O c=a(R);c.13({63:l+p+" "+(m+p),64:A,65:o.2M,66:!!b,67:!b}).X({2e:p||b?"2G":"55"}),!b&&p>0&&c.2F()===""&&c.2F(\'<3E:57 68="\'+p*2+\'3N" 2U="\'+o.1c+\'" 69="6a" 6b="4u" 14="4V:2l(#3r#4v); 2e:4w-2G;" />\')}));M i.17(b,1)},17:9(b,c){O f=k.16,g={},h=1d.2P(0,j.Y),l,m,n;T(j.1g===e||!f)M e;b=b||i.1g,l=b.1o,m=v(b),n=a.1F.2L&&3Z(a.1F.2X,10)==8&&p&&/^(b|r)/i.1E(b.1k())?1:0,a.1j(l==="y"?[b.x,b.y]:[b.y,b.x],9(a,c){O e,f;c==="1q"?(e=l==="y"?"Q":"P",g[e]="50%",g["5k-"+e]=-1d.3O(m[l==="y"?"V":"W"]/2)+h):(e=t(b,c,d),f=u(b),g[c]=a||!p?t(b,c)+(a?0:f):h+(f>e?f:0))}),g[b[l]]-=m[l==="x"?"V":"W"]+n,c&&f.X({P:"",1l:"",Q:"",1m:"",5k:""}).X(g);M g},26:9(){k.16&&k.16.1L(),l.1w(q)}}),i.1S()}9 w(a,b,c){O d=1d.3o(b/2),e=1d.3o(c/2),f={4O:[[0,0],[b,c],[b,0]],4J:[[0,0],[b,0],[0,c]],4y:[[0,c],[b,0],[b,c]],4z:[[0,0],[0,c],[b,c]],7u:[[0,c],[d,0],[b,c]],6g:[[0,0],[b,0],[d,c]],6h:[[0,0],[b,e],[0,c]],7r:[[b,0],[b,c],[0,e]]};f.7q=f.4O,f.6j=f.4J,f.6l=f.4y,f.6m=f.4z;M f[a.1k()]}9 v(b){O c=R,f=b.2E.1n,g=b.1W.U.1y,h=".1a-1y",i=/<3Q\\b[^<]*(?:(?!<\\/3Q>)<[^<]*)*<\\/3Q>/58,j=d;b.2J.1y={"^U.1y":9(a,b,d){b==="1y"&&(g=d),b==="2v"?(f.1w(h),d&&f.19("3q"+h,c.2B)):g&&g.2l?c.2B():f.1w(h)}},a.1i(c,{1S:9(){g&&g.2l&&f.19("3q"+h,c.2B);M c},2B:9(d,h){9 p(a,c,d){b.34("U.1p",c+": "+d),n()}9 o(c){l&&(c=a("<2n/>").36(c.24(i,"")).4B(l)),b.34("U.1p",c),n()}9 n(){m&&(f.X("45",""),h=e)}T(d.3v())M c;O j=g.2l.3P(" "),k=g.2l,l,m=g.2v&&!g.5j&&h;m&&f.X("45","48"),j>-1&&(l=k.2q(j),k=k.2q(0,j)),a.1y(a.1i({6o:o,3D:p,6q:b},g,{2l:k}));M c}}),c.1S()}9 u(b,c){O i,j,k,l,m=a(R),n=a(1B.31),o=R===1B?n:m,p=m.1Z?m.1Z(c.1Z):f,u=c.1Z.1A==="7d"&&p?p[c.1Z.40]:f,v=m.25(c.1Z.40||"6r");7b{v=11 v==="1k"?(1C 7a("M "+v))():v}79(w){r("6u 77 6x 75 6y 25: "+v)}l=a.1i(d,{},g.2t,c,11 v==="1e"?s(v):f,s(u||p)),p&&a.5h(R,"1Z"),j=l.17,l.1h=b;T("3a"===11 l.U.1p){k=m.13(l.U.13);T(l.U.13!==e&&k)l.U.1p=k;2r M e}j.1t===e&&(j.1t=n),j.12===e&&(j.12=o),l.N.12===e&&(l.N.12=o),l.N.3d===d&&(l.N.3d=n),l.S.12===e&&(l.S.12=o),l.17.1Q===d&&(l.17.1Q=j.1t),j.2f=1C h.2w(j.2f),j.1N=1C h.2w(j.1N);T(a.25(R,"1a"))T(l.4c)m.1a("26");2r T(l.4c===e)M e;a.13(R,"15")&&(a.13(R,q,a.13(R,"15")),R.3j("15")),i=1C t(m,l,b,!!k),a.25(R,"1a",i),m.19("1L.1a",9(){i.26()});M i}9 t(o,p,r,t){9 L(c,d,e,f){f=1v(f,10)!==0;O g=".1a-"+r,h={N:c&&p.N.12[0],S:d&&p.S.12[0],1n:e&&u.1f&&A.1n[0],U:e&&u.1f&&A.U[0],1t:f&&p.17.1t[0]===v?1B:p.17.1t[0],4f:f&&b};u.1f?a([]).73(a.6A([h.N,h.S,h.1n,h.1t,h.U,h.4f],9(a){M 11 a==="1e"})).1w(g):c&&p.N.12.1w(g+"-2i")}9 K(c,d,f,h){9 y(a){z.1X(":2k")&&u.1V(a)}9 x(a){T(z.2a(l))M e;1H(u.1r.1R),u.1r.1R=2Y(9(){u.S(a)},p.S.1R)}9 w(b){T(z.2a(l))M e;O c=a(b.3g||b.12),d=c.6C(m)[0]===z[0],f=c[0]===n.N[0];1H(u.1r.N),1H(u.1r.S);T(k.12==="29"&&d||p.S.2b&&(/29(4W|4X|3T)/.1E(b.1A)&&(d||f))){b.6D(),b.6Z();M e}p.S.27>0?u.1r.S=2Y(9(){u.S(b)},p.S.27):u.S(b)}9 t(a){T(z.2a(l))M e;n.N.2c("1a-"+r+"-1R"),1H(u.1r.N),1H(u.1r.S);O b=9(){u.N(a)};p.N.27>0?u.1r.N=2Y(b,p.N.27):b()}O j=".1a-"+r,k=p.17,n={N:p.N.12,S:p.S.12,1t:k.1t[0]===v?a(1B):k.1t,3S:a(1B)},q={N:a.3e(""+p.N.1b).32(" "),S:a.3e(""+p.S.1b).32(" ")},s=a.1F.2L&&1v(a.1F.2X,10)===6;f&&(p.S.2b&&(n.S=n.S.2I(z),z.19("6Y"+j,9(){z.2a(l)||1H(u.1r.S)})),k.12==="29"&&k.2m.29&&p.S.1b&&z.19("2K"+j,9(a){(a.3g||a.12)!==n.N[0]&&u.S(a)}),z.19("3c"+j+" 2K"+j,9(a){u[a.1A==="3c"?"2x":"1J"](a)})),d&&("2N"===11 p.S.1R&&(n.N.19("1a-"+r+"-1R",x),a.1j(g.4Y,9(a,b){n.S.2I(A.1n).19(b+j+"-1R",x)})),a.1j(q.S,9(b,c){O d=a.6I(c,q.N),e=a(n.S);d>-1&&e.2I(n.N).18===e.18||c==="3J"?(n.N.19(c+j,9(a){z.1X(":2k")?w(a):t(a)}),2A q.N[d]):n.S.19(c+j,w)})),c&&a.1j(q.N,9(a,b){n.N.19(b+j,t)}),h&&((k.2m.2o||k.1Q)&&a(a.1b.6J.2o?k.1Q:b).19("2o"+j,y),(k.1Q||s&&z.X("17")==="2b")&&a(k.1Q).19("4b"+j,y),/3J/i.1E(p.S.1b)&&n.3S.19("3u"+j,9(b){O c=a(b.12);c.6K(m).18===0&&c.2I(o).18>1&&z.1X(":2k")&&!z.2a(l)&&u.S(b)}),/2K|3X/i.1E(p.S.1b)&&a(b).19("1J 3X",9(a){a.3g||u.S(a)}),k.12==="29"&&n.3S.19("49"+j,9(a){k.2m.29&&!z.2a(l)&&z.1X(":2k")&&u.1V(a||i)}))}9 J(b,c){9 g(a){9 c(c,d){(b=b.3t(R)).18===0&&(u.2O(),u.1V(B.1b),a())}O b;T((b=d.4B("3C:3t([W]):3t([V])")).18===0)M c.1G(b);b.4R(["6M","3D","2B","6N",""].6O(".1a-6P "),c).1j(9(a,b){(9 d(){T(b.W&&b.V)M c.1G(b,f);u.1r.3C[a]=2Y(d,20)})()})}O d=A.U;T(!u.1f||!b)M e;a.21(b)&&(b=b.1G(o,u)||""),b.1T&&b.18>0?d.4C().36(b.X({2e:"2G"})):d.2F(b),u.1f<0?z.3x("3G",g):(y=0,g(a.4i));M u}9 I(b){O c=A.15;T(!u.1f||!b)M e;a.21(b)&&(b=b.1G(o,u)||""),b.1T&&b.18>0?c.4C().36(b.X({2e:"2G"})):c.2F(b),u.2O(),u.1f&&z.1X(":2k")&&u.1V(B.1b)}9 H(a){O b=A.1z,c=A.15;T(!u.1f)M e;a?(c||G(),F()):b.1L()}9 G(){O b=w+"-15";A.1x&&E(),A.1x=a("<2n />",{"1O":j+"-1x "+(p.14.2g?"1s-2g-4I":"")}).36(A.15=a("<2n />",{1h:b,"1O":j+"-15","1I-41":d})).6R(A.U),p.U.15.1z?F():u.1f&&u.2O()}9 F(){O b=p.U.15.1z,c=11 b==="1k",d=c?b:"6S 1n";A.1z&&A.1z.1L(),b.1T?A.1z=b:A.1z=a("",{"1O":"1s-2T-3r "+(p.14.2g?"":j+"-3l"),15:d,"1I-6T":d}).6U(a("<6V />",{"1O":"1s-3l 1s-3l-6W",2F:"&6X;"})),A.1z.2C(A.1x).13("4N","1z").4F(9(b){a(R).2p("1s-2T-4F",b.1A==="3c")}).3R(9(a){z.2a(l)||u.S(a);M e}).19("3u 71 54 72 3X",9(b){a(R).2p("1s-2T-74 1s-2T-2x",b.1A.2q(-4)==="78")}),u.2O()}9 E(){A.15&&(A.1x.1L(),A.1x=A.15=A.1z=f,u.1V())}9 D(){O a=p.14.2g;z.2p(k,a),A.U.2p(k+"-U",a),A.1x&&A.1x.2p(k+"-4I",a),A.1z&&A.1z.2p(j+"-3l",!a)}9 C(a){O b=0,c,d=p,e=a.32(".");2W(d=d[e[b++]])b0&&!a("#"+i).18&&(z[0].1h=i,A.U[0].1h=i+"-U",A.15[0].1h=i+"-15")},"^U.1p$":9(a,b,c){J(c)},"^U.15.1p$":9(a,b,c){T(!c)M E();!A.15&&c&&G(),I(c)},"^U.15.1z$":9(a,b,c){H(c)},"^17.(1N|2f)$":9(a,b,c){"1k"===11 c&&(a[b]=1C h.2w(c))},"^17.1t$":9(a,b,c){u.1f&&z.2C(c)},"^(N|S).(1b|12|2b|27|1R)$":9(a,b,c,d,e){O f=[1,0,0];f[e[1]==="N"?"42":"7g"](0),L.23(u,f),K.23(u,[1,1,0,0])},"^N.2Q$":9(){u.1f?u.N():u.1M(1)},"^14.2Z$":9(b,c,d){a.13(z[0],"1O",j+" 1a 1s-4L-4M "+d)},"^14.2g|U.15":D,"^3F.(1M|N|3T|S|2x|1J)$":9(b,c,d){z[(a.21(d)?"":"7h")+"19"]("1n"+c,d)}},a.1i(u,{1M:9(b){T(u.1f)M u;O c=p.U.1p,f=p.U.15.1p,g=a.38("7j");a.13(o[0],"1I-4g",w),z=A.1n=a("<2n/>").13({1h:w,"1O":j+" 1a 1s-4L-4M "+p.14.2Z,4N:"7k","1I-7l":"7m","1I-41":e,"1I-4g":w+"-U","1I-48":d}).2p(l,B.2y).25("1a",u).2C(p.17.1t).36(A.U=a("<2n />",{"1O":j+"-U",1h:w+"-U","1I-41":d})),u.1f=-1,y=1,f&&(G(),I(f)),J(c),u.1f=d,D(),a.1j(p.3F,9(b,c){a.21(c)&&z.19(b==="22"?"3q 4Q":"1n"+b,c)}),a.1j(h,9(){R.2u==="1M"&&R(u)}),K(1,1,1,1),z.3x("3G",9(a){g.3b=B.1b,z.2c(g,[u]),y=0,u.2O(),(p.N.2Q||b)&&u.N(B.1b),a()});M u},44:9(a){O b,c;52(a.2j()){2S"4S":b={W:z.35(),V:z.3i()};2z;2S"Y":b=h.Y(z,p.17.1t);2z;3r:c=C(a.2j()),b=c[0][c[1]],b=b.1o?b.1k():b}M b},34:9(b,c){9 j(a,b){O c,d,e;4T(c 1Y h)4T(d 1Y h[c])T(e=(1C 7n(d,"i")).4D(a))b.42(e),h[c][d].23(u,b)}O f=/^17\\.(1N|2f|2m|12|1t)|14|U|N\\.2Q/i,g=e,h=u.2J,i;"1k"===11 b?(i=b,b={},b[i]=c):b=a.1i(d,{},b),a.1j(b,9(c,d){O e=C(c.2j()),h;h=e[0][e[1]],e[0][e[1]]="1e"===11 d&&d.7o?a(d):d,b[c]=[e[0],e[1],d,h],g=f.1E(c)||g}),s(p),x=y=1,a.1j(b,j),x=y=0,g&&z.1X(":2k")&&u.1f&&u.1V();M u},22:9(b,c){9 j(){b?(a.1F.2L&&z[0].14.3j("2s"),z.X("7p","")):z.X({2e:"",45:"",V:"",4d:"",Q:"",P:""})}T(!u.1f)T(b)u.1M(1);2r M u;O d=b?"N":"S",g=p[d],h=z.1X(":2k"),i;(11 b).4r("3a|2N")&&(b=!h);T(h===b)M u;T(c){T(/7t|7v/.1E(c.1A)&&/4W|4X/.1E(B.1b.1A)&&c.12===p.N.12[0]&&z.7x(c.3g).18)M u;B.1b=a.1i({},c)}i=a.38("1n"+d),i.3b=c?B.1b:f,z.2c(i,[u,3A]);T(i.3v())M u;a.13(z[0],"1I-48",!b),b?(u.2x(c),u.1V(c),g.3d&&a(m,g.3d).3t(z).1a("S",i)):(1H(u.1r.N),u.1J(c)),z.4Z(0,1),a.21(g.1P)?(g.1P.1G(z,u),z.3x("3G",9(a){j(),a()})):g.1P===e?(z[d](),j.1G(z)):z.51(3A,b?1:0,j),b&&g.12.2c("1a-"+r+"-1R");M u},N:9(a){M u.22(d,a)},S:9(a){M u.22(e,a)},2x:9(b){T(!u.1f)M u;O c=a(m),d=1v(z[0].14.37,10),e=g.4a+c.18,f=a.1i({},b),h,i;z.2a(n)||(d!==e&&(c.1j(9(){R.14.37>d&&(R.14.37=R.14.37-1)}),c.2s("."+n).1a("1J",f)),i=a.38("7y"),i.3b=f,z.2c(i,[u,e]),i.3v()||(z.3z(n)[0].14.37=e));M u},1J:9(b){O c=a.1i({},b),d;z.4e(n),d=a.38("7A"),d.3b=c,z.2c(d,[u]);M u},1V:9(d,f){T(!u.1f||x)M u;x=1;O k=p.17.12,l=p.17,m=l.1N,n=l.2f,o=l.2m,q=z.3i(),r=z.35(),s=0,t=0,w=a.38("3K"),y=z.X("17")==="2b",A=l.1Q.1T?l.1Q:a(b),C={Q:0,P:0},D=(u.1D.16||{}).1g,E={Q:9(a){O b=A.2H,c=m.x==="Q"?q:m.x==="1m"?-q:-q/2,d=n.x==="Q"?s:n.x==="1m"?-s:-s/2,e=D&&D.1o==="x"?g.2t.14.16.V:0,f=b-a-e,h=a+q-A.V-b+e,i=c-(m.1o==="x"||m.x===m.y?d:0),j=m.x==="1q";f>0&&(m.x!=="Q"||h>0)?C.Q-=i+(j?0:2*o.x):h>0&&(m.x!=="1m"||f>0)&&(C.Q-=j?-i:i+2*o.x),C.Q!==a&&j&&(C.Q-=o.x),C.Q<0&&-C.Q>h&&(C.Q=a);M C.Q-a},P:9(a){O b=A.2D,c=m.y==="P"?r:m.y==="1l"?-r:-r/2,d=n.y==="P"?t:n.y==="1l"?-t:-t/2,e=D&&D.1o==="y"?g.2t.14.16.W:0,f=b-a-e,h=a+r-A.W-b+e,i=c-(m.1o==="y"||m.x===m.y?d:0),j=m.y==="1q";f>0&&(m.y!=="P"||h>0)?C.P-=i+(j?0:2*o.y):h>0&&(m.y!=="1l"||f>0)&&(C.P-=j?-i:i+2*o.y),C.P!==a&&j&&(C.P-=o.y),C.P<0&&-C.P>h&&(C.P=a);M C.P-a}};f=f===c||!!f,A=A?{5c:A,W:A[(A[0]===b?"h":"7C")+"7D"](),V:A[(A[0]===b?"w":"7E")+"7F"](),2H:A.2H(),2D:A.2D()}:e;T(k==="29")n={x:"Q",y:"P"},d=d&&(d.1A==="2o"||d.1A==="4b")?B.1b:o.29||!d||!d.3s?a.1i({},i):d,C={P:d.46,Q:d.3s};2r{k==="1b"&&(d&&d.12&&d.1A!=="4b"&&d.1A!=="2o"?k=B.12=a(d.12):k=B.12),k=a(k).7H(0);T(k.18===0)M u;k[0]===1B||k[0]===b?(s=k.V(),t=k.W(),k[0]===b&&(C={P:y?0:A.2D,Q:y?0:A.2H})):k.1X("7J")&&h.3Y?C=h.3Y(k,n):k[0].7K=="7L://7M.7N.7O/7P/3p"&&h.3p?C=h.3p(k,n):(s=k.3i(),t=k.35(),C=h.Y(k,l.1t)),C.Y&&(s=C.V,t=C.W,C=C.Y),C.Q+=n.x==="1m"?s:n.x==="1q"?s/2:0,C.P+=n.y==="1l"?t:n.y==="1q"?t/2:0}C.Q+=o.x+(m.x==="1m"?-q:m.x==="1q"?-q/2:0),C.P+=o.y+(m.y==="1l"?-r:m.y==="1q"?-r/2:0),l.1Q.1T&&k[0]!==b&&k[0]!==v?C.3w={Q:E.Q(C.Q),P:E.P(C.P)}:C.3w={Q:0,P:0},z.13("1O",9(b,c){M a.13(R,"1O").24(/1s-1n-5b-\\w+/i,"")}).3z(j+"-5b-"+m.4t()),w.3b=a.1i({},d),z.2c(w,[u,C,A.5c]);T(w.3v())M u;2A C.3w,f&&5d(C.Q)&&5d(C.P)?a.21(l.1P)&&(l.1P.1G(z,u,a.1i({},C)),z.3x(9(b){a(R).X({4d:"",W:""}),a.1F.2L&&R.14.3j("2s"),b()})):z.X(C),x=0;M u},2O:9(){T(u.1f<1||y)M u;O b=j+"-5e",c,d,e;y=1,z.X("V","7S").3z(b),c=z.V()+(a.1F.5f?1:0),d=1v(z.X("2P-V"),10)||0,e=1v(z.X("5g-V"),10)||0,c=d+e?1d.5g(1d.2P(c,e),d):c,z.X("V",c).4e(b),y=0;M u},3L:9(b){O c=l;"3a"!==11 b&&(b=!z.2a(c)&&!B.2y),u.1f?(z.2p(c,b),a.13(z[0],"1I-2y",b)):B.2y=!!b;M u},7Z:9(){M u.3L(e)},26:9(){O b=o[0],c=a.13(b,q);u.1f&&(z.1L(),a.1j(u.1D,9(){R.26&&R.26()})),1H(u.1r.N),1H(u.1r.S),L(1,1,1,1),a.5h(b,"1a"),c&&(a.13(b,"15",c),o.3U(q)),o.3U("1I-4g").1w(".1a");M o}})}9 s(b){O c;T(!b||"1e"!==11 b)M e;"1e"!==11 b.1Z&&(b.1Z={1A:b.1Z});T("U"1Y b){T("1e"!==11 b.U||b.U.1T)b.U={1p:b.U};c=b.U.1p||e,!a.21(c)&&(!c&&!c.13||c.18<1||"1e"===11 c&&!c.1T)&&(b.U.1p=e),"15"1Y b.U&&("1e"!==11 b.U.15&&(b.U.15={1p:b.U.15}),c=b.U.15.1p||e,!a.21(c)&&(!c&&!c.13||c.18<1||"1e"===11 c&&!c.1T)&&(b.U.15.1p=e))}"17"1Y b&&("1e"!==11 b.17&&(b.17={1N:b.17,2f:b.17})),"N"1Y b&&("1e"!==11 b.N&&(b.N.1T?b.N={12:b.N}:b.N={1b:b.N})),"S"1Y b&&("1e"!==11 b.S&&(b.S.1T?b.S={12:b.S}:b.S={1b:b.S})),"14"1Y b&&("1e"!==11 b.14&&(b.14={2Z:b.14})),a.1j(h,9(){R.2V&&R.2V(b)});M b}9 r(){O c=b.5l;M c&&(c.3D||c.5m||a.4i).23(c,28)}O d=!0,e=!1,f=5o,g,h,i,j="1s-1n",k="1s-2g",l="1s-2T-2y",m="2n.1a."+j,n=j+"-2x",o="-5u",p="5x",q="4E";g=a.2h.1a=9(b,h,i){O j=(""+b).2j(),k=f,l=j==="3L"?[d]:a.5A(28).4j(1,10),m=l[l.18-1],n=R[0]?a.25(R[0],"1a"):f;T(!28.18&&n||j==="5C")M n;T("1k"===11 b){R.1j(9(){O b=a.25(R,"1a");T(!b)M d;m&&m.5D&&(b.33.1b=m);T(j!=="3k"&&j!=="1W"||!h)b[j]&&b[j].23(b[j],l);2r T(a.5H(h)||i!==c)b.34(h,i);2r{k=b.44(h);M e}});M k!==f?k:R}T("1e"===11 b||!28.18){n=s(a.1i(d,{},b));M g.19.1G(R,n,m)}},g.19=9(b,c){M R.1j(9(f){9 p(b){9 c(){o.1M(11 b==="1e"||i.N.2Q),k.N.1w(l.N),k.S.1w(l.S)}T(o.33.2y)M e;o.33.1b=a.1i({},b),i.N.27>0?(1H(o.1r.N),o.1r.N=2Y(c,i.N.27),l.N!==l.S&&k.S.19(l.S,9(){1H(o.1r.N)})):c()}O i,k,l,m=!b.1h||b.1h===e||b.1h.18<1||a("#"+j+"-"+b.1h).18?g.47++:b.1h,n=".1a-"+m+"-2i",o=u.1G(R,m,b);T(o===e)M d;i=o.1W,a.1j(h,9(){R.2u==="2u"&&R(o)}),k={N:i.N.12,S:i.S.12},l={N:a.3e(""+i.N.1b).24(/ /g,n+" ")+n,S:a.3e(""+i.S.1b).24(/ /g,n+" ")+n},i.S.1b==="3J"&&(l.S="2K"+n),k.N.19(l.N,p),(i.N.2Q||i.56)&&p(c)})},h=g.1D={2w:9(a){a=(""+a).24(/([A-Z])/," $1").24(/62/58,"1q").2j(),R.x=(a.3M(/Q|1m/i)||a.3M(/1q/)||["3f"])[0].2j(),R.y=(a.3M(/P|1l|1q/i)||["3f"])[0].2j(),R.1o=a.39(0).4r(/^(t|b)/)>-1?"y":"x",R.1k=9(){M R.1o==="y"?R.y+R.x:R.x+R.y},R.4t=9(){O a=R.x.2q(0,1),b=R.y.2q(0,1);M a===b?a:a==="c"||a!=="c"&&b!=="c"?b+a:a+b}},Y:9(c,d){9 k(a,b){e.Q+=b*a.2H(),e.P+=b*a.2D()}O e=c.Y(),f=d,g=0,i=1B.31,j;T(f){6c{T(f[0]===i)2z;f.X("17")!=="6d"&&(j=f.17(),e.Q-=j.Q+(1v(f.X("6f"),10)||0),e.P-=j.P+(1v(f.X("6i"),10)||0),g++)}2W(f=f.6k());(d[0]!==i||g>1)&&k(d,1),h.4K&&k(a(b),-1)}M e},4K:3Z((""+(/4G.*6n ([0-6p]{2,3})|(4G 6s).*6t.*6v/i.4D(6z.6B)||[0,"6E"])[1]).24("53","6H").24("6L","."))<4.1,2h:{13:9(b,c){T(R.18){O d=R[0],e="15",f=a.25(d,"1a");T(b===e){T(28.18<2)M a.13(d,q);T(11 f==="1e"){f&&f.1f&&f.1W.U.13===e&&f.33.13&&f.34("U.1p",c),a.2h["13"+p].23(R,28),a.13(d,q,a.13(d,e));M R.3U(e)}}}},4A:9(b){O c=a([]),d="15",e;e=a.2h["4A"+p].23(R,28).2s("[4E]").1j(9(){a.13(R,d,a.13(R,q)),R.3j(q)}).7c();M e},1L:a.1s?f:9(b,c){a(R).1j(9(){c||(!b||a.2s(b,[R]).18)&&a("*",R).2I(R).1j(9(){a(R).7i("1L")})})}}},a.1j(h.2h,9(b,c){T(!c)M d;O e=a.2h[b+p]=a.2h[b];a.2h[b]=9(){M c.23(R,28)||e.23(R,28)}}),a(b).4R("2B",9(){O b="49";a(1B).19(b+".1a",9(a){i={3s:a.3s,46:a.46,1A:b}})}),g.2X="2.0.7w",g.47=0,g.4Y="3R 7z 3u 54 49 2K 3c".32(" "),g.4a=7G,g.2t={56:e,1h:e,4c:d,U:{1p:d,13:"15",15:{1p:e,1z:e}},17:{1N:"P Q",2f:"1l 1m",12:e,1t:e,1Q:e,2m:{x:0,y:0,29:d,2o:d,7V:"7Y"},1P:d},N:{12:e,1b:"3c",1P:d,27:3A,3d:e,2Q:e},S:{12:e,1b:"2K",1P:d,27:0,2b:e,1R:e},14:{2Z:"",2g:e},3F:{1M:f,3T:f,N:f,S:f,22:f,2x:f,1J:f}},h.1y=9(a){O b=a.1D.1y;M"1e"===11 b?b:a.1D.1y=1C v(a)},h.1y.2u="1M",h.1y.2V=9(a){O b=a.U,c;b&&"1y"1Y b&&(c=b.1y,11 c!=="1e"&&(c=a.U.1y={2l:c}),"3a"!==11 c.2v&&c.2v&&(c.2v=!!c.2v))},a.1i(d,g.2t,{U:{1y:{5j:d,2v:d}}}),h.16=9(a){O b=a.1D.16;M"1e"===11 b?b:a.1D.16=1C x(a)},h.16.2u="1M",h.16.2V=9(a){O b=a.14,c;b&&"16"1Y b&&(c=a.14.16,11 c!=="1e"&&(a.14.16={1g:c}),/1k|3a/i.1E(11 c.1g)||(c.1g=d),11 c.V!=="2N"&&2A c.V,11 c.W!=="2N"&&2A c.W,11 c.1c!=="2N"&&c.1c!==d&&2A c.1c,11 c.Y!=="2N"&&2A c.Y)},a.1i(d,g.2t,{14:{16:{1g:d,3n:e,V:6,W:6,1c:d,Y:0}}}),h.3Y=9(b,c){9 l(a,b){O d=0,e=1,f=1,g=0,h=0,i=a.V,j=a.W;2W(i>0&&j>0&&e>0&&f>0){i=1d.3m(i/2),j=1d.3m(j/2),c.x==="Q"?e=i:c.x==="1m"?e=a.V-i:e+=1d.3m(i/2),c.y==="P"?f=j:c.y==="1l"?f=a.W-j:f+=1d.3m(j/2),d=b.18;2W(d--){T(b.18<2)2z;g=b[d][0]-a.Y.Q,h=b[d][1]-a.Y.P,(c.x==="Q"&&g>=e||c.x==="1m"&&g<=e||c.x==="1q"&&(ga.V-e)||c.y==="P"&&h>=f||c.y==="1l"&&h<=f||c.y==="1q"&&(ha.W-f))&&b.6F(d,1)}}M{Q:b[0][0],P:b[0][1]}}O d=b.13("3V").2j(),e=b.13("6Q").32(","),f=[],g=a(\'3C[70="#\'+b.76("4U").13("40")+\'"]\'),h=g.Y(),i={V:0,W:0,Y:{P:3B,1m:0,1l:0,Q:3B}},j=0,k=0;h.Q+=1d.3o((g.3i()-g.V())/2),h.P+=1d.3o((g.35()-g.W())/2);T(d==="5a"){j=e.18;2W(j--)k=[1v(e[--j],10),1v(e[j+1],10)],k[0]>i.Y.1m&&(i.Y.1m=k[0]),k[0]i.Y.1l&&(i.Y.1l=k[1]),k[1]35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('"5n 7Q",9(a,b,c){9 z(b){O c=R,d=b.2F,e=d.1n,f=".1S-"+b.1g;a.1i(c,{1U:9(){d.1S=a(\'<4P 1K="1q-1n-1S" 5o="0" 5p="-1" 5q="7Z:\\\'\\\';" 14="2f:2H; 16:3H; z-41:-1; 2t:7G(4b=0); -5s-2t:"5t:7O.5v.7j(5w=0)";">\'),d.1S.2D(e),e.18("3F"+f,c.2n)},2n:9(){O a=b.3Q("4R"),c=b.1D.17,f=d.17,g,h;h=1v(e.X("1b-Q-V"),10)||0,h={Q:-h,P:-h},c&&f&&(g=c.1h.1p==="x"?["V","Q"]:["W","P"],h[g[1]]-=f[g[0]]()),d.1S.X(h).X(a)},26:9(){d.1S.1M(),e.1x(f)}}),c.1U()}9 y(c){O f=R,h=c.1V.N.1t,i=c.2F,j=i.1n,k="#1a-1N",l=".7l",m="3s"+l+" 4Q"+l;c.2J.1t={"^N.1t.(2Q|1L)$":9(){f.1U(),i.1N.27(j.1Q(":2j"))}},a.1i(f,{1U:9(){h.2Q&&(j.1x(l).18(m,9(b,c,d){O e=b.1A.24("1n","");a.21(h[e])?h[e].1H(i.1N,d,c):f[e](d)}),f.2e(),h.1L===d&&i.1N.1x(l+c.1g).18("3I"+l+c.1g,9(){c.S.1H(c)}),i.1N.X("5z",h.1L?"5A":""))},2e:9(){O c=a(k),d;T(c.19){i.1N=c;M c}d=i.1N=a("<2p />",{1g:k.2w(1),X:{16:"3H",P:0,Q:0,2f:"4r"},3v:9(){M e}}).2D(1C.2T),a(b).18("2m"+l,9(){d.X({W:1d.2O(a(b).W(),a(1C).W()),V:1d.2O(a(b).V(),a(1C).V())})}).2b("2m");M d},27:9(b){O h=i.1N,k=c.1V.N.1t.1P,l=b?"N":"S",m;h||(h=f.2e());T(!h.1Q(":5C")||b)h.51(d,e),b&&(m=1v(a.X(j[0],"z-41"),10),h.X("z-41",(m||g.47)-1)),a.21(k)?k.1H(h,b):k===e?h[l]():h.52(3C,b?.7:0,9(){b||a(R).S()})},N:9(){f.27(d)},S:9(){f.27(e)},26:9(){O d=i.1N;d&&(a(k).1j(9(){O b=a(R).23("1a");T(b&&b.1g!==b.1g&&b.1V.N.1t)M d=e}),d?(i.1N.1M(),a(b).1x(l)):i.1N.1x(l+c.1g)),j.1x(m)}}),f.1U()}9 x(b,g){9 v(a){O b=a.1p==="y",c=n[b?"V":"W"],d=n[b?"W":"V"],e=a.1l().3X("1r")>-1,f=c*(e?.5:1),g=1d.5E,h=1d.3O,i,j,k,l=1d.3G(g(f,2)+g(d,2)),m=[p/f*l,p/d*l];m[2]=1d.3G(g(m[0],2)-g(p,2)),m[3]=1d.3G(g(m[1],2)-g(p,2)),i=l+m[2]+m[3]+(e?0:m[0]),j=i/l,k=[h(j*d),h(j*c)];M{W:k[b?0:1],V:k[b?1:0]}}9 u(b){O c=k.1y&&b.y==="P",d=c?k.1y:k.U,e=a.1G.5f,f=e?"-5F-":a.1G.4H?"-4H-":"",g=b.y+(e?"":"-")+b.x,h=f+(e?"1b-4j-"+g:"1b-"+g+"-4j");M 1v(d.X(h),10)||1v(l.X(h),10)||0}9 t(a,b,c){b=b?b:a[a.1p];O d=k.1y&&a.y==="P",e=d?k.1y:k.U,f="1b-"+b+"-V",g=1v(e.X(f),10);M(c?g||1v(l.X(f),10):g)||0}9 s(b,e,f,g){T(k.17){O h=a.1i({},i.1h),l=f.3y,n;i.1h.2c!==d&&(l.Q&&(h.x=h.x==="1r"?l.Q>0?"Q":"1m":h.x==="Q"?"1m":"Q"),l.P&&(h.y=h.y==="1r"?l.P>0?"P":"1k":h.y==="P"?"1k":"P"),h.1l()!==m.1h&&(m.P!==l.P||m.Q!==l.Q)&&(n=i.35(h))),n||(n=i.16(h,0)),n.1m!==c&&(n.Q=n.1m),n.1k!==c&&(n.P=n.1k),n.3r=1d.2O(0,j.Y),f.Q-=n.Q.3a?n.3r:(n.1m?-1:1)*n.Q,f.P-=n.P.3a?n.3r:(n.1k?-1:1)*n.P,m.Q=l.Q,m.P=l.P,m.1h=h.1l()}}O i=R,j=b.1V.14.17,k=b.2F,l=k.1n,m={P:0,Q:0,1h:""},n={V:j.V,W:j.W},o={},p=j.1b||0,q=".1a-17",r=a("<4p />")[0].3J;i.1h=f,i.3j=f,b.2J.17={"^16.1J|14.17.(1h|3j|1b)$":9(){i.1U()||i.26(),b.1R()},"^14.17.(W|V)$":9(){n={V:j.V,W:j.W},i.2e(),i.35(),b.1R()},"^U.15.1o|14.(37|2l)$":9(){k.17&&i.35()}},a.1i(i,{1U:9(){O b=i.4k()&&(r||a.1G.2G);b&&(i.2e(),i.35(),l.1x(q).18("3F"+q,s));M b},4k:9(){O a=j.1h,c=b.1V.16,f=c.2o,g=c.1J.1l?c.1J.1l():c.1J;T(a===e||g===e&&f===e)M e;a===d?i.1h=1E h.2v(g):a.1l||(i.1h=1E h.2v(a),i.1h.2c=d);M i.1h.1l()!=="5i"},4l:9(){O c,d,e,f=k.17.X({5G:"",1b:""}),g=i.1h,h=g[g.1p],m="1b-"+h+"-39",p="1b"+h.3a(0)+h.2w(1)+"6n",q=/5H?\\(0, 0, 0(, 0)?\\)|3e/i,r="5I-39",s="3e",t="1q-1n-5e",u=a(1C.2T).X("39"),v=b.2F.U.X("39"),w=k.1y&&(g.y==="P"||g.y==="1r"&&f.16().P+n.W/2+j.Y",{"1K":"1q-1n-17"}).X({V:b,W:c}).5J(l),r?a("<4p />").2D(k.17)[0].3J("2d").4n():(d=\'<48:3S 5L="0,0" 14="2f:4Z-2H; 16:3H; 4v:2i(#3t#4w);">\',k.17.2N(p?d+=d:d))},35:9(b){O c=k.17,g=c.6D(),l=n.V,m=n.W,q="3N 5M ",s="3N 5N 3e",u=j.3j,x=1d.3O,y,z,A,B,C;b||(b=i.1h),u===e?u=b:(u=1E h.2v(u),u.1p=b.1p,u.x==="3f"?u.x=b.x:u.y==="3f"?u.y=b.y:u.x===u.y&&(u[b.1p]=b[b.1p])),y=u.1p,i.4l(),p=o.1b==="3e"||o.1b==="#5O"?0:j.1b===d?t(b,f,d):j.1b,A=w(u,l,m),C=v(b),c.X(C),b.1p==="y"?B=[x(u.x==="Q"?p:u.x==="1m"?C.V-l-p:(C.V-l)/2),x(u.y==="P"?C.W-m:0)]:B=[x(u.x==="Q"?C.V-l:0),x(u.y==="P"?p:u.y==="1k"?C.W-m-p:(C.W-m)/2)],r?(g.13(C),z=g[0].3J("2d"),z.5Q(),z.4n(),z.5R(0,0,4o,4o),z.5S(B[0],B[1]),z.5T(),z.5U(A[0][0],A[0][1]),z.5j(A[1][0],A[1][1]),z.5j(A[2][0],A[2][1]),z.7X(),z.7W=o.2A,z.5W=o.1b,z.5X=p*2,z.7T="4u",z.7S=5Z,z.4s(),z.2A()):(A="m"+A[0][0]+","+A[0][1]+" l"+A[1][0]+","+A[1][1]+" "+A[2][0]+","+A[2][1]+" 60",B[2]=p&&/^(r|b)/i.1z(b.1l())?3Y(a.1G.2U,10)===8?2:1:0,g.X({61:""+(u.1l().3X("1r")>-1),Q:B[0]-B[2]*4q(y==="x"),P:B[1]-B[2]*4q(y==="y"),V:l+p,W:m+p}).1j(9(b){O c=a(R);c.13({62:l+p+" "+(m+p),63:A,64:o.2A,65:!!b,66:!b}).X({2f:p||b?"2H":"4r"}),!b&&p>0&&c.2N()===""&&c.2N(\'<48:4s 67="\'+p*2+\'3N" 39="\'+o.1b+\'" 68="69" 6a="4u" 14="4v:2i(#3t#4w); 2f:4Z-2H;" />\')}));M i.16(b,1)},16:9(b,c){O f=k.17,g={},h=1d.2O(0,j.Y),l,m,n;T(j.1h===e||!f)M e;b=b||i.1h,l=b.1p,m=v(b),n=a.1G.2G&&3Y(a.1G.2U,10)==8&&p&&/^(b|r)/i.1z(b.1l())?1:0,a.1j(l==="y"?[b.x,b.y]:[b.y,b.x],9(a,c){O e,f;c==="1r"?(e=l==="y"?"Q":"P",g[e]="50%",g["4S-"+e]=-1d.3O(m[l==="y"?"V":"W"]/2)+h):(e=t(b,c,d),f=u(b),g[c]=a||!p?t(b,c)+(a?0:f):h+(f>e?f:0))}),g[b[l]]-=m[l==="x"?"V":"W"]+n,c&&f.X({P:"",1k:"",Q:"",1m:"",4S:""}).X(g);M g},26:9(){k.17&&k.17.1M(),l.1x(q)}}),i.1U()}9 w(a,b,c){O d=1d.3i(b/2),e=1d.3i(c/2),f={4y:[[0,0],[b,c],[b,0]],4L:[[0,0],[b,0],[0,c]],4z:[[0,c],[b,0],[b,c]],4K:[[0,0],[0,c],[b,c]],7q:[[0,c],[d,0],[b,c]],6f:[[0,0],[b,0],[d,c]],6g:[[0,0],[b,e],[0,c]],7n:[[b,0],[b,c],[0,e]]};f.6i=f.4y,f.6j=f.4L,f.7i=f.4z,f.6l=f.4K;M f[a.1l()]}9 v(b){O c=R,f=b.2F.1n,g=b.1V.U.1w,h=".1a-1w",i=/<3V\\b[^<]*(?:(?!<\\/3V>)<[^<]*)*<\\/3V>/58,j=d;b.2J.1w={"^U.1w":9(a,b,d){b==="1w"&&(g=d),b==="2r"?(f.1x(h),d&&f.18("3s"+h,c.2X)):g&&g.2i?c.2X():f.1x(h)}},a.1i(c,{1U:9(){g&&g.2i&&f.18("3s"+h,c.2X);M c},2X:9(d,h){9 p(a,c,d){b.32("U.1o",c+": "+d),n()}9 o(c){l&&(c=a("<2p/>").34(c.24(i,"")).4B(l)),b.32("U.1o",c),n()}9 n(){m&&(f.X("42",""),h=e)}T(d.3x())M c;O j=g.2i.3X(" "),k=g.2i,l,m=g.2r&&!g.4J&&h;m&&f.X("42","45"),j>-1&&(l=k.2w(j),k=k.2w(0,j)),a.1w(a.1i({6o:o,4g:p,7b:b},g,{2i:k}));M c}}),c.1U()}9 u(b,c){O i,j,k,l,m=a(R),n=a(1C.2T),o=R===1C?n:m,p=m.1X?m.1X(c.1X):f,u=c.1X.1A==="79"&&p?p[c.1X.3W]:f,v=m.23(c.1X.3W||"6r");77{v=11 v==="1l"?(1E 6u("M "+v))():v}75(w){r("6v 73 6x 6z 6A 23: "+v)}l=a.1i(d,{},g.2x,c,11 v==="1e"?s(v):f,s(u||p)),p&&a.5h(R,"1X"),j=l.16,l.1g=b;T("38"===11 l.U.1o){k=m.13(l.U.13);T(l.U.13!==e&&k)l.U.1o=k;2s M e}j.1u===e&&(j.1u=n),j.12===e&&(j.12=o),l.N.12===e&&(l.N.12=o),l.N.3d===d&&(l.N.3d=n),l.S.12===e&&(l.S.12=o),l.16.1Z===d&&(l.16.1Z=j.1u),j.2o=1E h.2v(j.2o),j.1J=1E h.2v(j.1J);T(a.23(R,"1a"))T(l.49)m.1a("26");2s T(l.49===e)M e;a.13(R,"15")&&(a.13(R,q,a.13(R,"15")),R.3o("15")),i=1E t(m,l,b,!!k),a.23(R,"1a",i),m.18("1M.1a",9(){i.26()});M i}9 t(o,p,r,t){9 L(c,d,e,f){f=1v(f,10)!==0;O g=".1a-"+r,h={N:c&&p.N.12[0],S:d&&p.S.12[0],1n:e&&u.1f&&A.1n[0],U:e&&u.1f&&A.U[0],1u:f&&p.16.1u[0]===v?1C:p.16.1u[0],4d:f&&b};u.1f?a([]).6Z(a.6Y([h.N,h.S,h.1n,h.1u,h.U,h.4d],9(a){M 11 a==="1e"})).1x(g):c&&p.N.12.1x(g+"-2e")}9 K(c,d,f,h){9 y(a){z.1Q(":2j")&&u.1R(a)}9 x(a){T(z.29(l))M e;1F(u.1s.1T),u.1s.1T=2Y(9(){u.S(a)},p.S.1T)}9 w(b){T(z.29(l))M e;O c=a(b.3l||b.12),d=c.6F(m)[0]===z[0],f=c[0]===n.N[0];1F(u.1s.N),1F(u.1s.S);T(k.12==="22"&&d||p.S.2c&&(/22(4W|4X|3U)/.1z(b.1A)&&(d||f))){b.6G(),b.6V();M e}p.S.25>0?u.1s.S=2Y(9(){u.S(b)},p.S.25):u.S(b)}9 t(a){T(z.29(l))M e;n.N.2b("1a-"+r+"-1T"),1F(u.1s.N),1F(u.1s.S);O b=9(){u.N(a)};p.N.25>0?u.1s.N=2Y(b,p.N.25):b()}O j=".1a-"+r,k=p.16,n={N:p.N.12,S:p.S.12,1u:k.1u[0]===v?a(1C):k.1u,3P:a(1C)},q={N:a.3g(""+p.N.1c).2Z(" "),S:a.3g(""+p.S.1c).2Z(" ")},s=a.1G.2G&&1v(a.1G.2U,10)===6;f&&(p.S.2c&&(n.S=n.S.2E(z),z.18("6U"+j,9(){z.29(l)||1F(u.1s.S)})),k.12==="22"&&k.2n.22&&p.S.1c&&z.18("2K"+j,9(a){(a.3l||a.12)!==n.N[0]&&u.S(a)}),z.18("3c"+j+" 2K"+j,9(a){u[a.1A==="3c"?"2q":"1L"](a)})),d&&("2L"===11 p.S.1T&&(n.N.18("1a-"+r+"-1T",x),a.1j(g.4Y,9(a,b){n.S.2E(A.1n).18(b+j+"-1T",x)})),a.1j(q.S,9(b,c){O d=a.6I(c,q.N),e=a(n.S);d>-1&&e.2E(n.N).19===e.19||c==="3K"?(n.N.18(c+j,9(a){z.1Q(":2j")?w(a):t(a)}),2B q.N[d]):n.S.18(c+j,w)})),c&&a.1j(q.N,9(a,b){n.N.18(b+j,t)}),h&&((k.2n.2m||k.1Z)&&a(a.1c.6J.2m?k.1Z:b).18("2m"+j,y),(k.1Z||s&&z.X("16")==="2c")&&a(k.1Z).18("3D"+j,y),/3K/i.1z(p.S.1c)&&n.3P.18("3v"+j,9(b){O c=a(b.12);c.6K(m).19===0&&c.2E(o).19>1&&z.1Q(":2j")&&!z.29(l)&&u.S(b)}),/2K|3T/i.1z(p.S.1c)&&a(b).18("1L 3T",9(a){a.3l||u.S(a)}),k.12==="22"&&n.3P.18("46"+j,9(a){k.2n.22&&!z.29(l)&&z.1Q(":2j")&&u.1R(a||i)}))}9 J(b,c){9 f(a){9 c(c){(b=b.3h(R)).19===0&&(u.2y(),u.1R(B.1c),a())}O b;T((b=d.4B("3n:3h([W]):3h([V])")).19===0)M c.1H(b);b.1j(9(a,b){(9 d(){O e=u.1s.3n;T(b.W&&b.V){1F(e[a]);M c.1H(b)}d=2Y(e[a],20)})()})}O d=A.U;T(!u.1f||!b)M e;a.21(b)&&(b=b.1H(o,u)||""),b.1W&&b.19>0?d.4C().34(b.X({2f:"2H"})):d.2N(b),u.1f<0?z.3z("3L",f):(y=0,f(a.4h));M u}9 I(b){O c=A.15;T(!u.1f||!b)M e;a.21(b)&&(b=b.1H(o,u)||""),b.1W&&b.19>0?c.4C().34(b.X({2f:"2H"})):c.2N(b),u.2y(),u.1f&&z.1Q(":2j")&&u.1R(B.1c)}9 H(a){O b=A.1B,c=A.15;T(!u.1f)M e;a?(c||G(),F()):b.1M()}9 G(){O b=w+"-15";A.1y&&E(),A.1y=a("<2p />",{"1K":j+"-1y "+(p.14.2l?"1q-2l-4I":"")}).34(A.15=a("<2p />",{1g:b,"1K":j+"-15","1O-40":d})).6M(A.U),p.U.15.1B?F():u.1f&&u.2y()}9 F(){O b=p.U.15.1B,c=11 b==="1l",d=c?b:"6N 1n";A.1B&&A.1B.1M(),b.1W?A.1B=b:A.1B=a("",{"1K":"1q-3b-3t "+(p.14.2l?"":j+"-3p"),15:d,"1O-6O":d}).6P(a("<6Q />",{"1K":"1q-3p 1q-3p-6R",2N:"&6S;"})),A.1B.2D(A.1y).13("4O","1B").4F(9(b){a(R).2k("1q-3b-4F",b.1A==="3c")}).3I(9(a){z.29(l)||u.S(a);M e}).18("3v 6W 55 6X 3T",9(b){a(R).2k("1q-3b-70 1q-3b-2q",b.1A.2w(-4)==="72")}),u.2y()}9 E(){A.15&&(A.1y.1M(),A.1y=A.15=A.1B=f,u.1R())}9 D(){O a=p.14.2l;z.2k(k,a),A.U.2k(k+"-U",a),A.1y&&A.1y.2k(k+"-4I",a),A.1B&&A.1B.2k(j+"-3p",!a)}9 C(a){O b=0,c,d=p,e=a.2Z(".");2V(d=d[e[b++]])b0&&!a("#"+i).19&&(z[0].1g=i,A.U[0].1g=i+"-U",A.15[0].1g=i+"-15")},"^U.1o$":9(a,b,c){J(c)},"^U.15.1o$":9(a,b,c){T(!c)M E();!A.15&&c&&G(),I(c)},"^U.15.1B$":9(a,b,c){H(c)},"^16.(1J|2o)$":9(a,b,c){"1l"===11 c&&(a[b]=1E h.2v(c))},"^16.1u$":9(a,b,c){u.1f&&z.2D(c)},"^(N|S).(1c|12|2c|25|1T)$":9(a,b,c,d,e){O f=[1,0,0];f[e[1]==="N"?"3M":"7a"](0),L.2a(u,f),K.2a(u,[1,1,0,0])},"^N.2P$":9(){u.1f?u.N():u.1I(1)},"^14.37$":9(b,c,d){a.13(z[0],"1K",j+" 1a 1q-4M-4N "+d)},"^14.2l|U.15":D,"^3E.(1I|N|3U|S|2q|1L)$":9(b,c,d){z[(a.21(d)?"":"7c")+"18"]("1n"+c,d)}},a.1i(u,{1I:9(b){T(u.1f)M u;O c=p.U.1o,f=p.U.15.1o,g=a.30("7e");a.13(o[0],"1O-4f",w),z=A.1n=a("<2p/>").13({1g:w,"1K":j+" 1a 1q-4M-4N "+p.14.37,4O:"7f","1O-7g":"7h","1O-40":e,"1O-4f":w+"-U","1O-45":d}).2k(l,B.2u).23("1a",u).2D(p.16.1u).34(A.U=a("<2p />",{"1K":j+"-U",1g:w+"-U","1O-40":d})),u.1f=-1,y=1,f&&(G(),I(f)),J(c),u.1f=d,D(),a.1j(p.3E,9(b,c){a.21(c)&&z.18(b==="27"?"3s 4Q":"1n"+b,c)}),a.1j(h,9(){R.2z==="1I"&&R(u)}),K(1,1,1,1),z.3z("3L",9(a){g.2R=B.1c,z.2b(g,[u]),y=0,u.2y(),(p.N.2P||b)&&u.N(B.1c),a()});M u},3Q:9(a){O b,c;53(a.2h()){2S"4R":b={W:z.33(),V:z.3q()};2M;2S"Y":b=h.Y(z,p.16.1u);2M;3t:c=C(a.2h()),b=c[0][c[1]],b=b.1p?b.1l():b}M b},32:9(b,c){9 l(a,b){O c,d,e;4T(c 1Y j)4T(d 1Y j[c])T(e=(1E 7m(d,"i")).4G(a))b.3M(e),j[c][d].2a(u,b)}O f=/^16\\.(1J|2o|2n|12|1u)|14|U|N\\.2P/i,g=/^U\\.(15|13)|14/i,h=e,i=e,j=u.2J,k;"1l"===11 b?(k=b,b={},b[k]=c):b=a.1i(d,{},b),a.1j(b,9(c,d){O e=C(c.2h()),j;j=e[0][e[1]],e[0][e[1]]="1e"===11 d&&d.7o?a(d):d,b[c]=[e[0],e[1],d,j],h=f.1z(c)||h,i=g.1z(c)||i}),s(p),x=y=1,a.1j(b,l),x=y=0,z.1Q(":2j")&&u.1f&&(h&&u.1R(),i&&u.2y());M u},27:9(b,c){9 j(){b?(a.1G.2G&&z[0].14.3o("2t"),z.X("7p","")):z.X({2f:"",42:"",V:"",4b:"",Q:"",P:""})}T(!u.1f)T(b)u.1I(1);2s M u;O d=b?"N":"S",g=p[d],h=z.1Q(":2j"),i;(11 b).59("38|2L")&&(b=!h);T(h===b)M u;T(c){T(/7r|7s/.1z(c.1A)&&/4W|4X/.1z(B.1c.1A)&&c.12===p.N.12[0]&&z.7u(c.3l).19)M u;B.1c=a.1i({},c)}i=a.30("1n"+d),i.2R=c?B.1c:f,z.2b(i,[u,3C]);T(i.3x())M u;a.13(z[0],"1O-45",!b),b?(u.2q(c),u.1R(c),g.3d&&a(m,g.3d).3h(z).1a("S",i)):(1F(u.1s.N),u.1L(c)),z.51(0,1),a.21(g.1P)?(g.1P.1H(z,u),z.3z("3L",9(a){j(),a()})):g.1P===e?(z[d](),j.1H(z)):z.52(3C,b?1:0,j),b&&g.12.2b("1a-"+r+"-1T");M u},N:9(a){M u.27(d,a)},S:9(a){M u.27(e,a)},2q:9(b){T(!u.1f)M u;O c=a(m),d=1v(z[0].14.36,10),e=g.47+c.19,f=a.1i({},b),h,i;z.29(n)||(d!==e&&(c.1j(9(){R.14.36>d&&(R.14.36=R.14.36-1)}),c.2t("."+n).1a("1L",f)),i=a.30("7v"),i.2R=f,z.2b(i,[u,e]),i.3x()||(z.3B(n)[0].14.36=e));M u},1L:9(b){O c=a.1i({},b),d;z.4c(n),d=a.30("7x"),d.2R=c,z.2b(d,[u]);M u},1R:9(d,f){T(!u.1f||x)M u;x=1;O k=p.16.12,l=p.16,m=l.1J,n=l.2o,o=l.2n,q=z.3q(),r=z.33(),s=0,t=0,w=a.30("3F"),y=z.X("16")==="2c",A=l.1Z.1W?l.1Z:a(b),C={Q:0,P:0},D=(u.1D.17||{}).1h,E={Q:9(a){O b=A.2I,c=m.x==="Q"?q:m.x==="1m"?-q:-q/2,d=n.x==="Q"?s:n.x==="1m"?-s:-s/2,e=D&&D.1p==="x"?g.2x.14.17.V:0,f=b-a-e,h=a+q-A.V-b+e,i=c-(m.1p==="x"||m.x===m.y?d:0),j=m.x==="1r";f>0&&(m.x!=="Q"||h>0)?C.Q-=i+(j?0:2*o.x):h>0&&(m.x!=="1m"||f>0)&&(C.Q-=j?-i:i+2*o.x),C.Q!==a&&j&&(C.Q-=o.x),C.Q<0&&-C.Q>h&&(C.Q=a);M C.Q-a},P:9(a){O b=A.2C,c=m.y==="P"?r:m.y==="1k"?-r:-r/2,d=n.y==="P"?t:n.y==="1k"?-t:-t/2,e=D&&D.1p==="y"?g.2x.14.17.W:0,f=b-a-e,h=a+r-A.W-b+e,i=c-(m.1p==="y"||m.x===m.y?d:0),j=m.y==="1r";f>0&&(m.y!=="P"||h>0)?C.P-=i+(j?0:2*o.y):h>0&&(m.y!=="1k"||f>0)&&(C.P-=j?-i:i+2*o.y),C.P!==a&&j&&(C.P-=o.y),C.P<0&&-C.P>h&&(C.P=a);M C.P-a}};f=f===c||!!f,A=A?{5c:A,W:A[(A[0]===b?"h":"7z")+"7A"](),V:A[(A[0]===b?"w":"7B")+"7C"](),2I:A.2I(),2C:A.2C()}:e;T(k==="22")n={x:"Q",y:"P"},d=d&&(d.1A==="2m"||d.1A==="3D")?B.1c:o.22||!d||!d.3u?a.1i({},i):d,C={P:d.43,Q:d.3u};2s{k==="1c"&&(d&&d.12&&d.1A!=="3D"&&d.1A!=="2m"?k=B.12=a(d.12):k=B.12),k=a(k).7E(0);T(k.19===0)M u;k[0]===1C||k[0]===b?(s=k.V(),t=k.W(),k[0]===b&&(C={P:y?0:A.2C,Q:y?0:A.2I})):k.1Q("7H")&&h.3Z?C=h.3Z(k,n):k[0].7I=="7J://7K.7L.7M/7N/3w"&&h.3w?C=h.3w(k,n):(s=k.3q(),t=k.33(),C=h.Y(k,l.1u)),C.Y&&(s=C.V,t=C.W,C=C.Y),C.Q+=n.x==="1m"?s:n.x==="1r"?s/2:0,C.P+=n.y==="1k"?t:n.y==="1r"?t/2:0}C.Q+=o.x+(m.x==="1m"?-q:m.x==="1r"?-q/2:0),C.P+=o.y+(m.y==="1k"?-r:m.y==="1r"?-r/2:0),l.1Z.1W&&k[0]!==b&&k[0]!==v?C.3y={Q:E.Q(C.Q),P:E.P(C.P)}:C.3y={Q:0,P:0},z.13("1K",9(b,c){M a.13(R,"1K").24(/1q-1n-5b-\\w+/i,"")}).3B(j+"-5b-"+m.4t()),w.2R=a.1i({},d),z.2b(w,[u,C,A.5c]);T(w.3x())M u;2B C.3y,f&&5d(C.Q)&&5d(C.P)?a.21(l.1P)&&(l.1P.1H(z,u,a.1i({},C)),z.3z(9(b){a(R).X({4b:"",W:""}),a.1G.2G&&R.14.3o("2t"),b()})):z.X(C),x=0;M u},2y:9(){T(u.1f<1||y)M u;O b=j+"-5e",c,d,e;y=1,z.X("V","7P").3B(b),c=z.V()+(a.1G.5f?1:0),d=1v(z.X("2O-V"),10)||0,e=1v(z.X("5g-V"),10)||0,c=d+e?1d.5g(1d.2O(c,e),d):c,z.X("V",c).4c(b),y=0;M u},4e:9(b){O c=l;"38"!==11 b&&(b=!z.29(c)&&!B.2u),u.1f?(z.2k(c,b),a.13(z[0],"1O-2u",b)):B.2u=!!b;M u},7V:9(){M u.4e(e)},26:9(){O b=o[0],c=a.13(b,q);u.1f&&(z.1M(),a.1j(u.1D,9(){R.26&&R.26()})),1F(u.1s.N),1F(u.1s.S),L(1,1,1,1),a.5h(b,"1a"),c&&(a.13(b,"15",c),o.3R(q)),o.3R("1O-4f").1x(".1a");M o}})}9 s(b){O c;T(!b||"1e"!==11 b)M e;"1e"!==11 b.1X&&(b.1X={1A:b.1X});T("U"1Y b){T("1e"!==11 b.U||b.U.1W)b.U={1o:b.U};c=b.U.1o||e,!a.21(c)&&(!c&&!c.13||c.19<1||"1e"===11 c&&!c.1W)&&(b.U.1o=e),"15"1Y b.U&&("1e"!==11 b.U.15&&(b.U.15={1o:b.U.15}),c=b.U.15.1o||e,!a.21(c)&&(!c&&!c.13||c.19<1||"1e"===11 c&&!c.1W)&&(b.U.15.1o=e))}"16"1Y b&&("1e"!==11 b.16&&(b.16={1J:b.16,2o:b.16})),"N"1Y b&&("1e"!==11 b.N&&(b.N.1W?b.N={12:b.N}:b.N={1c:b.N})),"S"1Y b&&("1e"!==11 b.S&&(b.S.1W?b.S={12:b.S}:b.S={1c:b.S})),"14"1Y b&&("1e"!==11 b.14&&(b.14={37:b.14})),a.1j(h,9(){R.2W&&R.2W(b)});M b}9 r(){O c=b.5k;M c&&(c.4g||c.5l||a.4h).2a(c,28)}O d=!0,e=!1,f=5m,g,h,i,j="1q-1n",k="1q-2l",l="1q-3b-2u",m="2p.1a."+j,n=j+"-2q",o="-5r",p="5u",q="4E";g=a.2g.1a=9(b,h,i){O j=(""+b).2h(),k=f,l=j==="4e"?[d]:a.5x(28).4i(1,10),m=l[l.19-1],n=R[0]?a.23(R[0],"1a"):f;T(!28.19&&n||j==="5y")M n;T("1l"===11 b){R.1j(9(){O b=a.23(R,"1a");T(!b)M d;m&&m.5B&&(b.31.1c=m);T(j!=="3r"&&j!=="1V"||!h)b[j]&&b[j].2a(b[j],l);2s T(a.5D(h)||i!==c)b.32(h,i);2s{k=b.3Q(h);M e}});M k!==f?k:R}T("1e"===11 b||!28.19){n=s(a.1i(d,{},b));M g.18.1H(R,n,m)}},g.18=9(b,c){M R.1j(9(f){9 p(b){9 c(){o.1I(11 b==="1e"||i.N.2P),k.N.1x(l.N),k.S.1x(l.S)}T(o.31.2u)M e;o.31.1c=a.1i({},b),i.N.25>0?(1F(o.1s.N),o.1s.N=2Y(c,i.N.25),l.N!==l.S&&k.S.18(l.S,9(){1F(o.1s.N)})):c()}O i,k,l,m=!b.1g||b.1g===e||b.1g.19<1||a("#"+j+"-"+b.1g).19?g.44++:b.1g,n=".1a-"+m+"-2e",o=u.1H(R,m,b);T(o===e)M d;i=o.1V,a.1j(h,9(){R.2z==="2z"&&R(o)}),k={N:i.N.12,S:i.S.12},l={N:a.3g(""+i.N.1c).24(/ /g,n+" ")+n,S:a.3g(""+i.S.1c).24(/ /g,n+" ")+n},i.S.1c==="3K"&&(l.S="2K"+n),k.N.18(l.N,p),(i.N.2P||i.57)&&p(c)})},h=g.1D={2v:9(a){a=(""+a).24(/([A-Z])/," $1").24(/5Y/58,"1r").2h(),R.x=(a.4a(/Q|1m/i)||a.4a(/1r/)||["3f"])[0].2h(),R.y=(a.4a(/P|1k|1r/i)||["3f"])[0].2h(),R.1p=a.3a(0).59(/^(t|b)/)>-1?"y":"x",R.1l=9(){M R.1p==="y"?R.y+R.x:R.x+R.y},R.4t=9(){O a=R.x.2w(0,1),b=R.y.2w(0,1);M a===b?a:a==="c"||a!=="c"&&b!=="c"?b+a:a+b}},Y:9(c,d){9 k(a,b){e.Q+=b*a.2I(),e.P+=b*a.2C()}O e=c.Y(),f=d,g=0,i=1C.2T,j;T(f){6b{T(f[0]===i)2M;f.X("16")!=="6c"&&(j=f.16(),e.Q-=j.Q+(1v(f.X("6d"),10)||0),e.P-=j.P+(1v(f.X("6e"),10)||0),g++)}2V(f=f.6h());(d[0]!==i||g>1)&&k(d,1),h.4V&&k(a(b),-1)}M e},4V:3Y((""+(/4A.*6k ([0-6m]{2,3})|(4A 6p).*6q.*6s/i.4G(6w.6y)||[0,"6B"])[1]).24("54","6E").24("6H","."))<4.1,2g:{13:9(b,c){T(R.19){O d=R[0],e="15",f=a.23(d,"1a");T(b===e){T(28.19<2)M a.13(d,q);T(11 f==="1e"){f&&f.1f&&f.1V.U.13===e&&f.31.13&&f.32("U.1o",c),a.2g["13"+p].2a(R,28),a.13(d,q,a.13(d,e));M R.3R(e)}}}},4D:9(b){O c=a([]),d="15",e;e=a.2g["4D"+p].2a(R,28).2t("[4E]").1j(9(){a.13(R,d,a.13(R,q)),R.3o(q)}).74();M e},1M:a.1q?f:9(b,c){a(R).1j(9(){c||(!b||a.2t(b,[R]).19)&&a("*",R).2E(R).1j(9(){a(R).7d("1M")})})}}},a.1j(h.2g,9(b,c){T(!c)M d;O e=a.2g[b+p]=a.2g[b];a.2g[b]=9(){M c.2a(R,28)||e.2a(R,28)}}),a(b).7k("2X",9(){O b="46";a(1C).18(b+".1a",9(a){i={3u:a.3u,43:a.43,1A:b}})}),g.2U="2.0.7t",g.44=0,g.4Y="3I 7w 3v 55 46 2K 3c".2Z(" "),g.47=7D,g.2x={57:e,1g:e,49:d,U:{1o:d,13:"15",15:{1o:e,1B:e}},16:{1J:"P Q",2o:"1k 1m",12:e,1u:e,1Z:e,2n:{x:0,y:0,22:d,2m:d,7R:"7U"},1P:d},N:{12:e,1c:"3c",1P:d,25:3C,3d:e,2P:e},S:{12:e,1c:"2K",1P:d,25:0,2c:e,1T:e},14:{37:"",2l:e},3E:{1I:f,3U:f,N:f,S:f,27:f,2q:f,1L:f}},h.1w=9(a){O b=a.1D.1w;M"1e"===11 b?b:a.1D.1w=1E v(a)},h.1w.2z="1I",h.1w.2W=9(a){O b=a.U,c;b&&"1w"1Y b&&(c=b.1w,11 c!=="1e"&&(c=a.U.1w={2i:c}),"38"!==11 c.2r&&c.2r&&(c.2r=!!c.2r))},a.1i(d,g.2x,{U:{1w:{4J:d,2r:d}}}),h.17=9(a){O b=a.1D.17;M"1e"===11 b?b:a.1D.17=1E x(a)},h.17.2z="1I",h.17.2W=9(a){O b=a.14,c;b&&"17"1Y b&&(c=a.14.17,11 c!=="1e"&&(a.14.17={1h:c}),/1l|38/i.1z(11 c.1h)||(c.1h=d),11 c.V!=="2L"&&2B c.V,11 c.W!=="2L"&&2B c.W,11 c.1b!=="2L"&&c.1b!==d&&2B c.1b,11 c.Y!=="2L"&&2B c.Y)},a.1i(d,g.2x,{14:{17:{1h:d,3j:e,V:6,W:6,1b:d,Y:0}}}),h.3Z=9(b,c){9 l(a,b){O d=0,e=1,f=1,g=0,h=0,i=a.V,j=a.W;2V(i>0&&j>0&&e>0&&f>0){i=1d.3k(i/2),j=1d.3k(j/2),c.x==="Q"?e=i:c.x==="1m"?e=a.V-i:e+=1d.3k(i/2),c.y==="P"?f=j:c.y==="1k"?f=a.W-j:f+=1d.3k(j/2),d=b.19;2V(d--){T(b.19<2)2M;g=b[d][0]-a.Y.Q,h=b[d][1]-a.Y.P,(c.x==="Q"&&g>=e||c.x==="1m"&&g<=e||c.x==="1r"&&(ga.V-e)||c.y==="P"&&h>=f||c.y==="1k"&&h<=f||c.y==="1r"&&(ha.W-f))&&b.6C(d,1)}}M{Q:b[0][0],P:b[0][1]}}O d=b.13("3S").2h(),e=b.13("6L").2Z(","),f=[],g=a(\'3n[6T="#\'+b.71("4U").13("3W")+\'"]\'),h=g.Y(),i={V:0,W:0,Y:{P:3m,1m:0,1k:0,Q:3m}},j=0,k=0;h.Q+=1d.3i((g.3q()-g.V())/2),h.P+=1d.3i((g.33()-g.W())/2);T(d==="5a"){j=e.19;2V(j--)k=[1v(e[--j],10),1v(e[j+1],10)],k[0]>i.Y.1m&&(i.Y.1m=k[0]),k[0]i.Y.1k&&(i.Y.1k=k[1]),k[1]') diff --git a/src/core.js b/src/core.js index 8ab4c4bf..780f9fb9 100644 --- a/src/core.js +++ b/src/core.js @@ -293,12 +293,12 @@ function QTip(target, options, id, attr) function detectImages(next) { var images; - function imageLoad(event, i) { + function imageLoad(event) { // If queue is empty after image removal, update tooltip and continue the queue if((images = images.not(this)).length === 0) { self.redraw(); self.reposition(cache.event); - + next(); } } @@ -306,15 +306,17 @@ function QTip(target, options, id, attr) // Find all content images without dimensions, and if no images were found, continue if((images = elem.find('img:not([height]):not([width])')).length === 0) { return imageLoad.call(images); } - // Apply the callback to img events to ensure queue continues no matter what! - images.one(['abort','error','load','unload',''].join('.qtip-image '), imageLoad) - - // Apply a recursive method that polls the image for dimensions every 20ms - .each(function(i, elem) { + // Apply timer to each iamge to poll for dimensions + images.each(function(i, elem) { (function timer(){ + var timers = self.timers.img; + // When the dimensions are found, remove the image from the queue and stop timer - if(elem.height && elem.width) { return imageLoad.call(elem, NULL); } - self.timers.img[i] = setTimeout(timer, 20); + if(elem.height && elem.width) { + clearTimeout(timers[i]); + return imageLoad.call(elem); + } + timer = setTimeout(timers[i], 20); }()); }); } @@ -744,7 +746,9 @@ function QTip(target, options, id, attr) set: function(option, value) { var rmove = /^position\.(my|at|adjust|target|container)|style|content|show\.ready/i, + rdraw = /^content\.(title|attr)|style/i, reposition = FALSE, + redraw = FALSE, checks = self.checks, name; @@ -775,9 +779,12 @@ function QTip(target, options, id, attr) previous = obj[0][ obj[1] ]; obj[0][ obj[1] ] = 'object' === typeof value && value.nodeType ? $(value) : value; - // Set the new params for the callback and test it against reposition + // Set the new params for the callback option[notation] = [obj[0], obj[1], value, previous]; + + // Also check if we need to reposition / redraw reposition = rmove.test(notation) || reposition; + redraw = rdraw.test(notation) || redraw; }); // Re-sanitize options @@ -786,12 +793,15 @@ function QTip(target, options, id, attr) /* * Execute any valid callbacks for the set options * Also set isPositioning/isDrawing so we don't get loads of redundant repositioning - * and redraw calls + * and redraw calls. */ isPositioning = isDrawing = 1; $.each(option, callback); isPositioning = isDrawing = 0; - // Update position on ANY style/position/content change if shown and rendered - if(reposition && tooltip.is(':visible') && self.rendered) { self.reposition(); } + // Update position / redraw if needed + if(tooltip.is(':visible') && self.rendered) { + if(reposition) { self.reposition(); } + if(redraw) { self.redraw(); } + } return self; },