D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
blackhat.pw
:
/
homepages
/
35
/
d135665864
/
htdocs
/
scripts
/
Filename :
pie.js
back
Copy
/* PIE: CSS3 rendering for IE Version 1.0beta5 http://css3pie.com Dual-licensed for use under the Apache License Version 2.0 or the General Public License (GPL) Version 2. 2013.04.17 change made to PIE.BackgroundRenderer (hideBackground() and destroy()) to fix a bug related to fill images not loading on objects with rounded corners. Copyright (c) 2013 Adobe Systems Incorporated All Rights Reserved. */ (function(){var d=document,b=window.PIE;if(!b){b=window.PIE={CSS_PREFIX:"-pie-",STYLE_PREFIX:"Pie",CLASS_PREFIX:"pie_",tableCellTags:{TD:1,TH:1},childlessElements:{TABLE:1,THEAD:1,TBODY:1,TFOOT:1,TR:1,INPUT:1,TEXTAREA:1,SELECT:1,OPTION:1,IMG:1,HR:1},focusableElements:{A:1,INPUT:1,TEXTAREA:1,SELECT:1,BUTTON:1},inputButtonTypes:{submit:1,button:1,reset:1},emptyFn:function(){}};try{d.execCommand("BackgroundImageCache",!1,!0)}catch(c){}(function(){for(var a=4,f=d.createElement("div"),c=f.getElementsByTagName("i");f.innerHTML= "<\!--[if gt IE "+ ++a+"]><i></i><![endif]--\>",c[0];);b.ieVersion=a;if(a===6)b.CSS_PREFIX=b.CSS_PREFIX.replace(/^-/,"");b.ieDocMode=d.documentMode||b.ieVersion;f.innerHTML='<v:shape adj="1"/>';a=f.firstChild;a.style.behavior="url(#default#VML)";b.supportsVML=typeof a.adj==="object"})();(function(){var a,f=0,c={};b.Util={createVmlElement:function(f){a||(a=d.createDocumentFragment(),a.namespaces.add("css3vml","urn:schemas-microsoft-com:vml"));return a.createElement("css3vml:"+f)},getUID:function(a){return a&& a._pieId||(a._pieId="_"+ ++f)},merge:function(a){var f,b,c,j,d=arguments;f=1;for(b=d.length;f<b;f++)for(c in j=d[f],j)j.hasOwnProperty(c)&&(a[c]=j[c]);return a},withImageSize:function(a,f,b){var d=c[a],k,m;d?Object.prototype.toString.call(d)==="[object Array]"?d.push([f,b]):f.call(b,d):(m=c[a]=[[f,b]],k=new Image,k.onload=function(){d=c[a]={w:k.width,h:k.height};for(var f=0,b=m.length;f<b;f++)m[f][0].call(m[f][1],d);k.onload=null},k.src=a)}}})();b.GradientUtil={getGradientMetrics:function(a,f,c,g){function d(){n= l>=90&&l<270?f:0;o=l<180?c:0;p=f-n;q=c-o}function i(){for(;l<0;)l+=360;l%=360}var l=g.angle,g=g.gradientStart,k,m,n,o,p,q,r,t;if(g)g=g.coords(a,f,c),k=g.x,m=g.y;l?(l=l.degrees(),i(),d(),g||(k=n,m=o),g=b.GradientUtil.perpendicularIntersect(k,m,l,p,q),a=g[0],g=g[1]):g?(a=f-k,g=c-m):(k=m=a=0,g=c);r=a-k;t=g-m;l===void 0&&(l=!r?t<0?90:270:!t?r<0?180:0:-Math.atan2(t,r)/Math.PI*180,i(),d());return{angle:l,startX:k,startY:m,endX:a,endY:g,startCornerX:n,startCornerY:o,endCornerX:p,endCornerY:q,deltaX:r,deltaY:t, lineLength:b.GradientUtil.distance(k,m,a,g)}},perpendicularIntersect:function(a,f,b,c,d){return b===0||b===180?[c,f]:b===90||b===270?[a,d]:(b=Math.tan(-b*Math.PI/180),a=b*a-f,f=-1/b,c=f*c-d,d=f-b,[(c-a)/d,(b*c-f*a)/d])},distance:function(a,f,b,c){a=b-a;f=c-f;return Math.abs(a===0?f:f===0?a:Math.sqrt(a*a+f*f))}};b.Observable=function(){this.observers=[];this.indexes={}};b.Observable.prototype={observe:function(a){var f=b.Util.getUID(a),c=this.indexes,g=this.observers;if(!(f in c))c[f]=g.length,g.push(a)}, unobserve:function(a){var a=b.Util.getUID(a),f=this.indexes;a&&a in f&&(delete this.observers[f[a]],delete f[a])},fire:function(){for(var a=this.observers,f=a.length;f--;)a[f]&&a[f]()}};b.Heartbeat=new b.Observable;b.Heartbeat.run=function(){var a=this;if(!a.running)setInterval(function(){a.fire()},250),a.running=1};(function(){function a(){b.OnUnload.fire();window.detachEvent("onunload",a);window.PIE=null}b.OnUnload=new b.Observable;window.attachEvent("onunload",a);b.OnUnload.attachManagedEvent= function(a,b,c){a.attachEvent(b,c);this.observe(function(){a.detachEvent(b,c)})}})();b.OnResize=new b.Observable;b.OnUnload.attachManagedEvent(window,"onresize",function(){b.OnResize.fire()});(function(){function a(){b.OnScroll.fire()}b.OnScroll=new b.Observable;b.OnUnload.attachManagedEvent(window,"onscroll",a);b.OnResize.observe(a)})();(function(){var a;b.OnUnload.attachManagedEvent(window,"onbeforeprint",function(){a=b.Element.destroyAll()});b.OnUnload.attachManagedEvent(window,"onafterprint", function(){if(a){for(var f=0,c=a.length;f<c;f++)b.attach(a[f]);a=0}})})();b.OnMouseup=new b.Observable;b.OnUnload.attachManagedEvent(d,"onmouseup",function(){b.OnMouseup.fire()});b.Length=function(){function a(a){this.val=a}var f=d.createElement("length-calc"),c=d.documentElement,g=f.style,h={},i=["mm","cm","in","pt","pc"],l=i.length,k={};g.position="absolute";g.top=g.left="-9999px";for(c.appendChild(f);l--;)f.style.width="100"+i[l],h[i[l]]=f.offsetWidth/100;c.removeChild(f);f.style.width="1em";a.prototype= {unitRE:/(px|em|ex|mm|cm|in|pt|pc|%)$/,getNumber:function(){var a=this.num;if(a===void 0)a=this.num=parseFloat(this.val);return a},getUnit:function(){var j;var a=this.unit;if(!a)j=this.unit=(a=this.val.match(this.unitRE))&&a[0]||"px",a=j;return a},isPercentage:function(){return this.getUnit()==="%"},pixels:function(a,f){var b=this.getNumber(),c=this.getUnit();switch(c){case "px":return b;case "%":return b*(typeof f==="function"?f():f)/100;case "em":return b*this.getEmPixels(a);case "ex":return b* this.getEmPixels(a)/2;default:return b*h[c]}},getEmPixels:function(a){var c=a.currentStyle.fontSize,g,j;return c.indexOf("px")>0?parseFloat(c):a.tagName in b.childlessElements?(j=this,g=a.parentNode,b.getLength(c).pixels(g,function(){return j.getEmPixels(g)})):(a.appendChild(f),c=f.offsetWidth,f.parentNode===a&&a.removeChild(f),c)}};b.getLength=function(f){return k[f]||(k[f]=new a(f))};return a}();b.BgPosition=function(){function a(a){this.tokens=a}var f=b.getLength("50%"),c={top:1,center:1,bottom:1}, g={left:1,center:1,right:1};a.prototype={getValues:function(){if(!this._values){var a=this.tokens,d=a.length,l=b.Tokenizer,k=l.Type,m=b.getLength("0"),k=k.IDENT,m=["left",m,"top",m];d===1&&(a.push(new l.Token(k,"center")),d++);if(d===2)k&(a[0].tokenType|a[1].tokenType)&&a[0].tokenValue in c&&a[1].tokenValue in g&&a.push(a.shift()),a[0].tokenType&k?a[0].tokenValue==="center"?m[1]=f:m[0]=a[0].tokenValue:a[0].isLengthOrPercent()&&(m[1]=b.getLength(a[0].tokenValue)),a[1].tokenType&k?a[1].tokenValue=== "center"?m[3]=f:m[2]=a[1].tokenValue:a[1].isLengthOrPercent()&&(m[3]=b.getLength(a[1].tokenValue));this._values=m}return this._values},coords:function(a,f,b){var c=this.getValues(),g=c[1].pixels(a,f),a=c[3].pixels(a,b);return{x:c[0]==="right"?f-g:g,y:c[2]==="bottom"?b-a:a}}};return a}();b.BgSize=function(){function a(a,b){this.w=a;this.h=b}a.prototype={pixels:function(a,b,c,d,i){var l=this.w,k=this.h,m=b/c;d/=i;l==="contain"?(l=d>m?b:c*d,k=d>m?b/d:c):l==="cover"?(l=d<m?b:c*d,k=d<m?b/d:c):l==="auto"? (k=k==="auto"?i:k.pixels(a,c),l=k*d):(l=l.pixels(a,b),k=k==="auto"?l/d:k.pixels(a,c));return{w:l,h:k}}};a.DEFAULT=new a("auto","auto");return a}();b.Angle=function(){function a(a){this.val=a}a.prototype={unitRE:/[a-z]+$/i,getUnit:function(){return this._unit||(this._unit=this.val.match(this.unitRE)[0].toLowerCase())},degrees:function(){var a=this._deg,b;if(a===void 0)a=this.getUnit(),b=parseFloat(this.val,10),a=this._deg=a==="deg"?b:a==="rad"?b/Math.PI*180:a==="grad"?b/400*360:a==="turn"?b*360:0; return a}};return a}();b.Color=function(){function a(a){this.val=a}var f={};a.rgbaRE=/\s*rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d+|\d*\.\d+)\s*\)\s*/;a.names={aliceblue:"F0F8FF",antiquewhite:"FAEBD7",aqua:"0FF",aquamarine:"7FFFD4",azure:"F0FFFF",beige:"F5F5DC",bisque:"FFE4C4",black:"000",blanchedalmond:"FFEBCD",blue:"00F",blueviolet:"8A2BE2",brown:"A52A2A",burlywood:"DEB887",cadetblue:"5F9EA0",chartreuse:"7FFF00",chocolate:"D2691E",coral:"FF7F50",cornflowerblue:"6495ED",cornsilk:"FFF8DC", crimson:"DC143C",cyan:"0FF",darkblue:"00008B",darkcyan:"008B8B",darkgoldenrod:"B8860B",darkgray:"A9A9A9",darkgreen:"006400",darkkhaki:"BDB76B",darkmagenta:"8B008B",darkolivegreen:"556B2F",darkorange:"FF8C00",darkorchid:"9932CC",darkred:"8B0000",darksalmon:"E9967A",darkseagreen:"8FBC8F",darkslateblue:"483D8B",darkslategray:"2F4F4F",darkturquoise:"00CED1",darkviolet:"9400D3",deeppink:"FF1493",deepskyblue:"00BFFF",dimgray:"696969",dodgerblue:"1E90FF",firebrick:"B22222",floralwhite:"FFFAF0",forestgreen:"228B22", fuchsia:"F0F",gainsboro:"DCDCDC",ghostwhite:"F8F8FF",gold:"FFD700",goldenrod:"DAA520",gray:"808080",green:"008000",greenyellow:"ADFF2F",honeydew:"F0FFF0",hotpink:"FF69B4",indianred:"CD5C5C",indigo:"4B0082",ivory:"FFFFF0",khaki:"F0E68C",lavender:"E6E6FA",lavenderblush:"FFF0F5",lawngreen:"7CFC00",lemonchiffon:"FFFACD",lightblue:"ADD8E6",lightcoral:"F08080",lightcyan:"E0FFFF",lightgoldenrodyellow:"FAFAD2",lightgreen:"90EE90",lightgrey:"D3D3D3",lightpink:"FFB6C1",lightsalmon:"FFA07A",lightseagreen:"20B2AA", lightskyblue:"87CEFA",lightslategray:"789",lightsteelblue:"B0C4DE",lightyellow:"FFFFE0",lime:"0F0",limegreen:"32CD32",linen:"FAF0E6",magenta:"F0F",maroon:"800000",mediumauqamarine:"66CDAA",mediumblue:"0000CD",mediumorchid:"BA55D3",mediumpurple:"9370D8",mediumseagreen:"3CB371",mediumslateblue:"7B68EE",mediumspringgreen:"00FA9A",mediumturquoise:"48D1CC",mediumvioletred:"C71585",midnightblue:"191970",mintcream:"F5FFFA",mistyrose:"FFE4E1",moccasin:"FFE4B5",navajowhite:"FFDEAD",navy:"000080",oldlace:"FDF5E6", olive:"808000",olivedrab:"688E23",orange:"FFA500",orangered:"FF4500",orchid:"DA70D6",palegoldenrod:"EEE8AA",palegreen:"98FB98",paleturquoise:"AFEEEE",palevioletred:"D87093",papayawhip:"FFEFD5",peachpuff:"FFDAB9",peru:"CD853F",pink:"FFC0CB",plum:"DDA0DD",powderblue:"B0E0E6",purple:"800080",red:"F00",rosybrown:"BC8F8F",royalblue:"4169E1",saddlebrown:"8B4513",salmon:"FA8072",sandybrown:"F4A460",seagreen:"2E8B57",seashell:"FFF5EE",sienna:"A0522D",silver:"C0C0C0",skyblue:"87CEEB",slateblue:"6A5ACD",slategray:"708090", snow:"FFFAFA",springgreen:"00FF7F",steelblue:"4682B4",tan:"D2B48C",teal:"008080",thistle:"D8BFD8",tomato:"FF6347",turquoise:"40E0D0",violet:"EE82EE",wheat:"F5DEB3",white:"FFF",whitesmoke:"F5F5F5",yellow:"FF0",yellowgreen:"9ACD32"};a.prototype={parse:function(){if(!this._color){var b=this.val,f;if(f=b.match(a.rgbaRE))this._color="rgb("+f[1]+","+f[2]+","+f[3]+")",this._alpha=parseFloat(f[4]);else{if((f=b.toLowerCase())in a.names)b="#"+a.names[f];this._color=b;this._alpha=b==="transparent"?0:1}}},colorValue:function(a){this.parse(); return this._color==="currentColor"?a.currentStyle.color:this._color},alpha:function(){this.parse();return this._alpha}};b.getColor=function(b){return f[b]||(f[b]=new a(b))};return a}();b.Tokenizer=function(){function a(a){this.css=a;this.ch=0;this.tokens=[];this.tokenIndex=0}var f=a.Type={ANGLE:1,CHARACTER:2,COLOR:4,DIMEN:8,FUNCTION:16,IDENT:32,LENGTH:64,NUMBER:128,OPERATOR:256,PERCENT:512,STRING:1024,URL:2048};a.Token=function(a,b){this.tokenType=a;this.tokenValue=b};a.Token.prototype={isLength:function(){return this.tokenType& f.LENGTH||this.tokenType&f.NUMBER&&this.tokenValue==="0"},isLengthOrPercent:function(){return this.isLength()||this.tokenType&f.PERCENT}};a.prototype={whitespace:/\s/,number:/^[\+\-]?(\d*\.)?\d+/,url:/^url\(\s*("([^"]*)"|'([^']*)'|([!#$%&*-~]*))\s*\)/i,ident:/^\-?[_a-z][\w-]*/i,string:/^("([^"]*)"|'([^']*)')/,operator:/^[\/,]/,hash:/^#[\w]+/,hashColor:/^#([\da-f]{6}|[\da-f]{3})/i,unitTypes:{px:f.LENGTH,em:f.LENGTH,ex:f.LENGTH,mm:f.LENGTH,cm:f.LENGTH,"in":f.LENGTH,pt:f.LENGTH,pc:f.LENGTH,deg:f.ANGLE, rad:f.ANGLE,grad:f.ANGLE},colorFunctions:{rgb:1,rgba:1,hsl:1,hsla:1},next:function(c){function g(b,f){var g=new a.Token(b,f);c||(n.tokens.push(g),n.tokenIndex++);return g}function d(){n.tokenIndex++;return null}var i,l,k,m,n=this;if(this.tokenIndex<this.tokens.length)return this.tokens[this.tokenIndex++];for(;this.whitespace.test(this.css.charAt(this.ch));)this.ch++;if(this.ch>=this.css.length)return d();l=this.ch;i=this.css.substring(this.ch);k=i.charAt(0);switch(k){case "#":if(m=i.match(this.hashColor))return this.ch+= m[0].length,g(f.COLOR,m[0]);break;case '"':case "'":if(m=i.match(this.string))return this.ch+=m[0].length,g(f.STRING,m[2]||m[3]||"");break;case "/":case ",":return this.ch++,g(f.OPERATOR,k);case "u":if(m=i.match(this.url))return this.ch+=m[0].length,g(f.URL,m[2]||m[3]||m[4]||"")}if(m=i.match(this.number)){k=m[0];this.ch+=k.length;if(i.charAt(k.length)==="%")return this.ch++,g(f.PERCENT,k+"%");if(m=i.substring(k.length).match(this.ident))return k+=m[0],this.ch+=m[0].length,g(this.unitTypes[m[0].toLowerCase()]|| f.DIMEN,k);return g(f.NUMBER,k)}if(m=i.match(this.ident)){k=m[0];this.ch+=k.length;if(k.toLowerCase()in b.Color.names||k==="currentColor"||k==="transparent")return g(f.COLOR,k);if(i.charAt(k.length)==="("){this.ch++;if(k.toLowerCase()in this.colorFunctions){i=function(a){return a&&a.tokenType&f.NUMBER};m=function(a){return a&&a.tokenType&(f.NUMBER|f.PERCENT)};var o=function(a,b){return a&&a.tokenValue===b},p=function(){return n.next(1)};if((k.charAt(0)==="r"?m(p()):i(p()))&&o(p(),",")&&m(p())&&o(p(), ",")&&m(p())&&(k==="rgb"||k==="hsa"||o(p(),",")&&i(p()))&&o(p(),")"))return g(f.COLOR,this.css.substring(l,this.ch));return d()}return g(f.FUNCTION,k)}return g(f.IDENT,k)}this.ch++;return g(f.CHARACTER,k)},hasNext:function(){var a=this.next();this.prev();return!!a},prev:function(){return this.tokens[this.tokenIndex-- -2]},all:function(){for(;this.next(););return this.tokens},until:function(a,b){for(var f=[],c,d;c=this.next();){if(a(c)){d=!0;this.prev();break}f.push(c)}return b&&!d?null:f}};return a}(); b.BoundsInfo=function(a){this.targetElement=a};b.BoundsInfo.prototype={_locked:0,positionChanged:function(){var a=this._lastBounds,b;return!a||(b=this.getBounds())&&(a.x!==b.x||a.y!==b.y)},sizeChanged:function(){var a=this._lastBounds,b;return!a||(b=this.getBounds())&&(a.w!==b.w||a.h!==b.h)},getLiveBounds:function(){var a=this.targetElement,f=a.getBoundingClientRect(),c=b.ieDocMode===9;return{x:f.left,y:f.top,w:c?a.offsetWidth:f.right-f.left,h:c?a.offsetHeight:f.bottom-f.top}},getBounds:function(){return this._locked? this._lockedBounds||(this._lockedBounds=this.getLiveBounds()):this.getLiveBounds()},hasBeenQueried:function(){return!!this._lastBounds},lock:function(){++this._locked},unlock:function(){if(!--this._locked){if(this._lockedBounds)this._lastBounds=this._lockedBounds;this._lockedBounds=null}}};(function(){function a(a){var c=b.Util.getUID(a);return function(){if(this._locked){var b=this._lockedValues||(this._lockedValues={});return c in b?b[c]:b[c]=a.call(this)}else return a.call(this)}}b.StyleInfoBase= {_locked:0,newStyleInfo:function(a){function c(a){this.targetElement=a;this._lastCss=this.getCss()}b.Util.merge(c.prototype,b.StyleInfoBase,a);c._propsCache={};return c},getProps:function(){var a=this.getCss(),b=this.constructor._propsCache;return a?a in b?b[a]:b[a]=this.parseCss(a):null},getCss:a(function(){var a=this.targetElement,c=this.constructor,g=a.style,a=a.currentStyle,d=this.cssProperty,i=this.styleProperty,l=c._prefixedCssProp||(c._prefixedCssProp=b.CSS_PREFIX+d),c=c._prefixedStyleProp|| (c._prefixedStyleProp=b.STYLE_PREFIX+i.charAt(0).toUpperCase()+i.substring(1));return g[c]||a.getAttribute(l)||g[i]||a.getAttribute(d)}),isActive:a(function(){return!!this.getProps()}),changed:a(function(){var a=this.getCss(),b=a!==this._lastCss;this._lastCss=a;return b}),cacheWhenLocked:a,lock:function(){++this._locked},unlock:function(){--this._locked||delete this._lockedValues}}})();b.BackgroundStyleInfo=b.StyleInfoBase.newStyleInfo({cssProperty:b.CSS_PREFIX+"background",styleProperty:b.STYLE_PREFIX+ "Background",attachIdents:{scroll:1,fixed:1,local:1},repeatIdents:{"repeat-x":1,"repeat-y":1,repeat:1,"no-repeat":1},originAndClipIdents:{"padding-box":1,"border-box":1,"content-box":1},positionIdents:{top:1,right:1,bottom:1,left:1,center:1},sizeIdents:{contain:1,cover:1},propertyNames:{CLIP:"backgroundClip",COLOR:"backgroundColor",IMAGE:"backgroundImage",ORIGIN:"backgroundOrigin",POSITION:"backgroundPosition",REPEAT:"backgroundRepeat",SIZE:"backgroundSize"},parseCss:function(a){function f(a){return a&& a.isLengthOrPercent()||a.tokenType&n&&a.tokenValue in t}function c(a){return a&&(a.isLengthOrPercent()&&b.getLength(a.tokenValue)||a.tokenValue==="auto"&&"auto")}var g=this.targetElement.currentStyle,d,i,l,k=b.Tokenizer.Type,m=k.OPERATOR,n=k.IDENT,o=k.COLOR,p,q,r=0,t=this.positionIdents,v,x,s={bgImages:[]};if(this.getCss3()){d=new b.Tokenizer(a);for(l={};i=d.next();)if(p=i.tokenType,q=i.tokenValue,!l.imgType&&p&k.FUNCTION&&q==="linear-gradient"){v={stops:[],imgType:q};for(x={};i=d.next();){p=i.tokenType; q=i.tokenValue;if(p&k.CHARACTER&&q===")"){x.color&&v.stops.push(x);v.stops.length>1&&b.Util.merge(l,v);break}if(p&o){if(v.angle||v.gradientStart){i=d.prev();if(i.tokenType!==m)break;d.next()}x={color:b.getColor(q)};i=d.next();i.isLengthOrPercent()?x.offset=b.getLength(i.tokenValue):d.prev()}else if(p&k.ANGLE&&!v.angle&&!x.color&&!v.stops.length)v.angle=new b.Angle(i.tokenValue);else if(f(i)&&!v.gradientStart&&!x.color&&!v.stops.length)d.prev(),v.gradientStart=new b.BgPosition(d.until(function(a){return!f(a)}, !1));else if(p&m&&q===",")x.color&&(v.stops.push(x),x={});else break}}else if(!l.imgType&&p&k.URL)l.imgUrl=q,l.imgType="image";else if(f(i)&&!l.bgPosition)d.prev(),l.bgPosition=new b.BgPosition(d.until(function(a){return!f(a)},!1));else if(p&n)if(q in this.repeatIdents&&!l.imgRepeat)l.imgRepeat=q;else if(q in this.originAndClipIdents&&!l.bgOrigin)l.bgOrigin=q,(i=d.next())&&i.tokenType&n&&i.tokenValue in this.originAndClipIdents?l.bgClip=i.tokenValue:(l.bgClip=q,d.prev());else if(q in this.attachIdents&& !l.bgAttachment)l.bgAttachment=q;else return null;else if(p&o&&!s.color)s.color=b.getColor(q);else if(p&m&&q==="/"&&!l.bgSize&&l.bgPosition)if(i=d.next(),i.tokenType&n&&i.tokenValue in this.sizeIdents)l.bgSize=new b.BgSize(i.tokenValue);else if(i=c(i))p=c(d.next()),p||(p=i,d.prev()),l.bgSize=new b.BgSize(i,p);else return null;else if(p&m&&q===","&&l.imgType)l.origString=a.substring(r,d.ch-1),r=d.ch,s.bgImages.push(l),l={};else return null;if(l.imgType)l.origString=a.substring(r),s.bgImages.push(l)}else this.withActualBg(b.ieDocMode< 9?function(){var a=this.propertyNames,f=g[a.POSITION+"X"],c=g[a.POSITION+"Y"],d=g[a.IMAGE],j=g[a.COLOR];if(j!=="transparent")s.color=b.getColor(j);if(d!=="none")s.bgImages=[{imgType:"image",imgUrl:(new b.Tokenizer(d)).next().tokenValue,imgRepeat:g[a.REPEAT],bgPosition:new b.BgPosition((new b.Tokenizer(f+" "+c)).all())}]}:function(){var a=this.propertyNames,f=/\s*,\s*/,c=g[a.IMAGE].split(f),d=g[a.COLOR],j,h,k,i,n,l;if(d!=="transparent")s.color=b.getColor(d);if((i=c.length)&&c[0]!=="none"){d=g[a.REPEAT].split(f); j=g[a.POSITION].split(f);h=g[a.ORIGIN].split(f);k=g[a.CLIP].split(f);a=g[a.SIZE].split(f);s.bgImages=[];for(f=0;f<i;f++)if((n=c[f])&&n!=="none")l=a[f].split(" "),s.bgImages.push({origString:n+" "+d[f]+" "+j[f]+" / "+a[f]+" "+h[f]+" "+k[f],imgType:"image",imgUrl:(new b.Tokenizer(n)).next().tokenValue,imgRepeat:d[f],bgPosition:new b.BgPosition((new b.Tokenizer(j[f])).all()),bgOrigin:h[f],bgClip:k[f],bgSize:new b.BgSize(l[0],l[1])})}});return s.color||s.bgImages[0]?s:null},withActualBg:function(a){var f= b.ieDocMode>8,c=this.propertyNames,g=this.targetElement.runtimeStyle,d=g[c.IMAGE],i=g[c.COLOR],l=g[c.REPEAT],k,m,n,o;d&&(g[c.IMAGE]="");i&&(g[c.COLOR]="");l&&(g[c.REPEAT]="");f&&(k=g[c.CLIP],m=g[c.ORIGIN],o=g[c.POSITION],n=g[c.SIZE],k&&(g[c.CLIP]=""),m&&(g[c.ORIGIN]=""),o&&(g[c.POSITION]=""),n&&(g[c.SIZE]=""));a=a.call(this);d&&(g[c.IMAGE]=d);i&&(g[c.COLOR]=i);l&&(g[c.REPEAT]=l);f&&(k&&(g[c.CLIP]=k),m&&(g[c.ORIGIN]=m),o&&(g[c.POSITION]=o),n&&(g[c.SIZE]=n));return a},getCss:b.StyleInfoBase.cacheWhenLocked(function(){return this.getCss3()|| this.withActualBg(function(){var a=this.targetElement.currentStyle,b=this.propertyNames;return a[b.COLOR]+" "+a[b.IMAGE]+" "+a[b.REPEAT]+" "+a[b.POSITION+"X"]+" "+a[b.POSITION+"Y"]})}),getCss3:b.StyleInfoBase.cacheWhenLocked(function(){var a=this.targetElement;return a.style[this.styleProperty]||a.currentStyle.getAttribute(this.cssProperty)}),isPngFix:function(){var a=0;if(b.ieVersion<7)a=this.targetElement,a=""+(a.style[b.STYLE_PREFIX+"PngFix"]||a.currentStyle.getAttribute(b.CSS_PREFIX+"png-fix"))=== "true";return a},isActive:b.StyleInfoBase.cacheWhenLocked(function(){return(this.getCss3()||this.isPngFix())&&!!this.getProps()})});b.BorderStyleInfo=b.StyleInfoBase.newStyleInfo({sides:["Top","Right","Bottom","Left"],namedWidths:{thin:"1px",medium:"3px",thick:"5px"},parseCss:function(){var a={},f={},c={},g=!1,d=!0,i=!0,l=!0;this.withActualBorder(function(){var h;for(var k=this.targetElement.currentStyle,m=0,n,o,p,q,r,t,v;m<4;m++)p=this.sides[m],v=p.charAt(0).toLowerCase(),n=f[v]=k["border"+p+"Style"], o=k["border"+p+"Color"],p=k["border"+p+"Width"],m>0&&(n!==q&&(i=!1),o!==r&&(d=!1),p!==t&&(l=!1)),q=n,r=o,t=p,c[v]=b.getColor(o),h=a[v]=b.getLength(f[v]==="none"?"0":this.namedWidths[p]||p),p=h,p.pixels(this.targetElement)>0&&(g=!0)});return g?{widths:a,styles:f,colors:c,widthsSame:l,colorsSame:d,stylesSame:i}:null},getCss:b.StyleInfoBase.cacheWhenLocked(function(){var a=this.targetElement,f=a.currentStyle,c;a.tagName in b.tableCellTags&&a.offsetParent.currentStyle.borderCollapse==="collapse"||this.withActualBorder(function(){c= f.borderWidth+"|"+f.borderStyle+"|"+f.borderColor});return c}),withActualBorder:function(a){var b=this.targetElement.runtimeStyle,c=b.borderWidth,g=b.borderColor;if(c)b.borderWidth="";if(g)b.borderColor="";a=a.call(this);if(c)b.borderWidth=c;if(g)b.borderColor=g;return a}});(function(){b.BorderRadiusStyleInfo=b.StyleInfoBase.newStyleInfo({cssProperty:"border-radius",styleProperty:"borderRadius",parseCss:function(a){var c=null,g,d,i,l,k=!1;if(a){d=new b.Tokenizer(a);var m=function(){for(var a=[],f;(i= d.next())&&i.isLengthOrPercent();){l=b.getLength(i.tokenValue);f=l.getNumber();if(f<0)return null;f>0&&(k=!0);a.push(l)}return a.length>0&&a.length<5?{tl:a[0],tr:a[1]||a[0],br:a[2]||a[0],bl:a[3]||a[1]||a[0]}:null};if(a=m())i?i.tokenType&b.Tokenizer.Type.OPERATOR&&i.tokenValue==="/"&&(g=m()):g=a,k&&a&&g&&(c={x:a,y:g})}return c}});var a=b.getLength("0"),a={tl:a,tr:a,br:a,bl:a};b.BorderRadiusStyleInfo.ALL_ZERO={x:a,y:a}})();b.BorderImageStyleInfo=b.StyleInfoBase.newStyleInfo({cssProperty:"border-image", styleProperty:"borderImage",repeatIdents:{stretch:1,round:1,repeat:1,space:1},parseCss:function(a){var f=null,c,g,d,i,l,k,m=0,n=b.Tokenizer.Type,o=n.IDENT,p=n.NUMBER,q=n.PERCENT;if(a){c=new b.Tokenizer(a);for(var f={},r=function(a){return a&&a.tokenType&n.OPERATOR&&a.tokenValue==="/"},t=function(a){return a&&a.tokenType&o&&a.tokenValue==="fill"},v=function(){i=c.until(function(a){return!(a.tokenType&(p|q))});t(c.next())&&!f.fill?f.fill=!0:c.prev();r(c.next())?(m++,l=c.until(function(a){return!a.isLengthOrPercent()&& !(a.tokenType&o&&a.tokenValue==="auto")}),r(c.next())&&(m++,k=c.until(function(a){return!a.isLength()}))):c.prev()};a=c.next();)if(g=a.tokenType,d=a.tokenValue,g&(p|q)&&!i)c.prev(),v();else if(t(a)&&!f.fill)f.fill=!0,v();else if(g&o&&this.repeatIdents[d]&&!f.repeat){if(f.repeat={h:d},a=c.next())a.tokenType&o&&this.repeatIdents[a.tokenValue]?f.repeat.v=a.tokenValue:c.prev()}else if(g&n.URL&&!f.src)f.src=d;else return null;if(!f.src||!i||i.length<1||i.length>4||l&&l.length>4||m===1&&l.length<1||k&& k.length>4||m===2&&k.length<1)return null;if(!f.repeat)f.repeat={h:"stretch"};if(!f.repeat.v)f.repeat.v=f.repeat.h;a=function(a,b){return{t:b(a[0]),r:b(a[1]||a[0]),b:b(a[2]||a[0]),l:b(a[3]||a[1]||a[0])}};f.slice=a(i,function(a){return b.getLength(a.tokenType&p?a.tokenValue+"px":a.tokenValue)});if(l&&l[0])f.widths=a(l,function(a){return a.isLengthOrPercent()?b.getLength(a.tokenValue):a.tokenValue});if(k&&k[0])f.outset=a(k,function(a){return a.isLength()?b.getLength(a.tokenValue):a.tokenValue})}return f}}); b.BoxShadowStyleInfo=b.StyleInfoBase.newStyleInfo({cssProperty:"box-shadow",styleProperty:"boxShadow",parseCss:function(a){var f,c=b.getLength,g=b.Tokenizer.Type,d;if(a){d=new b.Tokenizer(a);f={outset:[],inset:[]};for(a=function(){for(var a,l,k,m,n,o;a=d.next();)if(k=a.tokenValue,l=a.tokenType,l&g.OPERATOR&&k===",")break;else if(a.isLength()&&!n)d.prev(),n=d.until(function(a){return!a.isLength()});else if(l&g.COLOR&&!m)m=k;else if(l&g.IDENT&&k==="inset"&&!o)o=!0;else return!1;a=n&&n.length;if(a>1&& a<5)return(o?f.inset:f.outset).push({xOffset:c(n[0].tokenValue),yOffset:c(n[1].tokenValue),blur:c(n[2]?n[2].tokenValue:"0"),spread:c(n[3]?n[3].tokenValue:"0"),color:b.getColor(m||"currentColor")}),!0;return!1};a(););}return f&&(f.inset.length||f.outset.length)?f:null}});b.VisibilityStyleInfo=b.StyleInfoBase.newStyleInfo({getCss:b.StyleInfoBase.cacheWhenLocked(function(){var a=this.targetElement.currentStyle;return a.visibility+"|"+a.display}),parseCss:function(){var a=this.targetElement,b=a.runtimeStyle, a=a.currentStyle,c=b.visibility,g;b.visibility="";g=a.visibility;b.visibility=c;return{visible:g!=="hidden",displayed:a.display!=="none"}},isActive:function(){return!1}});b.RendererBase={newRenderer:function(a){function f(a,b,f,c){this.targetElement=a;this.boundsInfo=b;this.styleInfos=f;this.parent=c}b.Util.merge(f.prototype,b.RendererBase,a);return f},isPositioned:!1,needsUpdate:function(){return!1},prepareUpdate:b.emptyFn,updateProps:function(){this.destroy();this.isActive()&&this.draw()},updatePos:function(){this.isPositioned= !0},updateSize:function(){this.isActive()?this.draw():this.destroy()},addLayer:function(a,b){this.removeLayer(a);for(var c=this._layers||(this._layers=[]),g=a+1,d=c.length,i;g<d;g++)if(i=c[g])break;c[a]=b;this.getBox().insertBefore(b,i||null)},getLayer:function(a){var b=this._layers;return b&&b[a]||null},removeLayer:function(a){var b=this.getLayer(a),c=this._box;b&&c&&(c.removeChild(b),this._layers[a]=null)},getShape:function(a,f,c,g){var h=this._shapes||(this._shapes={}),i=h[a];if(!i)i=h[a]=b.Util.createVmlElement("shape"), f&&i.appendChild(i[f]=b.Util.createVmlElement(f)),g&&(c=this.getLayer(g),c||(this.addLayer(g,d.createElement("group"+g)),c=this.getLayer(g))),c.appendChild(i),a=i.style,a.position="absolute",a.left=a.top=0,a.behavior="url(#default#VML)";return i},deleteShape:function(a){var b=this._shapes,c=b&&b[a];c&&(c.parentNode.removeChild(c),delete b[a]);return!!c},getRadiiPixels:function(a){var b=this.targetElement,c=this.boundsInfo.getBounds(),g=c.w,d=c.h,i,l,k,m,n,o,c=a.x.tl.pixels(b,g);i=a.y.tl.pixels(b, d);l=a.x.tr.pixels(b,g);k=a.y.tr.pixels(b,d);m=a.x.br.pixels(b,g);n=a.y.br.pixels(b,d);o=a.x.bl.pixels(b,g);a=a.y.bl.pixels(b,d);g=Math.min(g/(c+l),d/(k+n),g/(o+m),d/(i+a));g<1&&(c*=g,i*=g,l*=g,k*=g,m*=g,n*=g,o*=g,a*=g);return{x:{tl:c,tr:l,br:m,bl:o},y:{tl:i,tr:k,br:n,bl:a}}},getBoxPath:function(a,b,c){var b=b||1,d,h,i=this.boundsInfo.getBounds();h=i.w*b;var i=i.h*b,l=this.styleInfos.borderRadiusInfo,k=Math.floor,m=Math.ceil,n=a?a.t*b:0,o=a?a.r*b:0,p=a?a.b*b:0,a=a?a.l*b:0,q,r,t,v,x;c||l.isActive()? (d=this.getRadiiPixels(c||l.getProps()),c=d.x.tl*b,l=d.y.tl*b,q=d.x.tr*b,r=d.y.tr*b,t=d.x.br*b,v=d.y.br*b,x=d.x.bl*b,b*=d.y.bl,h="m"+k(a)+","+k(l)+"qy"+k(c)+","+k(n)+"l"+m(h-q)+","+k(n)+"qx"+m(h-o)+","+k(r)+"l"+m(h-o)+","+m(i-v)+"qy"+m(h-t)+","+m(i-p)+"l"+k(x)+","+m(i-p)+"qx"+k(a)+","+m(i-b)+" x e"):h="m"+k(a)+","+k(n)+"l"+m(h-o)+","+k(n)+"l"+m(h-o)+","+m(i-p)+"l"+k(a)+","+m(i-p)+"xe";return h},getBox:function(){var a=this.parent.getLayer(this.boxZIndex),b;if(!a)a=d.createElement(this.boxName),b= a.style,b.position="absolute",b.top=b.left=0,this.parent.addLayer(this.boxZIndex,a);return a},hideBorder:function(){var a=this.targetElement,c=a.currentStyle,j=a.runtimeStyle,g=a.tagName,h=b.ieVersion===6,i;if(h&&(g in b.childlessElements||g==="FIELDSET")||g==="BUTTON"||g==="INPUT"&&a.type in b.inputButtonTypes){j.borderWidth="";g=this.styleInfos.borderInfo.sides;for(i=g.length;i--;)h=g[i],j["padding"+h]="",j["padding"+h]=b.getLength(c["padding"+h]).pixels(a)+b.getLength(c["border"+h+"Width"]).pixels(a)+ (b.ieVersion!==8&&i%2?1:0);j.borderWidth=0}else if(h){if(a.childNodes.length!==1||a.firstChild.tagName!=="ie6-mask"){c=d.createElement("ie6-mask");g=c.style;g.visibility="visible";for(g.zoom=1;g=a.firstChild;)c.appendChild(g);a.appendChild(c);j.visibility="hidden"}}else j.borderColor="transparent"},unhideBorder:function(){},destroy:function(){this.parent.removeLayer(this.boxZIndex);delete this._shapes;delete this._layers}};b.RootRenderer=b.RendererBase.newRenderer({isActive:function(){var a=this.childRenderers, b;for(b in a)if(a.hasOwnProperty(b)&&a[b].isActive())return!0;return!1},needsUpdate:function(){return this.styleInfos.visibilityInfo.changed()},updatePos:function(){if(this.isActive()){var a=this.getPositioningElement(),c=a,j,a=a.currentStyle,g=a.position,h=this.getBox().style,i=0,l=0,l=this.boundsInfo.getBounds();if(g==="fixed"&&b.ieVersion>6)i=l.x,l=l.y,c=g;else{do c=c.offsetParent;while(c&&c.currentStyle.position==="static");c?(j=c.getBoundingClientRect(),c=c.currentStyle,i=l.x-j.left-(parseFloat(c.borderLeftWidth)|| 0),l=l.y-j.top-(parseFloat(c.borderTopWidth)||0)):(c=d.documentElement,i=l.x+c.scrollLeft-c.clientLeft,l=l.y+c.scrollTop-c.clientTop);c="absolute"}h.position=c;h.left=i;h.top=l;h.zIndex=g==="static"?-1:a.zIndex;this.isPositioned=!0}},updateSize:b.emptyFn,updateVisibility:function(){var a=this.styleInfos.visibilityInfo.getProps();this.getBox().style.display=a.visible&&a.displayed?"":"none"},updateProps:function(){this.isActive()?this.updateVisibility():this.destroy()},getPositioningElement:function(){var a= this.targetElement;return a.tagName in b.tableCellTags?a.offsetParent:a},getBox:function(){var a=this._box,b;if(!a)b=this.getPositioningElement(),a=this._box=d.createElement("css3-container"),a.style.direction="ltr",this.updateVisibility(),b.parentNode.insertBefore(a,b);return a},finishUpdate:b.emptyFn,destroy:function(){var a=this._box,b;a&&(b=a.parentNode)&&b.removeChild(a);delete this._box;delete this._layers}});b.BackgroundRenderer=b.RendererBase.newRenderer({boxZIndex:2,boxName:"background", needsUpdate:function(){var a=this.styleInfos;return a.backgroundInfo.changed()||a.borderRadiusInfo.changed()},isActive:function(){var a=this.styleInfos;return a.borderImageInfo.isActive()||a.borderRadiusInfo.isActive()||a.backgroundInfo.isActive()||a.boxShadowInfo.isActive()&&a.boxShadowInfo.getProps().inset},draw:function(){var a=this.boundsInfo.getBounds();a.w&&a.h&&(this.drawBgColor(),this.drawBgImages())},drawBgColor:function(){var a=this.styleInfos.backgroundInfo.getProps(),b=this.boundsInfo.getBounds(), c=this.targetElement,d=a&&a.color,h,i;if(d&&d.alpha()>0){if(this.hideBackground(),a=this.getShape("bgColor","fill",this.getBox(),1),h=b.w,b=b.h,a.stroked=!1,a.coordsize=h*2+","+b*2,a.coordorigin="1,1",a.path=this.getBoxPath(null,2),i=a.style,i.width=h,i.height=b,a.fill.color=d.colorValue(c),c=d.alpha(),c<1)a.fill.opacity=c}else this.deleteShape("bgColor")},drawBgImages:function(){var a=this.styleInfos.backgroundInfo.getProps(),b=this.boundsInfo.getBounds(),a=a&&a.bgImages,c,d,h,i,l;if(a){this.hideBackground(); d=b.w;h=b.h;for(l=a.length;l--;)b=a[l],c=this.getShape("bgImage"+l,"fill",this.getBox(),2),c.stroked=!1,c.fill.type="tile",c.fillcolor="none",c.coordsize=d*2+","+h*2,c.coordorigin="1,1",c.path=this.getBoxPath(0,2),i=c.style,i.width=d,i.height=h,b.imgType==="linear-gradient"?this.addLinearGradient(c,b):(c.fill.src=b.imgUrl,this.positionBgImage(c,l))}for(l=a?a.length:0;this.deleteShape("bgImage"+l++););},positionBgImage:function(a,c){var d=this;b.Util.withImageSize(a.fill.src,function(g){var h=d.targetElement, i=d.boundsInfo.getBounds(),l=i.w,i=i.h;if(l&&i){var k=a.fill,m=d.styleInfos,n=m.borderInfo.getProps(),o=n&&n.widths,n=o?o.t.pixels(h):0,p=o?o.r.pixels(h):0,q=o?o.b.pixels(h):0,o=o?o.l.pixels(h):0,m=m.backgroundInfo.getProps().bgImages[c],h=m.bgPosition?m.bgPosition.coords(h,l-g.w-o-p,i-g.h-n-q):{x:0,y:0},m=m.imgRepeat,q=p=0,r=l+1,t=i+1,v=b.ieVersion===8?0:1,o=Math.round(h.x)+o+0.5,n=Math.round(h.y)+n+0.5;k.position=o/l+","+n/i;if(m&&m!=="repeat"){if(m==="repeat-x"||m==="no-repeat")p=n+1,t=n+g.h+v; if(m==="repeat-y"||m==="no-repeat")q=o+1,r=o+g.w+v;a.style.clip="rect("+p+"px,"+r+"px,"+t+"px,"+q+"px)"}}})},addLinearGradient:function(a,c){var d=this.targetElement,g=this.boundsInfo.getBounds(),h=g.w,i=g.h,g=a.fill,l=c.stops,k=l.length,m=Math.PI,n=b.GradientUtil,o=n.perpendicularIntersect,p=n.distance,n=n.getGradientMetrics(d,h,i,c),q=n.angle,r=n.startX,t=n.startY,v=n.startCornerX,x=n.startCornerY,s=n.endCornerX,w=n.endCornerY,z=n.deltaX,y=n.deltaY,n=n.lineLength,h=q%90?Math.atan2(z*h/i,y)/m*180: q+90;h+=180;h%=360;s=o(v,x,q,s,w);i=p(v,x,s[0],s[1]);m=[];s=o(r,t,q,v,x);p=p(r,t,s[0],s[1])/i*100;o=[];for(q=0;q<k;q++)o.push(l[q].offset?l[q].offset.pixels(d,n):q===0?0:q===k-1?n:null);for(q=1;q<k;q++){if(o[q]===null){r=o[q-1];n=q;do t=o[++n];while(t===null);o[q]=r+(t-r)/(n-q+1)}o[q]=Math.max(o[q],o[q-1])}for(q=0;q<k;q++)m.push(p+o[q]/i*100+"% "+l[q].color.colorValue(d));g.angle=h;g.type="gradient";g.method="sigma";g.color=l[0].color.colorValue(d);g.color2=l[k-1].color.colorValue(d);g.colors?g.colors.value= m.join(","):g.colors=m.join(",")},hideBackground:function(){var a=this.targetElement.runtimeStyle;if(!this.isMuseBGPolyfill())a.backgroundImage="url(about:blank)";a.backgroundColor="transparent"},destroy:function(){b.RendererBase.destroy.call(this);var a=this.targetElement.runtimeStyle;if(!this.isMuseBGPolyfill())a.backgroundImage="";a.backgroundColor=""},isMuseBGPolyfill:function(){var a=this.targetElement.children[0];if(!a)return!1;a=a.className;return"string"===typeof a&&"function"===typeof a.indexOf&& 0<=a.indexOf("museBgSizePolyfill")}});b.BorderRenderer=b.RendererBase.newRenderer({boxZIndex:4,boxName:"border",needsUpdate:function(){var a=this.styleInfos;return a.borderInfo.changed()||a.borderRadiusInfo.changed()},isActive:function(){var a=this.styleInfos;return(a.borderRadiusInfo.isActive()||a.backgroundInfo.isActive())&&!a.borderImageInfo.isActive()&&a.borderInfo.isActive()},draw:function(){var a=this.targetElement,b=this.styleInfos.borderInfo.getProps(),c=this.boundsInfo.getBounds(),d=c.w, c=c.h,h,i,l,k,m;if(b){this.hideBorder();b=this.getBorderSegments(2);k=0;for(m=b.length;k<m;k++)l=b[k],h=this.getShape("borderPiece"+k,l.stroke?"stroke":"fill",this.getBox()),h.coordsize=d*2+","+c*2,h.coordorigin="1,1",h.path=l.path,i=h.style,i.width=d,i.height=c,h.filled=!!l.fill,h.stroked=!!l.stroke,l.stroke?(h=h.stroke,h.weight=l.weight+"px",h.color=l.color.colorValue(a),h.dashstyle=l.stroke==="dashed"?"2 2":l.stroke==="dotted"?"1 1":"solid",h.linestyle=l.stroke==="double"&&l.weight>2?"ThinThin": "Single"):h.fill.color=l.fill.colorValue(a);for(;this.deleteShape("borderPiece"+k++););}},getBorderSegments:function(a){var b=this.targetElement,c,d,h,i=this.styleInfos.borderInfo,l=[],k,m,n,o,p=Math.round,q,r,t;if(i.isActive())if(c=i.getProps(),i=c.widths,r=c.styles,t=c.colors,c.widthsSame&&c.stylesSame&&c.colorsSame)t.t.alpha()>0&&(c=i.t.pixels(b),n=c/2,l.push({path:this.getBoxPath({t:n,r:n,b:n,l:n},a),stroke:r.t,color:t.t,weight:c}));else{a=a||1;c=this.boundsInfo.getBounds();d=c.w;h=c.h;c=p(i.t.pixels(b)); n=p(i.r.pixels(b));o=p(i.b.pixels(b));var b=p(i.l.pixels(b)),v={t:c,r:n,b:o,l:b},b=this.styleInfos.borderRadiusInfo;b.isActive()&&(q=this.getRadiiPixels(b.getProps()));k=Math.floor;m=Math.ceil;var x=function(a,b){return q?q[a][b]:0},s=function(b,c,f,j,i,n){var l=x("x",b),o=x("y",b),p=b.charAt(1)==="r",b=b.charAt(0)==="b";return l>0&&o>0?(n?"al":"ae")+(p?m(d-l):k(l))*a+","+(b?m(h-o):k(o))*a+","+(k(l)-c)*a+","+(k(o)-f)*a+","+j*65535+","+2949075*(i?1:-1):(n?"m":"l")+(p?d-c:c)*a+","+(b?h-f:f)*a},w=function(b, c,f,j){var i=b==="t"?k(x("x","tl"))*a+","+m(c)*a:b==="r"?m(d-c)*a+","+k(x("y","tr"))*a:b==="b"?m(d-x("x","br"))*a+","+k(h-c)*a:k(c)*a+","+m(h-x("y","bl"))*a,b=b==="t"?m(d-x("x","tr"))*a+","+m(c)*a:b==="r"?m(d-c)*a+","+m(h-x("y","br"))*a:b==="b"?k(x("x","bl"))*a+","+k(h-c)*a:k(c)*a+","+k(x("y","tl"))*a;return f?(j?"m"+b:"")+"l"+i:(j?"m"+i:"")+"l"+b},b=function(a,b,c,f,d,g){var j=a==="l"||a==="r",h=v[a],i,n;h>0&&r[a]!=="none"&&t[a].alpha()>0&&(i=v[j?a:b],b=v[j?b:a],n=v[j?a:c],c=v[j?c:a],r[a]==="dashed"|| r[a]==="dotted"?(l.push({path:s(f,i,b,g+45,0,1)+s(f,0,0,g,1,0),fill:t[a]}),l.push({path:w(a,h/2,0,1),stroke:r[a],weight:h,color:t[a]}),l.push({path:s(d,n,c,g,0,1)+s(d,0,0,g-45,1,0),fill:t[a]})):l.push({path:s(f,i,b,g+45,0,1)+w(a,h,0,0)+s(d,n,c,g,0,0)+(r[a]==="double"&&h>2?s(d,n-k(n/3),c-k(c/3),g-45,1,0)+w(a,m(h/3*2),1,0)+s(f,i-k(i/3),b-k(b/3),g,1,0)+"x "+s(f,k(i/3),k(b/3),g+45,0,1)+w(a,k(h/3),1,0)+s(d,k(n/3),k(c/3),g,0,0):"")+s(d,0,0,g-45,1,0)+w(a,0,1,0)+s(f,0,0,g,1,0),fill:t[a]}))};b("t","l","r", "tl","tr",90);b("r","t","b","tr","br",0);b("b","r","l","br","bl",-90);b("l","b","t","bl","tl",-180)}return l},destroy:function(){if(this.finalized||!this.styleInfos.borderImageInfo.isActive())this.targetElement.runtimeStyle.borderColor="";b.RendererBase.destroy.call(this)}});b.BorderImageRenderer=b.RendererBase.newRenderer({boxZIndex:5,pieceNames:["t","tr","r","br","b","bl","l","tl","c"],needsUpdate:function(){return this.styleInfos.borderImageInfo.changed()},isActive:function(){return this.styleInfos.borderImageInfo.isActive()}, draw:function(){this.getBox();var a=this.styleInfos.borderImageInfo.getProps(),c=this.styleInfos.borderInfo.getProps(),d=this.boundsInfo.getBounds(),g=this.targetElement,h=this.pieces;b.Util.withImageSize(a.src,function(i){function l(a,b,c,f,d){var a=h[a].style,g=Math.max;a.width=g(b,0);a.height=g(c,0);a.left=f;a.top=d}function k(a,b,c){for(var f=0,d=a.length;f<d;f++)h[a[f]].imagedata[b]=c}var m=d.w,n=d.h,o=b.getLength("0"),p=a.widths||(c?c.widths:{t:o,r:o,b:o,l:o}),o=p.t.pixels(g),q=p.r.pixels(g), r=p.b.pixels(g),p=p.l.pixels(g),t=a.slice,v=t.t.pixels(g),x=t.r.pixels(g),s=t.b.pixels(g),t=t.l.pixels(g);l("tl",p,o,0,0);l("t",m-p-q,o,p,0);l("tr",q,o,m-q,0);l("r",q,n-o-r,m-q,o);l("br",q,r,m-q,n-r);l("b",m-p-q,r,p,n-r);l("bl",p,r,0,n-r);l("l",p,n-o-r,0,o);l("c",m-p-q,n-o-r,p,o);k(["tl","t","tr"],"cropBottom",(i.h-v)/i.h);k(["tl","l","bl"],"cropRight",(i.w-t)/i.w);k(["bl","b","br"],"cropTop",(i.h-s)/i.h);k(["tr","r","br"],"cropLeft",(i.w-x)/i.w);k(["l","r","c"],"cropTop",v/i.h);k(["l","r","c"],"cropBottom", s/i.h);k(["t","b","c"],"cropLeft",t/i.w);k(["t","b","c"],"cropRight",x/i.w);h.c.style.display=a.fill?"":"none"},this)},getBox:function(){var a=this.parent.getLayer(this.boxZIndex),c,j,g,h=this.pieceNames,i=h.length;if(!a){a=d.createElement("border-image");c=a.style;c.position="absolute";this.pieces={};for(g=0;g<i;g++)j=this.pieces[h[g]]=b.Util.createVmlElement("rect"),j.appendChild(b.Util.createVmlElement("imagedata")),c=j.style,c.behavior="url(#default#VML)",c.position="absolute",c.top=c.left=0, j.imagedata.src=this.styleInfos.borderImageInfo.getProps().src,j.stroked=!1,j.filled=!1,a.appendChild(j);this.parent.addLayer(this.boxZIndex,a)}return a},prepareUpdate:function(){if(this.isActive()){var a=this.targetElement,b=a.runtimeStyle,c=this.styleInfos.borderImageInfo.getProps().widths;b.borderStyle="solid";if(c)b.borderTopWidth=c.t.pixels(a)+"px",b.borderRightWidth=c.r.pixels(a)+"px",b.borderBottomWidth=c.b.pixels(a)+"px",b.borderLeftWidth=c.l.pixels(a)+"px";this.hideBorder()}},destroy:function(){var a= this.targetElement.runtimeStyle;a.borderStyle="";if(this.finalized||!this.styleInfos.borderInfo.isActive())a.borderColor=a.borderWidth="";b.RendererBase.destroy.call(this)}});b.BoxShadowOutsetRenderer=b.RendererBase.newRenderer({boxZIndex:1,boxName:"outset-box-shadow",needsUpdate:function(){var a=this.styleInfos;return a.boxShadowInfo.changed()||a.borderRadiusInfo.changed()},isActive:function(){var a=this.styleInfos.boxShadowInfo;return a.isActive()&&a.getProps().outset[0]},draw:function(){function a(a, b,k,h,i,n,m){a=c.getShape("shadow"+a+b,"fill",g,l-a);b=a.fill;a.coordsize=o*2+","+p*2;a.coordorigin="1,1";a.stroked=!1;a.filled=!0;b.color=i.colorValue(d);if(n)b.type="gradienttitle",b.color2=b.color,b.opacity=0;a.path=m;x=a.style;x.left=k;x.top=h;x.width=o;x.height=p;return a}for(var c=this,d=this.targetElement,g=this.getBox(),h=this.styleInfos,i=h.boxShadowInfo.getProps().outset,h=h.borderRadiusInfo.getProps(),l=i.length,k=l,m,n=this.boundsInfo.getBounds(),o=n.w,p=n.h,n=b.ieVersion===8?1:0,q=["tl", "tr","br","bl"],r,t,v,x,s,w,z,y,u,B,D,M,S,T;k--;){t=i[k];s=t.xOffset.pixels(d);w=t.yOffset.pixels(d);m=t.spread.pixels(d);z=t.blur.pixels(d);t=t.color;y=-m-z;if(!h&&z)h=b.BorderRadiusStyleInfo.ALL_ZERO;y=this.getBoxPath({t:y,r:y,b:y,l:y},2,h);if(z)if(u=(m+z)*2+o,B=(m+z)*2+p,D=z*2/u,M=z*2/B,z-m>o/2||z-m>p/2)for(m=4;m--;)r=q[m],S=r.charAt(0)==="b",T=r.charAt(1)==="r",r=a(k,r,s,w,t,z,y),v=r.fill,v.focusposition=(T?1-D:D)+","+(S?1-M:M),v.focussize="0,0",r.style.clip="rect("+((S?B/2:0)+n)+"px,"+(T?u:u/ 2)+"px,"+(S?B:B/2)+"px,"+((T?u/2:0)+n)+"px)";else r=a(k,"",s,w,t,z,y),v=r.fill,v.focusposition=D+","+M,v.focussize=1-D*2+","+(1-M*2);else if(r=a(k,"",s,w,t,z,y),s=t.alpha(),s<1)r.fill.opacity=s}}});b.ImgRenderer=b.RendererBase.newRenderer({boxZIndex:6,boxName:"imgEl",needsUpdate:function(){var a=this.styleInfos;return this.targetElement.src!==this._lastSrc||a.borderRadiusInfo.changed()},isActive:function(){var a=this.styleInfos;return a.borderRadiusInfo.isActive()||a.backgroundInfo.isPngFix()},draw:function(){this._lastSrc= l;this.hideActualImg();var a=this.getShape("img","fill",this.getBox()),c=a.fill,d=this.boundsInfo.getBounds(),g=d.w,d=d.h,h=this.styleInfos.borderInfo.getProps(),i=h&&h.widths,h=this.targetElement,l=h.src,k=Math.round,m=h.currentStyle,n=b.getLength;if(!i||b.ieVersion<7)i=b.getLength("0"),i={t:i,r:i,b:i,l:i};a.stroked=!1;c.type="frame";c.src=l;c.position=(g?0.5/g:0)+","+(d?0.5/d:0);a.coordsize=g*2+","+d*2;a.coordorigin="1,1";a.path=this.getBoxPath({t:k(i.t.pixels(h)+n(m.paddingTop).pixels(h)),r:k(i.r.pixels(h)+ n(m.paddingRight).pixels(h)),b:k(i.b.pixels(h)+n(m.paddingBottom).pixels(h)),l:k(i.l.pixels(h)+n(m.paddingLeft).pixels(h))},2);a=a.style;a.width=g;a.height=d},hideActualImg:function(){this.targetElement.runtimeStyle.filter="alpha(opacity=0)"},destroy:function(){b.RendererBase.destroy.call(this);this.targetElement.runtimeStyle.filter=""}});b.IE9RootRenderer=b.RendererBase.newRenderer({updatePos:b.emptyFn,updateSize:b.emptyFn,updateVisibility:b.emptyFn,updateProps:b.emptyFn,outerCommasRE:/^,+|,+$/g, innerCommasRE:/,+/g,setBackgroundLayer:function(a,b){(this._bgLayers||(this._bgLayers=[]))[a]=b||void 0},finishUpdate:function(){var a=this._bgLayers,b;if(a&&(b=a.join(",").replace(this.outerCommasRE,"").replace(this.innerCommasRE,","))!==this._lastBg)this._lastBg=this.targetElement.runtimeStyle.background=b},destroy:function(){this.targetElement.runtimeStyle.background="";delete this._bgLayers}});b.IE9BackgroundRenderer=b.RendererBase.newRenderer({bgLayerZIndex:1,needsUpdate:function(){return this.styleInfos.backgroundInfo.changed()}, isActive:function(){var a=this.styleInfos;return a.backgroundInfo.isActive()||a.borderImageInfo.isActive()},draw:function(){var a=this.styleInfos.backgroundInfo.getProps(),c,d,g=0,h,i;if(a){c=[];if(d=a.bgImages)for(;h=d[g++];)h.imgType==="linear-gradient"?(i=this.getBgAreaSize(h.bgOrigin),i=(h.bgSize||b.BgSize.DEFAULT).pixels(this.targetElement,i.w,i.h,i.w,i.h),c.push("url(data:image/svg+xml,"+escape(this.getGradientSvg(h,i.w,i.h))+") "+this.bgPositionToString(h.bgPosition)+" / "+i.w+"px "+i.h+"px "+ (h.bgAttachment||"")+" "+(h.bgOrigin||"")+" "+(h.bgClip||""))):c.push(h.origString);a.color&&c.push(a.color.val);this.parent.setBackgroundLayer(this.bgLayerZIndex,c.join(","))}},bgPositionToString:function(a){return a?a.tokens.map(function(a){return a.tokenValue}).join(" "):"0 0"},getBgAreaSize:function(a){var c=this.targetElement,d=this.boundsInfo.getBounds(),g=d.w,d=d.h,h;if(a!=="border-box"&&(h=this.styleInfos.borderInfo.getProps())&&(h=h.widths))g-=h.l.pixels(c)+h.l.pixels(c),d-=h.t.pixels(c)+ h.b.pixels(c);if(a==="content-box")a=b.getLength,h=c.currentStyle,g-=a(h.paddingLeft).pixels(c)+a(h.paddingRight).pixels(c),d-=a(h.paddingTop).pixels(c)+a(h.paddingBottom).pixels(c);return{w:g,h:d}},getGradientSvg:function(a,c,d){var g=this.targetElement,h=a.stops,i=h.length,l=b.GradientUtil.getGradientMetrics(g,c,d,a),a=l.startX,k=l.startY,m=l.endX,n=l.endY,l=l.lineLength,o,p,q,r,t;o=[];for(p=0;p<i;p++)o.push(h[p].offset?h[p].offset.pixels(g,l):p===0?0:p===i-1?l:null);for(p=1;p<i;p++)if(o[p]===null){r= o[p-1];q=p;do t=o[++q];while(t===null);o[p]=r+(t-r)/(q-p+1)}c=['<svg width="'+c+'" height="'+d+'" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="g" gradientUnits="userSpaceOnUse" x1="'+a/c*100+'%" y1="'+k/d*100+'%" x2="'+m/c*100+'%" y2="'+n/d*100+'%">'];for(p=0;p<i;p++)c.push('<stop offset="'+o[p]/l+'" stop-color="'+h[p].color.colorValue(g)+'" stop-opacity="'+h[p].color.alpha()+'"/>');c.push('</linearGradient></defs><rect width="100%" height="100%" fill="url(#g)"/></svg>');return c.join("")}, destroy:function(){this.parent.setBackgroundLayer(this.bgLayerZIndex)}});b.IE9BorderImageRenderer=b.RendererBase.newRenderer({REPEAT:"repeat",STRETCH:"stretch",ROUND:"round",bgLayerZIndex:0,needsUpdate:function(){return this.styleInfos.borderImageInfo.changed()},isActive:function(){return this.styleInfos.borderImageInfo.isActive()},draw:function(){var a=this,c=a.styleInfos.borderImageInfo.getProps(),d=a.styleInfos.borderInfo.getProps(),g=a.boundsInfo.getBounds(),h=c.repeat,i=h.h,l=h.v,k=a.targetElement, m=0;b.Util.withImageSize(c.src,function(h){function o(a,b,c,f,d,g,j,h,k,n){O.push('<pattern patternUnits="userSpaceOnUse" id="pattern'+V+'" x="'+(i===x?a+c/2-k/2:a)+'" y="'+(l===x?b+f/2-n/2:b)+'" width="'+k+'" height="'+n+'"><svg width="'+k+'" height="'+n+'" viewBox="'+d+" "+g+" "+j+" "+h+'" preserveAspectRatio="none"><image xlink:href="'+v+'" x="0" y="0" width="'+r+'" height="'+t+'" /></svg></pattern>');U.push('<rect x="'+a+'" y="'+b+'" width="'+c+'" height="'+f+'" fill="url(#pattern'+V+')" />'); V++}var p=g.w,q=g.h,r=h.w,t=h.h,v=a.imageToDataURI(c.src,r,t),x=a.REPEAT,s=a.STRETCH,h=a.ROUND,w=Math.ceil,z=b.getLength("0"),y=c.widths||(d?d.widths:{t:z,r:z,b:z,l:z}),z=y.t.pixels(k),u=y.r.pixels(k),B=y.b.pixels(k),y=y.l.pixels(k),D=c.slice,M=D.t.pixels(k),S=D.r.pixels(k),T=D.b.pixels(k),D=D.l.pixels(k),I=p-y-u,R=q-z-B,L=r-D-S,J=t-M-T,E=i===s?I:L*z/M,F=l===s?R:J*u/S,P=i===s?I:L*B/T,s=l===s?R:J*y/D,O=[],U=[],V=0;i===h&&(E-=(E-(I%E||E))/w(I/E),P-=(P-(I%P||P))/w(I/P));l===h&&(F-=(F-(R%F||F))/w(R/F), s-=(s-(R%s||s))/w(R/s));h=['<svg width="'+p+'" height="'+q+'" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'];o(0,0,y,z,0,0,D,M,y,z);o(y,0,I,z,D,0,L,M,E,z);o(p-u,0,u,z,r-S,0,S,M,u,z);o(0,z,y,R,0,M,D,J,y,s);c.fill&&o(y,z,I,R,D,M,L,J,E||P||L,s||F||J);o(p-u,z,u,R,r-S,M,S,J,u,F);o(0,q-B,y,B,0,t-T,D,T,y,B);o(y,q-B,I,B,D,t-T,L,T,P,B);o(p-u,q-B,u,B,r-S,t-T,S,T,u,B);h.push("<defs>"+O.join("\n")+"</defs>"+U.join("\n")+"</svg>");a.parent.setBackgroundLayer(a.bgLayerZIndex,"url(data:image/svg+xml,"+ escape(h.join(""))+") no-repeat border-box border-box");m&&a.parent.finishUpdate()},a);m=1},imageToDataURI:function(){var a={};return function(b,c,g){var h=a[b],i;if(!h)h=new Image,i=d.createElement("canvas"),h.src=b,i.width=c,i.height=g,i.getContext("2d").drawImage(h,0,0),h=a[b]=i.toDataURL();return h}}(),prepareUpdate:b.BorderImageRenderer.prototype.prepareUpdate,destroy:function(){var a=this.targetElement.runtimeStyle;this.parent.setBackgroundLayer(this.bgLayerZIndex);a.borderColor=a.borderStyle= a.borderWidth=""}});b.Element=function(){function a(a){var b=q.slice.call(arguments,1),c=b.length;setTimeout(function(){for(;c--;)a.className+=" "+b[c]},0)}function c(a){var b=q.slice.call(arguments,1),f=b.length;setTimeout(function(){for(;f--;){var c=a,d=b[f],d=p[d]||(p[d]=RegExp("\\b"+d+"\\b","g"));c.className=c.className.replace(d,"")}},0)}function j(g){function j(){if(!U){var a,c,f=b.ieDocMode,k=g.currentStyle,l=k.getAttribute(h)==="true";aa=k.getAttribute(i);aa=f>7?aa!=="false":aa==="true";if(!O){O= 1;g.runtimeStyle.zoom=1;for(var k=g,m=1;k=k.previousSibling;)if(k.nodeType===1){m=0;break}m&&(g.className+=" "+n)}E.lock();if(l&&(c=E.getBounds())&&(a=d.documentElement||d.body)&&(c.y>a.clientHeight||c.x>a.clientWidth||c.y+c.h<0||c.x+c.w<0))ha||(ha=1,b.OnScroll.observe(j));else{U=1;ha=O=0;b.OnScroll.unobserve(j);f===9?(F={backgroundInfo:new b.BackgroundStyleInfo(g),borderImageInfo:new b.BorderImageStyleInfo(g),borderInfo:new b.BorderStyleInfo(g)},P=[F.backgroundInfo,F.borderImageInfo],J=new b.IE9RootRenderer(g, E,F),a=[new b.IE9BackgroundRenderer(g,E,F,J),new b.IE9BorderImageRenderer(g,E,F,J)]):(F={backgroundInfo:new b.BackgroundStyleInfo(g),borderInfo:new b.BorderStyleInfo(g),borderImageInfo:new b.BorderImageStyleInfo(g),borderRadiusInfo:new b.BorderRadiusStyleInfo(g),boxShadowInfo:new b.BoxShadowStyleInfo(g),visibilityInfo:new b.VisibilityStyleInfo(g)},P=[F.backgroundInfo,F.borderInfo,F.borderImageInfo,F.borderRadiusInfo,F.boxShadowInfo,F.visibilityInfo],J=new b.RootRenderer(g,E,F),a=[new b.BoxShadowOutsetRenderer(g, E,F,J),new b.BackgroundRenderer(g,E,F,J),new b.BorderRenderer(g,E,F,J),new b.BorderImageRenderer(g,E,F,J)],g.tagName==="IMG"&&a.push(new b.ImgRenderer(g,E,F,J)),J.childRenderers=a);L=[J].concat(a);if(a=g.currentStyle.getAttribute(b.CSS_PREFIX+"watch-ancestors")){a=parseInt(a,10);c=0;for(l=g.parentNode;l&&(a==="NaN"||c++<a);)I(l,"onpropertychange",M),I(l,"onmouseenter",w),I(l,"onmouseleave",z),I(l,"onmousedown",y),l.tagName in b.focusableElements&&(I(l,"onfocus",B),I(l,"onblur",D)),l=l.parentNode}aa&& (b.Heartbeat.observe(q),b.Heartbeat.run());q(1)}V||(V=1,f<9&&I(g,"onmove",p),I(g,"onresize",p),I(g,"onpropertychange",s),I(g,"onmouseenter",w),I(g,"onmouseleave",z),I(g,"onmousedown",y),g.tagName in b.focusableElements&&(I(g,"onfocus",B),I(g,"onblur",D)),b.OnResize.observe(p),b.OnUnload.observe(R));E.unlock()}}function p(){E&&E.hasBeenQueried()&&q()}function q(a){if(!X)if(U){var b,c=L.length;S();for(b=0;b<c;b++)L[b].prepareUpdate();if(a||E.positionChanged())for(b=0;b<c;b++)L[b].updatePos();if(a|| E.sizeChanged())for(b=0;b<c;b++)L[b].updateSize();J.finishUpdate();T()}else O||j()}function s(){var a,b=L.length,c;a=event;if(!X&&!(a&&a.propertyName in o))if(U){S();for(a=0;a<b;a++)L[a].prepareUpdate();for(a=0;a<b;a++)c=L[a],c.isPositioned||c.updatePos(),c.needsUpdate()&&c.updateProps();J.finishUpdate();T()}else O||j()}function w(){a(g,l)}function z(){c(g,l,k)}function y(){a(g,k);b.OnMouseup.observe(u)}function u(){c(g,k);b.OnMouseup.unobserve(u)}function B(){a(g,m)}function D(){c(g,m)}function M(){var a= event.propertyName;(a==="className"||a==="id")&&s()}function S(){E.lock();for(var a=P.length;a--;)P[a].lock()}function T(){for(var a=P.length;a--;)P[a].unlock();E.unlock()}function I(a,b,c){a.attachEvent(b,c);ba.push([a,b,c])}function R(){if(V){for(var a=ba.length,c;a--;)c=ba[a],c[0].detachEvent(c[1],c[2]);b.OnUnload.unobserve(R);V=0;ba=[]}}var L,J,E=new b.BoundsInfo(g),F,P,O,U,V,ba=[],ha,X,aa;this.init=j;this.update=q;this.destroy=function(){if(!X){var a,c;R();X=1;if(L){a=0;for(c=L.length;a<c;a++)L[a].finalized= 1,L[a].destroy()}aa&&b.Heartbeat.unobserve(q);b.OnResize.unobserve(q);L=E=F=P=g=null}};this.el=g}var g={},h=b.CSS_PREFIX+"lazy-init",i=b.CSS_PREFIX+"poll",l=b.CLASS_PREFIX+"hover",k=b.CLASS_PREFIX+"active",m=b.CLASS_PREFIX+"focus",n=b.CLASS_PREFIX+"first-child",o={background:1,bgColor:1,display:1},p={},q=[];j.getInstance=function(a){var c=b.Util.getUID(a);return g[c]||(g[c]=new j(a))};j.destroy=function(a){var a=b.Util.getUID(a),c=g[a];c&&(c.destroy(),delete g[a])};j.destroyAll=function(){var a=[], b;if(g){for(var c in g)g.hasOwnProperty(c)&&(b=g[c],a.push(b.el),b.destroy());g={}}return a};return j}();b.supportsVML=b.supportsVML;b.attach=function(a){b.ieDocMode<10&&b.supportsVML&&b.Element.getInstance(a).init()};b.detach=function(a){b.Element.destroy(a)}}})();