From 78c2ff7cde5ace01bba5be12cf16f0705714bcf0 Mon Sep 17 00:00:00 2001 From: Craig Michael Thompson Date: Fri, 22 Apr 2011 20:44:29 +0100 Subject: [PATCH] Content functions are now called every time the tooltip is toggled (shown) --- dist/jquery.qtip.basic.js | 13 ++++++++----- dist/jquery.qtip.css | 2 +- dist/jquery.qtip.js | 13 ++++++++----- dist/jquery.qtip.min.js | 4 ++-- dist/jquery.qtip.pack.js | 4 ++-- src/core.js | 11 +++++++---- 6 files changed, 28 insertions(+), 19 deletions(-) diff --git a/dist/jquery.qtip.basic.js b/dist/jquery.qtip.basic.js index bd9c6d89..2349dba2 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 22 20:26:38 2011 +0100 +* Date: Fri Apr 22 20:28:01 2011 +0100 */ "use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/ @@ -314,6 +314,7 @@ function QTip(target, options, id, attr) function updateContent(content, reposition) { var elem = elements.content; + content = content || options.content.text; // Make sure tooltip is rendered and content is defined. If not return if(!self.rendered || !content) { return FALSE; } @@ -673,8 +674,7 @@ function QTip(target, options, id, attr) { if(self.rendered) { return self; } // If tooltip has already been rendered, exit - var content = options.content.text, - title = options.content.title.text, + var title = options.content.title.text, callback = $.Event('tooltiprender'); // Add ARIA attributes to target @@ -716,7 +716,7 @@ function QTip(target, options, id, attr) } // Set proper rendered flag and update content - updateContent(content); + updateContent(); self.rendered = TRUE; // Setup widget classes @@ -896,7 +896,10 @@ function QTip(target, options, id, attr) // Focus the tooltip self.focus(event); - // Update tooltip position + // Update tooltip content if it's a dynamic function + if($.isFunction(options.content.text)) { updateContent(); } + + // Update the tooltip position self.reposition(event); // Hide other tooltips if tooltip is solo, using it as the context diff --git a/dist/jquery.qtip.css b/dist/jquery.qtip.css index 7f33361f..af93ce73 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 22 20:26:38 2011 +0100 +* Date: Fri Apr 22 20:28:01 2011 +0100 */ /* Fluid class for determining actual width in IE */ diff --git a/dist/jquery.qtip.js b/dist/jquery.qtip.js index 4e70b82c..81e75965 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 22 20:26:38 2011 +0100 +* Date: Fri Apr 22 20:28:01 2011 +0100 */ "use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/ @@ -314,6 +314,7 @@ function QTip(target, options, id, attr) function updateContent(content, reposition) { var elem = elements.content; + content = content || options.content.text; // Make sure tooltip is rendered and content is defined. If not return if(!self.rendered || !content) { return FALSE; } @@ -673,8 +674,7 @@ function QTip(target, options, id, attr) { if(self.rendered) { return self; } // If tooltip has already been rendered, exit - var content = options.content.text, - title = options.content.title.text, + var title = options.content.title.text, callback = $.Event('tooltiprender'); // Add ARIA attributes to target @@ -716,7 +716,7 @@ function QTip(target, options, id, attr) } // Set proper rendered flag and update content - updateContent(content); + updateContent(); self.rendered = TRUE; // Setup widget classes @@ -896,7 +896,10 @@ function QTip(target, options, id, attr) // Focus the tooltip self.focus(event); - // Update tooltip position + // Update tooltip content if it's a dynamic function + if($.isFunction(options.content.text)) { updateContent(); } + + // Update the tooltip position self.reposition(event); // Hide other tooltips if tooltip is solo, using it as the context diff --git a/dist/jquery.qtip.min.js b/dist/jquery.qtip.min.js index 8f2fca5e..52fb36a3 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 22 20:26:38 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,g=c.options.show.modal,h=c.elements,i=h.tooltip,j="#qtip-overlay",k=".qtipmodal",l;c.checks.modal={"^show.modal.(on|blur)$":function(){f.init(),h.overlay.toggle(i.is(":visible"))}},a.extend(f,{init:function(){if(!g.on)return f;i.unbind(k).unbind(k+c.id).bind("tooltipshow"+k+" tooltiphide"+k,function(b,c,d){var e=b.type.replace("tooltip","");a.isFunction(g[e])?g[e].call(h.overlay,d,c):f[e](d)}).bind("tooltipfocus",function(a,b,c){l.css("z-index",c-1)}),f.create(),h.overlay.css("cursor",g.blur?"pointer":""),g.blur===d&&h.overlay.bind("click"+k+c.id,function(){c.hide.call(c)});return f},create:function(){var c=a(j);if(c.length){h.overlay=c;return c}l=h.overlay=a("
",{id:j.substr(1),css:{position:"absolute",top:0,left:0,display:"none"},mousedown:function(){return e}}).appendTo(document.body),a(b).bind("resize"+k,function(){l.css({height:Math.max(a(b).height(),a(document).height()),width:Math.max(a(b).width(),a(document).width())})}).trigger("resize");return l},toggle:function(b){var g=c.options.show.modal.effect,h=b?"show":"hide",i;l||(l=f.create());if(!l.is(":animated")||b){l.stop(d,e),a.isFunction(g)?g.call(l,b):g===e?l[h]():l.fadeTo(90,b?.7:0,function(){b||a(this).hide()});return f}},show:function(){return f.toggle(d)},hide:function(){return f.toggle(e)},destroy:function(){var d=l;d&&(a(j).each(function(){var b=a(this).data("qtip");if(b&&b.id!==b.id&&b.options.show.modal)return d=e}),d?(h.overlay.remove(),a(b).unbind(k)):h.overlay.unbind(k+c.id));return i.unbind(k)}}),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(f,g,h,l){if(k.tip){var n=a.extend({},i.corner),o=h.adjusted,p=b.options.position.adjust.method.split(" "),q=p[0],r=p[1]||p[0],s={left:e,top:e,x:0,y:0},t,u={},v;i.corner.fixed!==d&&(q==="shift"&&n.precedance==="x"&&o.left&&n.y!=="center"?n.precedance=n.precedance==="x"?"y":"x":q==="flip"&&o.left&&(n.x=n.x==="center"?o.left>0?"left":"right":n.x==="left"?"right":"left"),r==="shift"&&n.precedance==="y"&&o.top&&n.x!=="center"?n.precedance=n.precedance==="y"?"x":"y":r==="flip"&&o.top&&(n.y=n.y==="center"?o.top>0?"top":"bottom":n.y==="top"?"bottom":"top"),n.string()!==m.corner&&(m.top!==o.top||m.left!==o.left)&&i.update(n,e)),t=i.position(n,o),t.right!==c&&(t.left=-t.right),t.bottom!==c&&(t.top=-t.bottom),t.user=Math.max(0,j.offset);if(s.left=q==="shift"&&!!o.left)n.x==="center"?u["margin-left"]=s.x=t["margin-left"]-o.left:(v=t.right!==c?[o.left,-t.left]:[-o.left,t.left],(s.x=Math.max(v[0],v[1]))>v[0]&&(h.left-=o.left,s.left=e),u[t.right!==c?"right":"left"]=s.x);if(s.top=r==="shift"&&!!o.top)n.y==="center"?u["margin-top"]=s.y=t["margin-top"]-o.top:(v=t.bottom!==c?[o.top,-t.top]:[-o.top,t.top],(s.y=Math.max(v[0],v[1]))>v[0]&&(h.top-=o.top,s.top=e),u[t.bottom!==c?"bottom":"top"]=s.y);k.tip.css(u).toggle(!(s.x&&s.y||n.x==="center"&&s.y||n.y==="center"&&s.x)),h.left-=t.left.charAt?t.user:q!=="shift"||s.top||!s.left&&!s.top?t.left:0,h.top-=t.top.charAt?t.user:r!=="shift"||s.left||!s.left&&!s.top?t.top:0,m.left=o.left,m.top=o.top,m.corner=n.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,i.position={},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,c){var g=k.tip,l=g.children(),m=n.width,q=n.height,s="px solid ",u="px dashed transparent",x=j.mimic,y=Math.round,z,A,B,C,D;b||(b=i.corner),x===e?x=b:(x=new h.Corner(x),x.precedance=b.precedance,x.x==="inherit"?x.x=b.x:x.y==="inherit"?x.y=b.y:x.x===x.y&&(x[b.precedance]=b[b.precedance])),z=x.precedance,i.detectColours(),p=o.border==="transparent"||o.border==="#123456"?0:j.border===d?t(b,f,d):j.border,B=w(x,m,q),D=v(b),g.css(D),b.precedance==="y"?C=[y(x.x==="left"?p:x.x==="right"?D.width-m-p:(D.width-m)/2),y(x.y==="top"?D.height-q:0)]:C=[y(x.x==="left"?D.width-m:0),y(x.y==="top"?p:x.y==="bottom"?D.height-q-p:(D.height-q)/2)],r?(l.attr(D),A=l[0].getContext("2d"),A.restore(),A.save(),A.clearRect(0,0,3e3,3e3),A.translate(C[0],C[1]),A.beginPath(),A.moveTo(B[0][0],B[0][1]),A.lineTo(B[1][0],B[1][1]),A.lineTo(B[2][0],B[2][1]),A.closePath(),A.fillStyle=o.fill,A.strokeStyle=o.border,A.lineWidth=p*2,A.lineJoin="miter",A.miterLimit=100,A.stroke(),A.fill()):(B="m"+B[0][0]+","+B[0][1]+" l"+B[1][0]+","+B[1][1]+" "+B[2][0]+","+B[2][1]+" xe",C[2]=p&&/^(r|b)/i.test(b.string())?parseFloat(a.browser.version,10)===8?2:1:0,l.css({antialias:""+(x.string().indexOf("center")>-1),left:C[0]-C[2]*Number(z==="x"),top:C[1]-C[2]*Number(z==="y"),width:m+p,height:q+p}).each(function(b){var c=a(this);c.attr({coordsize:m+p+" "+(q+p),path:B,fillcolor:o.fill,filled:!!b,stroked:!b}).css({display:p||b?"block":"none"}),!b&&p>0&&c.html()===""&&c.html('')})),c!==e&&i.position(b)},position:function(b){var c=k.tip,f={},g=Math.max(0,j.offset),h,l,m;if(j.corner===e||!c)return e;b=b||i.corner,h=b.precedance,l=v(b),m=[b.x,b.y],h==="x"&&m.reverse(),a.each(m,function(a,c){var e,i;c==="center"?(e=h==="y"?"left":"top",f[e]="50%",f["margin-"+e]=-Math.round(l[h==="y"?"width":"height"]/2)+g):(e=t(b,c,d),i=u(b),f[c]=a?t(b,c):g+(i>e?i:0))}),f[b[h]]-=l[h==="x"?"width":"height"],c.css({top:"",bottom:"",left:"",right:"",margin:""}).css(f);return f},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"?c.init():g&&g.url?c.load():f.unbind(h)}},a.extend(c,{init:function(){g&&g.url&&f.unbind(h)[g.once?"one":"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(c,o,p,r){function K(c,d,e,f){f=parseInt(f,10)!==0;var g=".qtip-"+p,h={show:c&&o.show.target[0],hide:d&&o.hide.target[0],tooltip:e&&t.rendered&&z.tooltip[0],content:e&&t.rendered&&z.content[0],container:f&&o.position.container[0]===u?document:o.position.container[0],window:f&&b};t.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&&o.show.target.unbind(g+"-create")}function J(d,f,h,j){function B(a){y.is(":visible")&&t.reposition(a)}function A(a){if(y.hasClass(l))return e;clearTimeout(t.timers.inactive),t.timers.inactive=setTimeout(function(){t.hide(a)},o.hide.inactive)}function x(b){if(y.hasClass(l))return e;var c=a(b.relatedTarget||b.target),d=c.closest(m)[0]===y[0],f=c[0]===q.show[0];clearTimeout(t.timers.show),clearTimeout(t.timers.hide);if(n.target==="mouse"&&d||o.hide.fixed&&(/mouse(out|leave|move)/.test(b.type)&&(d||f))){b.stopPropagation(),b.preventDefault();return e}o.hide.delay>0?t.timers.hide=setTimeout(function(){t.hide(b)},o.hide.delay):t.hide(b)}function w(a){if(y.hasClass(l))return e;q.show.trigger("qtip-"+p+"-inactive"),clearTimeout(t.timers.show),clearTimeout(t.timers.hide);var b=function(){t.show(a)};o.show.delay>0?t.timers.show=setTimeout(b,o.show.delay):b()}var k=".qtip-"+p,n=o.position,q={show:o.show.target,hide:o.hide.target,container:n.container[0]===u?a(document):n.container,doc:a(document)},r={show:a.trim(""+o.show.event).split(" "),hide:a.trim(""+o.hide.event).split(" ")},s=a.browser.msie&&parseInt(a.browser.version,10)===6,v;h&&(o.hide.fixed&&(q.hide=q.hide.add(y),y.bind("mouseover"+k,function(){y.hasClass(l)||clearTimeout(t.timers.hide)})),n.target==="mouse"&&n.adjust.mouse&&o.hide.event&&y.bind("mouseleave"+k,function(a){(a.relatedTarget||a.target)!==q.show[0]&&t.hide(a)}),y.bind("mouseenter"+k+" mouseleave"+k,function(a){t[a.type==="mouseenter"?"focus":"blur"](a)})),f&&("number"===typeof o.hide.inactive&&(q.show.bind("qtip-"+p+"-inactive",A),a.each(g.inactiveEvents,function(a,b){q.hide.add(z.tooltip).bind(b+k+"-inactive",A)})),a.each(r.hide,function(b,c){var d=a.inArray(c,r.show),e=a(q.hide);d>-1&&e.add(q.show).length===e.length||c==="unfocus"?(q.show.bind(c+k,function(a){y.is(":visible")?x(a):w(a)}),delete r.show[d]):q.hide.bind(c+k,x)})),d&&a.each(r.show,function(a,b){q.show.bind(b+k,w)}),j&&((n.adjust.resize||n.viewport)&&a(a.event.special.resize?n.viewport:b).bind("resize"+k,B),(n.viewport||s&&y.css("position")==="fixed")&&a(n.viewport).bind("scroll"+k,B),/unfocus/i.test(o.hide.event)&&q.doc.bind("mousedown"+k,function(b){var d=a(b.target);d.parents(m).length===0&&d.add(c).length>1&&y.is(":visible")&&!y.hasClass(l)&&t.hide(b)}),o.hide.leave&&/mouseleave|mouseout/i.test(o.hide.event)&&a(b).bind("blur"+k+" mouse"+(o.hide.leave.indexOf("frame")>-1?"out":"leave")+k,function(a){a.relatedTarget||t.hide(a)}),n.target==="mouse"&&q.doc.bind("mousemove"+k,function(a){n.adjust.mouse&&!y.hasClass(l)&&y.is(":visible")&&t.reposition(a||i)}))}function I(b,d){function g(a){function c(c){(b=b.not(this)).length===0&&(t.redraw(),t.reposition(A.event),a())}var b;if((b=f.find("img:not([height]):not([width])")).length===0)return c.call(b);b.each(function(a,b){(function d(){var e=t.timers.img;if(b.height&&b.width){clearTimeout(e[a]);return c.call(b)}e[a]=setTimeout(d,20)})()})}var f=z.content;if(!t.rendered||!b)return e;a.isFunction(b)&&(b=b.call(c,t)||""),b.jquery&&b.length>0?f.empty().append(b.css({display:"block"})):f.html(b),t.rendered<0?y.queue("fx",g):(x=0,g(a.noop));return t}function H(b){var d=z.title;if(!t.rendered||!b)return e;a.isFunction(b)&&(b=b.call(c,t)||""),b.jquery&&b.length>0?d.empty().append(b.css({display:"block"})):d.html(b),t.redraw(),t.rendered&&y.is(":visible")&&t.reposition(A.event)}function G(a){var b=z.button,c=z.title;if(!t.rendered)return e;a?(c||F(),E()):b.remove()}function F(){var b=v+"-title";z.titlebar&&D(),z.titlebar=a("
",{"class":j+"-titlebar "+(o.style.widget?"ui-widget-header":"")}).append(z.title=a("
",{id:b,"class":j+"-title","aria-atomic":d})).insertBefore(z.content),o.content.title.button?E():t.rendered&&t.redraw()}function E(){var b=o.content.title.button,c=typeof b==="string",d=c?b:"Close tooltip";z.button&&z.button.remove(),b.jquery?z.button=b:z.button=a("",{"class":"ui-state-default "+(o.style.widget?"":j+"-icon"),title:d,"aria-label":d}).prepend(a("",{"class":"ui-icon ui-icon-close",html:"×"})),z.button.appendTo(z.titlebar).attr("role","button").hover(function(b){a(this).toggleClass("ui-state-hover",b.type==="mouseenter")}).click(function(a){y.hasClass(l)||t.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")}),t.redraw()}function D(){z.title&&(z.titlebar.remove(),z.titlebar=z.title=z.button=f,t.reposition())}function C(){var a=o.style.widget;y.toggleClass(k,a),z.content.toggleClass(k+"-content",a),z.titlebar&&z.titlebar.toggleClass(k+"-header",a),z.button&&z.button.toggleClass(j+"-icon",!a)}function B(a){var b=0,c,d=o,e=a.split(".");while(d=d[e[b++]])b0&&!a("#"+i).length&&(y[0].id=i,z.content[0].id=i+"-content",z.title[0].id=i+"-title")},"^content.text$":function(a,b,c){I(c)},"^content.title.text$":function(a,b,c){if(!c)return D();!z.title&&c&&F(),H(c)},"^content.title.button$":function(a,b,c){G(c)},"^position.(my|at)$":function(a,b,c){"string"===typeof c&&(a[b]=new h.Corner(c))},"^position.container$":function(a,b,c){t.rendered&&y.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),K.apply(t,f),J.apply(t,[1,1,0,0])},"^show.ready$":function(){t.rendered?t.show():t.render(1)},"^style.classes$":function(b,c,d){a.attr(y[0],"class",j+" qtip ui-helper-reset "+d)},"^style.widget|content.title":C,"^events.(render|show|move|hide|focus|blur)$":function(b,c,d){y[(a.isFunction(d)?"":"un")+"bind"]("tooltip"+c,d)}},a.extend(t,{render:function(b){if(t.rendered)return t;var f=o.content.text,g=o.content.title.text,i=a.Event("tooltiprender");a.attr(c[0],"aria-describedby",v),y=z.tooltip=a("
",{id:v,"class":j+" qtip ui-helper-reset "+o.style.classes,width:o.style.width||"",role:"alert","aria-live":"polite","aria-atomic":e,"aria-describedby":v+"-content","aria-hidden":d}).toggleClass(l,A.disabled).data("qtip",t).appendTo(o.position.container).append(z.content=a("
",{"class":j+"-content",id:v+"-content","aria-atomic":d})),t.rendered=-1,x=1,g&&(F(),H(g)),I(f),t.rendered=d,C(),a.each(o.events,function(b,c){a.isFunction(c)&&y.bind(b==="toggle"?"tooltipshow tooltiphide":"tooltip"+b,c)}),a.each(h,function(){this.initialize==="render"&&this(t)}),J(1,1,1,1),y.queue("fx",function(a){i.originalEvent=A.event,y.trigger(i,[t]),x=0,t.redraw(),(o.show.ready||b)&&t.show(A.event),a()});return t},get:function(a){var b,c;switch(a.toLowerCase()){case"dimensions":b={height:y.outerHeight(),width:y.outerWidth()};break;case"offset":b=h.offset(y,o.position.container);break;default:c=B(a.toLowerCase()),b=c[0][c[1]],b=b.precedance?b.string():b}return b},set:function(b,c){function m(a,b){var c,d,e;for(c in k)for(d in k[c])if(e=(new RegExp(d,"i")).exec(a))b.push(e),k[c][d].apply(t,b)}var g=/^position\.(my|at|adjust|target|container)|style|content|show\.ready/i,h=/^content\.(title|attr)|style/i,i=e,j=e,k=t.checks,l;"string"===typeof b?(l=b,b={},b[l]=c):b=a.extend(d,{},b),a.each(b,function(c,d){var e=B(c.toLowerCase()),f;f=e[0][e[1]],e[0][e[1]]="object"===typeof d&&d.nodeType?a(d):d,b[c]=[e[0],e[1],d,f],i=g.test(c)||i,j=h.test(c)||j}),s(o),w=x=1,a.each(b,m),w=x=0,y.is(":visible")&&t.rendered&&(i&&t.reposition(o.position.target==="mouse"?f:A.event),j&&t.redraw());return t},toggle:function(b,c){function j(){b?(a.browser.msie&&y[0].style.removeAttribute("filter"),y.css("overflow","")):y.css({display:"",visibility:"",width:"",opacity:"",left:"",top:""})}if(!t.rendered)if(b)t.render(1);else return t;var d=b?"show":"hide",g=o[d],h=y.is(":visible"),i;(typeof b).search("boolean|number")&&(b=!h);if(h===b)return t;if(c){if(/over|enter/.test(c.type)&&/out|leave/.test(A.event.type)&&c.target===o.show.target[0]&&y.has(c.relatedTarget).length)return t;A.event=a.extend({},c)}i=a.Event("tooltip"+d),i.originalEvent=c?A.event:f,y.trigger(i,[t,90]);if(i.isDefaultPrevented())return t;a.attr(y[0],"aria-hidden",!b),b?(t.focus(c),t.reposition(c),g.solo&&a(m,g.solo).not(y).qtip("hide",i)):(clearTimeout(t.timers.show),t.blur(c)),y.stop(0,1),a.isFunction(g.effect)?(g.effect.call(y,t),y.queue("fx",function(a){j(),a()})):g.effect===e?(y[d](),j.call(y)):y.fadeTo(90,b?1:0,j),b&&g.target.trigger("qtip-"+p+"-inactive");return t},show:function(a){return t.toggle(d,a)},hide:function(a){return t.toggle(e,a)},focus:function(b){if(!t.rendered)return t;var c=a(m),d=parseInt(y[0].style.zIndex,10),e=g.zindex+c.length,f=a.extend({},b),h,i;y.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,y.trigger(i,[t,e]),i.isDefaultPrevented()||(y.addClass(n)[0].style.zIndex=e));return t},blur:function(b){var c=a.extend({},b),d;y.removeClass(n),d=a.Event("tooltipblur"),d.originalEvent=c,y.trigger(d,[t]);return t},reposition:function(c,d){if(!t.rendered||w)return t;w=1;var f=o.position.target,g=o.position,k=g.my,l=g.at,m=g.adjust,n=m.method.split(" "),p=y.outerWidth(),q=y.outerHeight(),r=0,s=0,v=a.Event("tooltipmove"),x=y.css("position")==="fixed",z=g.viewport.jquery?g.viewport:a(b),B={left:0,top:0},C=(t.plugins.tip||{}).corner,D={horizontal:n[0],vertical:n[1]||n[0],tip:o.style.tip,left:function(a){var b=z.offset.left+z.scrollLeft,c=k.x==="left"?p:k.x==="right"?-p:-p/2,d=l.x==="left"?r:l.x==="right"?-r:-r/2,e=C&&C.precedance==="y"?D.tip.width+D.tip.border*2:0,f=b-a-e,g=a+p-z.width-b+e,h=c-(k.precedance==="x"||k.x===k.y?d:0),i=k.x==="center";D.horizontal==="shift"?(B.left+=f>0?f:g>0?-g:0,B.left=Math.min(Math.max(b,B.left),Math.max(f>0?-1e9:0,b+z.width-p))):(f>0&&(k.x!=="left"||g>0)?B.left-=h+(i?0:2*m.x):g>0&&(k.x!=="right"||f>0)&&(B.left-=i?-h:h+2*m.x),B.left!==a&&i&&(B.left-=m.x),B.leftg&&(B.left=a));return B.left-a},top:function(a){var b=z.offset.top+z.scrollTop,c=k.y==="top"?q:k.y==="bottom"?-q:-q/2,d=l.y==="top"?s:l.y==="bottom"?-s:-s/2,e=C&&C.precedance==="x"?D.tip.height+D.tip.border*2:0,f=b-a-e,g=a+q-z.height-b+e,h=c-(k.precedance==="y"||k.x===k.y?d:0),i=k.y==="center";D.vertical==="shift"?(B.top+=f>0?f:g>0?-g:0,B.top=Math.min(Math.max(b,B.top),Math.max(f>0?-1e9:0,b+z.height-q))):(f>0&&(k.y!=="top"||g>0)?B.top-=h+(i?0:2*m.y):g>0&&(k.y!=="bottom"||f>0)&&(B.top-=i?-h:h+2*m.y),B.top!==a&&i&&(B.top-=m.y),B.top<0&&-B.top>g&&(B.top=a));return B.top-a}};z=z?{elem:z,height:z[(z[0]===b?"h":"outerH")+"eight"](),width:z[(z[0]===b?"w":"outerW")+"idth"](),scrollLeft:z.scrollLeft(),scrollTop:z.scrollTop(),offset:z.offset()||{left:0,top:0}}:e;if(f==="mouse")l={x:"left",y:"top"},c=c&&(c.type==="resize"||c.type==="scroll")?A.event:m.mouse||!c||!c.pageX||/over|enter$/i.test(c.type)&&!m.mouse?a.extend({},i):c,B={top:c.pageY,left:c.pageX};else{f==="event"&&(c&&c.target&&c.type!=="scroll"&&c.type!=="resize"?f=A.target=a(c.target):f=A.target),f=a(f).eq(0);if(f.length===0)return t;f[0]===document||f[0]===b?(r=f.width(),s=f.height(),f[0]===b&&(B={top:!x||h.iOS?z.scrollTop:0,left:!x||h.iOS?z.scrollLeft:0})):f.is("area")&&h.imagemap?B=h.imagemap(f,l):f[0].namespaceURI=="http://www.w3.org/2000/svg"&&h.svg?B=h.svg(f,l):(r=f.outerWidth(),s=f.outerHeight(),B=h.offset(f,g.container)),B.offset&&(r=B.width,s=B.height,B=B.offset),B.left+=l.x==="right"?r:l.x==="center"?r/2:0,B.top+=l.y==="bottom"?s:l.y==="center"?s/2:0}B.left+=m.x+(k.x==="right"?-p:k.x==="center"?-p/2:0),B.top+=m.y+(k.y==="bottom"?-q:k.y==="center"?-q/2:0),g.viewport.jquery&&f[0]!==b&&f[0]!==u?B.adjusted={left:D.horizontal!=="none"?D.left(B.left):0,top:D.vertical!=="none"?D.top(B.top):0}:B.adjusted={left:0,top:0},y.attr("class",function(b,c){return a.attr(this,"class").replace(/ui-tooltip-pos-\w+/i,"")}).addClass(j+"-pos-"+k.abbreviation()),v.originalEvent=a.extend({},c),y.trigger(v,[t,B,z.elem]);if(v.isDefaultPrevented())return t;delete B.adjusted,d===e||isNaN(B.left)||isNaN(B.top)||!a.isFunction(g.effect)?y.css(B):a.isFunction(g.effect)&&(g.effect.call(y,t,a.extend({},B)),y.queue(function(b){a(this).css({opacity:"",height:""}),a.browser.msie&&this.style.removeAttribute("filter"),b()})),w=0;return t},redraw:function(){if(t.rendered<1||o.style.width||x)return t;var b=j+"-fluid",c,d,e;x=1,y.css("width","").addClass(b),c=y.width()+(a.browser.mozilla?1:0),d=parseInt(y.css("max-width"),10)||0,e=parseInt(y.css("min-width"),10)||0,c=d+e?Math.min(Math.max(c,e),d):c,y.css("width",c).removeClass(b),x=0;return t},disable:function(b){var c=l;"boolean"!==typeof b&&(b=!y.hasClass(c)&&!A.disabled),t.rendered?(y.toggleClass(c,b),a.attr(y[0],"aria-disabled",b)):A.disabled=!!b;return t},enable:function(){return t.disable(e)},destroy:function(){var b=c[0],d=a.attr(b,q);t.rendered&&(y.remove(),a.each(t.plugins,function(){this.destroy&&this.destroy()})),clearTimeout(t.timers.show),clearTimeout(t.timers.hide),K(1,1,1,1),a.removeData(b,"qtip"),d&&(a.attr(b,"title",d),c.removeAttr(q)),c.removeAttr("aria-describedby").unbind(".qtip");return c}})}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<4.1&&h.iOS>3.1&&k(a(b),-1)}return e},iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,3})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_","."))||e,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(document).bind("mousemove.qtip",function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),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 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,leave:"window"},style:{classes:"",widget:e,width: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,g=c.options.show.modal,h=c.elements,i=h.tooltip,j="#qtip-overlay",k=".qtipmodal",l;c.checks.modal={"^show.modal.(on|blur)$":function(){f.init(),h.overlay.toggle(i.is(":visible"))}},a.extend(f,{init:function(){if(!g.on)return f;i.unbind(k).unbind(k+c.id).bind("tooltipshow"+k+" tooltiphide"+k,function(b,c,d){var e=b.type.replace("tooltip","");a.isFunction(g[e])?g[e].call(h.overlay,d,c):f[e](d)}).bind("tooltipfocus",function(a,b,c){l.css("z-index",c-1)}),f.create(),h.overlay.css("cursor",g.blur?"pointer":""),g.blur===d&&h.overlay.bind("click"+k+c.id,function(){c.hide.call(c)});return f},create:function(){var c=a(j);if(c.length){h.overlay=c;return c}l=h.overlay=a("
",{id:j.substr(1),css:{position:"absolute",top:0,left:0,display:"none"},mousedown:function(){return e}}).appendTo(document.body),a(b).bind("resize"+k,function(){l.css({height:Math.max(a(b).height(),a(document).height()),width:Math.max(a(b).width(),a(document).width())})}).trigger("resize");return l},toggle:function(b){var g=c.options.show.modal.effect,h=b?"show":"hide",i;l||(l=f.create());if(!l.is(":animated")||b){l.stop(d,e),a.isFunction(g)?g.call(l,b):g===e?l[h]():l.fadeTo(90,b?.7:0,function(){b||a(this).hide()});return f}},show:function(){return f.toggle(d)},hide:function(){return f.toggle(e)},destroy:function(){var d=l;d&&(a(j).each(function(){var b=a(this).data("qtip");if(b&&b.id!==b.id&&b.options.show.modal)return d=e}),d?(h.overlay.remove(),a(b).unbind(k)):h.overlay.unbind(k+c.id));return i.unbind(k)}}),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(f,g,h,l){if(k.tip){var n=a.extend({},i.corner),o=h.adjusted,p=b.options.position.adjust.method.split(" "),q=p[0],r=p[1]||p[0],s={left:e,top:e,x:0,y:0},t,u={},v;i.corner.fixed!==d&&(q==="shift"&&n.precedance==="x"&&o.left&&n.y!=="center"?n.precedance=n.precedance==="x"?"y":"x":q==="flip"&&o.left&&(n.x=n.x==="center"?o.left>0?"left":"right":n.x==="left"?"right":"left"),r==="shift"&&n.precedance==="y"&&o.top&&n.x!=="center"?n.precedance=n.precedance==="y"?"x":"y":r==="flip"&&o.top&&(n.y=n.y==="center"?o.top>0?"top":"bottom":n.y==="top"?"bottom":"top"),n.string()!==m.corner&&(m.top!==o.top||m.left!==o.left)&&i.update(n,e)),t=i.position(n,o),t.right!==c&&(t.left=-t.right),t.bottom!==c&&(t.top=-t.bottom),t.user=Math.max(0,j.offset);if(s.left=q==="shift"&&!!o.left)n.x==="center"?u["margin-left"]=s.x=t["margin-left"]-o.left:(v=t.right!==c?[o.left,-t.left]:[-o.left,t.left],(s.x=Math.max(v[0],v[1]))>v[0]&&(h.left-=o.left,s.left=e),u[t.right!==c?"right":"left"]=s.x);if(s.top=r==="shift"&&!!o.top)n.y==="center"?u["margin-top"]=s.y=t["margin-top"]-o.top:(v=t.bottom!==c?[o.top,-t.top]:[-o.top,t.top],(s.y=Math.max(v[0],v[1]))>v[0]&&(h.top-=o.top,s.top=e),u[t.bottom!==c?"bottom":"top"]=s.y);k.tip.css(u).toggle(!(s.x&&s.y||n.x==="center"&&s.y||n.y==="center"&&s.x)),h.left-=t.left.charAt?t.user:q!=="shift"||s.top||!s.left&&!s.top?t.left:0,h.top-=t.top.charAt?t.user:r!=="shift"||s.left||!s.left&&!s.top?t.top:0,m.left=o.left,m.top=o.top,m.corner=n.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,i.position={},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,c){var g=k.tip,l=g.children(),m=n.width,q=n.height,s="px solid ",u="px dashed transparent",x=j.mimic,y=Math.round,z,A,B,C,D;b||(b=i.corner),x===e?x=b:(x=new h.Corner(x),x.precedance=b.precedance,x.x==="inherit"?x.x=b.x:x.y==="inherit"?x.y=b.y:x.x===x.y&&(x[b.precedance]=b[b.precedance])),z=x.precedance,i.detectColours(),p=o.border==="transparent"||o.border==="#123456"?0:j.border===d?t(b,f,d):j.border,B=w(x,m,q),D=v(b),g.css(D),b.precedance==="y"?C=[y(x.x==="left"?p:x.x==="right"?D.width-m-p:(D.width-m)/2),y(x.y==="top"?D.height-q:0)]:C=[y(x.x==="left"?D.width-m:0),y(x.y==="top"?p:x.y==="bottom"?D.height-q-p:(D.height-q)/2)],r?(l.attr(D),A=l[0].getContext("2d"),A.restore(),A.save(),A.clearRect(0,0,3e3,3e3),A.translate(C[0],C[1]),A.beginPath(),A.moveTo(B[0][0],B[0][1]),A.lineTo(B[1][0],B[1][1]),A.lineTo(B[2][0],B[2][1]),A.closePath(),A.fillStyle=o.fill,A.strokeStyle=o.border,A.lineWidth=p*2,A.lineJoin="miter",A.miterLimit=100,A.stroke(),A.fill()):(B="m"+B[0][0]+","+B[0][1]+" l"+B[1][0]+","+B[1][1]+" "+B[2][0]+","+B[2][1]+" xe",C[2]=p&&/^(r|b)/i.test(b.string())?parseFloat(a.browser.version,10)===8?2:1:0,l.css({antialias:""+(x.string().indexOf("center")>-1),left:C[0]-C[2]*Number(z==="x"),top:C[1]-C[2]*Number(z==="y"),width:m+p,height:q+p}).each(function(b){var c=a(this);c.attr({coordsize:m+p+" "+(q+p),path:B,fillcolor:o.fill,filled:!!b,stroked:!b}).css({display:p||b?"block":"none"}),!b&&p>0&&c.html()===""&&c.html('')})),c!==e&&i.position(b)},position:function(b){var c=k.tip,f={},g=Math.max(0,j.offset),h,l,m;if(j.corner===e||!c)return e;b=b||i.corner,h=b.precedance,l=v(b),m=[b.x,b.y],h==="x"&&m.reverse(),a.each(m,function(a,c){var e,i;c==="center"?(e=h==="y"?"left":"top",f[e]="50%",f["margin-"+e]=-Math.round(l[h==="y"?"width":"height"]/2)+g):(e=t(b,c,d),i=u(b),f[c]=a?t(b,c):g+(i>e?i:0))}),f[b[h]]-=l[h==="x"?"width":"height"],c.css({top:"",bottom:"",left:"",right:"",margin:""}).css(f);return f},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"?c.init():g&&g.url?c.load():f.unbind(h)}},a.extend(c,{init:function(){g&&g.url&&f.unbind(h)[g.once?"one":"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(c,o,p,r){function K(c,d,e,f){f=parseInt(f,10)!==0;var g=".qtip-"+p,h={show:c&&o.show.target[0],hide:d&&o.hide.target[0],tooltip:e&&t.rendered&&z.tooltip[0],content:e&&t.rendered&&z.content[0],container:f&&o.position.container[0]===u?document:o.position.container[0],window:f&&b};t.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&&o.show.target.unbind(g+"-create")}function J(d,f,h,j){function B(a){y.is(":visible")&&t.reposition(a)}function A(a){if(y.hasClass(l))return e;clearTimeout(t.timers.inactive),t.timers.inactive=setTimeout(function(){t.hide(a)},o.hide.inactive)}function x(b){if(y.hasClass(l))return e;var c=a(b.relatedTarget||b.target),d=c.closest(m)[0]===y[0],f=c[0]===q.show[0];clearTimeout(t.timers.show),clearTimeout(t.timers.hide);if(n.target==="mouse"&&d||o.hide.fixed&&(/mouse(out|leave|move)/.test(b.type)&&(d||f))){b.stopPropagation(),b.preventDefault();return e}o.hide.delay>0?t.timers.hide=setTimeout(function(){t.hide(b)},o.hide.delay):t.hide(b)}function w(a){if(y.hasClass(l))return e;q.show.trigger("qtip-"+p+"-inactive"),clearTimeout(t.timers.show),clearTimeout(t.timers.hide);var b=function(){t.show(a)};o.show.delay>0?t.timers.show=setTimeout(b,o.show.delay):b()}var k=".qtip-"+p,n=o.position,q={show:o.show.target,hide:o.hide.target,container:n.container[0]===u?a(document):n.container,doc:a(document)},r={show:a.trim(""+o.show.event).split(" "),hide:a.trim(""+o.hide.event).split(" ")},s=a.browser.msie&&parseInt(a.browser.version,10)===6,v;h&&(o.hide.fixed&&(q.hide=q.hide.add(y),y.bind("mouseover"+k,function(){y.hasClass(l)||clearTimeout(t.timers.hide)})),n.target==="mouse"&&n.adjust.mouse&&o.hide.event&&y.bind("mouseleave"+k,function(a){(a.relatedTarget||a.target)!==q.show[0]&&t.hide(a)}),y.bind("mouseenter"+k+" mouseleave"+k,function(a){t[a.type==="mouseenter"?"focus":"blur"](a)})),f&&("number"===typeof o.hide.inactive&&(q.show.bind("qtip-"+p+"-inactive",A),a.each(g.inactiveEvents,function(a,b){q.hide.add(z.tooltip).bind(b+k+"-inactive",A)})),a.each(r.hide,function(b,c){var d=a.inArray(c,r.show),e=a(q.hide);d>-1&&e.add(q.show).length===e.length||c==="unfocus"?(q.show.bind(c+k,function(a){y.is(":visible")?x(a):w(a)}),delete r.show[d]):q.hide.bind(c+k,x)})),d&&a.each(r.show,function(a,b){q.show.bind(b+k,w)}),j&&((n.adjust.resize||n.viewport)&&a(a.event.special.resize?n.viewport:b).bind("resize"+k,B),(n.viewport||s&&y.css("position")==="fixed")&&a(n.viewport).bind("scroll"+k,B),/unfocus/i.test(o.hide.event)&&q.doc.bind("mousedown"+k,function(b){var d=a(b.target);d.parents(m).length===0&&d.add(c).length>1&&y.is(":visible")&&!y.hasClass(l)&&t.hide(b)}),o.hide.leave&&/mouseleave|mouseout/i.test(o.hide.event)&&a(b).bind("blur"+k+" mouse"+(o.hide.leave.indexOf("frame")>-1?"out":"leave")+k,function(a){a.relatedTarget||t.hide(a)}),n.target==="mouse"&&q.doc.bind("mousemove"+k,function(a){n.adjust.mouse&&!y.hasClass(l)&&y.is(":visible")&&t.reposition(a||i)}))}function I(b,d){function g(a){function c(c){(b=b.not(this)).length===0&&(t.redraw(),t.reposition(A.event),a())}var b;if((b=f.find("img:not([height]):not([width])")).length===0)return c.call(b);b.each(function(a,b){(function d(){var e=t.timers.img;if(b.height&&b.width){clearTimeout(e[a]);return c.call(b)}e[a]=setTimeout(d,20)})()})}var f=z.content;b=b||o.content.text;if(!t.rendered||!b)return e;a.isFunction(b)&&(b=b.call(c,t)||""),b.jquery&&b.length>0?f.empty().append(b.css({display:"block"})):f.html(b),t.rendered<0?y.queue("fx",g):(x=0,g(a.noop));return t}function H(b){var d=z.title;if(!t.rendered||!b)return e;a.isFunction(b)&&(b=b.call(c,t)||""),b.jquery&&b.length>0?d.empty().append(b.css({display:"block"})):d.html(b),t.redraw(),t.rendered&&y.is(":visible")&&t.reposition(A.event)}function G(a){var b=z.button,c=z.title;if(!t.rendered)return e;a?(c||F(),E()):b.remove()}function F(){var b=v+"-title";z.titlebar&&D(),z.titlebar=a("
",{"class":j+"-titlebar "+(o.style.widget?"ui-widget-header":"")}).append(z.title=a("
",{id:b,"class":j+"-title","aria-atomic":d})).insertBefore(z.content),o.content.title.button?E():t.rendered&&t.redraw()}function E(){var b=o.content.title.button,c=typeof b==="string",d=c?b:"Close tooltip";z.button&&z.button.remove(),b.jquery?z.button=b:z.button=a("",{"class":"ui-state-default "+(o.style.widget?"":j+"-icon"),title:d,"aria-label":d}).prepend(a("",{"class":"ui-icon ui-icon-close",html:"×"})),z.button.appendTo(z.titlebar).attr("role","button").hover(function(b){a(this).toggleClass("ui-state-hover",b.type==="mouseenter")}).click(function(a){y.hasClass(l)||t.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")}),t.redraw()}function D(){z.title&&(z.titlebar.remove(),z.titlebar=z.title=z.button=f,t.reposition())}function C(){var a=o.style.widget;y.toggleClass(k,a),z.content.toggleClass(k+"-content",a),z.titlebar&&z.titlebar.toggleClass(k+"-header",a),z.button&&z.button.toggleClass(j+"-icon",!a)}function B(a){var b=0,c,d=o,e=a.split(".");while(d=d[e[b++]])b0&&!a("#"+i).length&&(y[0].id=i,z.content[0].id=i+"-content",z.title[0].id=i+"-title")},"^content.text$":function(a,b,c){I(c)},"^content.title.text$":function(a,b,c){if(!c)return D();!z.title&&c&&F(),H(c)},"^content.title.button$":function(a,b,c){G(c)},"^position.(my|at)$":function(a,b,c){"string"===typeof c&&(a[b]=new h.Corner(c))},"^position.container$":function(a,b,c){t.rendered&&y.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),K.apply(t,f),J.apply(t,[1,1,0,0])},"^show.ready$":function(){t.rendered?t.show():t.render(1)},"^style.classes$":function(b,c,d){a.attr(y[0],"class",j+" qtip ui-helper-reset "+d)},"^style.widget|content.title":C,"^events.(render|show|move|hide|focus|blur)$":function(b,c,d){y[(a.isFunction(d)?"":"un")+"bind"]("tooltip"+c,d)}},a.extend(t,{render:function(b){if(t.rendered)return t;var f=o.content.title.text,g=a.Event("tooltiprender");a.attr(c[0],"aria-describedby",v),y=z.tooltip=a("
",{id:v,"class":j+" qtip ui-helper-reset "+o.style.classes,width:o.style.width||"",role:"alert","aria-live":"polite","aria-atomic":e,"aria-describedby":v+"-content","aria-hidden":d}).toggleClass(l,A.disabled).data("qtip",t).appendTo(o.position.container).append(z.content=a("
",{"class":j+"-content",id:v+"-content","aria-atomic":d})),t.rendered=-1,x=1,f&&(F(),H(f)),I(),t.rendered=d,C(),a.each(o.events,function(b,c){a.isFunction(c)&&y.bind(b==="toggle"?"tooltipshow tooltiphide":"tooltip"+b,c)}),a.each(h,function(){this.initialize==="render"&&this(t)}),J(1,1,1,1),y.queue("fx",function(a){g.originalEvent=A.event,y.trigger(g,[t]),x=0,t.redraw(),(o.show.ready||b)&&t.show(A.event),a()});return t},get:function(a){var b,c;switch(a.toLowerCase()){case"dimensions":b={height:y.outerHeight(),width:y.outerWidth()};break;case"offset":b=h.offset(y,o.position.container);break;default:c=B(a.toLowerCase()),b=c[0][c[1]],b=b.precedance?b.string():b}return b},set:function(b,c){function m(a,b){var c,d,e;for(c in k)for(d in k[c])if(e=(new RegExp(d,"i")).exec(a))b.push(e),k[c][d].apply(t,b)}var g=/^position\.(my|at|adjust|target|container)|style|content|show\.ready/i,h=/^content\.(title|attr)|style/i,i=e,j=e,k=t.checks,l;"string"===typeof b?(l=b,b={},b[l]=c):b=a.extend(d,{},b),a.each(b,function(c,d){var e=B(c.toLowerCase()),f;f=e[0][e[1]],e[0][e[1]]="object"===typeof d&&d.nodeType?a(d):d,b[c]=[e[0],e[1],d,f],i=g.test(c)||i,j=h.test(c)||j}),s(o),w=x=1,a.each(b,m),w=x=0,y.is(":visible")&&t.rendered&&(i&&t.reposition(o.position.target==="mouse"?f:A.event),j&&t.redraw());return t},toggle:function(b,c){function j(){b?(a.browser.msie&&y[0].style.removeAttribute("filter"),y.css("overflow","")):y.css({display:"",visibility:"",width:"",opacity:"",left:"",top:""})}if(!t.rendered)if(b)t.render(1);else return t;var d=b?"show":"hide",g=o[d],h=y.is(":visible"),i;(typeof b).search("boolean|number")&&(b=!h);if(h===b)return t;if(c){if(/over|enter/.test(c.type)&&/out|leave/.test(A.event.type)&&c.target===o.show.target[0]&&y.has(c.relatedTarget).length)return t;A.event=a.extend({},c)}i=a.Event("tooltip"+d),i.originalEvent=c?A.event:f,y.trigger(i,[t,90]);if(i.isDefaultPrevented())return t;a.attr(y[0],"aria-hidden",!b),b?(t.focus(c),a.isFunction(o.content.text)&&I(),t.reposition(c),g.solo&&a(m,g.solo).not(y).qtip("hide",i)):(clearTimeout(t.timers.show),t.blur(c)),y.stop(0,1),a.isFunction(g.effect)?(g.effect.call(y,t),y.queue("fx",function(a){j(),a()})):g.effect===e?(y[d](),j.call(y)):y.fadeTo(90,b?1:0,j),b&&g.target.trigger("qtip-"+p+"-inactive");return t},show:function(a){return t.toggle(d,a)},hide:function(a){return t.toggle(e,a)},focus:function(b){if(!t.rendered)return t;var c=a(m),d=parseInt(y[0].style.zIndex,10),e=g.zindex+c.length,f=a.extend({},b),h,i;y.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,y.trigger(i,[t,e]),i.isDefaultPrevented()||(y.addClass(n)[0].style.zIndex=e));return t},blur:function(b){var c=a.extend({},b),d;y.removeClass(n),d=a.Event("tooltipblur"),d.originalEvent=c,y.trigger(d,[t]);return t},reposition:function(c,d){if(!t.rendered||w)return t;w=1;var f=o.position.target,g=o.position,k=g.my,l=g.at,m=g.adjust,n=m.method.split(" "),p=y.outerWidth(),q=y.outerHeight(),r=0,s=0,v=a.Event("tooltipmove"),x=y.css("position")==="fixed",z=g.viewport.jquery?g.viewport:a(b),B={left:0,top:0},C=(t.plugins.tip||{}).corner,D={horizontal:n[0],vertical:n[1]||n[0],tip:o.style.tip,left:function(a){var b=z.offset.left+z.scrollLeft,c=k.x==="left"?p:k.x==="right"?-p:-p/2,d=l.x==="left"?r:l.x==="right"?-r:-r/2,e=C&&C.precedance==="y"?D.tip.width+D.tip.border*2:0,f=b-a-e,g=a+p-z.width-b+e,h=c-(k.precedance==="x"||k.x===k.y?d:0),i=k.x==="center";D.horizontal==="shift"?(B.left+=f>0?f:g>0?-g:0,B.left=Math.min(Math.max(b,B.left),Math.max(f>0?-1e9:0,b+z.width-p))):(f>0&&(k.x!=="left"||g>0)?B.left-=h+(i?0:2*m.x):g>0&&(k.x!=="right"||f>0)&&(B.left-=i?-h:h+2*m.x),B.left!==a&&i&&(B.left-=m.x),B.leftg&&(B.left=a));return B.left-a},top:function(a){var b=z.offset.top+z.scrollTop,c=k.y==="top"?q:k.y==="bottom"?-q:-q/2,d=l.y==="top"?s:l.y==="bottom"?-s:-s/2,e=C&&C.precedance==="x"?D.tip.height+D.tip.border*2:0,f=b-a-e,g=a+q-z.height-b+e,h=c-(k.precedance==="y"||k.x===k.y?d:0),i=k.y==="center";D.vertical==="shift"?(B.top+=f>0?f:g>0?-g:0,B.top=Math.min(Math.max(b,B.top),Math.max(f>0?-1e9:0,b+z.height-q))):(f>0&&(k.y!=="top"||g>0)?B.top-=h+(i?0:2*m.y):g>0&&(k.y!=="bottom"||f>0)&&(B.top-=i?-h:h+2*m.y),B.top!==a&&i&&(B.top-=m.y),B.top<0&&-B.top>g&&(B.top=a));return B.top-a}};z=z?{elem:z,height:z[(z[0]===b?"h":"outerH")+"eight"](),width:z[(z[0]===b?"w":"outerW")+"idth"](),scrollLeft:z.scrollLeft(),scrollTop:z.scrollTop(),offset:z.offset()||{left:0,top:0}}:e;if(f==="mouse")l={x:"left",y:"top"},c=c&&(c.type==="resize"||c.type==="scroll")?A.event:m.mouse||!c||!c.pageX||/over|enter$/i.test(c.type)&&!m.mouse?a.extend({},i):c,B={top:c.pageY,left:c.pageX};else{f==="event"&&(c&&c.target&&c.type!=="scroll"&&c.type!=="resize"?f=A.target=a(c.target):f=A.target),f=a(f).eq(0);if(f.length===0)return t;f[0]===document||f[0]===b?(r=f.width(),s=f.height(),f[0]===b&&(B={top:!x||h.iOS?z.scrollTop:0,left:!x||h.iOS?z.scrollLeft:0})):f.is("area")&&h.imagemap?B=h.imagemap(f,l):f[0].namespaceURI=="http://www.w3.org/2000/svg"&&h.svg?B=h.svg(f,l):(r=f.outerWidth(),s=f.outerHeight(),B=h.offset(f,g.container)),B.offset&&(r=B.width,s=B.height,B=B.offset),B.left+=l.x==="right"?r:l.x==="center"?r/2:0,B.top+=l.y==="bottom"?s:l.y==="center"?s/2:0}B.left+=m.x+(k.x==="right"?-p:k.x==="center"?-p/2:0),B.top+=m.y+(k.y==="bottom"?-q:k.y==="center"?-q/2:0),g.viewport.jquery&&f[0]!==b&&f[0]!==u?B.adjusted={left:D.horizontal!=="none"?D.left(B.left):0,top:D.vertical!=="none"?D.top(B.top):0}:B.adjusted={left:0,top:0},y.attr("class",function(b,c){return a.attr(this,"class").replace(/ui-tooltip-pos-\w+/i,"")}).addClass(j+"-pos-"+k.abbreviation()),v.originalEvent=a.extend({},c),y.trigger(v,[t,B,z.elem]);if(v.isDefaultPrevented())return t;delete B.adjusted,d===e||isNaN(B.left)||isNaN(B.top)||!a.isFunction(g.effect)?y.css(B):a.isFunction(g.effect)&&(g.effect.call(y,t,a.extend({},B)),y.queue(function(b){a(this).css({opacity:"",height:""}),a.browser.msie&&this.style.removeAttribute("filter"),b()})),w=0;return t},redraw:function(){if(t.rendered<1||o.style.width||x)return t;var b=j+"-fluid",c,d,e;x=1,y.css("width","").addClass(b),c=y.width()+(a.browser.mozilla?1:0),d=parseInt(y.css("max-width"),10)||0,e=parseInt(y.css("min-width"),10)||0,c=d+e?Math.min(Math.max(c,e),d):c,y.css("width",c).removeClass(b),x=0;return t},disable:function(b){var c=l;"boolean"!==typeof b&&(b=!y.hasClass(c)&&!A.disabled),t.rendered?(y.toggleClass(c,b),a.attr(y[0],"aria-disabled",b)):A.disabled=!!b;return t},enable:function(){return t.disable(e)},destroy:function(){var b=c[0],d=a.attr(b,q);t.rendered&&(y.remove(),a.each(t.plugins,function(){this.destroy&&this.destroy()})),clearTimeout(t.timers.show),clearTimeout(t.timers.hide),K(1,1,1,1),a.removeData(b,"qtip"),d&&(a.attr(b,"title",d),c.removeAttr(q)),c.removeAttr("aria-describedby").unbind(".qtip");return c}})}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<4.1&&h.iOS>3.1&&k(a(b),-1)}return e},iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,3})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_","."))||e,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(document).bind("mousemove.qtip",function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),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 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,leave:"window"},style:{classes:"",widget:e,width: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}('"5t 80",9(a,b,c){9 z(b){P c=Q,d=b.2K,e=d.1n,f=".1U-"+b.1h;a.1l(c,{1K:9(){d.1U=a(\'<51 1O="1q-1n-1U" 7Z="0" 5v="-1" 5w="7X:\\\'\\\';" 13="2m:2J; 14:3N; z-4U:-1; 2w:7F(4h=0); -5y-2w:"5z:83.5A.5B(5C=0)";">\'),d.1U.2D(e),e.19("4a"+f,c.29)},29:9(){P a=b.4c("4Z"),c=b.1D.11,f=d.11,g,h;h=1w(e.X("1a-N-T"),10)||0,h={N:-h,L:-h},c&&f&&(g=c.1k.1e==="x"?["T","N"]:["V","L"],h[g[1]]-=f[g[0]]()),d.1U.X(h).X(a)},28:9(){d.1U.1R(),e.1u(f)}}),c.1K()}9 y(c){P f=Q,g=c.1I.O.1s,h=c.2K,i=h.1n,j="#1c-25",k=".7C",l;c.2M.1s={"^O.1s.(2R|1N)$":9(){f.1K(),h.25.1T(i.1V(":2g"))}},a.1l(f,{1K:9(){S(!g.2R)M f;i.1u(k).1u(k+c.1h).19("42"+k+" 4Y"+k,9(b,c,d){P e=b.1y.27("1n","");a.1L(g[e])?g[e].1G(h.25,d,c):f[e](d)}).19("57",9(a,b,c){l.X("z-4U",c-1)}),f.2e(),h.25.X("5E",g.1N?"5G":""),g.1N===d&&h.25.19("49"+k+c.1h,9(){c.R.1G(c)});M f},2e:9(){P c=a(j);S(c.18){h.25=c;M c}l=h.25=a("<2h />",{1h:j.2x(1),X:{14:"3N",L:0,N:0,2m:"3E"},3x:9(){M e}}).2D(1A.2X),a(b).19("2q"+k,9(){l.X({V:16.1F(a(b).V(),a(1A).V()),T:16.1F(a(b).T(),a(1A).T())})}).2p("2q");M l},1T:9(b){P g=c.1I.O.1s.1Q,h=b?"O":"R",i;l||(l=f.2e());S(!l.1V(":5H")||b){l.54(d,e),a.1L(g)?g.1G(l,b):g===e?l[h]():l.56(3H,b?.7:0,9(){b||a(Q).R()});M f}},O:9(){M f.1T(d)},R:9(){M f.1T(e)},28:9(){P d=l;d&&(a(j).1m(9(){P b=a(Q).26("1c");S(b&&b.1h!==b.1h&&b.1I.O.1s)M d=e}),d?(h.25.1R(),a(b).1u(k)):h.25.1u(k+c.1h));M i.1u(k)}}),f.1K()}9 x(b,g){9 v(a){P b=a.1e==="y",c=n[b?"T":"V"],d=n[b?"V":"T"],e=a.1o().3o("1f")>-1,f=c*(e?.5:1),g=16.5J,h=16.40,i,j,k,l=16.3X(g(f,2)+g(d,2)),m=[p/f*l,p/d*l];m[2]=16.3X(g(m[0],2)-g(p,2)),m[3]=16.3X(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{V:k[b?0:1],T:k[b?1:0]}}9 u(b){P c=k.1x&&b.y==="L",d=c?k.1x:k.U,e=a.1X.5m,f=e?"-5K-":a.1X.5q?"-5q-":"",g=b.y+(e?"":"-")+b.x,h=f+(e?"1a-4F-"+g:"1a-"+g+"-4F");M 1w(d.X(h),10)||1w(l.X(h),10)||0}9 t(a,b,c){b=b?b:a[a.1e];P d=k.1x&&a.y==="L",e=d?k.1x:k.U,f="1a-"+b+"-T",g=1w(e.X(f),10);M(c?g||1w(l.X(f),10):g)||0}9 s(f,g,h,l){S(k.11){P n=a.1l({},i.1k),o=h.3B,p=b.1I.14.29.4i.2v(" "),q=p[0],r=p[1]||p[0],s={N:e,L:e,x:0,y:0},t,u={},v;i.1k.2l!==d&&(q==="2k"&&n.1e==="x"&&o.N&&n.y!=="1f"?n.1e=n.1e==="x"?"y":"x":q==="3w"&&o.N&&(n.x=n.x==="1f"?o.N>0?"N":"1j":n.x==="N"?"1j":"N"),r==="2k"&&n.1e==="y"&&o.L&&n.x!=="1f"?n.1e=n.1e==="y"?"x":"y":r==="3w"&&o.L&&(n.y=n.y==="1f"?o.L>0?"L":"1i":n.y==="L"?"1i":"L"),n.1o()!==m.1k&&(m.L!==o.L||m.N!==o.N)&&i.2S(n,e)),t=i.14(n,o),t.1j!==c&&(t.N=-t.1j),t.1i!==c&&(t.L=-t.1i),t.3S=16.1F(0,j.W);S(s.N=q==="2k"&&!!o.N)n.x==="1f"?u["2L-N"]=s.x=t["2L-N"]-o.N:(v=t.1j!==c?[o.N,-t.N]:[-o.N,t.N],(s.x=16.1F(v[0],v[1]))>v[0]&&(h.N-=o.N,s.N=e),u[t.1j!==c?"1j":"N"]=s.x);S(s.L=r==="2k"&&!!o.L)n.y==="1f"?u["2L-L"]=s.y=t["2L-L"]-o.L:(v=t.1i!==c?[o.L,-t.L]:[-o.L,t.L],(s.y=16.1F(v[0],v[1]))>v[0]&&(h.L-=o.L,s.L=e),u[t.1i!==c?"1i":"L"]=s.y);k.11.X(u).1T(!(s.x&&s.y||n.x==="1f"&&s.y||n.y==="1f"&&s.x)),h.N-=t.N.39?t.3S:q!=="2k"||s.L||!s.N&&!s.L?t.N:0,h.L-=t.L.39?t.3S:r!=="2k"||s.N||!s.N&&!s.L?t.L:0,m.N=o.N,m.L=o.L,m.1k=n.1o()}}P i=Q,j=b.1I.13.11,k=b.2K,l=k.1n,m={L:0,N:0,1k:""},n={T:j.T,V:j.V},o={},p=j.1a||0,q=".1c-11",r=a("<4q />")[0].3O;i.1k=f,i.3n=f,i.14={},b.2M.11={"^14.1M|13.11.(1k|3n|1a)$":9(){i.1K()||i.28(),b.1S()},"^13.11.(V|T)$":9(){n={T:j.T,V:j.V},i.2e(),i.2S(),b.1S()},"^U.17.1p|13.(35|2j)$":9(){k.11&&i.2S()}},a.1l(i,{1K:9(){P b=i.4p()&&(r||a.1X.34);b&&(i.2e(),i.2S(),l.1u(q).19("4a"+q,s));M b},4p:9(){P a=j.1k,c=b.1I.14,f=c.2o,g=c.1M.1o?c.1M.1o():c.1M;S(a===e||g===e&&f===e)M e;a===d?i.1k=1C h.2y(g):a.1o||(i.1k=1C h.2y(a),i.1k.2l=d);M i.1k.1o()!=="5n"},4r:9(){P c,d,e,f=k.11.X({6o:"",1a:""}),g=i.1k,h=g[g.1e],m="1a-"+h+"-3e",p="1a"+h.39(0)+h.2x(1)+"5O",q=/6c?\\(0, 0, 0(, 0)?\\)|3l/i,r="5P-3e",s="3l",t="1q-1n-5l",u=a(1A.2X).X("3e"),v=b.2K.U.X("3e"),w=k.1x&&(g.y==="L"||g.y==="1f"&&f.14().L+n.V/2+j.W",{"1O":"1q-1n-11"}).X({T:b,V:c}).5R(l),r?a("<4q />").2D(k.11)[0].3O("2d").4t():(d=\'<48:3T 5S="0,0" 13="2m:4B-2J; 14:3N; 4S:2n(#3t#4A);">\',k.11.2I(p?d+=d:d))},2S:9(b,c){P g=k.11,l=g.5T(),m=n.T,q=n.V,s="4b 5U ",u="4b 5V 3l",x=j.3n,y=16.40,z,A,B,C,D;b||(b=i.1k),x===e?x=b:(x=1C h.2y(x),x.1e=b.1e,x.x==="3h"?x.x=b.x:x.y==="3h"?x.y=b.y:x.x===x.y&&(x[b.1e]=b[b.1e])),z=x.1e,i.4r(),p=o.1a==="3l"||o.1a==="#5W"?0:j.1a===d?t(b,f,d):j.1a,B=w(x,m,q),D=v(b),g.X(D),b.1e==="y"?C=[y(x.x==="N"?p:x.x==="1j"?D.T-m-p:(D.T-m)/2),y(x.y==="L"?D.V-q:0)]:C=[y(x.x==="N"?D.T-m:0),y(x.y==="L"?p:x.y==="1i"?D.V-q-p:(D.V-q)/2)],r?(l.15(D),A=l[0].3O("2d"),A.5X(),A.4t(),A.5Y(0,0,4u,4u),A.5Z(C[0],C[1]),A.61(),A.62(B[0][0],B[0][1]),A.5r(B[1][0],B[1][1]),A.5r(B[2][0],B[2][1]),A.63(),A.64=o.2H,A.65=o.1a,A.7W=p*2,A.66="4X",A.67=68,A.4w(),A.2H()):(B="m"+B[0][0]+","+B[0][1]+" l"+B[1][0]+","+B[1][1]+" "+B[2][0]+","+B[2][1]+" 6a",C[2]=p&&/^(r|b)/i.1z(b.1o())?4R(a.1X.3y,10)===8?2:1:0,l.X({6b:""+(x.1o().3o("1f")>-1),N:C[0]-C[2]*5c(z==="x"),L:C[1]-C[2]*5c(z==="y"),T:m+p,V:q+p}).1m(9(b){P c=a(Q);c.15({6d:m+p+" "+(q+p),6e:B,6g:o.2H,6h:!!b,6i:!b}).X({2m:p||b?"2J":"3E"}),!b&&p>0&&c.2I()===""&&c.2I(\'<48:4w 6j="\'+p*2+\'4b" 3e="\'+o.1a+\'" 6k="6l" 6m="4X" 13="4S:2n(#3t#4A); 2m:4B-2J;" />\')})),c!==e&&i.14(b)},14:9(b){P c=k.11,f={},g=16.1F(0,j.W),h,l,m;S(j.1k===e||!c)M e;b=b||i.1k,h=b.1e,l=v(b),m=[b.x,b.y],h==="x"&&m.6n(),a.1m(m,9(a,c){P e,i;c==="1f"?(e=h==="y"?"N":"L",f[e]="50%",f["2L-"+e]=-16.40(l[h==="y"?"T":"V"]/2)+g):(e=t(b,c,d),i=u(b),f[c]=a?t(b,c):g+(i>e?i:0))}),f[b[h]]-=l[h==="x"?"T":"V"],c.X({L:"",1i:"",N:"",1j:"",2L:""}).X(f);M f},28:9(){k.11&&k.11.1R(),l.1u(q)}}),i.1K()}9 w(a,b,c){P d=16.3s(b/2),e=16.3s(c/2),f={4C:[[0,0],[b,c],[b,0]],4Q:[[0,0],[b,0],[0,c]],4M:[[0,c],[b,0],[b,c]],4E:[[0,0],[0,c],[b,c]],7s:[[0,c],[d,0],[b,c]],6q:[[0,0],[b,0],[d,c]],7q:[[0,0],[b,e],[0,c]],6s:[[b,0],[b,c],[0,e]]};f.6u=f.4C,f.7m=f.4Q,f.6w=f.4M,f.6y=f.4E;M f[a.1o()]}9 v(b){P c=Q,f=b.2K.1n,g=b.1I.U.1v,h=".1c-1v",i=/<3R\\b[^<]*(?:(?!<\\/3R>)<[^<]*)*<\\/3R>/4v,j=d;b.2M.1v={"^U.1v":9(a,b,d){b==="1v"&&(g=d),b==="2c"?c.1K():g&&g.2n?c.3Q():f.1u(h)}},a.1l(c,{1K:9(){g&&g.2n&&f.1u(h)[g.2c?"6z":"19"]("42"+h,c.3Q);M c},3Q:9(d,h){9 p(a,c,d){b.30("U.1p",c+": "+d),n()}9 o(c){l&&(c=a("<2h/>").2V(c.27(i,"")).4I(l)),b.30("U.1p",c),n()}9 n(){m&&(f.X("45",""),h=e)}S(d.3A())M c;P j=g.2n.3o(" "),k=g.2n,l,m=g.2c&&!g.5g&&h;m&&f.X("45","3M"),j>-1&&(l=k.2x(j),k=k.2x(0,j)),a.1v(a.1l({6A:o,4m:p,6B:b},g,{2n:k}));M c}}),c.1K()}9 u(b,c){P i,j,k,l,m=a(Q),n=a(1A.2X),o=Q===1A?n:m,p=m.22?m.22(c.22):f,u=c.22.1y==="7a"&&p?p[c.22.3Z]:f,v=m.26(c.22.3Z||"79");6E{v=Y v==="1o"?(1C 6F("M "+v))():v}76(w){r("75 74 6I 6K 6L 26: "+v)}l=a.1l(d,{},g.3c,c,Y v==="1d"?s(v):f,s(u||p)),p&&a.5o(Q,"22"),j=l.14,l.1h=b;S("38"===Y l.U.1p){k=m.15(l.U.15);S(l.U.15!==e&&k)l.U.1p=k;2t M e}j.1t===e&&(j.1t=n),j.12===e&&(j.12=o),l.O.12===e&&(l.O.12=o),l.O.3d===d&&(l.O.3d=n),l.R.12===e&&(l.R.12=o),l.14.21===d&&(l.14.21=j.1t),j.2o=1C h.2y(j.2o),j.1M=1C h.2y(j.1M);S(a.26(Q,"1c"))S(l.4d)m.1c("28");2t S(l.4d===e)M e;a.15(Q,"17")&&(a.15(Q,q,a.15(Q,"17")),Q.3m("17")),i=1C t(m,l,b,!!k),a.26(Q,"1c",i),m.19("1R.1c",9(){i.28()});M i}9 t(c,o,p,r){9 K(c,d,e,f){f=1w(f,10)!==0;P g=".1c-"+p,h={O:c&&o.O.12[0],R:d&&o.R.12[0],1n:e&&t.1g&&z.1n[0],U:e&&t.1g&&z.U[0],1t:f&&o.14.1t[0]===u?1A:o.14.1t[0],3I:f&&b};t.1g?a([]).6N(a.6O([h.O,h.R,h.1n,h.1t,h.U,h.3I],9(a){M Y a==="1d"})).1u(g):c&&o.O.12.1u(g+"-2e")}9 J(d,f,h,j){9 B(a){y.1V(":2g")&&t.1S(a)}9 A(a){S(y.24(l))M e;1E(t.1r.1Y),t.1r.1Y=2T(9(){t.R(a)},o.R.1Y)}9 x(b){S(y.24(l))M e;P c=a(b.3k||b.12),d=c.6Y(m)[0]===y[0],f=c[0]===q.O[0];1E(t.1r.O),1E(t.1r.R);S(n.12==="1H"&&d||o.R.2l&&(/1H(3P|2E|4k)/.1z(b.1y)&&(d||f))){b.6X(),b.6R();M e}o.R.23>0?t.1r.R=2T(9(){t.R(b)},o.R.23):t.R(b)}9 w(a){S(y.24(l))M e;q.O.2p("1c-"+p+"-1Y"),1E(t.1r.O),1E(t.1r.R);P b=9(){t.O(a)};o.O.23>0?t.1r.O=2T(b,o.O.23):b()}P k=".1c-"+p,n=o.14,q={O:o.O.12,R:o.R.12,1t:n.1t[0]===u?a(1A):n.1t,3U:a(1A)},r={O:a.3z(""+o.O.1b).2v(" "),R:a.3z(""+o.R.1b).2v(" ")},s=a.1X.34&&1w(a.1X.3y,10)===6,v;h&&(o.R.2l&&(q.R=q.R.2O(y),y.19("6S"+k,9(){y.24(l)||1E(t.1r.R)})),n.12==="1H"&&n.29.1H&&o.R.1b&&y.19("2B"+k,9(a){(a.3k||a.12)!==q.O[0]&&t.R(a)}),y.19("3a"+k+" 2B"+k,9(a){t[a.1y==="3a"?"2u":"1N"](a)})),f&&("2N"===Y o.R.1Y&&(q.O.19("1c-"+p+"-1Y",A),a.1m(g.55,9(a,b){q.R.2O(z.1n).19(b+k+"-1Y",A)})),a.1m(r.R,9(b,c){P d=a.6U(c,r.O),e=a(q.R);d>-1&&e.2O(q.O).18===e.18||c==="4e"?(q.O.19(c+k,9(a){y.1V(":2g")?x(a):w(a)}),2F r.O[d]):q.R.19(c+k,x)})),d&&a.1m(r.O,9(a,b){q.O.19(b+k,w)}),j&&((n.29.2q||n.21)&&a(a.1b.6V.2q?n.21:b).19("2q"+k,B),(n.21||s&&y.X("14")==="2l")&&a(n.21).19("3J"+k,B),/4e/i.1z(o.R.1b)&&q.3U.19("3x"+k,9(b){P d=a(b.12);d.6Z(m).18===0&&d.2O(c).18>1&&y.1V(":2g")&&!y.24(l)&&t.R(b)}),o.R.2E&&/2B|4O/i.1z(o.R.1b)&&a(b).19("1N"+k+" 1H"+(o.R.2E.3o("71")>-1?"3P":"2E")+k,9(a){a.3k||t.R(a)}),n.12==="1H"&&q.3U.19("3g"+k,9(a){n.29.1H&&!y.24(l)&&y.1V(":2g")&&t.1S(a||i)}))}9 I(b,d){9 g(a){9 c(c){(b=b.3i(Q)).18===0&&(t.2z(),t.1S(A.1b),a())}P b;S((b=f.4I("3q:3i([V]):3i([T])")).18===0)M c.1G(b);b.1m(9(a,b){(9 d(){P e=t.1r.3q;S(b.V&&b.T){1E(e[a]);M c.1G(b)}e[a]=2T(d,20)})()})}P f=z.U;S(!t.1g||!b)M e;a.1L(b)&&(b=b.1G(c,t)||""),b.1W&&b.18>0?f.4J().2V(b.X({2m:"2J"})):f.2I(b),t.1g<0?y.3D("3L",g):(x=0,g(a.5p));M t}9 H(b){P d=z.17;S(!t.1g||!b)M e;a.1L(b)&&(b=b.1G(c,t)||""),b.1W&&b.18>0?d.4J().2V(b.X({2m:"2J"})):d.2I(b),t.2z(),t.1g&&y.1V(":2g")&&t.1S(A.1b)}9 G(a){P b=z.1B,c=z.17;S(!t.1g)M e;a?(c||F(),E()):b.1R()}9 F(){P b=v+"-17";z.1x&&D(),z.1x=a("<2h />",{"1O":j+"-1x "+(o.13.2j?"1q-2j-4P":"")}).2V(z.17=a("<2h />",{1h:b,"1O":j+"-17","1P-41":d})).77(z.U),o.U.17.1B?E():t.1g&&t.2z()}9 E(){P b=o.U.17.1B,c=Y b==="1o",d=c?b:"78 1n";z.1B&&z.1B.1R(),b.1W?z.1B=b:z.1B=a("",{"1O":"1q-2U-3t "+(o.13.2j?"":j+"-3r"),17:d,"1P-7b":d}).7c(a("<7d />",{"1O":"1q-3r 1q-3r-7e",2I:"&7f;"})),z.1B.2D(z.1x).15("4W","1B").4L(9(b){a(Q).2r("1q-2U-4L",b.1y==="3a")}).49(9(a){y.24(l)||t.R(a);M e}).19("3x 7h 59 7i 4O",9(b){a(Q).2r("1q-2U-7j 1q-2U-2u",b.1y.2x(-4)==="7l")}),t.2z()}9 D(){z.17&&(z.1x.1R(),z.1x=z.17=z.1B=f,t.1S())}9 C(){P a=o.13.2j;y.2r(k,a),z.U.2r(k+"-U",a),z.1x&&z.1x.2r(k+"-4P",a),z.1B&&z.1B.2r(j+"-3r",!a)}9 B(a){P b=0,c,d=o,e=a.2v(".");36(d=d[e[b++]])b0&&!a("#"+i).18&&(y[0].1h=i,z.U[0].1h=i+"-U",z.17[0].1h=i+"-17")},"^U.1p$":9(a,b,c){I(c)},"^U.17.1p$":9(a,b,c){S(!c)M D();!z.17&&c&&F(),H(c)},"^U.17.1B$":9(a,b,c){G(c)},"^14.(1M|2o)$":9(a,b,c){"1o"===Y c&&(a[b]=1C h.2y(c))},"^14.1t$":9(a,b,c){t.1g&&y.2D(c)},"^(O|R).(1b|12|2l|23|1Y)$":9(a,b,c,d,e){P f=[1,0,0];f[e[1]==="O"?"43":"7r"](0),K.2b(t,f),J.2b(t,[1,1,0,0])},"^O.2Q$":9(){t.1g?t.O():t.1J(1)},"^13.35$":9(b,c,d){a.15(y[0],"1O",j+" 1c 1q-4T-4V "+d)},"^13.2j|U.17":C,"^3K.(1J|O|4k|R|2u|1N)$":9(b,c,d){y[(a.1L(d)?"":"7t")+"19"]("1n"+c,d)}},a.1l(t,{1J:9(b){S(t.1g)M t;P f=o.U.1p,g=o.U.17.1p,i=a.37("7u");a.15(c[0],"1P-4l",v),y=z.1n=a("<2h/>",{1h:v,"1O":j+" 1c 1q-4T-4V "+o.13.35,T:o.13.T||"",4W:"7w","1P-7x":"7y","1P-41":e,"1P-4l":v+"-U","1P-3M":d}).2r(l,A.2s).26("1c",t).2D(o.14.1t).2V(z.U=a("<2h />",{"1O":j+"-U",1h:v+"-U","1P-41":d})),t.1g=-1,x=1,g&&(F(),H(g)),I(f),t.1g=d,C(),a.1m(o.3K,9(b,c){a.1L(c)&&y.19(b==="1T"?"42 4Y":"1n"+b,c)}),a.1m(h,9(){Q.2A==="1J"&&Q(t)}),J(1,1,1,1),y.3D("3L",9(a){i.3b=A.1b,y.2p(i,[t]),x=0,t.2z(),(o.O.2Q||b)&&t.O(A.1b),a()});M t},4c:9(a){P b,c;58(a.2f()){2Z"4Z":b={V:y.33(),T:y.3j()};2P;2Z"W":b=h.W(y,o.14.1t);2P;3t:c=B(a.2f()),b=c[0][c[1]],b=b.1e?b.1o():b}M b},30:9(b,c){9 m(a,b){P c,d,e;52(c 1Z k)52(d 1Z k[c])S(e=(1C 7z(d,"i")).4G(a))b.43(e),k[c][d].2b(t,b)}P g=/^14\\.(1M|2o|29|12|1t)|13|U|O\\.2Q/i,h=/^U\\.(17|15)|13/i,i=e,j=e,k=t.2M,l;"1o"===Y b?(l=b,b={},b[l]=c):b=a.1l(d,{},b),a.1m(b,9(c,d){P e=B(c.2f()),f;f=e[0][e[1]],e[0][e[1]]="1d"===Y d&&d.7A?a(d):d,b[c]=[e[0],e[1],d,f],i=g.1z(c)||i,j=h.1z(c)||j}),s(o),w=x=1,a.1m(b,m),w=x=0,y.1V(":2g")&&t.1g&&(i&&t.1S(o.14.12==="1H"?f:A.1b),j&&t.2z());M t},1T:9(b,c){9 j(){b?(a.1X.34&&y[0].13.3m("2w"),y.X("7B","")):y.X({2m:"",45:"",T:"",4h:"",N:"",L:""})}S(!t.1g)S(b)t.1J(1);2t M t;P d=b?"O":"R",g=o[d],h=y.1V(":2g"),i;(Y b).4x("38|2N")&&(b=!h);S(h===b)M t;S(c){S(/5e|5f/.1z(c.1y)&&/3P|2E/.1z(A.1b.1y)&&c.12===o.O.12[0]&&y.7D(c.3k).18)M t;A.1b=a.1l({},c)}i=a.37("1n"+d),i.3b=c?A.1b:f,y.2p(i,[t,3H]);S(i.3A())M t;a.15(y[0],"1P-3M",!b),b?(t.2u(c),t.1S(c),g.3d&&a(m,g.3d).3i(y).1c("R",i)):(1E(t.1r.O),t.1N(c)),y.54(0,1),a.1L(g.1Q)?(g.1Q.1G(y,t),y.3D("3L",9(a){j(),a()})):g.1Q===e?(y[d](),j.1G(y)):y.56(3H,b?1:0,j),b&&g.12.2p("1c-"+p+"-1Y");M t},O:9(a){M t.1T(d,a)},R:9(a){M t.1T(e,a)},2u:9(b){S(!t.1g)M t;P c=a(m),d=1w(y[0].13.2W,10),e=g.5b+c.18,f=a.1l({},b),h,i;y.24(n)||(d!==e&&(c.1m(9(){Q.13.2W>d&&(Q.13.2W=Q.13.2W-1)}),c.2w("."+n).1c("1N",f)),i=a.37("57"),i.3b=f,y.2p(i,[t,e]),i.3A()||(y.3F(n)[0].13.2W=e));M t},1N:9(b){P c=a.1l({},b),d;y.4j(n),d=a.37("7H"),d.3b=c,y.2p(d,[t]);M t},1S:9(c,d){S(!t.1g||w)M t;w=1;P f=o.14.12,g=o.14,k=g.1M,l=g.2o,m=g.29,n=m.4i.2v(" "),p=y.3j(),q=y.33(),r=0,s=0,v=a.37("4a"),x=y.X("14")==="2l",z=g.21.1W?g.21:a(b),B={N:0,L:0},C=(t.1D.11||{}).1k,D={4f:n[0],4g:n[1]||n[0],11:o.13.11,N:9(a){P b=z.W.N+z.2G,c=k.x==="N"?p:k.x==="1j"?-p:-p/2,d=l.x==="N"?r:l.x==="1j"?-r:-r/2,e=C&&C.1e==="y"?D.11.T+D.11.1a*2:0,f=b-a-e,g=a+p-z.T-b+e,h=c-(k.1e==="x"||k.x===k.y?d:0),i=k.x==="1f";D.4f==="2k"?(B.N+=f>0?f:g>0?-g:0,B.N=16.3G(16.1F(b,B.N),16.1F(f>0?-4o:0,b+z.T-p))):(f>0&&(k.x!=="N"||g>0)?B.N-=h+(i?0:2*m.x):g>0&&(k.x!=="1j"||f>0)&&(B.N-=i?-h:h+2*m.x),B.N!==a&&i&&(B.N-=m.x),B.Ng&&(B.N=a));M B.N-a},L:9(a){P b=z.W.L+z.2C,c=k.y==="L"?q:k.y==="1i"?-q:-q/2,d=l.y==="L"?s:l.y==="1i"?-s:-s/2,e=C&&C.1e==="x"?D.11.V+D.11.1a*2:0,f=b-a-e,g=a+q-z.V-b+e,h=c-(k.1e==="y"||k.x===k.y?d:0),i=k.y==="1f";D.4g==="2k"?(B.L+=f>0?f:g>0?-g:0,B.L=16.3G(16.1F(b,B.L),16.1F(f>0?-4o:0,b+z.V-q))):(f>0&&(k.y!=="L"||g>0)?B.L-=h+(i?0:2*m.y):g>0&&(k.y!=="1i"||f>0)&&(B.L-=i?-h:h+2*m.y),B.L!==a&&i&&(B.L-=m.y),B.L<0&&-B.L>g&&(B.L=a));M B.L-a}};z=z?{5j:z,V:z[(z[0]===b?"h":"7J")+"7K"](),T:z[(z[0]===b?"w":"7L")+"7N"](),2G:z.2G(),2C:z.2C(),W:z.W()||{N:0,L:0}}:e;S(f==="1H")l={x:"N",y:"L"},c=c&&(c.1y==="2q"||c.1y==="3J")?A.1b:m.1H||!c||!c.3v||/5e|5f$/i.1z(c.1y)&&!m.1H?a.1l({},i):c,B={L:c.44,N:c.3v};2t{f==="1b"&&(c&&c.12&&c.1y!=="3J"&&c.1y!=="2q"?f=A.12=a(c.12):f=A.12),f=a(f).7P(0);S(f.18===0)M t;f[0]===1A||f[0]===b?(r=f.T(),s=f.V(),f[0]===b&&(B={L:!x||h.32?z.2C:0,N:!x||h.32?z.2G:0})):f.1V("7Q")&&h.3V?B=h.3V(f,l):f[0].7R=="7S://7T.7U.7V/7Y/3f"&&h.3f?B=h.3f(f,l):(r=f.3j(),s=f.33(),B=h.W(f,g.1t)),B.W&&(r=B.T,s=B.V,B=B.W),B.N+=l.x==="1j"?r:l.x==="1f"?r/2:0,B.L+=l.y==="1i"?s:l.y==="1f"?s/2:0}B.N+=m.x+(k.x==="1j"?-p:k.x==="1f"?-p/2:0),B.L+=m.y+(k.y==="1i"?-q:k.y==="1f"?-q/2:0),g.21.1W&&f[0]!==b&&f[0]!==u?B.3B={N:D.4f!=="3E"?D.N(B.N):0,L:D.4g!=="3E"?D.L(B.L):0}:B.3B={N:0,L:0},y.15("1O",9(b,c){M a.15(Q,"1O").27(/1q-1n-5i-\\w+/i,"")}).3F(j+"-5i-"+k.4z()),v.3b=a.1l({},c),y.2p(v,[t,B,z.5j]);S(v.3A())M t;2F B.3B,d===e||5k(B.N)||5k(B.L)||!a.1L(g.1Q)?y.X(B):a.1L(g.1Q)&&(g.1Q.1G(y,t,a.1l({},B)),y.3D(9(b){a(Q).X({4h:"",V:""}),a.1X.34&&Q.13.3m("2w"),b()})),w=0;M t},2z:9(){S(t.1g<1||o.13.T||x)M t;P b=j+"-5l",c,d,e;x=1,y.X("T","").3F(b),c=y.T()+(a.1X.5m?1:0),d=1w(y.X("1F-T"),10)||0,e=1w(y.X("3G-T"),10)||0,c=d+e?16.3G(16.1F(c,e),d):c,y.X("T",c).4j(b),x=0;M t},3Y:9(b){P c=l;"38"!==Y b&&(b=!y.24(c)&&!A.2s),t.1g?(y.2r(c,b),a.15(y[0],"1P-2s",b)):A.2s=!!b;M t},81:9(){M t.3Y(e)},28:9(){P b=c[0],d=a.15(b,q);t.1g&&(y.1R(),a.1m(t.1D,9(){Q.28&&Q.28()})),1E(t.1r.O),1E(t.1r.R),K(1,1,1,1),a.5o(b,"1c"),d&&(a.15(b,"17",d),c.3W(q)),c.3W("1P-4l").1u(".1c");M c}})}9 s(b){P c;S(!b||"1d"!==Y b)M e;"1d"!==Y b.22&&(b.22={1y:b.22});S("U"1Z b){S("1d"!==Y b.U||b.U.1W)b.U={1p:b.U};c=b.U.1p||e,!a.1L(c)&&(!c&&!c.15||c.18<1||"1d"===Y c&&!c.1W)&&(b.U.1p=e),"17"1Z b.U&&("1d"!==Y b.U.17&&(b.U.17={1p:b.U.17}),c=b.U.17.1p||e,!a.1L(c)&&(!c&&!c.15||c.18<1||"1d"===Y c&&!c.1W)&&(b.U.17.1p=e))}"14"1Z b&&("1d"!==Y b.14&&(b.14={1M:b.14,2o:b.14})),"O"1Z b&&("1d"!==Y b.O&&(b.O.1W?b.O={12:b.O}:b.O={1b:b.O})),"R"1Z b&&("1d"!==Y b.R&&(b.R.1W?b.R={12:b.R}:b.R={1b:b.R})),"13"1Z b&&("1d"!==Y b.13&&(b.13={35:b.13})),a.1m(h,9(){Q.2Y&&Q.2Y(b)});M b}9 r(){P c=b.5s;M c&&(c.4m||c.5u||a.5p).2b(c,2a)}P d=!0,e=!1,f=5x,g,h,i,j="1q-1n",k="1q-2j",l="1q-2U-2s",m="2h.1c."+j,n=j+"-2u",o="-5D",p="5F",q="4N";g=a.2i.1c=9(b,h,i){P j=(""+b).2f(),k=f,l=j==="3Y"?[d]:a.5I(2a).4n(1,10),m=l[l.18-1],n=Q[0]?a.26(Q[0],"1c"):f;S(!2a.18&&n||j==="70")M n;S("1o"===Y b){Q.1m(9(){P b=a.26(Q,"1c");S(!b)M d;m&&m.5L&&(b.31.1b=m);S(j!=="5M"&&j!=="1I"||!h)b[j]&&b[j].2b(b[j],l);2t S(a.5N(h)||i!==c)b.30(h,i);2t{k=b.4c(h);M e}});M k!==f?k:Q}S("1d"===Y b||!2a.18){n=s(a.1l(d,{},b));M g.19.1G(Q,n,m)}},g.19=9(b,c){M Q.1m(9(f){9 p(b){9 c(){o.1J(Y b==="1d"||i.O.2Q),k.O.1u(l.O),k.R.1u(l.R)}S(o.31.2s)M e;o.31.1b=a.1l({},b),i.O.23>0?(1E(o.1r.O),o.1r.O=2T(c,i.O.23),l.O!==l.R&&k.R.19(l.R,9(){1E(o.1r.O)})):c()}P i,k,l,m=!b.1h||b.1h===e||b.1h.18<1||a("#"+j+"-"+b.1h).18?g.47++:b.1h,n=".1c-"+m+"-2e",o=u.1G(Q,m,b);S(o===e)M d;i=o.1I,a.1m(h,9(){Q.2A==="2A"&&Q(o)}),k={O:i.O.12,R:i.R.12},l={O:a.3z(""+i.O.1b).27(/ /g,n+" ")+n,R:a.3z(""+i.R.1b).27(/ /g,n+" ")+n},i.R.1b==="4e"&&(l.R="2B"+n),k.O.19(l.O,p),(i.O.2Q||i.5d)&&p(c)})},h=g.1D={2y:9(a){a=(""+a).27(/([A-Z])/," $1").27(/6f/4v,"1f").2f(),Q.x=(a.46(/N|1j/i)||a.46(/1f/)||["3h"])[0].2f(),Q.y=(a.46(/L|1i|1f/i)||["3h"])[0].2f(),Q.1e=a.39(0).4x(/^(t|b)/)>-1?"y":"x",Q.1o=9(){M Q.1e==="y"?Q.y+Q.x:Q.x+Q.y},Q.4z=9(){P a=Q.x.2x(0,1),b=Q.y.2x(0,1);M a===b?a:a==="c"||a!=="c"&&b!=="c"?b+a:a+b}},W:9(c,d){9 k(a,b){e.N+=b*a.2G(),e.L+=b*a.2C()}P e=c.W(),f=d,g=0,i=1A.2X,j;S(f){6p{S(f[0]===i)2P;f.X("14")!=="6r"&&(j=f.14(),e.N-=j.N+(1w(f.X("6t"),10)||0),e.L-=j.L+(1w(f.X("6v"),10)||0),g++)}36(f=f.6x());(d[0]!==i||g>1)&&k(d,1),h.32<4.1&&h.32>3.1&&k(a(b),-1)}M e},32:4R((""+(/4H.*6C ([0-6D]{1,3})|(4H 6H).*6J.*6M/i.4G(6Q.6T)||[0,""])[1]).27("5a","6W").27("72","."))||e,2i:{15:9(b,c){S(Q.18){P d=Q[0],e="17",f=a.26(d,"1c");S(b===e){S(2a.18<2)M a.15(d,q);S(Y f==="1d"){f&&f.1g&&f.1I.U.15===e&&f.31.15&&f.30("U.1p",c),a.2i["15"+p].2b(Q,2a),a.15(d,q,a.15(d,e));M Q.3W(e)}}}},4K:9(b){P c=a([]),d="17",e;e=a.2i["4K"+p].2b(Q,2a).2w("[4N]").1m(9(){a.15(Q,d,a.15(Q,q)),Q.3m(q)}).7n();M e},1R:a.1q?f:9(b,c){a(Q).1m(9(){c||(!b||a.2w(b,[Q]).18)&&a("*",Q).2O(Q).1m(9(){a(Q).7v("1R")})})}}},a.1m(h.2i,9(b,c){S(!c)M d;P e=a.2i[b+p]=a.2i[b];a.2i[b]=9(){M c.2b(Q,2a)||e.2b(Q,2a)}}),a(1A).19("3g.1c",9(a){i={3v:a.3v,44:a.44,1y:"3g"}}),g.3y="2.0.7E",g.47=0,g.55="49 7G 3x 59 3g 2B 3a".2v(" "),g.5b=7M,g.3c={5d:e,1h:e,4d:d,U:{1p:d,15:"17",17:{1p:e,1B:e}},14:{1M:"L N",2o:"1i 1j",12:e,1t:e,21:e,29:{x:0,y:0,1H:d,2q:d,4i:"3w 3w"},1Q:d},O:{12:e,1b:"3a",1Q:d,23:3H,3d:e,2Q:e},R:{12:e,1b:"2B",1Q:d,23:0,2l:e,1Y:e,2E:"3I"},13:{35:"",2j:e,T:e},3K:{1J:f,4k:f,O:f,R:f,1T:f,2u:f,1N:f}},h.1v=9(a){P b=a.1D.1v;M"1d"===Y b?b:a.1D.1v=1C v(a)},h.1v.2A="1J",h.1v.2Y=9(a){P b=a.U,c;b&&"1v"1Z b&&(c=b.1v,Y c!=="1d"&&(c=a.U.1v={2n:c}),"38"!==Y c.2c&&c.2c&&(c.2c=!!c.2c))},a.1l(d,g.3c,{U:{1v:{5g:d,2c:d}}}),h.11=9(a){P b=a.1D.11;M"1d"===Y b?b:a.1D.11=1C x(a)},h.11.2A="1J",h.11.2Y=9(a){P b=a.13,c;b&&"11"1Z b&&(c=a.13.11,Y c!=="1d"&&(a.13.11={1k:c}),/1o|38/i.1z(Y c.1k)||(c.1k=d),Y c.T!=="2N"&&2F c.T,Y c.V!=="2N"&&2F c.V,Y c.1a!=="2N"&&c.1a!==d&&2F c.1a,Y c.W!=="2N"&&2F c.W)},a.1l(d,g.3c,{13:{11:{1k:d,3n:e,T:6,V:6,1a:d,W:0}}}),h.3V=9(b,c){9 l(a,b){P d=0,e=1,f=1,g=0,h=0,i=a.T,j=a.V;36(i>0&&j>0&&e>0&&f>0){i=16.3p(i/2),j=16.3p(j/2),c.x==="N"?e=i:c.x==="1j"?e=a.T-i:e+=16.3p(i/2),c.y==="L"?f=j:c.y==="1i"?f=a.V-j:f+=16.3p(j/2),d=b.18;36(d--){S(b.18<2)2P;g=b[d][0]-a.W.N,h=b[d][1]-a.W.L,(c.x==="N"&&g>=e||c.x==="1j"&&g<=e||c.x==="1f"&&(ga.T-e)||c.y==="L"&&h>=f||c.y==="1i"&&h<=f||c.y==="1f"&&(ha.V-f))&&b.6P(d,1)}}M{N:b[0][0],L:b[0][1]}}P d=b.15("3T").2f(),e=b.15("73").2v(","),f=[],g=a(\'3q[7g="#\'+b.7k("53").15("3Z")+\'"]\'),h=g.W(),i={T:0,V:0,W:{L:3u,1j:0,1i:0,N:3u}},j=0,k=0;h.N+=16.3s((g.3j()-g.T())/2),h.L+=16.3s((g.33()-g.V())/2);S(d==="5h"){j=e.18;36(j--)k=[1w(e[--j],10),1w(e[j+1],10)],k[0]>i.W.1j&&(i.W.1j=k[0]),k[0]i.W.1i&&(i.W.1i=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}('"5t 81",9(a,b,c){9 z(b){P c=Q,d=b.2K,e=d.1p,f=".1Z-"+b.1i;a.1l(c,{1K:9(){d.1Z=a(\'<52 1O="1q-1p-1Z" 80="0" 5v="-1" 5w="7X:\\\'\\\';" 13="2e:2J; 14:3N; z-4U:-1; 2y:7F(4g=0); -5y-2y:"5z:7Y.5A.5B(5C=0)";">\'),d.1Z.2D(e),e.19("4a"+f,c.2a)},2a:9(){P a=b.4b("4Z"),c=b.1C.11,f=d.11,g,h;h=1y(e.X("1a-N-T"),10)||0,h={N:-h,L:-h},c&&f&&(g=c.1k.1e==="x"?["T","N"]:["W","L"],h[g[1]]-=f[g[0]]()),d.1Z.X(h).X(a)},29:9(){d.1Z.1Q(),e.1v(f)}}),c.1K()}9 y(c){P f=Q,g=c.1L.O.1t,h=c.2K,i=h.1p,j="#1c-24",k=".7C",l;c.2M.1t={"^O.1t.(2R|1M)$":9(){f.1K(),h.24.1T(i.1U(":2g"))}},a.1l(f,{1K:9(){S(!g.2R)M f;i.1v(k).1v(k+c.1i).19("41"+k+" 4Y"+k,9(b,c,d){P e=b.1w.26("1p","");a.1F(g[e])?g[e].1I(h.24,d,c):f[e](d)}).19("57",9(a,b,c){l.X("z-4U",c-1)}),f.2h(),h.24.X("5E",g.1M?"5G":""),g.1M===d&&h.24.19("49"+k+c.1i,9(){c.R.1I(c)});M f},2h:9(){P c=a(j);S(c.18){h.24=c;M c}l=h.24=a("<2i />",{1i:j.2v(1),X:{14:"3N",L:0,N:0,2e:"3A"},3x:9(){M e}}).2D(1z.2X),a(b).19("2q"+k,9(){l.X({W:16.1G(a(b).W(),a(1z).W()),T:16.1G(a(b).T(),a(1z).T())})}).2p("2q");M l},1T:9(b){P g=c.1L.O.1t.1P,h=b?"O":"R",i;l||(l=f.2h());S(!l.1U(":5H")||b){l.54(d,e),a.1F(g)?g.1I(l,b):g===e?l[h]():l.56(3H,b?.7:0,9(){b||a(Q).R()});M f}},O:9(){M f.1T(d)},R:9(){M f.1T(e)},29:9(){P d=l;d&&(a(j).1m(9(){P b=a(Q).25("1c");S(b&&b.1i!==b.1i&&b.1L.O.1t)M d=e}),d?(h.24.1Q(),a(b).1v(k)):h.24.1v(k+c.1i));M i.1v(k)}}),f.1K()}9 x(b,g){9 v(a){P b=a.1e==="y",c=n[b?"T":"W"],d=n[b?"W":"T"],e=a.1o().3o("1g")>-1,f=c*(e?.5:1),g=16.5J,h=16.3Z,i,j,k,l=16.3W(g(f,2)+g(d,2)),m=[p/f*l,p/d*l];m[2]=16.3W(g(m[0],2)-g(p,2)),m[3]=16.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],T:k[b?1:0]}}9 u(b){P c=k.1x&&b.y==="L",d=c?k.1x:k.U,e=a.1W.5o,f=e?"-5K-":a.1W.5j?"-5j-":"",g=b.y+(e?"":"-")+b.x,h=f+(e?"1a-4F-"+g:"1a-"+g+"-4F");M 1y(d.X(h),10)||1y(l.X(h),10)||0}9 t(a,b,c){b=b?b:a[a.1e];P d=k.1x&&a.y==="L",e=d?k.1x:k.U,f="1a-"+b+"-T",g=1y(e.X(f),10);M(c?g||1y(l.X(f),10):g)||0}9 s(f,g,h,l){S(k.11){P n=a.1l({},i.1k),o=h.3C,p=b.1L.14.2a.4i.2x(" "),q=p[0],r=p[1]||p[0],s={N:e,L:e,x:0,y:0},t,u={},v;i.1k.2m!==d&&(q==="2l"&&n.1e==="x"&&o.N&&n.y!=="1g"?n.1e=n.1e==="x"?"y":"x":q==="3w"&&o.N&&(n.x=n.x==="1g"?o.N>0?"N":"1h":n.x==="N"?"1h":"N"),r==="2l"&&n.1e==="y"&&o.L&&n.x!=="1g"?n.1e=n.1e==="y"?"x":"y":r==="3w"&&o.L&&(n.y=n.y==="1g"?o.L>0?"L":"1j":n.y==="L"?"1j":"L"),n.1o()!==m.1k&&(m.L!==o.L||m.N!==o.N)&&i.2S(n,e)),t=i.14(n,o),t.1h!==c&&(t.N=-t.1h),t.1j!==c&&(t.L=-t.1j),t.3R=16.1G(0,j.V);S(s.N=q==="2l"&&!!o.N)n.x==="1g"?u["2L-N"]=s.x=t["2L-N"]-o.N:(v=t.1h!==c?[o.N,-t.N]:[-o.N,t.N],(s.x=16.1G(v[0],v[1]))>v[0]&&(h.N-=o.N,s.N=e),u[t.1h!==c?"1h":"N"]=s.x);S(s.L=r==="2l"&&!!o.L)n.y==="1g"?u["2L-L"]=s.y=t["2L-L"]-o.L:(v=t.1j!==c?[o.L,-t.L]:[-o.L,t.L],(s.y=16.1G(v[0],v[1]))>v[0]&&(h.L-=o.L,s.L=e),u[t.1j!==c?"1j":"L"]=s.y);k.11.X(u).1T(!(s.x&&s.y||n.x==="1g"&&s.y||n.y==="1g"&&s.x)),h.N-=t.N.39?t.3R:q!=="2l"||s.L||!s.N&&!s.L?t.N:0,h.L-=t.L.39?t.3R:r!=="2l"||s.N||!s.N&&!s.L?t.L:0,m.N=o.N,m.L=o.L,m.1k=n.1o()}}P i=Q,j=b.1L.13.11,k=b.2K,l=k.1p,m={L:0,N:0,1k:""},n={T:j.T,W:j.W},o={},p=j.1a||0,q=".1c-11",r=a("<4q />")[0].3O;i.1k=f,i.3n=f,i.14={},b.2M.11={"^14.1N|13.11.(1k|3n|1a)$":9(){i.1K()||i.29(),b.1S()},"^13.11.(W|T)$":9(){n={T:j.T,W:j.W},i.2h(),i.2S(),b.1S()},"^U.17.1n|13.(35|2k)$":9(){k.11&&i.2S()}},a.1l(i,{1K:9(){P b=i.4p()&&(r||a.1W.34);b&&(i.2h(),i.2S(),l.1v(q).19("4a"+q,s));M b},4p:9(){P a=j.1k,c=b.1L.14,f=c.2o,g=c.1N.1o?c.1N.1o():c.1N;S(a===e||g===e&&f===e)M e;a===d?i.1k=1D h.2s(g):a.1o||(i.1k=1D h.2s(a),i.1k.2m=d);M i.1k.1o()!=="5p"},4r:9(){P c,d,e,f=k.11.X({6o:"",1a:""}),g=i.1k,h=g[g.1e],m="1a-"+h+"-3e",p="1a"+h.39(0)+h.2v(1)+"5O",q=/6c?\\(0, 0, 0(, 0)?\\)|3l/i,r="5P-3e",s="3l",t="1q-1p-5n",u=a(1z.2X).X("3e"),v=b.2K.U.X("3e"),w=k.1x&&(g.y==="L"||g.y==="1g"&&f.14().L+n.W/2+j.V",{"1O":"1q-1p-11"}).X({T:b,W:c}).5R(l),r?a("<4q />").2D(k.11)[0].3O("2d").4t():(d=\'<48:3S 5S="0,0" 13="2e:4B-2J; 14:3N; 4S:2n(#3t#4A);">\',k.11.2I(p?d+=d:d))},2S:9(b,c){P g=k.11,l=g.5T(),m=n.T,q=n.W,s="4e 5U ",u="4e 5V 3l",x=j.3n,y=16.3Z,z,A,B,C,D;b||(b=i.1k),x===e?x=b:(x=1D h.2s(x),x.1e=b.1e,x.x==="3h"?x.x=b.x:x.y==="3h"?x.y=b.y:x.x===x.y&&(x[b.1e]=b[b.1e])),z=x.1e,i.4r(),p=o.1a==="3l"||o.1a==="#5W"?0:j.1a===d?t(b,f,d):j.1a,B=w(x,m,q),D=v(b),g.X(D),b.1e==="y"?C=[y(x.x==="N"?p:x.x==="1h"?D.T-m-p:(D.T-m)/2),y(x.y==="L"?D.W-q:0)]:C=[y(x.x==="N"?D.T-m:0),y(x.y==="L"?p:x.y==="1j"?D.W-q-p:(D.W-q)/2)],r?(l.15(D),A=l[0].3O("2d"),A.5X(),A.4t(),A.5Y(0,0,4u,4u),A.5Z(C[0],C[1]),A.61(),A.62(B[0][0],B[0][1]),A.5g(B[1][0],B[1][1]),A.5g(B[2][0],B[2][1]),A.63(),A.64=o.2H,A.65=o.1a,A.7W=p*2,A.66="4X",A.67=68,A.4w(),A.2H()):(B="m"+B[0][0]+","+B[0][1]+" l"+B[1][0]+","+B[1][1]+" "+B[2][0]+","+B[2][1]+" 6a",C[2]=p&&/^(r|b)/i.1B(b.1o())?4R(a.1W.3y,10)===8?2:1:0,l.X({6b:""+(x.1o().3o("1g")>-1),N:C[0]-C[2]*5c(z==="x"),L:C[1]-C[2]*5c(z==="y"),T:m+p,W:q+p}).1m(9(b){P c=a(Q);c.15({6d:m+p+" "+(q+p),6e:B,6g:o.2H,6h:!!b,6i:!b}).X({2e:p||b?"2J":"3A"}),!b&&p>0&&c.2I()===""&&c.2I(\'<48:4w 6j="\'+p*2+\'4e" 3e="\'+o.1a+\'" 6k="6l" 6m="4X" 13="4S:2n(#3t#4A); 2e:4B-2J;" />\')})),c!==e&&i.14(b)},14:9(b){P c=k.11,f={},g=16.1G(0,j.V),h,l,m;S(j.1k===e||!c)M e;b=b||i.1k,h=b.1e,l=v(b),m=[b.x,b.y],h==="x"&&m.6n(),a.1m(m,9(a,c){P e,i;c==="1g"?(e=h==="y"?"N":"L",f[e]="50%",f["2L-"+e]=-16.3Z(l[h==="y"?"T":"W"]/2)+g):(e=t(b,c,d),i=u(b),f[c]=a?t(b,c):g+(i>e?i:0))}),f[b[h]]-=l[h==="x"?"T":"W"],c.X({L:"",1j:"",N:"",1h:"",2L:""}).X(f);M f},29:9(){k.11&&k.11.1Q(),l.1v(q)}}),i.1K()}9 w(a,b,c){P d=16.3s(b/2),e=16.3s(c/2),f={4C:[[0,0],[b,c],[b,0]],4Q:[[0,0],[b,0],[0,c]],4M:[[0,c],[b,0],[b,c]],4E:[[0,0],[0,c],[b,c]],7s:[[0,c],[d,0],[b,c]],6q:[[0,0],[b,0],[d,c]],7q:[[0,0],[b,e],[0,c]],6s:[[b,0],[b,c],[0,e]]};f.6u=f.4C,f.7m=f.4Q,f.6w=f.4M,f.6y=f.4E;M f[a.1o()]}9 v(b){P c=Q,f=b.2K.1p,g=b.1L.U.1u,h=".1c-1u",i=/<3Q\\b[^<]*(?:(?!<\\/3Q>)<[^<]*)*<\\/3Q>/4v,j=d;b.2M.1u={"^U.1u":9(a,b,d){b==="1u"&&(g=d),b==="2c"?c.1K():g&&g.2n?c.3P():f.1v(h)}},a.1l(c,{1K:9(){g&&g.2n&&f.1v(h)[g.2c?"6z":"19"]("41"+h,c.3P);M c},3P:9(d,h){9 p(a,c,d){b.30("U.1n",c+": "+d),n()}9 o(c){l&&(c=a("<2i/>").2V(c.26(i,"")).4I(l)),b.30("U.1n",c),n()}9 n(){m&&(f.X("43",""),h=e)}S(d.3B())M c;P j=g.2n.3o(" "),k=g.2n,l,m=g.2c&&!g.5h&&h;m&&f.X("43","3M"),j>-1&&(l=k.2v(j),k=k.2v(0,j)),a.1u(a.1l({6A:o,4m:p,6B:b},g,{2n:k}));M c}}),c.1K()}9 u(b,c){P i,j,k,l,m=a(Q),n=a(1z.2X),o=Q===1z?n:m,p=m.22?m.22(c.22):f,u=c.22.1w==="7a"&&p?p[c.22.3Y]:f,v=m.25(c.22.3Y||"79");6E{v=Y v==="1o"?(1D 6F("M "+v))():v}76(w){r("75 74 6I 6K 6L 25: "+v)}l=a.1l(d,{},g.3b,c,Y v==="1d"?s(v):f,s(u||p)),p&&a.5q(Q,"22"),j=l.14,l.1i=b;S("38"===Y l.U.1n){k=m.15(l.U.15);S(l.U.15!==e&&k)l.U.1n=k;2u M e}j.1s===e&&(j.1s=n),j.12===e&&(j.12=o),l.O.12===e&&(l.O.12=o),l.O.3c===d&&(l.O.3c=n),l.R.12===e&&(l.R.12=o),l.14.21===d&&(l.14.21=j.1s),j.2o=1D h.2s(j.2o),j.1N=1D h.2s(j.1N);S(a.25(Q,"1c"))S(l.4c)m.1c("29");2u S(l.4c===e)M e;a.15(Q,"17")&&(a.15(Q,q,a.15(Q,"17")),Q.3m("17")),i=1D t(m,l,b,!!k),a.25(Q,"1c",i),m.19("1Q.1c",9(){i.29()});M i}9 t(c,o,p,r){9 K(c,d,e,f){f=1y(f,10)!==0;P g=".1c-"+p,h={O:c&&o.O.12[0],R:d&&o.R.12[0],1p:e&&t.1f&&z.1p[0],U:e&&t.1f&&z.U[0],1s:f&&o.14.1s[0]===u?1z:o.14.1s[0],3I:f&&b};t.1f?a([]).6N(a.6O([h.O,h.R,h.1p,h.1s,h.U,h.3I],9(a){M Y a==="1d"})).1v(g):c&&o.O.12.1v(g+"-2h")}9 J(d,f,h,j){9 B(a){y.1U(":2g")&&t.1S(a)}9 A(a){S(y.28(l))M e;1H(t.1r.1X),t.1r.1X=2T(9(){t.R(a)},o.R.1X)}9 x(b){S(y.28(l))M e;P c=a(b.3j||b.12),d=c.6Y(m)[0]===y[0],f=c[0]===q.O[0];1H(t.1r.O),1H(t.1r.R);S(n.12==="1E"&&d||o.R.2m&&(/1E(45|2C|4j)/.1B(b.1w)&&(d||f))){b.6X(),b.6R();M e}o.R.23>0?t.1r.R=2T(9(){t.R(b)},o.R.23):t.R(b)}9 w(a){S(y.28(l))M e;q.O.2p("1c-"+p+"-1X"),1H(t.1r.O),1H(t.1r.R);P b=9(){t.O(a)};o.O.23>0?t.1r.O=2T(b,o.O.23):b()}P k=".1c-"+p,n=o.14,q={O:o.O.12,R:o.R.12,1s:n.1s[0]===u?a(1z):n.1s,3T:a(1z)},r={O:a.3z(""+o.O.1b).2x(" "),R:a.3z(""+o.R.1b).2x(" ")},s=a.1W.34&&1y(a.1W.3y,10)===6,v;h&&(o.R.2m&&(q.R=q.R.2E(y),y.19("6S"+k,9(){y.28(l)||1H(t.1r.R)})),n.12==="1E"&&n.2a.1E&&o.R.1b&&y.19("2B"+k,9(a){(a.3j||a.12)!==q.O[0]&&t.R(a)}),y.19("37"+k+" 2B"+k,9(a){t[a.1w==="37"?"2w":"1M"](a)})),f&&("2N"===Y o.R.1X&&(q.O.19("1c-"+p+"-1X",A),a.1m(g.55,9(a,b){q.R.2E(z.1p).19(b+k+"-1X",A)})),a.1m(r.R,9(b,c){P d=a.6U(c,r.O),e=a(q.R);d>-1&&e.2E(q.O).18===e.18||c==="4d"?(q.O.19(c+k,9(a){y.1U(":2g")?x(a):w(a)}),2F r.O[d]):q.R.19(c+k,x)})),d&&a.1m(r.O,9(a,b){q.O.19(b+k,w)}),j&&((n.2a.2q||n.21)&&a(a.1b.6V.2q?n.21:b).19("2q"+k,B),(n.21||s&&y.X("14")==="2m")&&a(n.21).19("3J"+k,B),/4d/i.1B(o.R.1b)&&q.3T.19("3x"+k,9(b){P d=a(b.12);d.6Z(m).18===0&&d.2E(c).18>1&&y.1U(":2g")&&!y.28(l)&&t.R(b)}),o.R.2C&&/2B|4O/i.1B(o.R.1b)&&a(b).19("1M"+k+" 1E"+(o.R.2C.3o("71")>-1?"45":"2C")+k,9(a){a.3j||t.R(a)}),n.12==="1E"&&q.3T.19("3g"+k,9(a){n.2a.1E&&!y.28(l)&&y.1U(":2g")&&t.1S(a||i)}))}9 I(b,d){9 g(a){9 c(c){(b=b.3i(Q)).18===0&&(t.2A(),t.1S(A.1b),a())}P b;S((b=f.4I("3q:3i([W]):3i([T])")).18===0)M c.1I(b);b.1m(9(a,b){(9 d(){P e=t.1r.3q;S(b.W&&b.T){1H(e[a]);M c.1I(b)}e[a]=2T(d,20)})()})}P f=z.U;b=b||o.U.1n;S(!t.1f||!b)M e;a.1F(b)&&(b=b.1I(c,t)||""),b.1V&&b.18>0?f.4J().2V(b.X({2e:"2J"})):f.2I(b),t.1f<0?y.3E("3L",g):(x=0,g(a.5r));M t}9 H(b){P d=z.17;S(!t.1f||!b)M e;a.1F(b)&&(b=b.1I(c,t)||""),b.1V&&b.18>0?d.4J().2V(b.X({2e:"2J"})):d.2I(b),t.2A(),t.1f&&y.1U(":2g")&&t.1S(A.1b)}9 G(a){P b=z.1A,c=z.17;S(!t.1f)M e;a?(c||F(),E()):b.1Q()}9 F(){P b=v+"-17";z.1x&&D(),z.1x=a("<2i />",{"1O":j+"-1x "+(o.13.2k?"1q-2k-4P":"")}).2V(z.17=a("<2i />",{1i:b,"1O":j+"-17","1R-40":d})).77(z.U),o.U.17.1A?E():t.1f&&t.2A()}9 E(){P b=o.U.17.1A,c=Y b==="1o",d=c?b:"78 1p";z.1A&&z.1A.1Q(),b.1V?z.1A=b:z.1A=a("",{"1O":"1q-3d-3t "+(o.13.2k?"":j+"-3r"),17:d,"1R-7b":d}).7c(a("<7d />",{"1O":"1q-3r 1q-3r-7e",2I:"&7f;"})),z.1A.2D(z.1x).15("4W","1A").4L(9(b){a(Q).2r("1q-3d-4L",b.1w==="37")}).49(9(a){y.28(l)||t.R(a);M e}).19("3x 7h 59 7i 4O",9(b){a(Q).2r("1q-3d-7j 1q-3d-2w",b.1w.2v(-4)==="7l")}),t.2A()}9 D(){z.17&&(z.1x.1Q(),z.1x=z.17=z.1A=f,t.1S())}9 C(){P a=o.13.2k;y.2r(k,a),z.U.2r(k+"-U",a),z.1x&&z.1x.2r(k+"-4P",a),z.1A&&z.1A.2r(j+"-3r",!a)}9 B(a){P b=0,c,d=o,e=a.2x(".");2U(d=d[e[b++]])b0&&!a("#"+i).18&&(y[0].1i=i,z.U[0].1i=i+"-U",z.17[0].1i=i+"-17")},"^U.1n$":9(a,b,c){I(c)},"^U.17.1n$":9(a,b,c){S(!c)M D();!z.17&&c&&F(),H(c)},"^U.17.1A$":9(a,b,c){G(c)},"^14.(1N|2o)$":9(a,b,c){"1o"===Y c&&(a[b]=1D h.2s(c))},"^14.1s$":9(a,b,c){t.1f&&y.2D(c)},"^(O|R).(1b|12|2m|23|1X)$":9(a,b,c,d,e){P f=[1,0,0];f[e[1]==="O"?"42":"7r"](0),K.2b(t,f),J.2b(t,[1,1,0,0])},"^O.2Q$":9(){t.1f?t.O():t.1J(1)},"^13.35$":9(b,c,d){a.15(y[0],"1O",j+" 1c 1q-4T-4V "+d)},"^13.2k|U.17":C,"^3K.(1J|O|4j|R|2w|1M)$":9(b,c,d){y[(a.1F(d)?"":"7t")+"19"]("1p"+c,d)}},a.1l(t,{1J:9(b){S(t.1f)M t;P f=o.U.17.1n,g=a.36("7u");a.15(c[0],"1R-4l",v),y=z.1p=a("<2i/>",{1i:v,"1O":j+" 1c 1q-4T-4V "+o.13.35,T:o.13.T||"",4W:"7w","1R-7x":"7y","1R-40":e,"1R-4l":v+"-U","1R-3M":d}).2r(l,A.2t).25("1c",t).2D(o.14.1s).2V(z.U=a("<2i />",{"1O":j+"-U",1i:v+"-U","1R-40":d})),t.1f=-1,x=1,f&&(F(),H(f)),I(),t.1f=d,C(),a.1m(o.3K,9(b,c){a.1F(c)&&y.19(b==="1T"?"41 4Y":"1p"+b,c)}),a.1m(h,9(){Q.2z==="1J"&&Q(t)}),J(1,1,1,1),y.3E("3L",9(a){g.3a=A.1b,y.2p(g,[t]),x=0,t.2A(),(o.O.2Q||b)&&t.O(A.1b),a()});M t},4b:9(a){P b,c;58(a.2f()){2Z"4Z":b={W:y.33(),T:y.3k()};2O;2Z"V":b=h.V(y,o.14.1s);2O;3t:c=B(a.2f()),b=c[0][c[1]],b=b.1e?b.1o():b}M b},30:9(b,c){9 m(a,b){P c,d,e;51(c 1Y k)51(d 1Y k[c])S(e=(1D 7z(d,"i")).4G(a))b.42(e),k[c][d].2b(t,b)}P g=/^14\\.(1N|2o|2a|12|1s)|13|U|O\\.2Q/i,h=/^U\\.(17|15)|13/i,i=e,j=e,k=t.2M,l;"1o"===Y b?(l=b,b={},b[l]=c):b=a.1l(d,{},b),a.1m(b,9(c,d){P e=B(c.2f()),f;f=e[0][e[1]],e[0][e[1]]="1d"===Y d&&d.7A?a(d):d,b[c]=[e[0],e[1],d,f],i=g.1B(c)||i,j=h.1B(c)||j}),s(o),w=x=1,a.1m(b,m),w=x=0,y.1U(":2g")&&t.1f&&(i&&t.1S(o.14.12==="1E"?f:A.1b),j&&t.2A());M t},1T:9(b,c){9 j(){b?(a.1W.34&&y[0].13.3m("2y"),y.X("7B","")):y.X({2e:"",43:"",T:"",4g:"",N:"",L:""})}S(!t.1f)S(b)t.1J(1);2u M t;P d=b?"O":"R",g=o[d],h=y.1U(":2g"),i;(Y b).4x("38|2N")&&(b=!h);S(h===b)M t;S(c){S(/5e|5f/.1B(c.1w)&&/45|2C/.1B(A.1b.1w)&&c.12===o.O.12[0]&&y.7D(c.3j).18)M t;A.1b=a.1l({},c)}i=a.36("1p"+d),i.3a=c?A.1b:f,y.2p(i,[t,3H]);S(i.3B())M t;a.15(y[0],"1R-3M",!b),b?(t.2w(c),a.1F(o.U.1n)&&I(),t.1S(c),g.3c&&a(m,g.3c).3i(y).1c("R",i)):(1H(t.1r.O),t.1M(c)),y.54(0,1),a.1F(g.1P)?(g.1P.1I(y,t),y.3E("3L",9(a){j(),a()})):g.1P===e?(y[d](),j.1I(y)):y.56(3H,b?1:0,j),b&&g.12.2p("1c-"+p+"-1X");M t},O:9(a){M t.1T(d,a)},R:9(a){M t.1T(e,a)},2w:9(b){S(!t.1f)M t;P c=a(m),d=1y(y[0].13.2W,10),e=g.5b+c.18,f=a.1l({},b),h,i;y.28(n)||(d!==e&&(c.1m(9(){Q.13.2W>d&&(Q.13.2W=Q.13.2W-1)}),c.2y("."+n).1c("1M",f)),i=a.36("57"),i.3a=f,y.2p(i,[t,e]),i.3B()||(y.3F(n)[0].13.2W=e));M t},1M:9(b){P c=a.1l({},b),d;y.4k(n),d=a.36("7H"),d.3a=c,y.2p(d,[t]);M t},1S:9(c,d){S(!t.1f||w)M t;w=1;P f=o.14.12,g=o.14,k=g.1N,l=g.2o,m=g.2a,n=m.4i.2x(" "),p=y.3k(),q=y.33(),r=0,s=0,v=a.36("4a"),x=y.X("14")==="2m",z=g.21.1V?g.21:a(b),B={N:0,L:0},C=(t.1C.11||{}).1k,D={4h:n[0],4f:n[1]||n[0],11:o.13.11,N:9(a){P b=z.V.N+z.2G,c=k.x==="N"?p:k.x==="1h"?-p:-p/2,d=l.x==="N"?r:l.x==="1h"?-r:-r/2,e=C&&C.1e==="y"?D.11.T+D.11.1a*2:0,f=b-a-e,g=a+p-z.T-b+e,h=c-(k.1e==="x"||k.x===k.y?d:0),i=k.x==="1g";D.4h==="2l"?(B.N+=f>0?f:g>0?-g:0,B.N=16.3G(16.1G(b,B.N),16.1G(f>0?-4o:0,b+z.T-p))):(f>0&&(k.x!=="N"||g>0)?B.N-=h+(i?0:2*m.x):g>0&&(k.x!=="1h"||f>0)&&(B.N-=i?-h:h+2*m.x),B.N!==a&&i&&(B.N-=m.x),B.Ng&&(B.N=a));M B.N-a},L:9(a){P b=z.V.L+z.2P,c=k.y==="L"?q:k.y==="1j"?-q:-q/2,d=l.y==="L"?s:l.y==="1j"?-s:-s/2,e=C&&C.1e==="x"?D.11.W+D.11.1a*2:0,f=b-a-e,g=a+q-z.W-b+e,h=c-(k.1e==="y"||k.x===k.y?d:0),i=k.y==="1g";D.4f==="2l"?(B.L+=f>0?f:g>0?-g:0,B.L=16.3G(16.1G(b,B.L),16.1G(f>0?-4o:0,b+z.W-q))):(f>0&&(k.y!=="L"||g>0)?B.L-=h+(i?0:2*m.y):g>0&&(k.y!=="1j"||f>0)&&(B.L-=i?-h:h+2*m.y),B.L!==a&&i&&(B.L-=m.y),B.L<0&&-B.L>g&&(B.L=a));M B.L-a}};z=z?{5l:z,W:z[(z[0]===b?"h":"7J")+"7K"](),T:z[(z[0]===b?"w":"7L")+"7N"](),2G:z.2G(),2P:z.2P(),V:z.V()||{N:0,L:0}}:e;S(f==="1E")l={x:"N",y:"L"},c=c&&(c.1w==="2q"||c.1w==="3J")?A.1b:m.1E||!c||!c.3u||/5e|5f$/i.1B(c.1w)&&!m.1E?a.1l({},i):c,B={L:c.44,N:c.3u};2u{f==="1b"&&(c&&c.12&&c.1w!=="3J"&&c.1w!=="2q"?f=A.12=a(c.12):f=A.12),f=a(f).7P(0);S(f.18===0)M t;f[0]===1z||f[0]===b?(r=f.T(),s=f.W(),f[0]===b&&(B={L:!x||h.32?z.2P:0,N:!x||h.32?z.2G:0})):f.1U("7Q")&&h.3U?B=h.3U(f,l):f[0].7R=="7S://7T.7U.7V/7Z/3f"&&h.3f?B=h.3f(f,l):(r=f.3k(),s=f.33(),B=h.V(f,g.1s)),B.V&&(r=B.T,s=B.W,B=B.V),B.N+=l.x==="1h"?r:l.x==="1g"?r/2:0,B.L+=l.y==="1j"?s:l.y==="1g"?s/2:0}B.N+=m.x+(k.x==="1h"?-p:k.x==="1g"?-p/2:0),B.L+=m.y+(k.y==="1j"?-q:k.y==="1g"?-q/2:0),g.21.1V&&f[0]!==b&&f[0]!==u?B.3C={N:D.4h!=="3A"?D.N(B.N):0,L:D.4f!=="3A"?D.L(B.L):0}:B.3C={N:0,L:0},y.15("1O",9(b,c){M a.15(Q,"1O").26(/1q-1p-5k-\\w+/i,"")}).3F(j+"-5k-"+k.4z()),v.3a=a.1l({},c),y.2p(v,[t,B,z.5l]);S(v.3B())M t;2F B.3C,d===e||5m(B.N)||5m(B.L)||!a.1F(g.1P)?y.X(B):a.1F(g.1P)&&(g.1P.1I(y,t,a.1l({},B)),y.3E(9(b){a(Q).X({4g:"",W:""}),a.1W.34&&Q.13.3m("2y"),b()})),w=0;M t},2A:9(){S(t.1f<1||o.13.T||x)M t;P b=j+"-5n",c,d,e;x=1,y.X("T","").3F(b),c=y.T()+(a.1W.5o?1:0),d=1y(y.X("1G-T"),10)||0,e=1y(y.X("3G-T"),10)||0,c=d+e?16.3G(16.1G(c,e),d):c,y.X("T",c).4k(b),x=0;M t},3X:9(b){P c=l;"38"!==Y b&&(b=!y.28(c)&&!A.2t),t.1f?(y.2r(c,b),a.15(y[0],"1R-2t",b)):A.2t=!!b;M t},82:9(){M t.3X(e)},29:9(){P b=c[0],d=a.15(b,q);t.1f&&(y.1Q(),a.1m(t.1C,9(){Q.29&&Q.29()})),1H(t.1r.O),1H(t.1r.R),K(1,1,1,1),a.5q(b,"1c"),d&&(a.15(b,"17",d),c.3V(q)),c.3V("1R-4l").1v(".1c");M c}})}9 s(b){P c;S(!b||"1d"!==Y b)M e;"1d"!==Y b.22&&(b.22={1w:b.22});S("U"1Y b){S("1d"!==Y b.U||b.U.1V)b.U={1n:b.U};c=b.U.1n||e,!a.1F(c)&&(!c&&!c.15||c.18<1||"1d"===Y c&&!c.1V)&&(b.U.1n=e),"17"1Y b.U&&("1d"!==Y b.U.17&&(b.U.17={1n:b.U.17}),c=b.U.17.1n||e,!a.1F(c)&&(!c&&!c.15||c.18<1||"1d"===Y c&&!c.1V)&&(b.U.17.1n=e))}"14"1Y b&&("1d"!==Y b.14&&(b.14={1N:b.14,2o:b.14})),"O"1Y b&&("1d"!==Y b.O&&(b.O.1V?b.O={12:b.O}:b.O={1b:b.O})),"R"1Y b&&("1d"!==Y b.R&&(b.R.1V?b.R={12:b.R}:b.R={1b:b.R})),"13"1Y b&&("1d"!==Y b.13&&(b.13={35:b.13})),a.1m(h,9(){Q.2Y&&Q.2Y(b)});M b}9 r(){P c=b.5s;M c&&(c.4m||c.5u||a.5r).2b(c,27)}P d=!0,e=!1,f=5x,g,h,i,j="1q-1p",k="1q-2k",l="1q-3d-2t",m="2i.1c."+j,n=j+"-2w",o="-5D",p="5F",q="4N";g=a.2j.1c=9(b,h,i){P j=(""+b).2f(),k=f,l=j==="3X"?[d]:a.5I(27).4n(1,10),m=l[l.18-1],n=Q[0]?a.25(Q[0],"1c"):f;S(!27.18&&n||j==="70")M n;S("1o"===Y b){Q.1m(9(){P b=a.25(Q,"1c");S(!b)M d;m&&m.5L&&(b.31.1b=m);S(j!=="5M"&&j!=="1L"||!h)b[j]&&b[j].2b(b[j],l);2u S(a.5N(h)||i!==c)b.30(h,i);2u{k=b.4b(h);M e}});M k!==f?k:Q}S("1d"===Y b||!27.18){n=s(a.1l(d,{},b));M g.19.1I(Q,n,m)}},g.19=9(b,c){M Q.1m(9(f){9 p(b){9 c(){o.1J(Y b==="1d"||i.O.2Q),k.O.1v(l.O),k.R.1v(l.R)}S(o.31.2t)M e;o.31.1b=a.1l({},b),i.O.23>0?(1H(o.1r.O),o.1r.O=2T(c,i.O.23),l.O!==l.R&&k.R.19(l.R,9(){1H(o.1r.O)})):c()}P i,k,l,m=!b.1i||b.1i===e||b.1i.18<1||a("#"+j+"-"+b.1i).18?g.47++:b.1i,n=".1c-"+m+"-2h",o=u.1I(Q,m,b);S(o===e)M d;i=o.1L,a.1m(h,9(){Q.2z==="2z"&&Q(o)}),k={O:i.O.12,R:i.R.12},l={O:a.3z(""+i.O.1b).26(/ /g,n+" ")+n,R:a.3z(""+i.R.1b).26(/ /g,n+" ")+n},i.R.1b==="4d"&&(l.R="2B"+n),k.O.19(l.O,p),(i.O.2Q||i.5d)&&p(c)})},h=g.1C={2s:9(a){a=(""+a).26(/([A-Z])/," $1").26(/6f/4v,"1g").2f(),Q.x=(a.46(/N|1h/i)||a.46(/1g/)||["3h"])[0].2f(),Q.y=(a.46(/L|1j|1g/i)||["3h"])[0].2f(),Q.1e=a.39(0).4x(/^(t|b)/)>-1?"y":"x",Q.1o=9(){M Q.1e==="y"?Q.y+Q.x:Q.x+Q.y},Q.4z=9(){P a=Q.x.2v(0,1),b=Q.y.2v(0,1);M a===b?a:a==="c"||a!=="c"&&b!=="c"?b+a:a+b}},V:9(c,d){9 k(a,b){e.N+=b*a.2G(),e.L+=b*a.2P()}P e=c.V(),f=d,g=0,i=1z.2X,j;S(f){6p{S(f[0]===i)2O;f.X("14")!=="6r"&&(j=f.14(),e.N-=j.N+(1y(f.X("6t"),10)||0),e.L-=j.L+(1y(f.X("6v"),10)||0),g++)}2U(f=f.6x());(d[0]!==i||g>1)&&k(d,1),h.32<4.1&&h.32>3.1&&k(a(b),-1)}M e},32:4R((""+(/4H.*6C ([0-6D]{1,3})|(4H 6H).*6J.*6M/i.4G(6Q.6T)||[0,""])[1]).26("5a","6W").26("72","."))||e,2j:{15:9(b,c){S(Q.18){P d=Q[0],e="17",f=a.25(d,"1c");S(b===e){S(27.18<2)M a.15(d,q);S(Y f==="1d"){f&&f.1f&&f.1L.U.15===e&&f.31.15&&f.30("U.1n",c),a.2j["15"+p].2b(Q,27),a.15(d,q,a.15(d,e));M Q.3V(e)}}}},4K:9(b){P c=a([]),d="17",e;e=a.2j["4K"+p].2b(Q,27).2y("[4N]").1m(9(){a.15(Q,d,a.15(Q,q)),Q.3m(q)}).7n();M e},1Q:a.1q?f:9(b,c){a(Q).1m(9(){c||(!b||a.2y(b,[Q]).18)&&a("*",Q).2E(Q).1m(9(){a(Q).7v("1Q")})})}}},a.1m(h.2j,9(b,c){S(!c)M d;P e=a.2j[b+p]=a.2j[b];a.2j[b]=9(){M c.2b(Q,27)||e.2b(Q,27)}}),a(1z).19("3g.1c",9(a){i={3u:a.3u,44:a.44,1w:"3g"}}),g.3y="2.0.7E",g.47=0,g.55="49 7G 3x 59 3g 2B 37".2x(" "),g.5b=7M,g.3b={5d:e,1i:e,4c:d,U:{1n:d,15:"17",17:{1n:e,1A:e}},14:{1N:"L N",2o:"1j 1h",12:e,1s:e,21:e,2a:{x:0,y:0,1E:d,2q:d,4i:"3w 3w"},1P:d},O:{12:e,1b:"37",1P:d,23:3H,3c:e,2Q:e},R:{12:e,1b:"2B",1P:d,23:0,2m:e,1X:e,2C:"3I"},13:{35:"",2k:e,T:e},3K:{1J:f,4j:f,O:f,R:f,1T:f,2w:f,1M:f}},h.1u=9(a){P b=a.1C.1u;M"1d"===Y b?b:a.1C.1u=1D v(a)},h.1u.2z="1J",h.1u.2Y=9(a){P b=a.U,c;b&&"1u"1Y b&&(c=b.1u,Y c!=="1d"&&(c=a.U.1u={2n:c}),"38"!==Y c.2c&&c.2c&&(c.2c=!!c.2c))},a.1l(d,g.3b,{U:{1u:{5h:d,2c:d}}}),h.11=9(a){P b=a.1C.11;M"1d"===Y b?b:a.1C.11=1D x(a)},h.11.2z="1J",h.11.2Y=9(a){P b=a.13,c;b&&"11"1Y b&&(c=a.13.11,Y c!=="1d"&&(a.13.11={1k:c}),/1o|38/i.1B(Y c.1k)||(c.1k=d),Y c.T!=="2N"&&2F c.T,Y c.W!=="2N"&&2F c.W,Y c.1a!=="2N"&&c.1a!==d&&2F c.1a,Y c.V!=="2N"&&2F c.V)},a.1l(d,g.3b,{13:{11:{1k:d,3n:e,T:6,W:6,1a:d,V:0}}}),h.3U=9(b,c){9 l(a,b){P d=0,e=1,f=1,g=0,h=0,i=a.T,j=a.W;2U(i>0&&j>0&&e>0&&f>0){i=16.3p(i/2),j=16.3p(j/2),c.x==="N"?e=i:c.x==="1h"?e=a.T-i:e+=16.3p(i/2),c.y==="L"?f=j:c.y==="1j"?f=a.W-j:f+=16.3p(j/2),d=b.18;2U(d--){S(b.18<2)2O;g=b[d][0]-a.V.N,h=b[d][1]-a.V.L,(c.x==="N"&&g>=e||c.x==="1h"&&g<=e||c.x==="1g"&&(ga.T-e)||c.y==="L"&&h>=f||c.y==="1j"&&h<=f||c.y==="1g"&&(ha.W-f))&&b.6P(d,1)}}M{N:b[0][0],L:b[0][1]}}P d=b.15("3S").2f(),e=b.15("73").2x(","),f=[],g=a(\'3q[7g="#\'+b.7k("53").15("3Y")+\'"]\'),h=g.V(),i={T:0,W:0,V:{L:3v,1h:0,1j:0,N:3v}},j=0,k=0;h.N+=16.3s((g.3k()-g.T())/2),h.L+=16.3s((g.33()-g.W())/2);S(d==="5i"){j=e.18;2U(j--)k=[1y(e[--j],10),1y(e[j+1],10)],k[0]>i.V.1h&&(i.V.1h=k[0]),k[0]i.V.1j&&(i.V.1j=k[1]),k[1]