(function(){function j(c,b){var a=(c+"").match(/([-0-9\.]+)(\S*)/);c=parseFloat(a[1],10);if(a=(a[2]||"").toLowerCase())if(a=="%"&&b)c*=b/100;if(c<0&&b)c=b+c;return c}var t=this,n=document,B=navigator.userAgent,G="uki"+ +new Date,s=Math.max,x=Math.min,H=Math.floor,I=Math.ceil;t.uki=function(c,b){if(typeof c=="string"){var a=c.match(/^#((?:[\w\u00c0-\uFFFF_-]|\\.)+)$/),d=a&&uki._ids[a[1]];if(a&&!b)return new uki.Collection(d?[d]:[]);return uki.find(c,b)}if(c.length===undefined)c=[c];if(c.length>0&&
uki.isFunction(c[0].typeName))return new uki.Collection(c);return uki.build(c)};uki.version="0.0.9";uki.F=function(){return false};uki._ids={};uki.registerId=function(c){uki._ids[uki.attr(c,"id")]=c};uki.unregisterId=function(c){uki._ids[uki.attr(c,"id")]=undefined};var J=Object.prototype.toString,z=uki.utils={attr:function(c,b,a){if(a!==undefined){if(z.isFunction(c[b]))c[b](a);else c[b]=a;return c}else return z.isFunction(c[b])?c[b]():c[b]},proxy:function(c,b){return function(){return c.apply(b,
arguments)}},isFunction:function(c){return J.call(c)==="[object Function]"},isArray:function(c){return J.call(c)==="[object Array]"},trim:function(c){return(c||"").replace(/^\s+|\s+$/g,"")},escapeHTML:function(c){var b={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"};return c.replace(/[&<>\"\']/g,function(a){return b[a]})},each:function(c,b,a){var d,e=0,f=c.length;if(f===undefined)for(d in c){if(!(!d||c[d]===undefined||!c.hasOwnProperty(d)))if(b.call(a||c[d],d,c[d])===false)break}else for(d=
c[0];e<f&&b.call(a||d,e,d)!==false;d=c[++e]);return c},inArray:function(c,b){for(var a=0,d=b.length;a<d;a++)if(b[a]===c)return a;return-1},unique:function(c){var b=[],a={};try{for(var d=0,e=c.length;d<e;d++){var f=c[d];if(!a[f]){a[f]=true;b.push(c[d])}}}catch(g){b=c}return b},grep:function(c,b){for(var a=[],d=0,e=c.length;d<e;d++)b(c[d],d)&&a.push(c[d]);return a},map:function(c,b,a){for(var d=[],e=z.isFunction(b)?b:function(k){return z.attr(k,b)},f=0,g=c.length;f<g;f++){var h=e.call(a||c[f],c[f],
f);if(h!=null)d[d.length]=h}return d},reduce:function(c,b,a,d){for(var e=0,f=b.length;e<f;e++)c=a.call(d||b[e],c,b[e],e);return c},extend:function(){for(var c=arguments[0]||{},b=1,a=arguments.length,d;b<a;b++)if((d=arguments[b])!=null)for(var e in d){var f=d[e];if(f!==undefined)c[e]=f}return c},newClass:function(){var c=function(){this.init.apply(this,arguments)},b,a;a=0;var d;b=[];if(arguments.length>1)if(arguments[0].prototype){b=function(){};b.prototype=arguments[0].prototype;c.prototype=new b;
a=1;b=[b.prototype]}for(a=a;a<arguments.length;a++){d=arguments[a];if(this.isFunction(d))d=d.apply(d,b);b.push(d);z.extend(c.prototype,arguments[a])}return c},newProp:function(c,b){return function(a){if(a===undefined)return this[c];if(b)b.call(this,a);else this[c]=a;return this}},addProps:function(c,b){z.each(b,function(){c[this]=z.newProp("_"+this)})},toArray:function(c){return Array.prototype.slice.call(c,0)},delegateProp:function(c,b,a){var d="_"+b;c[b]=function(e){if(this[a])return z.attr(this[a],
b,e);if(e===undefined)return this[d];this[d]=e;return this}}};z.extend(uki,z);uki.geometry={};var y=uki.geometry.Point=function(c,b){this.x=c||0;this.y=b||0};y.prototype={toString:function(){return this.x+" "+this.y},clone:function(){return new y(this.x,this.y)},eq:function(c){return this.x==c.x&&this.y==c.y},offset:function(c,b){this.x+=c;this.y+=b;return this},constructor:y};y.fromString=function(c,b){c=c.split(/\s+/);return new y(j(c[0],b&&b.width),j(c[1],b&&b.height))};var v=uki.geometry.Size=
function(c,b){this.width=c||0;this.height=b||0};v.prototype={toString:function(){return this.width+" "+this.height},clone:function(){return new v(this.width,this.height)},eq:function(c){return this.width==c.width&&this.height==c.height},empty:function(){return this.width<=0||this.height<=0},constructor:v};v.fromString=function(c,b){c=c.split(/\s+/);return new v(j(c[0],b&&b.width),j(c[1],b&&b.height))};v.create=function(c,b){if(c===undefined)return null;if(c.width!==undefined)return c;if(/\S+\s+\S+/.test(c+
""))return v.fromString(c,b);return new v(c,b)};var o=uki.geometry.Rect=function(c,b,a,d){if(a!==undefined){this.x=c;this.y=b;this.width=a;this.height=d}else if(c===undefined||c.x===undefined){this.y=this.x=0;this.width=c||0;this.height=b||0}else{this.x=c?c.x:0;this.y=c?c.y:0;this.width=b?b.width:0;this.height=b?b.height:0}};o.prototype={toString:function(){return[this.x,this.y,this.width,this.height].join(" ")},toCoordsString:function(){return[this.x,this.y,this.maxX(),this.maxY()].join(" ")},clone:function(){return new o(this.x,
this.y,this.width,this.height)},minX:function(){return this.x},maxX:function(){return this.x+this.width},midX:function(){return this.x+this.width/2},minY:function(){return this.y},midY:function(){return this.y+this.height/2},maxY:function(){return this.y+this.height},normalize:function(){this.x=this.y=0;return this},empty:v.prototype.empty,eq:function(c){return c&&this.x==c.x&&this.y==c.y&&this.height==c.height&&this.width==c.width},inset:function(c,b){this.x+=c;this.y+=b;this.width-=c*2;this.height-=
b*2;return this},offset:y.prototype.offset,intersection:function(c){var b=new y(s(this.x,c.x),s(this.y,c.y));c=new v(x(this.maxX(),c.maxX())-b.x,x(this.maxY(),c.maxY())-b.y);return c.empty()?new o:new o(b,c)},union:function(c){return o.fromCoords(x(this.x,c.x),x(this.y,c.y),s(this.maxX(),c.maxX()),s(this.maxY(),c.maxY()))},containsPoint:function(c){return c.x>=this.minX()&&c.x<=this.maxX()&&c.y>=this.minY()&&c.y<=this.maxY()},containsRect:function(c){return this.eq(this.union(c))},constructor:o};
o.prototype.left=o.prototype.minX;o.prototype.top=o.prototype.minY;o.fromCoords=function(c,b,a,d){if(a===undefined)return new o(c.x,c.y,b.x-c.x,b.y-c.y);return new o(c,b,a-c,d-b)};o.fromCoordsString=function(c,b){c=c.split(/\s+/);return o.fromCoords(j(c[0],b&&b.width),j(c[1],b&&b.height),j(c[2],b&&b.width),j(c[3],b&&b.height))};o.fromString=function(c,b){c=c.split(/\s+/);if(c.length>2)return new o(j(c[0],b&&b.width),j(c[1],b&&b.height),j(c[2],b&&b.width),j(c[3],b&&b.height));return new o(j(c[0],b&&
b.width),j(c[1],b&&b.height))};o.create=function(c,b,a,d){if(c===undefined)return null;if(c.x!==undefined)return c;if(/\S+\s+\S+/.test(c+""))return o.fromString(c,b);if(a===undefined)return new o(c,b);return new o(c,b,a,d)};var w=uki.geometry.Inset=function(c,b,a,d){this.top=c||0;this.right=b||0;this.bottom=a===undefined?this.top:a;this.left=d===undefined?this.right:d};w.prototype={toString:function(){return[this.top,this.right,this.bottom,this.left].join(" ")},clone:function(){return new w(this.top,
this.right,this.bottom,this.left)},width:function(){return this.left+this.right},height:function(){return this.top+this.bottom},negative:function(){return this.top<0||this.left<0||this.right<0||this.bottom<0},empty:function(){return!this.top&&!this.left&&!this.right&&!this.bottom}};w.fromString=function(c,b){c=c.split(/\s+/);if(c.length<3)c[2]=c[0];if(c.length<4)c[3]=c[1];return new w(j(c[0],b),j(c[1],b),j(c[2],b),j(c[3],b))};w.create=function(c,b,a,d){if(c===undefined)return null;if(c.top!==undefined)return c;
if(/\S+\s+\S+/.test(c+""))return w.fromString(c,b);if(a===undefined)return new w(c,b);return new w(c,b,a,d)};uki.dom={guid:1,createElement:function(c,b,a){c=n.createElement(c);if(b)c.style.cssText=b;if(a)c.innerHTML=a;c[G]=uki.dom.guid++;return c},probe:function(c,b){var a=n.body;a.appendChild(c);b(c);a.removeChild(c)},layout:function(c,b,a){a=a||{};if(a.left!=b.left)c.left=b.left+"px";if(a.top!=b.top)c.top=b.top+"px";if(a.right!=b.right)c.right=b.right+"px";if(a.bottom!=b.bottom)c.bottom=b.bottom+
"px";if(a.width!=b.width)c.width=s(b.width,0)+"px";if(a.height!=b.height)c.height=s(b.height,0)+"px";return b},computedStyle:function(c){if(n&&n.defaultView&&n.defaultView.getComputedStyle)return n.defaultView.getComputedStyle(c,null);else if(c.currentStyle)return c.currentStyle},contains:function(c,b){try{if(c.contains)return c.contains(b);if(c.compareDocumentPosition)return!!(c.compareDocumentPosition(b)&16)}catch(a){}for(;b&&b!=c;)try{b=b.parentNode}catch(d){b=null}return c==b},createStylesheet:function(c){var b=
n.createElement("style");n.getElementsByTagName("head")[0].appendChild(b);if(b.styleSheet)b.styleSheet.cssText=c;else b.appendChild(document.createTextNode(c));return b}};uki.each(["createElement"],function(c,b){uki[b]=uki.dom[b]});uki.view={declare:function(){var c=uki.toArray(arguments),b=c.shift();c=uki.newClass.apply(uki,c);var a=b.split("."),d=t,e,f;c.prototype.typeName=function(){return b};for(e=0;e<a.length-1;e++){f=a[e];d[f]||(d[f]={});d=d[f]}d[a[a.length-1]]=c}};uki.view.Observable={bind:function(c,
b){uki.each(c.split(" "),function(a,d){this._bound(d)||this._bindToDom(d);this._observersFor(d).push(b)},this);return this},unbind:function(c,b){uki.each(c.split(" "),function(a,d){this._observers[d]=uki.grep(this._observers[d],function(e){return e!=b});this._observers[d].length==0&&this._unbindFromDom(d)},this);return this},trigger:function(c){var b=Array.prototype.slice.call(arguments,1);uki.each(this._observersFor(c,true),function(a,d){d.apply(this,b)},this);return this},_unbindFromDom:function(c){this._domHander&&
this._eventTargets[c]&&uki.dom.unbind(this._eventTargets[c],c,this._domHander)},_bindToDom:function(c,b){if(b||this.dom){this._domHander=this._domHander||uki.proxy(function(a){this.trigger(a.type,{domEvent:a,source:this})},this);this._eventTargets=this._eventTargets||{};this._eventTargets[c]=b||this.dom();uki.dom.bind(this._eventTargets[c],c,this._domHander);return true}},_bound:function(c){return this._observers&&this._observers[c]},_observersFor:function(c,b){if(b&&(!this._observers||!this._observers[c]))return[];
if(!this._observers)this._observers={};this._observers[c]||(this._observers[c]=[]);return this._observers[c]}};(function(){function c(){return n.compatMode=="CSS1Compat"&&n.documentElement||n.body}var b=uki.Attachment=uki.newClass(uki.view.Observable,{init:function(a,d,e){uki.initNativeLayout();this._dom=a=a||t;this._view=d;this._rect=o.create(e)||this.rect();uki.dom.offset.initialize();d.parent(this);this.domForChild().appendChild(d.dom());if(a!=t&&a.tagName!="BODY"){d=a.runtimeStyle||a.ownerDocument.defaultView.getComputedStyle(a,
null);if(!d.position||d.position=="static")a.style.position="relative"}b.register(this);this.layout()},domForChild:function(){return this._dom===t?n.body:this._dom},rectForChild:function(){return this.rect()},scroll:function(){},scrollTop:function(){return this._dom.scrollTop||0},scrollLeft:function(){return this._dom.scrollLeft||0},parent:function(){return null},layout:function(){var a=this._rect,d=this._rect=this.rect();this._view.parentResized(a,d);this._view._needsLayout&&this._view.layout();
this.trigger("layout",{source:this,rect:d})},dom:function(){return this._dom},view:function(){return this._view},rect:function(){var a=this._dom===t||this._dom===n.body?s(c().clientWidth,this._dom.offsetWidth||0):this._dom.offsetWidth,d=this._dom===t||this._dom===n.body?s(c().clientHeight,this._dom.offsetHeight||0):this._dom.offsetHeight;return new o(a,d)}});b.instances=[];b.register=function(a){if(b.instances.length==0){var d=false;uki.dom.bind(t,"resize",function(){if(!d){d=true;setTimeout(function(){d=
false;uki.each(b.instances,function(){this.layout()})},1)}})}b.instances.push(a)};b.childViews=function(){return uki.map(b.instances,"view")};uki.top=function(){return[b]}})();uki.Collection=function(c){this.length=0;Array.prototype.push.apply(this,c)};uki.fn=uki.Collection.prototype=new (function(){var c=this;this.each=function(b){uki.each(this,b);return this};this.grep=function(b){return new uki.Collection(uki.grep(this,b))};this.attr=function(b,a){if(a!==undefined){this.each(function(){uki.attr(this,
b,a)});return this}else return this[0]?uki.attr(this[0],b):""};this.find=function(b){return uki.find(b,this)};this.attachTo=function(b,a){this.each(function(){new uki.Attachment(b,this,a)});return this};this.append=function(b){if(!this[0])return this;b=b.length!==undefined?b:[b];for(var a=0;a<b.length;a++)this[0].appendChild(b[a]);return this};this.appendTo=function(b){b=uki(b)[0];this.each(function(){b.appendChild(this)});return this};uki.Collection.addAttrs=function(b){uki.each(b.split(","),function(a,
d){c[d]=function(e){return this.attr(d,e)}})};uki.Collection.addAttrs("html,text,background,value,rect,checked,anchors,childViews,typeName,id,name,visible,disabled,focusable,style");uki.each(["parent"],function(b,a){c[a]=function(){return new uki.Collection(uki.map(this,a))}});uki.each(["scrollableParent"],function(b,a){c[a]=function(){return new uki.Collection(uki.map(this,function(d){return uki.view[a](d)}))}});uki.each("bind,unload,trigger,layout,appendChild,removeChild,insertBefore,addRow,removeRow,resizeToContents,toggle".split(","),
function(b,a){c[a]=function(){for(var d=0;d<this.length;d++)this[d][a].apply(this[d],arguments);return this}});uki.each("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error".split(","),function(b,a){c[a]=function(d){if(d)this.bind(a,d);else for(d=0;d<this.length;d++)this[d][a]();return this}})});(function(){function c(d){return uki.map(d,function(e){return b(e)})}function b(d){if(uki.isFunction(d.typeName))return d;
var e=d.view||d.type;if(uki.isFunction(e))e=e();else if(typeof e==="string"){e=e.split(".");var f=t;if(!t[e[0]]||e[0]=="Image")e=["uki","view"].concat(e);for(var g=0;g<e.length;g++)f=f[e[g]];e=new f(d.rect)}else e=e;a(e,d);return e}function a(d,e){uki.each(e,function(f,g){f=="view"||f=="type"||f=="rect"||uki.attr(d,f,g)});return d}uki.build=function(d){if(d.length===undefined)d=[d];return new uki.Collection(c(d))};uki.build.copyAttrs=a})();(function(){function c(l){return b(uki.map(l,function(m){return[m].concat(c(g(m,
"childViews")))}))}function b(l){return uki.reduce([],l,a)}function a(l,m){return l.concat(m)}function d(l){var m=[],r;for(r=0;r<l.length;r++){l[r][f]||(m[m.length]=l[r]);l[r][f]=true}for(r=0;r<m.length;r++)m[r][f]=undefined;return m}var e,f="__selector_marked",g=uki.attr,h=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,k=[{name:"ID",regexp:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/},{name:"ATTR",regexp:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/},
{name:"TYPE",regexp:/^((?:[\w\u00c0-\uFFFF\*_\.-]|\\.)+)/},{name:"POS",regexp:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/}],q={first:function(l){return l===0},last:function(l,m,r){return l===r.length-1},even:function(l){return l%2===0},odd:function(l){return l%2===1},lt:function(l,m){return l<m[2]-0},gt:function(l,m){return l>m[2]-0},nth:function(l,m){return m[2]-0==l},eq:function(l,m){return m[2]-0==l}},p={TYPE:function(l,m){m=m[1];if(m=="*")return true;return(l=g(l,"typeName"))&&
l.length>=m.length&&("."+l).indexOf("."+m)==l.length-m.length},ATTR:function(l,m){l=g(l,m[1]);var r=l+"",u=m[2];m=m[4];return l==null?u==="!=":u==="="?r===m:u==="*="?r.indexOf(m)>=0:u==="~="?(" "+r+" ").indexOf(m)>=0:!m?r&&l!==false:u==="!="?r!=m:u==="^="?r.indexOf(m)===0:u==="$="?r.substr(r.length-m.length)===m:false},ID:function(l,m){return p.ATTR(l,["","id","=","",m[1]])},POS:function(l,m,r,u){return(l=q[m[1]])?l(r,m,u):false}},C={"+":function(){},">":function(l){return b(uki.map(l,"childViews"))},
"":function(l){return c(b(uki.map(l,"childViews")))},"~":function(){}};e=uki.Selector={find:function(l,m,r){m=m||uki.top();if(m.length===undefined)m=[m];var u=e.tokenize(l);l=u[0];u=u[1];for(var A=m,D;l.length>0;){D=C[l[0]]?C[l.shift()]:C[""];A=D(A);if(l.length==0)break;A=e.reduce(l.shift(),A)}if(u)A=A.concat(e.find(u,m,true));return r?A:new uki.Collection(d(A))},reduce:function(l,m){if(!m||!m.length)return[];for(var r,u;l!="";){u=false;uki.each(k,function(A,D){if(r=l.match(D.regexp)){u=true;m=uki.grep(m,
function(K,L){return p[D.name](K,r,L,m)});l=l.replace(D.regexp,"");return false}});if(!u)break}return m},tokenize:function(l){var m=[],r,u;for(h.lastIndex=0;(r=h.exec(l))!==null;){m.push(r[1]);if(r[2]){u=RegExp.rightContext;break}}return[m,u]}};uki.find=e.find})();uki.extend(uki.dom,{bound:{},handles:{},events:"blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error".split(","),bind:function(c,
b,a){if(c.setInterval&&c!=window)c=window;a.huid=a.huid||uki.dom.guid++;var d=c[G]=c[G]||uki.dom.guid++,e=uki.dom.handles[d]=uki.dom.handles[d]||function(){uki.dom.handler.apply(arguments.callee.elem,arguments)},f,g;e.elem=c;uki.dom.bound[d]||(uki.dom.bound[d]={});b=b.split(" ");for(f=0;f<b.length;f++){g=b[f];if(!uki.dom.bound[d][g]){c.addEventListener?c.addEventListener(g,e,false):c.attachEvent("on"+g,e);uki.dom.bound[d][g]=[]}uki.dom.bound[d][g].push(a)}a=e=c=null},unbind:function(c,b,a){c=c[G];
var d=a.huid,e;b=b.split(" ");for(a=0;a<b.length;a++){e=b[a];!d||!c||!uki.dom.bound[c]||!uki.dom.bound[c][e]||(uki.dom.bound[c][e]=uki.grep(uki.dom.bound[c][e],function(f){return f.huid!==d}))}},handler:function(c){c=uki.dom.fix(c||t.event);var b=c.type,a=this[G],d=uki.dom.bound[a];if(!(!a||!d||!d[b])){a=0;for(d=d[b];a<d.length;a++)d[a].call(this,c)}},preventDefault:function(c){if(c)c.preventDefault?c.preventDefault():(c.returnValue=false)},fix:function(c){if(!c.target)c.target=c.srcElement||n;if(c.target.nodeType==
3)c.target=c.target.parentNode;if(!c.relatedTarget&&c.fromElement)c.relatedTarget=c.fromElement==c.target?c.toElement:c.fromElement;if(c.pageX==null&&c.clientX!=null){var b=n.documentElement,a=n.body;c.pageX=c.clientX+(b&&b.scrollLeft||a&&a.scrollLeft||0)-(b.clientLeft||0);c.pageY=c.clientY+(b&&b.scrollTop||a&&a.scrollTop||0)-(b.clientTop||0)}if(!c.which&&(c.charCode||c.charCode===0?c.charCode:c.keyCode))c.which=c.charCode||c.keyCode;if(!c.metaKey&&c.ctrlKey)try{c.metaKey=c.ctrlKey}catch(d){}if(!c.which&&
c.button)c.which=c.button&1?1:c.button&2?3:c.button&4?2:0;return c}});t.attachEvent&&t.attachEvent("onunload",function(){uki.each(uki.dom.bound,function(c,b){uki.each(b,function(a){try{uki.dom.handles[c].elem.detachEvent("on"+a,uki.dom.handles[c])}catch(d){}})})});(function(){var c;c=n.documentElement.getBoundingClientRect?(uki.dom.offset=function(b){if(!b||b==t)return new y;if(b===b.ownerDocument.body)return c.bodyOffset(b);c.boxModel===undefined&&c.initializeBoxModel();var a=b.getBoundingClientRect(),
d=b.ownerDocument;b=d.body;d=d.documentElement;return new y(a.left+(c.pageXOffset||c.boxModel&&d.scrollLeft||b.scrollLeft)-(d.clientLeft||b.clientLeft||0),a.top+(c.pageYOffset||c.boxModel&&d.scrollTop||b.scrollTop)-(d.clientTop||b.clientTop||0))}):(uki.dom.offset=function(b){if(!b||b==t)return new y;if(b===b.ownerDocument.body)return c.bodyOffset(b);c.initialized||c.initialize();var a=b.offsetParent,d=b.ownerDocument,e,f=d.documentElement,g=d.body;d=d.defaultView;e=d.getComputedStyle(b,null);for(var h=
b.offsetTop,k=b.offsetLeft;(b=b.parentNode)&&b!==g&&b!==f;){e=d.getComputedStyle(b,null);h-=b.scrollTop;k-=b.scrollLeft;if(b===a){h+=b.offsetTop;k+=b.offsetLeft;if(c.doesNotAddBorder&&!(c.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.tagName))){h+=parseInt(e.borderTopWidth,10)||0;k+=parseInt(e.borderLeftWidth,10)||0}a=b.offsetParent}if(c.subtractsBorderForOverflowNotVisible&&e.overflow!=="visible"){h+=parseInt(e.borderTopWidth,10)||0;k+=parseInt(e.borderLeftWidth,10)||0}e=e}if(e.position===
"relative"||e.position==="static"){h+=g.offsetTop;k+=g.offsetLeft}if(e.position==="fixed"){h+=s(f.scrollTop,g.scrollTop);k+=s(f.scrollLeft,g.scrollLeft)}return new y(k,h)});uki.extend(c,{initialize:function(){if(!this.initialized){var b=n.body,a=n.createElement("div"),d,e,f,g=b.style.marginTop;d={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(e in d)a.style[e]=d[e];a.innerHTML='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';
b.insertBefore(a,b.firstChild);d=a.firstChild;e=d.firstChild;f=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=e.offsetTop!==5;this.doesAddBorderForTableAndCells=f.offsetTop===5;d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5;b.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=b.offsetTop===0;b.style.marginTop=g;b.removeChild(a);this.boxModel===undefined&&this.initializeBoxModel();this.initialized=true}},initializeBoxModel:function(){if(this.boxModel===
undefined){var b=n.createElement("div");b.style.width=b.style.paddingLeft="1px";n.body.appendChild(b);this.boxModel=b.offsetWidth===2;n.body.removeChild(b).style.display="none"}},bodyOffset:function(b){c.initialized||c.initialize();var a=b.offsetTop,d=b.offsetLeft;if(uki.dom.doesNotIncludeMarginInBodyOffset){a+=parseInt(uki.dom.elem.currentStyle(b).marginTop,10)||0;d+=parseInt(uki.dom.elem.currentStyle(b).marginLeft,10)||0}return new y(d,a)}})})();(function(){function c(){uki.dom.bind(h,"mousemove scroll",
a);uki.dom.bind(h,"mouseup",d);uki.dom.bind(h.body,"selectstart mousedown",e)}function b(){uki.dom.unbind(h,"mousemove scroll",a);uki.dom.unbind(h,"mouseup",d);uki.dom.unbind(h.body,"selectstart mousedown",e)}function a(k){g.draggable&&g.draggable._drag&&g.draggable._drag(k,f(k))}function d(k){b();g.draggable&&g.draggable._drop&&g.draggable._drop(k,f(k));g.draggable=null}function e(k){k.preventDefault?k.preventDefault():(k.returnValue=false)}function f(k){return g.pos.clone().offset(-k.pageX,-k.pageY)}
var g=uki.dom.drag={draggable:null,pos:null,start:function(k,q){this.draggable=k;this.pos=new y(q.pageX,q.pageY);c()},watch:function(k,q){uki.dom.bind(k,"dragstart",function(p){p.returnValue=false});uki.dom.bind(k,"mousedown",function(p){if(!q._acceptDrag||q._acceptDrag(p))uki.dom.drag.start(q,p)})}},h=document})();uki.initNativeLayout=function(){uki.supportNativeLayout===undefined&&uki.dom.probe(uki.createElement("div","position:absolute;width:100px;height:100px;left:-999em;",'<div style="position:absolute;left:0;right:0"></div>'),
function(c){uki.supportNativeLayout=c.childNodes[0].offsetWidth==100&&!t.opera})};uki.image=function(c,b,a){var d=new Image;d.src=uki.imageSrc(c,b,a);return d};uki.imageSrc=function(c,b,a){if(uki.image.dataUrlSupported&&b)return b;if(a&&uki.image.needAlphaFix)return a;return c};uki.imageHTML=function(c,b,a,d){if(uki.image.needAlphaFix&&a)c=a;else if(uki.image.dataUrlSupported)c=b;return"<img"+(d||"")+' src="'+c+'" />'};uki.image.load=function(c,b){var a=c.length;uki.each(c,function(d,e){if(!e||e.width)--a||
b();else{d=function(){e.onload=e.onerror=e.onabort=null;--a||b()};e.onload=d;e.onerror=d;e.onabort=d}})};uki.image.dataUrlSupported=n.createElement("canvas").toDataURL||/MSIE (8)/.test(B);uki.image.needAlphaFix=/MSIE 6/.test(B);uki.image.needAlphaFix&&n.execCommand("BackgroundImageCache",false,true);(function(){var c=/^\s*null\s*$/,b=/theme\s*\(\s*([^)]*\s*)\)/,a=/rows\s*\(\s*([^)]*\s*)\)/,d=/cssBox\s*\(\s*([^)]*\s*)\)/,e=uki.background=function(f){if(typeof f==="string"){var g;if(f.match(c))return new e.Null;
if(g=f.match(b))return uki.theme.background(g[1]);if(g=f.match(a))return new e.Rows(g[1].split(",")[0],g[1].split(/\s*,\s*/).slice(1));if(g=f.match(d))return new e.CssBox(g[1]);return new e.Css(f)}return f}})();uki.background.Base=uki.background.Null=uki.newClass({init:uki.F,attachTo:uki.F,detach:uki.F});uki.background.Sliced9=uki.newClass(new (function(){function c(f,g,h,k,q){k=h[3]?a(h,k):"";h[3]||(g+=b(h,q));return'<div class="'+f+'" style="position:absolute;overflow:hidden;'+g+'">'+k+"</div>"}
function b(f,g){return";background: url("+uki.imageSrc(f[0],f[1],f[2])+") "+g}function a(f,g){return uki.imageHTML(f[0],f[1],f[2],' galleryimg="no" style="-webkit-user-drag:none;position:absolute;'+g+'"')}var d=uki.dom,e={};this.init=function(f,g,h){this._settings=uki.extend({},f);this._inset=w.create(g);this._size=null;this._inited=false;h=h||{};this._fixedSize=v.create(h.fixedSize)||new v;this._bgInset=w.create(h.inset)||new w;this._zIndex=h.zIndex||-1;this._container=this._getContainer();this._container.style.zIndex=
this._zIndex};this._getContainer=function(){var f=this._getKey();if(!e[f])return e[f]=this._createContainer();return e[f].cloneNode(true)};this._createContainer=function(){var f=this._inset,g=this._bgInset,h=this._settings,k=f.left+f.right,q=f.top+f.bottom;g=["left:"+g.left+"px","right:"+g.right+"px","top:"+g.top+"px","bottom:"+g.bottom+"px"].join(";");var p=[];if(f.top&&f.left)p[p.length]=c("tl",["left:0;top:0","width:"+f.left+"px","height:"+f.top+"px"].join(";"),h.c,["left:0;top:0","width:"+k+"px",
"height:"+q+"px"].join(";"),"top left");if(f.top)p[p.length]=c("t",["left:"+f.left+"px","top:0","height:"+f.top+"px","right:"+f.right+"px"].join(";"),h.h,["left:0;top:0;width:100%","height:"+q+"px"].join(";"),"repeat-x top");if(f.top&&f.right)p[p.length]=c("tr",["right:0;top:0","width:"+f.right+"px","height:"+f.top+"px"].join(";"),h.c,["left:-"+f.left+"px","top:0","width:"+k+"px","height:"+q+"px"].join(";"),"top right");if(f.left)p[p.length]=c("l",["left:0","top:"+f.top+"px","width:"+f.left+"px",
"bottom:"+f.bottom+"px"].join(";"),h.v,["left:0;top:0;height:100%","width:"+k+"px"].join(";"),"repeat-y left");if(h.m)p[p.length]=c("m",["left:"+f.left+"px","top:"+f.top+"px","right:"+f.left+"px","bottom:"+f.bottom+"px"].join(";"),h.m,"left:0;top:0;height:100%;width:100%","");if(f.right)p[p.length]=c("r",["right:0","top:"+f.top+"px","width:"+f.right+"px","bottom:"+f.bottom+"px"].join(";"),h.v,["left:-"+f.left+"px","top:0;height:100%","width:"+k+"px"].join(";"),"repeat-y right");if(f.bottom&&f.left)p[p.length]=
c("bl",["left:0;bottom:0","width:"+f.left+"px","height:"+f.bottom+"px"].join(";"),h.c,["left:0","top:-"+f.top+"px","width:"+k+"px","height:"+q+"px"].join(";"),"left -"+f.top+"px");if(f.bottom)p[p.length]=c("b",["left:"+f.left+"px","bottom:0","height:"+f.bottom+"px","right:"+f.right+"px"].join(";"),h.h,["left:0","top:-"+f.top+"px","width:100%","height:"+q+"px"].join(";"),"repeat-x 0 -"+f.top+"px");if(f.bottom&&f.right)p[p.length]=c("br",["right:0;bottom:0","width:"+f.right+"px","height:"+f.bottom+
"px"].join(";"),h.c,["left:-"+f.left+"px","top:-"+f.top+"px","width:"+k+"px","height:"+q+"px"].join(";"),"right -"+f.top+"px");return uki.createElement("div","position:absolute;overflow:hidden;"+g,p.join(""))};this._getKey=function(){return uki.map(["v","h","m","c"],function(f){return this._settings[f]&&this._settings[f][0]||""},this).concat([this._inset,this._bgInset,this._fixedSize]).join(",")};this.attachTo=function(f){this._comp=f;this._container.style.visibility="visible";this._comp.dom().appendChild(this._container);
if(!uki.supportNativeLayout){this._layoutHandler=this._layoutHandler||uki.proxy(function(g){if(!(this._size&&this._size.eq(g.rect))){this._size=g.rect;this.layout()}},this);this._comp.bind("layout",this._layoutHandler);this.layout()}};this.detach=function(){if(this._comp){this._container.style.visibility="hidden";uki.supportNativeLayout||this._comp.unbind("layout",this._layoutHandler);this._size=this._comp=null;this._attached=this._inited=false}};this.layout=function(){var f=this._comp.rect(),g=this._parts,
h=this._inset,k=this._bgInset,q=this._fixedSize,p=H(q.width||f.width-k.left-k.right);f=H(q.height||f.height-k.top-k.bottom);k=h.left+h.right;h=h.top+h.bottom;if(!g){g={};uki.each(this._container.childNodes,function(){if(this.className)g[this.className]=this});this._parts=g}g.t&&d.layout(g.t.style,{width:p-k});g.b&&d.layout(g.b.style,{width:p-k});g.l&&d.layout(g.l.style,{height:f-h});g.r&&d.layout(g.r.style,{height:f-h});g.m&&d.layout(g.m.style,{height:f-h,width:p-k});d.layout(this._container.style,
{width:p,height:f})}}));uki.background.Css=uki.newClass(new (function(){this.init=function(c){this._options=typeof c=="string"?{background:c}:c};this.attachTo=function(c){this._comp=c;this._originalValues={};uki.each(this._options,function(b,a){this._originalValues[b]=c.style(b);c.style(b,a)},this)};this.detach=function(){this._comp&&uki.each(this._options,function(c){this._comp.style(c,this._originalValues[c])},this)}}));uki.background.CssBox=uki.newClass(new (function(){function c(a){b[a]||uki.dom.probe(uki.createElement("div",
a+";position:absolute;overflow:hidden;left:-999em;width:10px;height:10px;"),function(d){b[a]=new w(d.offsetHeight-10,d.offsetWidth-10)});return b[a]}var b={};this.init=function(a,d){this._options=a;d=d||{};this._inset=inset=w.create(d.inset)||new w;this._insetWidth=c(a).left+inset.left+inset.right;this._insetHeight=c(a).top+inset.top+inset.bottom;this._container=uki.createElement("div",a+";position:absolute;overflow:hidden;z-index:"+(d.zIndex||"-1")+";left:"+inset.left+";top:"+inset.top+"px;right:"+
inset.right+"px;bottom:"+inset.bottom+"px",d.innerHTML);this._attached=false};this.attachTo=function(a){this._comp=a;this._comp.dom().appendChild(this._container);if(!uki.supportNativeLayout){this._layoutHandler=this._layoutHandler||uki.proxy(function(d){this.layout(d.rect)},this);this._comp.bind("layout",this._layoutHandler);this.layout(this._comp.rect())}};this.layout=function(a){this._prevLayout=uki.dom.layout(this._container.style,{width:a.width-this._insetWidth,height:a.height-this._insetHeight},
this._prevLayout)};this.detach=function(){if(this._comp){this._comp.dom().removeChild(this._container);uki.supportNativeLayout||this._comp.unbind("layout",this._layoutHandler);this._attached=false}}}));uki.background.Rows=uki.newClass(new (function(){function c(e,f){var g=e+" "+f.join(" "),h=[],k=[],q,p=f.length;if(!a[g]){for(q=0;q<p;q++)h[q]=['<div style="height:',e,"px;width:100%;overflow:hidden;",f[q]?"background:"+f[q]:"",'"></div>'].join("");for(q=0;q<d;q++)k[q]=h[q%p];a[g]=k.join("")}return a[g]}
var b=this,a=[],d=100;b.init=function(e,f){this._height=e||20;this._colors=uki.isArray(f)?f:f.split(" ");this._packSize=I(d/this._colors.length)*this._colors.length;this._renderedHeight=0;this._visibleExt=200;if(this._colors.length==1)this._colors=this._colors.concat(["#FFF"])};b.attachTo=function(e){this._comp&&this.detach();this._comp=e;if(!this._container)this._container=uki.createElement("div","position:absolute;left:0;top:0;width:100%;z-index:-1");this._layoutHandler=this._layoutHandler||uki.proxy(function(f){this.layout(f.rect,
f.visibleRect)},this);this._comp.dom().appendChild(this._container);this._comp.bind("layout",this._layoutHandler)};b.layout=function(e,f){for(e=f?f.height+this._visibleExt*2:e.maxY();this._renderedHeight<e;){var g=d*this._height,h=uki.createElement("div","height:"+g+"px;overflow:hidden;width:100%;",c(this._height,this._colors));this._renderedHeight+=g;this._container.appendChild(h)}if(f)this._container.style.top=I((f.y-this._visibleExt)/this._height/this._colors.length)*this._height*this._colors.length+
"px"};b.detach=function(){this._comp.dom().removeChild(this._container);this._comp.unbind("layout",this._layoutHandler);this._comp=null}}));uki.background.Multi=uki.newClass({init:function(){this._bgs=Array.prototype.slice.call(arguments,0)},attachTo:function(c){for(var b=0;b<this._bgs.length;b++)this._bgs[b].attachTo(c)},detach:function(){for(var c=0;c<this._bgs.length;c++)this._bgs[c].detach()}});uki.theme={themes:[],register:function(c){uki.theme.themes.push(c)},background:function(c,b){return uki.theme._namedResource(c,
"background",b)||new uki.background.Null},image:function(c,b){return uki.theme._namedResource(c,"image",b)||new Image},imageSrc:function(c,b){return uki.theme._namedResource(c,"imageSrc",b)||""},style:function(c,b){return uki.theme._namedResource(c,"style",b)||""},dom:function(c,b){return uki.theme._namedResource(c,"dom",b)||uki.createElement("div")},template:function(c,b){return uki.theme._namedResource(c,"template",b)||""},_namedResource:function(c,b,a){for(var d=uki.theme.themes.length-1;d>=0;d--){var e=
uki.theme.themes[d][b](c,a);if(e)return e}return null}};uki.theme.Base={images:[],imageSrcs:[],backgrounds:[],doms:[],styles:[],templates:[],background:function(c,b){return this.backgrounds[c]&&this.backgrounds[c](b)},image:function(c,b){if(this.images[c])return this.images[c](b);return this.imageSrcs[c]&&uki.image.apply(uki,this.imageSrcs[c](b))},imageSrc:function(c,b){if(this.imageSrcs[c])return uki.imageSrc.apply(uki,this.imageSrcs[c](b));return this.images[c]&&this.images[c](b).src},dom:function(c,
b){return this.doms[c]&&this.doms[c](b)},style:function(c,b){return this.styles[c]&&this.styles[c](b)},template:function(c,b){return this.templates[c]&&this.templates[c](b)}};uki.theme.Template=function(c){c=c.split("${");var b,a,d;this.parts=[c[0]];this.names=[];b=1;for(a=c.length;b<a;b++){d=c[b].split("}");this.names.push(d.shift());this.parts.push("");this.parts.push(d.join("}"))}};uki.theme.Template.prototype.render=function(c){for(var b=0,a=this.names,d=a.length;b<d;b++)this.parts[b*2+1]=c[a[b]]||
"";return this.parts.join("")};uki.view.utils=new (function(){function c(b){return b.visibleRect?b.visibleRect():b.rect().clone()}this.visibleRect=function(b,a){var d=[],e,f=b;do{d[d.length]=f;f=f.parent()}while(f&&f!=a);if(a&&a!=b)d[d.length]=a;for(b=d.length-1;b>=0;b--){f=d[b];a=c(f);e=e?e.intersection(a):a;e.x-=f.rect().x;e.y-=f.rect().y}return e};this.top=function(b){for(;b.parent();)b=b.parent();return b};this.offset=function(b,a){for(var d=new y,e;b&&b!=a;){e=b.rect();d.x+=e.x;d.y+=e.y;if(b.scrollTop){d.x-=
b.scrollLeft();d.y-=b.scrollTop()}b=b.parent()}return d};this.scrollableParent=function(b){do{if(uki.isFunction(b.scrollTop))return b;b=b.parent()}while(b);return null}});uki.extend(uki.view,uki.view.utils);uki.view.Stylable=new (function(){this.style=function(a,d){if(typeof a=="string")return this._style(a,d);uki.each(a,function(e,f){this._style(e,f)},this);return this};this._style=function(a,d){if(d===undefined)return this._dom.style[a];this._dom.style[a]=d;return this};var c=uki.createElement("div").style,
b=this;uki.each(["userSelect","MozUserSelect","WebkitUserSelect"],function(){if(typeof c[this]=="string")b._textSelectProp=this});this.textSelectable=function(a){if(a===undefined)return this._textSelectable;this._textSelectable=a;if(this._textSelectProp)this._dom.style[this._textSelectProp]=a?"":this._textSelectProp=="MozUserSelect"?"-moz-none":"none";else this._dom.unselectable=a?"":"on";this._dom.style.cursor=a?"text":"default";return this}});uki.view.Focusable={_focusable:true,focusable:uki.newProp("_focusable",
function(c){this._focusable=c;if(this._focusableInput)this._focusableInput.style.display=c?"":"none"}),disabled:uki.newProp("_disabled",function(c){(this._disabled=c)&&this.blur();this._focusableInput.disabled=c;this._updateBg&&this._updateBg()}),_initFocusable:function(c){if(this._focusable){var b=c;if(!b){b=uki.createElement("input",uki.view.Base.prototype.defaultCss+"border:none;padding:0;overflow:hidden;width:1px;height:1px;padding:1px;font-size:1px;left:-9999em;top:50%;background:transparent;outline:none;opacity:0;");
this.dom().appendChild(b)}this._focusableInput=b;this._hasFocus=false;this._firstFocus=true;uki.dom.bind(b,"focus",uki.proxy(function(a){if(!this._hasFocus){this._hasFocus=true;this._focus(a);this._firstFocus=false;this.trigger("focus",{domEvent:a,source:this})}},this));uki.dom.bind(b,"blur",uki.proxy(function(a){if(this._hasFocus){this._hasFocus=false;this._blur(a);this.trigger("blur",{domEvent:a,source:this})}},this));c||this.bind("mousedown",function(){setTimeout(uki.proxy(function(){try{this._hasFocus||
this._focusableInput.focus()}catch(a){}},this),1)})}},_focus:function(){},_blur:function(){},focus:function(){this._focusableInput.focus();return this},blur:function(){this._focusableInput.blur();return this},hasFocus:function(){return this._hasFocus},_bindToDom:function(c){if(!this._focusableInput||"keyup keydown keypress focus blur".indexOf(c)==-1)return false;return uki.view.Observable._bindToDom.call(this,c,this._focusableInput)}};var E=16,F=32;uki.view.Base=uki.newClass(uki.view.Observable,uki.view.Stylable,
new (function(){function c(d){if(!d)return 0;var e=0;if(d.indexOf("width")>-1)e|=E;if(d.indexOf("height")>-1)e|=F;return e}var b=1,a=this;this.defaultCss="position:absolute;z-index:100;-moz-user-focus:none;font-family:Arial,Helvetica,sans-serif;";this.init=function(d){this._parentRect=this._rect=o.create(d);this._setup();uki.initNativeLayout();this._createDom()};this._setup=function(){uki.extend(this,{_anchors:0,_parent:null,_visible:true,_needsLayout:true,_textSelectable:false,_styleH:"left",_styleV:"top",
_firstLayout:true})};this.dom=function(){return this._dom};this.typeName=function(){return"uki.view.Base"};this.id=function(d){if(d===undefined)return this._dom.id;this._dom.id&&uki.unregisterId(this);this._dom.id=d;uki.registerId(this);return this};uki.delegateProp(this,"className","_dom");this.visible=function(d){if(d===undefined)return this._dom.style.display!="none";this._dom.style.display=d?"block":"none";return this};a.background=function(d){if(d===undefined&&!this._background&&this.defaultBackground)this._background=
this.defaultBackground();if(d===undefined)return this._background;d=uki.background(d);if(d==this._background)return this;this._background&&this._background.detach(this);d.attachTo(this);this._background=d;return this};a.defaultBackground=function(){return this._defaultBackground&&uki.background(this._defaultBackground)};this.parent=function(d){if(d===undefined)return this._parent;this._parent=d;return this};this.childViews=function(){return[]};this.prevView=function(){if(!this.parent())return null;
return this.parent().childViews()[this._viewIndex-1]||null};this.nextView=function(){if(!this.parent())return null;return this.parent().childViews()[this._viewIndex+1]||null};this.rect=function(d){if(d===undefined)return this._rect;this._parentRect=d=o.create(d);this._rect=this._normalizeRect(d);this._needsLayout=this._needsLayout||b++;return this};this.anchors=uki.newProp("_anchors",function(d){if(d.indexOf){var e=0;if(d.indexOf("right")>-1)e|=2;if(d.indexOf("bottom")>-1)e|=4;if(d.indexOf("top")>
-1)e|=1;if(d.indexOf("left")>-1)e|=8;if(d.indexOf("width")>-1||e&8&&e&2)e|=E;if(d.indexOf("height")>-1||e&4&&e&1)e|=F;d=e}this._anchors=d;this._styleH=d&8?"left":"right";this._styleV=d&1?"top":"bottom"});this.rectForChild=function(){return this.rect()};this.layout=function(){this._layoutDom(this._rect);this._needsLayout=false;this.trigger("layout",{rect:this._rect,source:this});this._firstLayout=false};this.minSize=uki.newProp("_minSize",function(d){this._minSize=v.create(d);this.rect(this._parentRect);
if(this._minSize.width)this._dom.style.minWidth=this._minSize.width+"px";if(this._minSize.height)this._dom.style.minHeight=this._minSize.height+"px"});this.maxSize=uki.newProp("_maxSize",function(d){this._maxSize=v.create(d);this.rect(this._parentRect);if(this._maxSize.width)this._dom.style.maxWidth=this._maxSize.width+"px";if(this._maxSize.height)this._dom.style.maxHeight=this._maxSize.height+"px"});this.parentResized=function(d,e){var f=this._parentRect.clone(),g=(e.width-d.width)/((this._anchors&
8^8?1:0)+(this._anchors&E?1:0)+(this._anchors&2^2?1:0));d=(e.height-d.height)/((this._anchors&1^1?1:0)+(this._anchors&F?1:0)+(this._anchors&4^4?1:0));if(this._anchors&8^8)f.x+=g;if(this._anchors&E)f.width+=g;if(this._anchors&1^1)f.y+=d;if(this._anchors&F)f.height+=d;this.rect(f)};this.resizeToContents=function(d){d=c(d);if(0==d)return this;this.rect();this._rect=this._parentRect=this._calcRectOnContentResize(d);this._needsLayout=true;return this};this.contentsSize=function(){return this.rect()};this._normalizeRect=
function(d){if(this._minSize)d=new o(d.x,d.y,s(this._minSize.width,d.width),s(this._minSize.height,d.height));if(this._maxSize)d=new o(d.x,d.y,x(this._maxSize.width,d.width),x(this._maxSize.height,d.height));return d};this._initBackgrounds=function(){this.background()&&this.background().attachTo(this)};this._calcRectOnContentResize=function(d){var e=this.contentsSize(d),f=this.rect();if(e.eq(f))return f;var g=this.rect().clone(),h=e.width-f.width;e=e.height-f.height;if(d&E){if(this._anchors&8^8&&
this._anchors&2^2)g.x-=h/2;else if(this._anchors&8^8)g.x-=h;g.width+=h}if(d&F){if(this._anchors&1^1&&this._anchors&4^4)g.y-=e/2;else if(this._anchors&1^1)g.y-=e;g.height+=e}return g};uki.each(["width","height","minX","maxX","minY","maxY","left","top"],function(d,e){a[e]=function(f){return uki.attr(this.rect(),e,f)}});this._createDom=function(){this._dom=uki.createElement("div",this.defaultCss)};this._layoutDom=function(d){var e={},f=uki.supportNativeLayout,g=this.parent().rectForChild(this);if(f&&
this._anchors&8&&this._anchors&2){e.left=d.x;e.right=g.width-d.x-d.width}else{e.width=d.width;e[this._styleH]=this._styleH=="left"?d.x:g.width-d.x-d.width}if(f&&this._anchors&1&&this._anchors&4){e.top=d.y;e.bottom=g.height-d.y-d.height}else{e.height=d.height;e[this._styleV]=this._styleV=="top"?d.y:g.height-d.y-d.height}this._lastLayout=uki.dom.layout(this._dom.style,e,this._lastLayout);this._firstLayout&&this._initBackgrounds();return true};this._bindToDom=function(d){if("resize layout".indexOf(d)>
-1)return true;return uki.view.Observable._bindToDom.call(this,d)}}));uki.view.Container=uki.newClass(uki.view.Base,new (function(){function c(a,d){var e=0,f;for(f=a._childViews.length-1;f>=0;f--)e=s(e,a._childViews[f].rect()[d]());return e}var b=uki.view.Base.prototype;this._setup=function(){this._childViews=[];b._setup.call(this)};this.typeName=function(){return"uki.view.Container"};this.contentsWidth=function(){return c(this,"maxX")};this.contentsHeight=function(){return c(this,"maxY")};this.contentsSize=
function(){return new v(this.contentsWidth(),this.contentsHeight())};this.childViews=function(a){if(a===undefined)return this._childViews;uki.each(this._childViews,function(d,e){this.removeChild(e)},this);uki.each(uki.build(a),function(d,e){this.appendChild(e)},this);return this};this.removeChild=function(a){a.parent(null);this.domForChild(a).removeChild(a.dom());var d,e;d=a._viewIndex+1;for(e=this._childViews.length;d<e;d++)this._childViews[d]._viewIndex--;this._childViews=uki.grep(this._childViews,
function(f){return f!=a})};this.appendChild=function(a){a._viewIndex=this._childViews.length;this._childViews.push(a);a.parent(this);this.domForChild(a).appendChild(a.dom())};this.insertBefore=function(a,d){var e,f;e=a._viewIndex=d._viewIndex;for(f=this._childViews.length;e<f;e++)this._childViews[e]._viewIndex++;this._childViews.splice(d._viewIndex-1,0,a);a.parent(this);this.domForChild(a).insertBefore(a.dom(),d.dom())};this.domForChild=function(){return this._dom};this._layoutDom=function(a){b._layoutDom.call(this,
a);this._layoutChildViews(a)};this._layoutChildViews=function(){for(var a=0,d=this.childViews();a<d.length;a++)d[a]._needsLayout&&d[a].visible()&&d[a].layout(this._rect)};this.rect=function(a){if(a===undefined)return this._rect;this._parentRect=a=o.create(a);var d=this._rect;if(!this._resizeSelf(a))return this;this._needsLayout=true;if(d.width!=a.width||d.height!=a.height)this._resizeChildViews(d);this.trigger("resize",{oldRect:d,newRect:this._rect,source:this});return this};this._resizeSelf=function(a){this._rect=
this._normalizeRect(a);return true};this._resizeChildViews=function(a){for(var d=0,e=this.childViews();d<e.length;d++)e[d].parentResized(a,this._rect)}}));uki.view.Box=uki.newClass(uki.view.Container,{typeName:function(){return"uki.view.Box"}});uki.view.Image=uki.newClass(uki.view.Base,new (function(){var c=this;c.typeName=function(){return"uki.view.Image"};uki.delegateProp(c,"src","_dom");c._createDom=function(){this._dom=uki.createElement("img",this.defaultCss)}}));uki.view.Label=uki.newClass(uki.view.Base,
new (function(){var c=uki.view.Base.prototype,b=this;b._setup=function(){c._setup.call(this);uki.extend(this,{_scrollable:false,_textSelectable:false,_inset:new w})};b.typeName=function(){return"uki.view.Label"};b._style=function(a,d){var e="fontSize textDecoration color".indexOf(a)>-1?this._label:this._dom;if(d===undefined)return e.style[a];e.style[a]=d;return this};b.textSelectable=function(a){if(a!==undefined&&!this._textSelectProp)this._label.unselectable=a?"":"on";return c.textSelectable.call(this,
a)};b.contentsSize=function(a){var d=this._createLabelClone(a),e=this.inset(),f;uki.dom.probe(d,function(){f=new v(d.offsetWidth+e.width(),d.offsetHeight+e.height())});return f};b.text=function(a){return a===undefined?this.html():this.html(uki.escapeHTML(a))};b.html=function(a){if(a===undefined)return this._label.innerHTML;this._label.innerHTML=a;return this};b.inset=uki.newProp("_inset",function(a){this._inset=w.create(a)});b.scrollable=uki.newProp("_scrollable",function(a){this._scrollable=a;this._label.style.overflow=
a?"auto":"hidden"});b.multiline=uki.newProp("_multiline",function(a){this._multiline=a;this._label.style.whiteSpace=a?"":"nowrap"});b._createLabelClone=function(a){var d=this._label.cloneNode(true),e=this.inset(),f=this.rect();if(a&E)d.style.width=d.style.right="";else if(uki.supportNativeLayout){d.style.right="";d.style.width=f.width-e.width()+"px"}if(a&F)d.style.height=d.style.bottom="";else if(uki.supportNativeLayout){d.style.bottom="";d.style.height=f.height-e.height()+"px"}d.style.paddingTop=
0;d.style.visibility="hidden";return d};b._createDom=function(){c._createDom.call(this);this._label=uki.createElement("div",c.defaultCss+"font-size:12px;white-space:nowrap;");this._dom.appendChild(this._label);this.textSelectable(this.textSelectable())};b._layoutDom=function(){c._layoutDom.apply(this,arguments);var a=this._inset;if(!this.multiline()){parseInt(this.style("fontSize"),10);this._label.style.lineHeight=this._rect.height-a.top-a.bottom+"px"}a=uki.supportNativeLayout?{left:a.left,top:a.top,
right:a.right,bottom:a.bottom}:{left:a.left,top:a.top,width:this._rect.width-a.width(),height:this._rect.height-a.height()};this._lastLabelLayout=uki.dom.layout(this._label.style,a,this._lastLabelLayout)}}));uki.view.Button=uki.newClass(uki.view.Label,uki.view.Focusable,new (function(){var c=this,b=uki.view.Label.prototype;c._setup=function(){b._setup.call(this);uki.extend(this,{_inset:new w(0,4),_backgroundPrefix:"button-",defaultCss:b.defaultCss+"cursor:default;-moz-user-select:none;-webkit-user-select:none;"})};
c.typeName=function(){return"uki.view.Button"};uki.addProps(c,["backgroundPrefix"]);uki.each(["normal","hover","down","focus","disabled"],function(d,e){var f=e+"-background";c[f]=function(g){if(g)this["_"+f]=g;return this["_"+f]=this["_"+f]||uki.theme.background(this._backgroundPrefix+e,{height:this.rect().height,view:this})}});c._createLabelClone=function(d){d=b._createLabelClone.call(this,d);d.style.fontWeight=this.style("fontWeight");return d};c._layoutDom=function(d){b._layoutDom.call(this,d);
if(this._firstLayout){this["hover-background"]();this["down-background"]();this._backgroundByName(this._backgroundName||"normal")}};c._updateBg=function(){var d=this._disabled?"disabled":this._down?"down":this._over?"hover":"normal";this._dom.style.color=this._disabled?"#999":"#333";this._backgroundByName(d)};var a=t.attachEvent&&!t.opera;c._createDom=function(){this._dom=uki.createElement("div",this.defaultCss+"color:#333;text-align:center;font-weight:bold;");this._label=uki.createElement("div",
b.defaultCss+"font-size:12px;line-height:12px;white-space:nowrap;");this._dom.appendChild(this._label);this._dom.attachEvent&&this._dom.appendChild(uki.createElement("div","left:0;top:0;width:100%;height:100%;position:absolute;background:url("+uki.theme.imageSrc("x")+");"));this.textSelectable(this.textSelectable());this._initFocusable();uki.dom.bind(document,"mouseup",uki.proxy(this._mouseup,this));this.bind("mousedown",this._mousedown);this.bind(a?"mouseenter":"mouseover",this._mouseover);this.bind(a?
"mouseleave":"mouseout",this._mouseout);this.bind("keyup",this._keyup);this.bind("keydown",this._keydown)};c._mouseup=function(){if(this._down){this._down=false;this._updateBg()}};c._mousedown=function(){this._down=true;this._updateBg()};c._mouseover=function(d){if(!(!a&&uki.dom.contains(this._dom,d.relatedTarget)||this._over)){this._over=true;this._updateBg()}};c._mouseout=function(d){if(!(!a&&uki.dom.contains(this._dom,d.relatedTarget)||!this._over)){this._over=false;this._updateBg()}};c._focus=
function(){this["focus-background"]().attachTo(this)};c._keydown=function(d){d=d.domEvent;if((d.which==32||d.which==13)&&!this._down)this._mousedown()};c._keyup=function(d){d=d.domEvent;if((d.which==32||d.which==13)&&this._down){this._mouseup();this.trigger("click",{domEvent:d,source:this})}d.which==27&&this._down&&this._mouseup()};c._blur=function(){this["focus-background"]().detach()};c._backgroundByName=function(d){var e=this[d+"-background"]();if(this._background!=e){this._background&&this._background.detach();
e.attachTo(this);this._background=e;this._backgroundName=d}};c._bindToDom=function(d){return uki.view.Focusable._bindToDom.call(this,d)||uki.view.Label.prototype._bindToDom.call(this,d)}}));(function(){var c=uki.view.Base.prototype,b=uki.view.Checkbox=uki.newClass(uki.view.Base,uki.view.Focusable,{_bindToDom:function(a){" change".indexOf(a)>-1||c._bindToDom.apply(this,arguments)},_imageSize:18,_setup:function(){c._setup.call(this);uki.extend(this,{_checked:false,_textSelectable:false,_disabled:false})},
checked:uki.newProp("_checked",function(a){this._checked=!!a;this._updateBg()}),_click:function(){if(!this._disabled){this.checked(!this._checked);this.trigger("change",{checked:this._checked,source:this})}},_updateBg:function(){var a=this._checked?0:this._imageSize;a+=this._disabled?this._imageSize*4:this._over?this._imageSize*2:0;this._image.style.top=-a+"px"},_createImages:function(){this._image=uki.theme.image("checkbox");this._focusImage=uki.theme.image("checkbox-focus")},_createDom:function(){this._createImages();
var a=this._imageSize+"px",d=this._imageSize/2+"px";this._dom=uki.createElement("div",c.defaultCss+"overflow:visible");this._box=uki.createElement("div",c.defaultCss+"overflow:hidden;left:50%;top:50%;margin-left:-"+d+";margin-top:-"+d+";width:"+a+";height:"+a);this._image.style.cssText+=";position:absolute;-webkit-user-drag:none;";this._image.ondragstart=uki.F;this._focusImage.style.cssText+="display:block;-webkit-user-drag:none;position:absolute;z-index:-1;left:50%;top:50%;";this._dom.appendChild(this._box);
this._box.appendChild(this._image);this._initFocusable();this.textSelectable(this.textSelectable());this.checked(this.checked());uki.dom.bind(this._box,"click",uki.proxy(this._click,this));uki.dom.bind(this._box,"mouseover",uki.proxy(this._mousover,this));uki.dom.bind(this._box,"mouseout",uki.proxy(this._mouseout,this));uki.image.load([this._focusImage],uki.proxy(function(){this._focusImage.style.cssText+=";margin-left:-"+this._focusImage.width/2+"px;margin-top:-"+this._focusImage.height/2+"px"},
this));this.bind("keyup",this._keyup)},_keyup:function(a){a=a.domEvent;if(a.which==32||a.which==13){this._click();this.trigger("click",{domEvent:a,source:this})}},_mousover:function(){this._over=true;this._updateBg()},_mouseout:function(){this._over=false;this._updateBg()},_focus:function(){this._dom.appendChild(this._focusImage)},_blur:function(){this._dom.removeChild(this._focusImage)},typeName:function(){return"uki.view.Checkbox"},_bindToDom:function(a){return uki.view.Focusable._bindToDom.call(this,
a)||c._bindToDom.call(this,a)}});b.prototype.value=b.prototype.checked})();(function(){var c=uki.view.Radio=uki.newClass(uki.view.Checkbox,new (function(){var b=this;b.typeName=function(){return"uki.view.Radio"};b._createImages=function(){this._image=uki.theme.image("radio");this._focusImage=uki.theme.image("radio-focus")};b.group=uki.newProp("_group",function(a){c.unregisterGroup(this);this._group=a;c.registerGroup(this);c.clearGroup(this)});b.checked=uki.newProp("_checked",function(a){this._checked=
!!a;a&&c.clearGroup(this);this._updateBg()});b._click=function(){if(!(this._disabled||this.checked())){this.checked(!this._checked);this.trigger("change",{checked:this._checked,source:this})}}}));c.groups={};c.registerGroup=function(b){var a=b.group();if(c.groups[a])c.groups[a].push(b);else c.groups[a]=[b]};c.unregisterGroup=function(b){var a=b.group();if(c.groups[a])c.groups[a]=uki.grep(c.groups[a],function(d){return d!=b})};c.clearGroup=function(b){uki.each(c.groups[b.group()]||[],function(a,d){d!=
b&&d.checked()&&d.checked(false)})}})();uki.view.TextField=uki.newClass(uki.view.Base,uki.view.Focusable,new (function(){function c(f){if(!d[f]){var g=uki.createElement("input",a.defaultCss+"border:none;padding:0;border:0;overflow:hidden;font-size:"+f+";left:-999em;top:0");uki.dom.probe(g,function(h){d[f]=h.offsetHeight})}return d[f]}function b(f){return typeof f.placeholder=="string"}var a=uki.view.Base.prototype,d={},e=this;e._setup=function(){a._setup.apply(this,arguments);uki.extend(this,{_value:"",
_multiline:false,_placeholder:"",_backgroundPrefix:"",defaultCss:a.defaultCss+"margin:0;border:none;outline:none;padding:0;font-size:11px;left:2px;top:0;z-index:100;resize:none;background: url("+uki.theme.imageSrc("x")+")"})};e._updateBg=function(){this._input.style.color=this._disabled?"#999":"#000"};e.value=function(f){if(f===undefined)return this._input.value;this._input.value=f;this._updatePlaceholderVis();return this};e.placeholder=uki.newProp("_placeholder",function(f){this._placeholder=f;if(!this._multiline&&
b(this._input))this._input.placeholder=f;else if(this._placeholderDom)this._placeholderDom.innerHTML=f;else{this._placeholderDom=uki.createElement("div",this.defaultCss+"z-input:103;color:#999;cursor:text",f);this._dom.appendChild(this._placeholderDom);this._updatePlaceholderVis();uki.each(["fontSize","fontFamily","fontWeight"],function(g,h){this._placeholderDom.style[h]=this.style(h)},this);uki.dom.bind(this._placeholderDom,"mousedown",uki.proxy(function(g){this.focus();uki.dom.preventDefault(g)},
this))}});e._style=function(f,g){if(g===undefined)return this._input.style[f];this._input.style[f]=g;if(this._placeholderDom)this._placeholderDom.style[f]=g;return this};uki.addProps(e,["backgroundPrefix"]);e.defaultBackground=function(){return uki.theme.background(this._backgroundPrefix+"input")};e.typeName=function(){return"uki.view.TextField"};e._createDom=function(){var f=this._multiline?"textarea":"input";this._dom=uki.createElement("div",a.defaultCss+";cursor:text;overflow:visible");this._input=
uki.createElement(f,this.defaultCss+(this._multiline?"":";overflow:hidden;"));this._inputStyle=this._input.style;this._input.value=this._value;this._dom.appendChild(this._input);this._input.value=this.value();this._initFocusable(this._input)};e._layoutDom=function(){a._layoutDom.apply(this,arguments);uki.dom.layout(this._input.style,{width:this._rect.width-4});var f;if(this._multiline){this._input.style.height=this._rect.height-4+"px";this._input.style.top="2px";f="2px 0"}else{f=(this._rect.height-
c(this.style("fontSize")))/2;f=I(f)+"px 0 "+H(f)+"px 0";this._input.style.margin=f}if(this._placeholderDom)this._placeholderDom.style.margin=f;this._firstLayout&&this._initFocusable(this._input)};e._updatePlaceholderVis=function(){if(this._placeholderDom)this._placeholderDom.style.display=this.value()?"none":"block"};e._focus=function(){this._focusBackground=this._focusBackground||uki.theme.background(this._backgroundPrefix+"input-focus");this._focusBackground.attachTo(this);if(this._placeholderDom)this._placeholderDom.style.display=
"none"};e._blur=function(){this._focusBackground.detach();this._updatePlaceholderVis()};e._bindToDom=function(f){return uki.view.Focusable._bindToDom.call(this,f)||a._bindToDom.call(this,f)}}));uki.view.MultilineTextField=uki.newClass(uki.view.TextField,{typeName:function(){return"uki.view.MultilineTextField"},_setup:function(){uki.view.TextField.prototype._setup.call(this);this._multiline=true}});(function(){function c(){b||uki.dom.probe(uki.createElement("div","position:absolute;left:-99em;width:100px;height:100px;overflow:scroll;",
'<div style="position:absolute;left:0;width:100%;"></div>'),function(d){b=d.offsetWidth-d.clientWidth;a=d.firstChild.offsetWidth==100});return b}var b,a;uki.view.declare("uki.view.ScrollPane",uki.view.Container,function(d){this.typeName=function(){return"uki.view.ScrollPane"};this._setup=function(){d._setup.call(this);uki.extend(this,{_clientRect:this.rect().clone(),_rectForChild:this.rect().clone(),_clientRectValid:false,_scrollableV:true,_scrollableH:false,_scrollV:false,_scrollH:false})};uki.addProps(this,
["scrollableV","scrollableH"]);this.rectForChild=function(){return this._rectForChild};this.clientRect=function(){return this._clientRect};this.scroll=function(e,f){e&&this.scrollTop(this.scrollLeft()+f);f&&this.scrollTop(this.scrollTop()+f)};uki.each(["appendChild","removeChild","childViews"],function(e,f){this[f]=function(g){this._clientRectValid=false;return d[f].call(this,g)}},this);uki.delegateProp(this,"scrollTop","_dom");uki.delegateProp(this,"scrollLeft","_dom");this.visibleRect=function(){var e=
this._clientRect.clone();e.x=this.rect().x+this.scrollLeft();e.y=this.rect().y+this.scrollTop();return e};this.rect=function(e){if(e===undefined)return this._rect;e=o.create(e);var f=this._rect;this._parentRect=e;if(!this._resizeSelf(e))return this;this._clientRectValid=false;this._updateClientRects();this._needsLayout=true;this.trigger("resize",{oldRect:f,newRect:this._rect,source:this});return this};this._recalcClientRects=function(){c();this._clientRectValid=true;var e=this.contentsWidth(),f=this.contentsHeight();
e=this._scrollableH?e>this._rect.width:false;f=this._scrollableV?f>this._rect.height:false;this._scrollH=e;this._scrollV=f;this._clientRect=new o(this._rect.width+(f?-1:0)*b,this._rect.height+(e?-1:0)*b);this._rectForChild=new o(this._rect.width+(f&&!a?-1:0)*b,this._rect.height+(e&&!a?-1:0)*b)};this._updateClientRects=function(){if(!this._clientRectValid){var e=this._clientRect;this._recalcClientRects();if(e.width!=this._clientRect.width||e.height!=this._clientRect.height)this._resizeChildViews(e)}};
this._resizeChildViews=function(e){for(var f=0,g=this.childViews();f<g.length;f++)g[f].parentResized(e,this._clientRect)};this._layoutChildViews=function(){for(var e=0,f=this.childViews();e<f.length;e++)f[e]._needsLayout&&f[e].visible()&&f[e].layout()};this._layoutDom=function(e){this._updateClientRects();if(this._layoutScrollH!==this._scrollH){this._dom.style.overflowX=this._scrollH?"scroll":"hidden";this._layoutScrollH=this._scrollH}if(this._layoutScrollV!==this._scrollV){this._dom.style.overflowY=
this._scrollV?"scroll":"hidden";this._layoutScrollV=this._scrollV}d._layoutDom.call(this,e);if(this._dom.attachEvent)this._dom.className+=""}});uki.view.ScrollPane.initScrollWidth=c})();uki.view.list={};uki.view.List=uki.newClass(uki.view.Base,uki.view.Focusable,new (function(){var c=uki.view.Base.prototype,b=this;b.typeName=function(){return"uki.view.List"};b._throttle=5;b._visibleRectExt=300;b._defaultBackground="theme(list)";b._setup=function(){c._setup.call(this);uki.extend(this,{_rowHeight:30,
_render:new uki.view.list.Render,_data:[],_selectedIndex:-1})};b.defaultBackground=function(){return uki.theme.background("list",this._rowHeight)};uki.addProps(b,["render","packSize","visibleRectExt","throttle"]);b.rowHeight=uki.newProp("_rowHeight",function(a){this._rowHeight=a;this._background&&this._background.detach();this._background=null;this.background()&&this.background().attachTo(this)});b.data=function(a){if(a===undefined)return this._data;this.clearSelection();this._data=a;this._packs[0].itemFrom=
this._packs[0].itemTo=this._packs[1].itemFrom=this._packs[1].itemTo=0;this._updateRectOnDataChnage();this._relayoutParent();return this};b.addRow=function(a,d){this.clearSelection();this._data.splice(a,0,d);this.data(this._data)};b.removeRow=function(a){this.clearSelection();this._data.splice(a,1);this.data(this._data)};b.selectedIndex=function(a){if(a===undefined)return this._selectedIndex;var d=s(0,x((this._data||[]).length-1,a));this._selectedIndex>-1&&this._setSelected(this._selectedIndex,false);
if(d==a)this._setSelected(this._selectedIndex=d,true);this._scrollToPosition(a);return this};b.clearSelection=function(){this._selectedIndex>-1&&this._setSelected(this._selectedIndex,false);this._selectedIndex=-1};b.layout=function(){this._layoutDom(this._rect);this._needsLayout=false;this.trigger("layout",{rect:this._rect,source:this,visibleRect:this._visibleRect});this._firstLayout=false};b._scrollableParentScroll=function(){if(this._throttle){if(!this._throttleStarted){this._throttleStarted=true;
setTimeout(uki.proxy(function(){this._throttleStarted=false;this.layout()},this),this._throttle)}}else this.layout()};b._relayoutParent=function(){if(this._scrollableParent){for(var a=this;a&&a!=this._scrollableParent;){a._needsLayout=true;a=a.parent()}a.layout()}};b._updateRectOnDataChnage=function(){this.rect(this._parentRect)};b._bindSelectionEvents=function(){this.bind("mousedown",this._mousedown);this.bind(/mozilla/i.test(B)&&!/(compatible|webkit)/i.test(B)?"keypress":"keydown",this._keypress)};
b._mousedown=function(a){var d=uki.dom.offset(this._dom);this.selectedIndex(H((a.domEvent.pageY-d.y)/this._rowHeight))};b._keypress=function(a){a=a.domEvent;if(a.which==38||a.keyCode==38){this.selectedIndex(s(0,this.selectedIndex()-1));uki.dom.preventDefault(a)}else if(a.which==40||a.keyCode==40){this.selectedIndex(x(this._data.length-1,this.selectedIndex()+1));uki.dom.preventDefault(a)}};b._createDom=function(){this._dom=uki.createElement("div",this.defaultCss+"overflow:hidden");var a=uki.createElement("div",
"position:absolute;left:0;top:0px;width:100%;overflow:hidden");this._packs=[{dom:a,itemTo:0,itemFrom:0},{dom:a.cloneNode(false),itemTo:0,itemFrom:0}];this._dom.appendChild(this._packs[0].dom);this._dom.appendChild(this._packs[1].dom);this._initFocusable();this._bindSelectionEvents()};b._setSelected=function(a,d){var e=this._itemAt(a);e&&this._render.setSelected(e,this._data[a],d,this.hasFocus())};b._scrollToPosition=function(a){var d;d=(a+1)*this._rowHeight;a=a*this._rowHeight;if(d>=this._visibleRect.maxY())this._scrollableParent.scroll(0,
d-this._visibleRect.maxY());else a<this._visibleRect.y&&this._scrollableParent.scroll(0,a-this._visibleRect.y);this.layout()};b._itemAt=function(a){if(a<this._packs[1].itemTo&&a>=this._packs[1].itemFrom)return this._packs[1].dom.childNodes[a-this._packs[1].itemFrom];else if(a<this._packs[0].itemTo&&a>=this._packs[0].itemFrom)return this._packs[0].dom.childNodes[a-this._packs[0].itemFrom];return null};b._focus=function(){this._selectedIndex=this._selectedIndex>-1?this._selectedIndex:0;this._setSelected(this._selectedIndex,
true)};b._blur=function(){this._selectedIndex>-1&&this._setSelected(this._selectedIndex,true)};b._rowTemplate=new uki.theme.Template('<div style="width:100%;height:${height}px;overflow:hidden">${text}</div>');b._renderPack=function(a,d,e){var f=[],g=new o(0,d*this._rowHeight,this.rect().width,this._rowHeight);for(i=d;i<e;i++){f[f.length]=this._rowTemplate.render({height:this._rowHeight,text:this._render.render(this._data[i],g,i)});g.y+=this._rowHeight}a.dom.innerHTML=f.join("");a.itemFrom=d;a.itemTo=
e;a.dom.style.top=d*this._rowHeight+"px";this._restorePackSelection(a,d,e)};b._restorePackSelection=function(a){this._selectedIndex>a.itemFrom&&this._selectedIndex<a.itemTo&&this._render.setSelected(this._itemAt(this._selectedIndex),this._data[this._selectedIndex-a.itemFrom],true,this.hasFocus())};b._swapPacks=function(){var a=this._packs[0];this._packs[0]=this._packs[1];this._packs[1]=a};b._normalizeRect=function(a){a=c._normalizeRect.call(this,a);if(a.height<this._rowHeight*this._data.length)a=
new o(a.x,a.y,a.width,this._rowHeight*this._data.length);return a};b._layoutDom=function(a){if(!this._scrollableParent){this._scrollableParent=uki.view.scrollableParent(this);this._scrollableParent.bind("scroll",uki.proxy(this._scrollableParentScroll,this))}var d=this._rowHeight*this._data.length;this._visibleRect=uki.view.visibleRect(this,this._scrollableParent);var e=I((this._visibleRect.height+this._visibleRectExt*2)/this._rowHeight),f=s(0,this._visibleRect.y-this._visibleRectExt);d=x(d,this._visibleRect.maxY()+
this._visibleRectExt);var g=this._packs[0].itemFrom*this._rowHeight,h=this._packs[1].itemTo*this._rowHeight;c._layoutDom.call(this,a);if(d<=g||f>=h||d>h&&this._packs[1].itemFrom*this._rowHeight>this._visibleRect.y&&this._packs[1].itemTo>this._packs[1].itemFrom||f<g&&this._packs[0].itemTo*this._rowHeight<this._visibleRect.maxY()){a=f-this._visibleRectExt/2;a=s(0,Math.round(a/this._rowHeight));e=x(this._data.length,a+e);this._renderPack(this._packs[0],a,e);this._renderPack(this._packs[1],e,e)}else if(d>
h&&this._packs[1].itemTo>this._packs[1].itemFrom){a=this._packs[1].itemTo;e=x(this._data.length,this._packs[1].itemTo+e);this._renderPack(this._packs[0],a,e);this._swapPacks()}else if(d>h){a=this._packs[0].itemTo;e=x(this._data.length,this._packs[1].itemTo+e);this._renderPack(this._packs[1],a,e)}else if(f<g){a=s(this._packs[0].itemFrom-e,0);e=this._packs[0].itemFrom;this._renderPack(this._packs[1],a,e);this._swapPacks()}if(this._focusableInput)this._focusableInput.style.top=this._visibleRect.y+"px"};
b._bindToDom=function(a){return uki.view.Focusable._bindToDom.call(this,a)||c._bindToDom.call(this,a)}}));uki.Collection.addAttrs("data,selectedIndex");uki.view.ScrollableList=uki.newClass(uki.view.ScrollPane,new (function(){var c=uki.view.ScrollPane.prototype,b=this;b.typeName=function(){return"uki.view.ScrollableList"};b._createDom=function(){c._createDom.call(this);this._list=uki({view:"List",rect:this.rect().clone().normalize(),anchors:"left top right bottom"})[0];this.appendChild(this._list)};
uki.each(["data","rowHeight","render","packSize","visibleRectExt","throttle","focusable"],function(){uki.delegateProp(b,this,"_list")})}));uki.view.list.Render=uki.newClass({init:function(){},render:function(c){return'<div style="line-height: 30px; text-align: center; font-size: 12px">'+c+"</div>"},setSelected:function(c,b,a,d){c.style.backgroundColor=a&&d?"#3875D7":a?"#CCC":"";c.style.color=a&&d?"#FFF":"#000"}});uki.view.table={};uki.view.Table=uki.newClass(uki.view.Container,new (function(){var c=
this,b=uki.view.Container.prototype,a=["rowHeight","data","packSize","visibleRectExt","render","selectedIndex","focusable","textSelectable"];c.typeName=function(){return"uki.view.Table"};c._rowHeight=17;c._headerHeight=17;c.defaultCss=b.defaultCss+"overflow:hidden;";c._listImpl="uki.view.List";uki.each(a,function(d,e){uki.delegateProp(c,e,"_list")});c.columns=uki.newProp("_columns",function(d){this._columns=uki.build(d);for(d=this._totalWidth=0;d<this._columns.length;d++){this._columns[d].position(d);
this._columns[d].bind("beforeResize",uki.proxy(function(){this._updateTotalWidth();this._scrollPane.layout()},this))}this._updateTotalWidth();this._header.columns(this._columns)});c._updateTotalWidth=function(){for(var d=this._totalWidth=0;d<this._columns.length;d++){this._columns[d].position(d);this._totalWidth+=this._columns[d].width()}this._list.minSize(new v(this._totalWidth,0));this._list.rect(new o(this._totalWidth,this._list.height()));this._header.minSize(new v(this._totalWidth,0))};c._createDom=
function(){b._createDom.call(this);var d=new o(0,this._headerHeight,this.rect().width,this.rect().height-this._headerHeight),e=d.clone().normalize(),f=new o(0,0,this.rect().width,this._headerHeight),g={view:this._listImpl,rect:e,anchors:"left top bottom",render:new uki.view.table.Render(this),className:"table-list"};d={view:"ScrollPane",rect:d,anchors:"left top right bottom",scrollableH:true,childViews:[g],className:"table-scroll-pane"};f={view:"table.Header",rect:f,anchors:"top left right",className:"table-header"};
uki.each(a,function(h,k){if(this["_"+k]!==undefined)g[k]=this["_"+k]},this);this._scrollPane=uki.build(d)[0];this._list=this._scrollPane.childViews()[0];this._header=uki.build(f)[0];this._scrollPane.resizeToContents();this.appendChild(this._header);this.appendChild(this._scrollPane);this._scrollPane.bind("scroll",uki.proxy(function(){this._header.dom().style.left=-this._scrollPane.scrollLeft()+"px"},this))}}));uki.Collection.addAttrs("columns");uki.view.table.Render=uki.newClass(uki.view.list.Render,
new (function(){var c=this;c.init=function(b){this._table=b};c.render=function(b,a,d){if(!this._template)this._template=this._buildTemplate(a);var e=this._table.columns();this._template[1]=uki.map(e,function(f,g){return e[g].render(b,a,d)}).join("");return this._template.join("")};c._buildTemplate=function(b){['<div style="position:relwidth:100%;height:',b.height,'px">'].join(",");return["","",""]}}));uki.view.table.Column=uki.newClass(uki.view.Observable,new (function(){var c=this;c._width=100;c._offset=
0;c._position=0;c._minWidth=40;c._css="overflow:hidden;float:left;font-size:11px;line-height:11px;white-space:nowrap;text-overflow:ellipsis;";c._inset=new w(3,5);c.init=function(){};uki.addProps(c,["position","css","formatter","label","resizable","maxWidth","minWidth"]);c.width=uki.newProp("_width",function(b){this._width=this._normailizeWidth(b);this.trigger("beforeResize",{source:this});if(this._stylesheet)(this._stylesheet.styleSheet?this._stylesheet.styleSheet.rules:this._stylesheet.sheet.cssRules)[0].style.width=
this._clientWidth()+"px";this.trigger("resize",{source:this})});c._bindToDom=uki.F;c._normailizeWidth=function(b){if(this._maxWidth)b=x(this._maxWidth,b);if(this._minWidth)b=s(this._minWidth,b);return b};c.inset=uki.newProp("_inset",function(b){this._inset=w.create(b)});c.render=function(b,a){if(!this._template)this._template=this._buildTemplate(a);this._template[1]=this._formatter?this._formatter(b[this._position],b):b[this._position];return this._template.join("")};c.renderHeader=function(b){if(!this._headerTemplate)this._headerTemplate=
this._buildHeaderTemplate(b);b=this._headerTemplate;b[1]=this.label();return b.join("")};c._clientWidth=function(){return this._width-(uki.dom.offset.boxModel?this._inset.width()+1:0)};c._initStylesheet=function(){uki.dom.offset.initializeBoxModel();if(!this._className){this._className="uki-table-column-"+ ++uki.dom.guid;var b="."+this._className+" {width:"+this._clientWidth()+"px;}";this._stylesheet=uki.dom.createStylesheet(b)}};c._buildHeaderTemplate=function(b){this._initStylesheet();var a=this._inset,
d=["padding:",a.top,"px ",a.right,"px ",a.bottom,"px ",a.left,"px;"].join("");b="height:"+(b-(uki.dom.offset.boxModel?a.height()+1:0))+"px;";return[['<div style="position:relative;border:1px solid #CCC;border-top: none;border-left:none;',d,b,this._css,'" class="',this._className,'">'].join(""),"","</div>"]};c._buildTemplate=function(b){this._initStylesheet();var a=this._inset,d=["padding:",a.top,"px ",a.right,"px ",a.bottom,"px ",a.left,"px;"].join("");b="height:"+(b.height-(uki.dom.offset.boxModel?
a.height():0))+"px;";return[['<div style="border-right:1px solid #CCC;',d,b,this._css,'" class="',this._className,'">'].join(""),"","</div>"]}}));uki.view.table.NumberColumn=uki.newClass(uki.view.table.Column,new function(){this._css=uki.view.table.Column.prototype._css+"text-align:right;"});uki.view.table.CustomColumn=uki.view.table.Column;uki.view.table.Header=uki.newClass(uki.view.Label,new (function(){var c=uki.view.Label.prototype,b=this;b._setup=function(){c._setup.call(this);this._multiline=
true};b.typeName=function(){return"uki.view.table.Header"};b.columns=uki.newProp("_columns",function(a){this._columns=a;this.html(this._createColumns());this._createResizers()});b._createColumns=function(){for(var a=[],d=0,e=this._columns,f=e.length;d<f;d++)a[a.length]=e[d].renderHeader(this.rect().height);return a.join("")};b._createResizers=function(){for(var a=0,d;a<this._columns.length;a++){d=this._columns[a];if(d.resizable()){d=uki.theme.dom("resizer",{height:this.rect().height});d.style.right=
"-2px";this._label.childNodes[a].appendChild(d);this._bindResizerDrag(d,a)}}};b._bindResizerDrag=function(a,d){uki.dom.drag.watch(a,{_drag:uki.proxy(function(e){var f=uki.dom.offset(this.dom());e=e.pageX-f.x;f=0;var g,h=this._columns[d];for(g=0;g<d;g++)f+=this._columns[g].width();h.width(e-f)},this)})}}));(function(){var c=uki.view.Base.prototype;uki.view.Slider=uki.newClass(uki.view.Base,uki.view.Focusable,{_setup:function(){c._setup.call(this);uki.extend(this,{_min:0,_max:1,_value:0,_values:null,
_keyStep:0.01})},min:uki.newProp("_min"),max:uki.newProp("_max"),values:uki.newProp("_values"),keyStep:uki.newProp("_keyStep"),value:function(b){if(b===undefined)return this._value;this._value=s(this._min,x(this._max,b));this._position=this._val2pos(this._value);this._moveHandle();this.trigger("change",{source:this,value:this._value});return this},_pos2val:function(b){return b/this._rect.width*(this._max-this._min)},_val2pos:function(b){return b/(this._max-this._min)*this._rect.width},_createDom:function(){this._dom=
uki.createElement("div",c.defaultCss+"height:18px;-moz-user-select:none;-webkit-user-select:none;overflow:visible;");this._handle=uki.createElement("div",c.defaultCss+"overflow:hidden;cursor:default;background:url("+uki.theme.image("x").src+")");this._bg=uki.theme.image("slider-handle");this._focusBg=uki.theme.image("slider-focus");this._focusBg.style.cssText+=this._bg.style.cssText+=c.defaultCss+"top:0;left:0;z-index:-1;position:absolute;";this._handle.appendChild(this._bg);uki.theme.background("slider-bar").attachTo(this);
this._initFocusable();uki.image.load([this._bg,this._focusBg],uki.proxy(this._afterHandleLoad,this))},_afterHandleLoad:function(){this._focusBg.style.cssText+=";z-index:10;margin-left:-"+this._focusBg.width/2+"px;margin-top:-"+(this._focusBg.height-this._bg.height/2+1)/2+"px;";this._handle.style.cssText+=";margin-left:-"+this._bg.width/2+"px;width:"+this._bg.width+"px;height:"+this._bg.height/2+"px;";this._dom.appendChild(this._handle);uki.dom.drag.watch(this._handle,this);uki.dom.bind(this._handle,
"mouseover",uki.proxy(this._mouseover,this));uki.dom.bind(this._handle,"mouseout",uki.proxy(this._mouseout,this));this.bind("click",this._click);this.bind("keydown",this._keydown)},_mouseover:function(){this._over=true;this._bg.style.top=-this._bg.height/2+"px"},_mouseout:function(){this._over=false;this._bg.style.top=this._dragging?-this._bg.height/2+"px":0},_click:function(b){b=b.domEvent;this.value(this._pos2val(b.pageX-uki.dom.offset(this._dom).x))},_keydown:function(b){b=b.domEvent;if(b.which==
39)this.value(this.value()+this._keyStep*(this._max-this._min));else b.which==37&&this.value(this.value()-this._keyStep*(this._max-this._min))},_moveHandle:function(){this._focusBg.style.left=this._handle.style.left=this._position+"px"},_acceptDrag:function(){this._dragging=true;this._initialPosition=new y(parseInt(this._handle.style.left,10),parseInt(this._handle.style.top,10));return true},_drag:function(b,a){this._position=s(0,x(this._rect.width,this._initialPosition.x-a.x));this._value=this._pos2val(this._position);
this._moveHandle();this.trigger("change",{source:this,value:this._value})},_drop:function(){this._dragging=false;this._initialPosition=null;if(!this._over)this._bg.style.top=0;this._value=this._pos2val(this._position)},_focus:function(){this._dom.appendChild(this._focusBg);this._focusBg.style.left=this._handle.style.left},_blur:function(){this._dom.removeChild(this._focusBg)},_layoutDom:function(b){b=b.clone();b.height=18;c._layoutDom.call(this,b);this._position=this._val2pos(this._value);this._moveHandle();
return true},typeName:function(){return"uki.view.Slider"},_bindToDom:function(b){if(b=="change")return true;return uki.view.Focusable._bindToDom.call(this,b)||c._bindToDom.call(this,b)}})})();uki.view.SplitPane=uki.newClass(uki.view.Container,new (function(){var c=uki.view.Container.prototype,b=this;b.typeName=function(){return"uki.view.SplitPane"};b._setup=function(){c._setup.call(this);this._originalRect=this._rect;uki.extend(this,{_vertical:false,_handlePosition:200,_autogrowLeft:false,_autogrowRight:true,
_handleWidth:7,_leftMin:100,_rightMin:100,_panes:[]})};b.handlePosition=uki.newProp("_handlePosition",function(a){this._handlePosition=this._normalizePosition(a);this.trigger("handleMove",{source:this,handlePosition:this._handlePosition,dragValue:a});this._resizeChildViews()});b.handleWidth=uki.newProp("_handleWidth",function(a){if(this._handleWidth!=a){this._handleWidth=a;a=this._createHandle();this._dom.insertBefore(a,this._handle);this._removeHandle();this._handle=a;this._resizeChildViews()}});
b._normalizePosition=function(a){var d=this._vertical?"height":"width";return s(this._leftMin,x(this._rect[d]-this._rightMin-this._handleWidth,s(0,x(this._rect?this._rect[d]:1E3,a*1))))};uki.addProps(b,["leftMin","rightMin","autogrowLeft","autogrowRight"]);b.topMin=b.leftMin;b.bottomMin=b.rightMin;b._removeHandle=function(){this._dom.removeChild(this._handle)};b._createHandle=function(){var a;if(this._vertical){a=uki.theme.dom("splitPane-vertical",{handleWidth:this._handleWidth});a.style.top=this._handlePosition+
"px"}else{a=uki.theme.dom("splitPane-horizontal",{handleWidth:this._handleWidth});a.style.left=this._handlePosition+"px"}uki.dom.drag.watch(a,this);return a};b._createDom=function(){this._dom=uki.createElement("div",c.defaultCss);for(var a=0,d;a<2;a++){d={view:"Container"};d.anchors=a==1?"left top bottom right":this._vertical?"left top right":"left top bottom";d.rect=a==0?this._leftRect():this._rightRect();this._panes[a]=uki.build(d)[0];this.appendChild(this._panes[a])}this._dom.appendChild(this._handle=
this._createHandle())};b._normalizeRect=function(a){a=c._normalizeRect.call(this,a);a=a.clone();if(this._vertical)a.height=s(a.height,this._leftMin+this._rightMin);else a.width=s(a.width,this._leftMin+this._rightMin);return a};b._resizeSelf=function(a){var d=this._rect,e=this._vertical?"height":"width";if(!c._resizeSelf.call(this,a))return false;if(this._autogrowLeft){d=a[e]-d[e];this._handlePosition=this._normalizePosition(this._handlePosition+(this._autogrowRight?d/2:d))}if(this._vertical){if(a.height-
this._handlePosition<this._rightMin)this._handlePosition=s(this._leftMin,a.height-this._rightMin)}else if(a.width-this._handlePosition<this._rightMin)this._handlePosition=s(this._leftMin,a.width-this._rightMin);return true};b._acceptDrag=function(a){var d=uki.dom.offset(this.dom());this._posWithinHandle=a[this._vertical?"pageY":"pageX"]-d[this._vertical?"y":"x"]-this._handlePosition;return true};b._drag=function(a){var d=uki.dom.offset(this.dom());this.handlePosition(a[this._vertical?"pageY":"pageX"]-
d[this._vertical?"y":"x"]-this._posWithinHandle);a.preventDefault?a.preventDefault():(a.returnValue=false);this.layout()};b._drop=function(){};b.topPane=b.leftPane=function(a){return this._paneAt(0,a)};b.bottomPane=b.rightPane=function(a){return this._paneAt(1,a)};b.topChildViews=b.leftChildViews=function(a){return this._childViewsAt(0,a)};b.bottomChildViews=b.rightChildViews=function(a){return this._childViewsAt(1,a)};b._childViewsAt=function(a,d){if(d===undefined)return this._panes[a].childViews();
this._panes[a].childViews(d);return this};b._paneAt=function(a,d){if(d===undefined)return this._panes[a];uki.build.copyAttrs(this._panes[a],d);return this};b._leftRect=function(){return this._vertical?new o(this._rect.width,this._handlePosition):new o(this._handlePosition,this._rect.height)};b._rightRect=function(){return this._vertical?new o(0,this._handlePosition+this._handleWidth,this._rect.width,this._rect.height-this._handleWidth-this._handlePosition):new o(this._handlePosition+this._handleWidth,
0,this._rect.width-this._handleWidth-this._handlePosition,this._rect.height)};b._resizeChildViews=function(){this._panes[0].rect(this._leftRect());this._panes[1].rect(this._rightRect())};b._layoutDom=function(a){c._layoutDom.call(this,a);this._handle.style[this._vertical?"top":"left"]=this._handlePosition+"px"};b._bindToDom=function(a){if(a=="handleMove")return true;return c._bindToDom.call(this,a)}}));uki.view.HorizontalSplitPane=uki.view.SplitPane;uki.view.VerticalSplitPane=uki.newClass(uki.view.SplitPane,
{_setup:function(){uki.view.SplitPane.prototype._setup.call(this);this._vertical=true}});uki.Collection.addAttrs("handlePosition");uki.view.Popup=uki.newClass(uki.view.Container,new (function(){var c=uki.view.Container.prototype,b=this;b._setup=function(){c._setup.call(this);uki.extend(this,{_offset:2,_relativeTo:null,_horizontal:false,_flipOnResize:true,_defaultBackground:"theme(popup-normal)"})};b._createDom=function(){c._createDom.call(this);this.hideOnClick(true)};uki.addProps(b,["offset","relativeTo",
"horizontal","flipOnResize"]);this.hideOnClick=function(a){if(a===undefined)return this._clickHandler;if(a!=!!this._clickHandler)if(a){this._clickHandler=this._clickHandler||uki.proxy(function(d){uki.dom.contains(this._relativeTo.dom(),d.target)||uki.dom.contains(this.dom(),d.target)||this.hide()},this);uki.dom.bind(n.body,"mousedown",this._clickHandler);uki.dom.bind(t,"resize",this._clickHandler)}else{uki.dom.unbind(n.body,"mousedown",this._clickHandler);uki.dom.unbind(t,"resize",this._clickHandler);
this._clickHandler=false}return this};b.typeName=function(){return"uki.view.Popup"};b.toggle=function(){this.parent()&&this.visible()?this.hide():this.show()};b.show=function(){this.visible(true);if(this.parent()){this.rect(this._recalculateRect());this.layout(this._rect)}else new uki.Attachment(t,this)};b.hide=function(){this.visible(false)};b.parentResized=function(){this.rect(this._recalculateRect())};b._resizeSelf=function(a){this._rect=this._normalizeRect(a);return true};b._layoutDom=function(a){return c._layoutDom.call(this,
a)};b._recalculateRect=function(){if(!this.visible())return this._rect;var a=uki.dom.offset(this._relativeTo.dom()),d=this._relativeTo.rect(),e=this.rect().clone(),f=uki.view.top(this);f.rect();f=uki.dom.offset(f.dom());var g=new y,h=this._horizontal?this._offset:0,k=this._horizontal?0:this._offset;a.offset(-f.x,-f.y);g.x=this._anchors&2?a.x+d.width-(this._horizontal?0:e.width)+h:a.x-(this._horizontal?e.width:0)-h;g.y=this._anchors&4?a.y+(this._horizontal?d.height:0)-e.height-k:a.y+(this._horizontal?
0:d.height)+k;return new o(g.x,g.y,e.width,e.height)}}));uki.each(["show","hide","toggle"],function(c,b){uki.fn[b]=function(){this.each(function(){this[b]()})}});uki.view.VerticalFlow=uki.newClass(uki.view.Container,new (function(){var c=uki.view.Container.prototype,b=this;b._setup=function(){c._setup.call(this);uki.extend(this,{_horizontal:false,_dimension:"height",_containers:[],_containerSizes:[],defaultCss:this.defaultCss+"overflow:hidden;"})};b.typeName=function(){return"uki.view.VerticalFlow"};
b.horizontal=uki.newProp("_horizontal",function(a){this._dimension=a?"width":"height"});b.appendChild=function(a){var d=this._createContainer(a),e=this._childViews.length;this._containers[e]=d;this._containerSizes[e]=a.rect()[this._dimension];this._dom.appendChild(d);c.appendChild.call(this,a)};b.insertBefore=function(a,d){var e=this._createContainer(a),f=d._viewIndex;this._dom.insertBefore(e,this._containers[f]);this._containers.splice(f,0,e);this._containerSizes.splice(f,0,a.rect()[this._dimension]);
c.insertBefore.call(this,a,d)};b.removeChild=function(a){var d=this._containers[a._viewIndex];c.removeChild.call(this,a);this._dom.removeChild(d);this._containers=uki.grep(this._containers,function(e){return e!=d})};b.domForChild=function(a){return this._containers[a._viewIndex]};b.contentsSize=function(){var a=this._dimension,d=uki.reduce(0,this._childViews,function(e,f){return e+f.rect()[a]});return this._horizontal?new v(d,this.contentsHeight()):new v(this.contentsWidth(),d)};b._updateSize=function(a){var d=
this.rect(),e;if(this._horizontal){e=d.width+a;a=d.height}else{e=d.width;a=d.height+a}this.rect(new o(d.x,d.y,e,a))};b._createDom=function(){c._createDom.call(this);for(var a=0;a<this._containers.length;a++)this._dom.appendChild(this._containers[a])};b._layoutDom=function(a){c._layoutDom.call(this,a);var d,e,f;a=0;for(d=this._containers.length;a<d;a++){e=this._containers[a];f=this._childViews[a].rect()[this._dimension];if(f!=this._containerSizes[a]){e.style[this._dimension]=f+"px";this._containerSizes[a]=
f}}};b._createContainer=function(a){var d=uki.createElement("div","position:relative;top:0;left:0;width:100%;padding:0;");d.style[this._dimension]=a.rect()[this._dimension]+"px";return d}}));uki.view.HorizontalFlow=uki.newClass(uki.view.VerticalFlow,{_setup:function(){uki.view.VerticalFlow.prototype._setup.call(this);this._horizontal=true;this._dimension="width"},typeName:function(){return"uki.view.HorizontalFlow"},_createContainer:function(c){var b=uki.createElement("div","position:relative;top:0;left:0;float:left;padding:0;height:100%;");
b.style[this._dimension]=c.rect()[this._dimension]+"px";return b}});uki.view.toolbar={};uki.view.Toolbar=uki.newClass(uki.view.Container,new (function(){var c=uki.view.Container.prototype,b=this;b.typeName=function(){return"uki.view.Toolbar"};b._moreWidth=30;b._setup=function(){c._setup.call(this);this._buttons=[];this._widths=[]};this.buttons=uki.newProp("_buttons",function(a){this._buttons=a;this._flow.childViews(uki.build(uki.map(this._buttons,this._createButton,this)).resizeToContents("width"));
this._totalWidth=uki.reduce(0,this._flow.childViews(),function(d,e){return d+e.rect().width})});uki.moreWidth=uki.newProp("_moreWidth",function(a){this._moreWidth=a;this._updateMoreVisible()});b._createDom=function(){c._createDom.call(this);var a=this.rect(),d=a.clone().normalize();a={view:"Button",rect:new o(a.width-this._moreWidth,0,this._moreWidth,a.height),anchors:"right top",className:"toolbar-button",visible:false,backgroundPrefix:"toolbar-more-",text:">>",focusable:false};var e={view:"Popup",
rect:"0 0",anchors:"right top",className:"toolbar-popup",background:"theme(toolbar-popup)",childViews:{view:"VerticalFlow",rect:"0 0",anchors:"right top left bottom"}};this._flow=uki.build({view:"HorizontalFlow",rect:d,anchors:"left top right",className:"toolbar-flow",horizontal:true})[0];this._more=uki.build(a)[0];this.appendChild(this._flow);this.appendChild(this._more);e.relativeTo=this._more;this._popup=uki.build(e)[0];this._more.bind("click",uki.proxy(this._showMissingButtons,this))};b._showMissingButtons=
function(){for(var a=this._flow.rect().width,d=0,e=[],f=0,g=this._flow.childViews(),h=g.length;f<h;f++){d+=g[f].rect().width;d>a&&e.push(f)}a=uki.map(e,function(k){var q={html:g[k].html(),backgroundPrefix:"toolbar-popup-"};uki.each(["fontSize","fontWeight","color","textAlign","inset"],function(p,C){q[C]=uki.attr(g[k],C)});return this._createButton(q)},this);uki("VerticalFlow",this._popup).childViews(a).resizeToContents("width height");this._popup.resizeToContents("width height").toggle()};b._updateMoreVisible=
function(){var a=this._rect;if(this._more.visible()!=a.width<this._totalWidth){this._more.visible(a.width<this._totalWidth);var d=this._flow.rect();d.width+=(a.width<this._totalWidth?-1:1)*this._moreWidth;this._flow.rect(d)}};b.rect=function(a){var d=c.rect.call(this,a);a&&this._updateMoreVisible();return d};b._createButton=function(a){return uki.extend({view:"Button",rect:new o(100,this.rect().height),focusable:false,align:"left",anchors:"left top",backgroundPrefix:"toolbar-button-",autosizeToContents:"width",
focusable:false},a)}}))})();
(function(){function j(n){return uki.theme.airport.imagePath+n}function t(){return{c:[j("shadow/large-c.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAYAAABXuSs3AAACzklEQVRo3t2a63KiUBCEPYCX1U2Ixvd/Qm/kYjRBWd2aTjW950CS3fyYtaprULl8p2kGAcMg/QqR6SDTsXk/8moi041Mx+bt3WAKVDVIDOQj0ArcROCbFHzoAGbYTICzLwygC/jc8T62bGccFDKLKLUXeH2625sIpCo2mBa8bkiBWbkpo5oaQMrxFPCJ6ikxkNYAQg90Tiqk5h0DiDmeAoZqqTqIFrxuSB0uSENTQVUHkHJdnVbgN6qYrmkQ6n7U6VygRwY6Eg1pHiyDdcQcx0YZGLCvInxWyx44q+Nwi6Hh8Ng0kTqieTQ2QcCbSDzeCPB40UHqUfYAlvu9Lu0aDD0i0B+iiQnup1wfdLgNdw+mFxEG8CrwZziuB6JCT00zqQyfcn3Q4TZD7y96lrqPwL9HJkiLKygecPcK+tN0Y3VG348lMlnC8bNE5EjuXmGfLnq0+mSf4fujuh6kM8DtCUHfmG6pMry63uc4u83QDwaO+kjwB3U9SD45InD61lSS4PzU4GNxUXCNyYvFAU5XpAcTnOfI/AFeiNuIxhX0TgT3pxKXoge8lpjsyeWdqKLosOs1wIcEzgck3L6Czk0Le1/ad7O/BH826MpgNxdtTTtynQ/UFngh4DNym6HvbfqO4oKcfwYc+UZMdga7FviKss7gdbB45NJNAA637wl8QXFBzsfSz7vAccLZ00EJt9dU4TofpOgup0AbLKSbICYAZiEu3NM/6zh6NmKyFm0oLtxdWo5z/8ZJpiTwpYDPxfGvgsPxrUCvCLyik9J7P1dw7igAB+zStDDw8h+BVwa+MeAVDQDg3FmS4NxR5gTN9TvA1wS9opxrZ+kFL6mbLEnfDb6iqGzJ8f8f3F1UXB6cLtuhyxOQy1O+2x9Zbn/Wur2QcHvp5vZi2e3tCbc3hNzegnN709P1bWaXN/bdPkpx/fDK9eNCtw9oXT8Sd/MnhF+iLpLibpmRrgAAAABJRU5ErkJggg==",j("shadow/large-c.gif")],
v:[j("shadow/large-v.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAECAYAAADxjg1nAAAAWklEQVQYGdXBWwpAQAAAwLEeSUqy9z/hSkpSnh9OsTMFGlSo0aJDjwEjJkREREwYMaBHhxY1KpQIKPxePLhx4cSBHRtWLJiRkJAwY8GKDTsOnLiCTAWZCjL1AeihFg5/1kytAAAAAElFTkSuQmCC",j("shadow/large-v.gif")],h:[j("shadow/large-h.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAuCAYAAAAPxrguAAAAe0lEQVQoz5XSWwtAQBCG4XEMOST+/y8kOYScKRe8WzZbc7FPX7PNtLaIuPI49l0vUBIewT/LuO/7BRETMRMpExkh/w9KD+WVhBASAu20jnZjFsEkGAQh7ISNsBIWwkwYCT2hI9SEilASiv+g9KgEH6ZhomVi0E47fW7sAEmnGr/QVlzBAAAAAElFTkSuQmCC",
j("shadow/large-h.gif")],m:[j("shadow/large-m.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAEUlEQVQIHWNgYGD4i4ZJFQAAAkoP0RsgosoAAAAASUVORK5CYII=",j("shadow/large-m.gif"),true]}}uki.theme.airport=uki.extend({},uki.theme.Base,{imagePath:"http://static.ukijs.org/pkg/0.0.9/uki-theme/airport/i/",backgrounds:{"button-normal":function(){return new uki.background.Sliced9({c:[j("button/normal-c.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAS0lEQVQIW2NgAILy8vL/yJgBJrh+/fr/MABigyVBxN9//1EwXGLGrDn/j5++9P/G7Qf/t+/YBZEA6k5LTU39j4xBYmB7QAxkDBIDALKrX9FN99pwAAAAAElFTkSuQmCC",
j("button/normal-c.gif")],v:[j("button/normal-v.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAATCAYAAACz13xgAAAAT0lEQVQYlZXPMQ6AQAhE0b9m78zZFca1sdEwxZLQ8MIQiIh1XuvTEbEmQOnmXxNAVT2UB5komY1MA5KNys3jHlyUtv+wNzhGDwMDzfyFRh7wcj5EWWRJUgAAAABJRU5ErkJggg==",false,true],h:[j("button/normal-h.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH8AAAAGCAYAAADqkEEaAAAAMklEQVRIie3DUQ0AIAxDwZodFmaVhB+MjIeQ9pJTd5OeRdjSPEjP2ueSnlVVpGcBKz1/kUWrDOOOWIQAAAAASUVORK5CYII=",j("button/normal-h.gif")],m:[j("button/normal-m.png"),
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH8AAAATCAYAAAC5i9IyAAAAXklEQVQYGe3BgRHDMAACsXeP/fdtDUkHAUnf3/syleQ8TCfFZjrJNtNJdphOSsx00r1mOikJ00nJZTrJDtNJdphOci7TSXGYTkrMdJIdppP4HKaTDofpJA5TSnCYTn/FLC2twbqbSQAAAABJRU5ErkJggg==",null,true]},"3 3 3 3",{inset:"0 0 -1 0"})},"button-hover":function(){return new uki.background.Sliced9({c:[j("button/hover-c.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAS0lEQVQIW2NgAILy8vL/yJgBJrh+/fr/MABigyVBxN9//1EwXGL+wqX/b9579v/Ji3f/9+w9AJEA6m5ITU39j4xBYmB7QAxkDBIDAN/zYPRpDtd1AAAAAElFTkSuQmCC",
j("button/hover-c.gif")],v:[j("button/hover-v.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAATCAYAAACz13xgAAAAT0lEQVQY062PMQ7AIAwDj8Kf83gw7tKlhQxItZTp5EtCRLh3vyYi3AA0J980gJmBoayh31S290DS4Q4pUzlTjdOr0j9KLXvAanrAWuAiyQ2Hqz+Eaxa7lwAAAABJRU5ErkJggg==",false,true],h:[j("button/hover-h.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH8AAAAGCAYAAADqkEEaAAAAM0lEQVRIS+3DsREAIAwDMS+bGdIyLAUVG4RnEFt3UneTnkXY0jxIz9rnkp5VVaRnASs9f4uJy0upJnsYAAAAAElFTkSuQmCC",j("button/hover-h.gif")],m:[j("button/hover-m.png"),
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH8AAAATCAYAAAC5i9IyAAAAXElEQVQYGe3BgRHAMAABQLnaf+EEHYR/3ptgKlE2phNtYzrxyZhOtIzpRNuYTnwyphOTYDpREqYTbWM6UQqmExVhOtHPmE5MgunEJ2M68XwH04kIphRxMKWIqfUDGFEu5jKnhiUAAAAASUVORK5CYII=",null,true]},"3 3 3 3",{inset:"0 0 -1 0"})},"button-down":function(){return new uki.background.Sliced9({c:[j("button/down-c.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAR0lEQVQIW2NgAIKGhob/yJgBJlhQUPg/JTUDjEFssCSIyC8o+l9b1wjGIDZcoq9v4v9tO/aDMYiNYhyGHSDw////NGQMEgMAouBOxXrB3FIAAAAASUVORK5CYII=",
j("button/down-c.gif")],v:[j("button/down-v.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAATCAYAAACz13xgAAAAkUlEQVQYV42Nuw4CMQwEHT9ojvvnNPTQ8LfIeH3BmKuwNMomI294zulz3vz+eCbIeGOK2a4b7fueIGNSmF1IRBPkEqxMYpIgl1A2UllE/m5IbCyQS4hEjS4iN6FHXYDcBCokkV7FrYp7lcXFVA+6oME0xkiQS3weS9YGj19q48QfVbQ+zY+b4BMlXu7kcfrKmDdNVhnN3VjMVQAAAABJRU5ErkJggg==",false,true],h:[j("button/down-h.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH8AAAAGCAYAAADqkEEaAAAARklEQVQYGe3BsQ2AQAwDQNvD0oCYIQ0UbIVExVDxDxLfsaqMGIn7cVoSYpbuBq/7sSTELN0Nvt9vgohZDINVZcRItL0hRloovBiO+VNuegAAAABJRU5ErkJggg==",
j("button/down-h.gif")],m:[j("button/down-m.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH8AAAATCAYAAAC5i9IyAAAAa0lEQVQYGe3BsREDQQwDseWJF/n7n3lH7lQuhAT8fn8rUWF2wc/zQRKVZXexfalMnjtUJnsulckzQ2XyeKhM9lwqk2eGyuTxUJl8bSqTpUNlsiQqkzmiMllUKkuiMhkdKpMPlcoLSKKy7C5/du0Mt289U6QAAAAASUVORK5CYII=",null,true]},"3 3 3 3",{inset:"0 0 -1 0"})},"button-focus":function(){if(uki.image.needAlphaFix)return new uki.background.CssBox("filter:progid:DXImageTransform.Microsoft.Blur(pixelradius=3);background:#7594D2;",
{inset:"-5 -5 -4 -5",zIndex:-2});return new uki.background.Sliced9({c:[j("button/focusRing-c.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAtUlEQVQokWNgQABGBof9LNqhq9hkQo9xgjCIDRIDy6GA0FXMKp7b2NX9jvCqJB4S1Y47IgfCIDZYDCgHUgM3GSSgkLBfQCfxoKxO3Ak93fijdiAMYoPEQHJgTWCbgFaCTAFJ6MafMNZNPOGvl3AiC4RBbJAYSA6kBuw8kDtBVoNNBis+WQWzGsQGiYHkwE4F+QnsOaB7QU4AmcqABsA2AeVAakBqSddAspNI9jTpwUpGxJGUNADqMZr1BXNgDAAAAABJRU5ErkJggg=="],v:[j("button/focusRing-v.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAUCAYAAAC58NwRAAAAf0lEQVQoU2MQj93JrZlwQlUn/qS3TsLJegY0ABIDyYHUgNQyqPsd4dWJPa6pl3giRDfxeB+6BpAYSA6kBqSWQSl0N79m7FEdvcSTkUA8DV0DSAwkB1IDUgvWoBN3Qk83/ni0buKJGegaQGIgOZCaUQ2jGgZeA0nJm+QMRGoWBQCeEP1BW4HCpgAAAABJRU5ErkJggg=="],
h:[j("button/focusRing-h.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIEAAAAMCAYAAABFjt5WAAAAlElEQVRYw+2YMQoCMRBFpxextBcWCUxykQUrLUTibk7iDbYUryK2SpJbubN7jLwHr0n7msmXfXxvjqfv9nD57LAtrbv1FzeWTmN2Lv5U7yVgGy69rfvcX3SofUjlHFK9+iHfsA2tt3W3/qJjffiUp/nx6VN5YRuuvfNk/QUAAADA4DDkMOSLyBexZyxiLOqE2ZjZ+A+dZWjNi3C4GwAAAABJRU5ErkJggg=="]},"6 6 6 6",{inset:"-4 -4 -4 -4",zIndex:2})},"toolbar-button-normal":function(){return new uki.background.Css("#CCC")},"toolbar-button-hover":function(){return new uki.background.Css("#E0E0E0")},
"toolbar-button-down":function(){return new uki.background.Css("#AAA")},"toolbar-button-focus":function(){return new uki.background.Css("#CCC")},"toolbar-popup-button-hover":function(){return new uki.background.Css({background:"#4086FF",color:"#FFF"})},panel:function(){return new uki.background.Sliced9({h:[j("panel/dark-h.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAAGCAYAAADpJ08yAAAAIElEQVQIW2NcvnzFfwYgYLx37z4aY8aMmWgMIJ4JYgAAGzEQWXMYYT0AAAAASUVORK5CYII=",j("panel/dark-h.gif")],m:[j("panel/dark-m.png"),
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAABlCAYAAABnRzLGAAAAPUlEQVQoz2O5e/fefwYgYGGAAgTj////DERLkaSY6lLkKaaQATfw379/BNVgSsF1Ud1hw5VBYYBTaCntGQBCJspdTUaYMwAAAABJRU5ErkJggg==",false,true]},"3 0 3 0")},input:function(){return new uki.background.CssBox("background:white;border: 1px solid #999;border-top-color:#555;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.4);-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, 0.4);box-shadow:0 1px 0 rgba(255, 255, 255, 0.4)",
{inset:"0 0 0 0"})},"slider-bar":function(){return new uki.background.Sliced9({v:[j("slider/bar-v.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAASCAYAAAB4i6/FAAAASUlEQVQY02NgGHqgvLz8PzKGC7a0tP1ftnwNGIPYYEkQsW//0f/Hjp8FYxAbLjFjxiy4BIgNlvj//38auh0gMbA9IAYyHvDQAACE3VpNVzKSLwAAAABJRU5ErkJggg==",j("slider/bar-v.gif")],m:[j("slider/bar-m.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAAASCAYAAAB4gjqpAAAAUUlEQVQYGe3BwRFAMBAAwItJIVTAR0taSE9eVHiKOA9jdjcCAAAAAAAAgJ9rY4wMgKK+bnsAVPV5XgKgagqAF/T7OgOgqmXmEQAAAAAAAHzTAx6DCNiUJps4AAAAAElFTkSuQmCC",
j("slider/bar-m.gif"),true]},"0 3 0 3",{fixedSize:"0 18"})},list:function(n){return new uki.background.Rows(n,"#EDF3FE")},"popup-normal":function(){return new uki.background.Multi(new uki.background.CssBox("opacity:0.95;background:#ECEDEE;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;border:1px solid #CCC"),uki.theme.background("shadow-medium"))},"shadow-big":function(){return new uki.background.Sliced9(t(),"23 23 23 23",{zIndex:-2,inset:"-4 -10 -12 -10"})},"shadow-medium":function(){return new uki.background.Sliced9(t(),
"23 23 23 23",{zIndex:-2,inset:"-1 -6 -6 -6"})}},images:{"slider-handle":function(){return uki.image(j("slider/handle.gif"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAkCAYAAACwlKv7AAABcUlEQVQ4T7WSy0sCYRRH758b0aKFCwmjB1kwlGEIJQiVvRe6iajIVpGbJArKjWK0GCgq7DE2muJt7kf3cmeaBlz0wVl8Z34Dw3AAvLNbqmIUtIHNo2sk/jr8HNb2K/jV60dCG8gVy9jq9IThsXmDdrQxw2arKySzRYN2mcIpQma7hE/vHYHuYQ5SG8doN9sC3cMcWKsHeP/sCnQPc5BcKWDtoSXwN/qct4GZzA5WbUcgSWhHG5hczP+SwZdpAwkrhxeNN2EivWXQjjYQn13Gcu1VSKTWDdrRBmJTS/6h9zahHW1gdHwBT25fIqENjMTnkND/TcPPTWpDsWmMAgY+AxXedZxQfIXffWIkUriWXLh2UvjlIwpcj3ZSuE/+FB50pvAzGwUuPOhM4aVGX+DCg84UfljvCvyNPseFF6oocOHaSeF7N22BC9dOCs9fuQIXrp0Unq24AheunRSeLjsCF66dFG6df0TiK7xid0L5v8K/AYNKQJdGv2S4AAAAAElFTkSuQmCC")},
"slider-focus":function(){if(uki.image.needAlphaFix){var n=new uki.createElement("div","width:12px;height:18px;filter:progid:DXImageTransform.Microsoft.Blur(pixelradius=4);background:#7594D2;");n.width=20;n.height=28;return n}return uki.image(j("slider/focus.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAZCAYAAAA8CX6UAAABUUlEQVQ4y+2VsUoDQRCGVxRFRLQRGxUJETmyd4292IoQm1wRwuVuWx/BxjewDHmGPIAgFkFJvL23cr45MVhli20EFxaW2f//b+afvV1jVmPD3My3evls+yT/3D0uXvcu+4v9Tv52wGRNjD0wYJXza+Szze7tyw7grvs46o0XZ0nlL2xRJ0mxtExdS4w9MIoVDtyfTAicV/ND695P7dhnabm8tmVzlzk/yFwzbKcfENM9wYCFo2KamaSIOhtp6a9S5++zyj/YqnlKXf0sIhMma2LsgQELB66WSb2kqpmoSPNo1gwwYOGoFXim5kndpMzXTODQzIQDFw1DJ9RYqZ/UQ4XAwoGLhlF/pCOYiQ+hQq1/0gDhqk+cEdr73Z1JcGltE4Zw0VChtuX1SAychmfkp3Dg/gv9aaEo5yjayY72r0X7+6PdR9FuyHh3dsRXJMq79gUgPopCCBOTpwAAAABJRU5ErkJggg==")},
checkbox:function(){return uki.image(j("checkbox/normal.png"),"data:image/png;base64,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",
j("checkbox/normal.gif"))},"checkbox-focus":function(){if(uki.image.needAlphaFix){var n=new uki.createElement("div","width:18px;height:18px;filter:progid:DXImageTransform.Microsoft.Blur(pixelradius=3);background:#7594D2;");n.width=26;n.height=26;return n}return uki.image(j("checkbox/focus.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABdklEQVRIie2Wv0rDUBSHUxRFRHQRFxWRioTeZHEXVxHqYgaRNrmrj+Ai+AAdi6trH0AQh6K05uYpfBQ934m0EnHQcIuDB+5y7/l9J+dPchMEU2sER8P5VjJY2ExeljY6D8v77dHKbvK4+t3iHD/80aFXzhdLBnPN4/tFBE37vN7qjrbDzO2ZTh6GnbExXRdXl+5zLn74o1O9cOB9xjfY3MmGa8Y+bSGO0vGhSYuT2Lqz2BbnUZpfVBf7nOOn/gQWPRwNMslE0iIyh1HqDiLrTuPMXZqsuI5s3hNQX/Zuq6vcz3v44Y8OPRx4H+UKAmpHevrkCi+ubu5e33660KGHo2WmJ5g2SGpImjzJb+DTIJKJcODB1QBMgTZUakm6dQKghwMPrgbQ+ss00DBqWidA2TNpvPC0DxjzzMiVU1H0a5VI9HDgwZ0EKEdTxk+mo14GMmHCgfcf4I8F8DpF3t8D72+y92+R96+p9/vA/402gzt5Bn8VHu0d2HhIetPffvAAAAAASUVORK5CYII=")},
radio:function(){return uki.image(j("radio/normal.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAABsCAYAAABn5uLmAAAGiklEQVRYw+2X/08TdxjH/RP6Z+2XJWeyzMTMjGkkEkmsog4VzSGiA0FUQAPIUHEqMC0i3Rgt66Sj8q0wkG9tgV4RAflij7b0C198du8Ozn6uPe66uGSJXvLO5fk8r+cNP/TeeT579vxXj8nmNTxzvuVbnEtCy8ASyZJqnKOvadLg8HKNDp/Y61khf2id3r8nWahxjj44VZN66xjX2OmmRTFMsY0tVaEPDnySSZnJZrhjdoqzyyEKRTc1BQ485hijyiY739btIv/ahm6BxxxjdO2BRXDPvqOlQExWR1c/fbnvO/riq2/jb9SJffCYY4x+uNNCc/4oowNHTtOpK9WUX9EQf6NWMphjjPIrHpNvOcLImF9O5Q1/UFVzd/yNWslgjjE6V1JHk2/DjPJK66j8sY0qJBO8USsZzDFGOQWVQtfIaxqfC8my9E7Q1dpnVFJnjr9RJ/bBY44xyj57lS+//5yGXwd1CzzmGKMMI2/IzLkotvdPkVMIaAoceMwl/Si/yTrNZZ7gydztpu4pUVXogwOv+pl8fSib23fomMhfryPTn+Nkd/tlocY5+uA0P1yOyzBw+zP5vfsPC3v3Z9IHHRZwjv6eT/yx2QYN9r5XfJdzRJBECRJwjr6mibWzn7N29Yujbi+tBtdoa+u9LNQ4Rx+cqskvVgdnsfeQPxCkza0tVaEPDnxy4JtMhua2DnHFv0obm5uaAgcec2zom8x8t3OI1jc2dAs85hijB03NwuLySlpG4DHHGN2pb6DY+nrawhxjdLv2PkVjsbSFOcbo+q0aCkdjaQtzjFFRaYXgm52jtUhUt8Bjjg3/wqv802etFApHdAs85hgjI88bzuUXilOCj4JrYU2BA4+5pB9lzpk87vzFQvJMeykQWlMV+uDAq34m2TmnuWM534t36x+RyzMlfV8hWahxjj44zQ83I8NoOJJt5LOOGoWsbCPJkmqco/+pJyR2RFPfPN/sXMDOSDtCjfM0dkhB7PMskxiKUeKDGufoa+yQLq7RPknLgShtSsunmtAHBz7FDjlo+LHtL/GttGiuS/msJXDgMccYVZle8lZpMQjFtnQLPOYYo4rGTsG3uEpBaWPdkb1nQNodD27vkAfjdWIfPObYZbS+nVYjm4wOZCl2SKlWMphLWkZXpM0+Ual2SCWTtIwW3GqkRWnlTdT50rvMDolayWCOMcorvS+8ml6gOTEqyzHkoZLtHRJv1Il98JhjjE4XVvF1TzpoZiWiW+Axp0jIMsPx/Jti/8SstD+HNQUOPOaSfpRZZ4q4E/k3qGdMoOmlkKrQBwde9TPJzOE5bKs3655Q1/A0uReCslDjHH1wuhIyI/ssn3H0rCC9SdY/9eeE/NgJ2SsloV9KRPaWHaPedBJyUYxo3LIj2gmZzi1bNSHb+ybTumWDT5mQnjd+5hatJfApE1J5g9ajlAmpvEHrUcqEVN6g9ShlQjrG3jC3aC2BT5mQVY3WtG7Z4FUT0jog6Lplg9s1IY/z1+nXvqldb9nog9OVkEXVTdTy0sPcslHj/HNCfsTH6x00eL3jvFeYEASfi3aEOn7u1XHLdrkGOZd7SJyfn6FwBLfsLVmocY4+OFWTweEebnRsgNbWQoyBUuiDA59kYrPZDL19nWIoFNjVZEfgwGOOMXrxwsK7XKO6THYEHnOMkcXSKqyuikl/1e0ZoQnXUPyt/G/BY44xet76NOkvjow6aWi4VxZqJYM5xqjp54dJUE+PPUlKBnOM0U8P70qNTUYOxwuy2ztkoVYymGOMamurhaWleakZlbW8PE+/236jdos5/kad2AePOcaosvIGb7W20fp6WLfAY44x4qXbcum1YnH2jZei0YCmwIHnU92yL18u4K6VFdPMzCSFw6Kq0AcHXvUzycs7w124cE5sanpE09MTFAyuyEKNc/TBaX64RqPRkJt7kpck5Oaeog9CfZJH/3NCfqSEdG8nZESRkJHthHRrJeTwcD83Pj6oKyHBgU+ZkP1Oh5SQQZ0JGSTwSQnZ1WXjPZ6JtBISPOYYo85OixAIrKZlBB5zyqhNy2RHmGOMWs2mf2WEOcboqakhKf30CHOM0aPH9cLKuwUmAbUEHnOM0b17NbzdbksrIcFjjjEqKyszVFffln7RPl0JCQ485pJ+lOXlZVxNzW2anZ3eNSHRBwde9TMpKStC3IpmczP5fB4mIVHjHH1wmh8uAv1KUQFfVHxJKCoupA+6JOA8ZeD/L5+/ASNtA71vTxEVAAAAAElFTkSuQmCC",
j("radio/normal.gif"))},"radio-focus":function(){if(uki.image.needAlphaFix)return uki.theme.airport.image("checkbox-focus");return uki.image(j("radio/focus.png"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABcElEQVRIx92VP0oEMRTGt9ADeAERq21E8ACLNp7AUrRbWdzdDDa6IBhnM5YqaCPCiiewyPzBA1gK1oIsHsNCNL9owBl1HYWM6MBjSPK+7+W99yWp1X7jm5dyrLUVTwTyYqotdb0dJjOdUM86Y8w86/jhX5q82TwZF1JPrkd6rtNPF40tiTBb7qps1Rlj5lnHD39wpchbMp4WKmmIKF0x/+0gSg8DlZ0KlZ05Y8w8669+DXAjgzjy7m68IPrJmoiS/Y29S907vr7fGdw+hOfDJ2eMmWcdP/zBfRqEGpKm3TnkKj3aPLi6kYO7x7fERWMdP/xfcAZveN71hEbZWpKu2RGgUcRFs0HIxODhgS8XADXQMGpK2l/t/KNMbLkMHh74cgGQHKqgcdT2O+TOwIGHB758AKNrpIc6ig0ta+Cs2gwPfLkAHB6rbyPBn5A7Aw8PfP8sgPceeFeR93Pg/SR7v4u836aVvAeVvGiVvMl/7nsGaBHOn+3vxvEAAAAASUVORK5CYII=")}},
imageSrcs:{x:function(){return[j("x.gif"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIHWNgAAIAAAUAAY27m/MAAAAASUVORK5CYII="]},"splitPane-horizontal":function(){return[j("splitPane/horizontal.gif"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAICAYAAAA870V8AAAAFUlEQVQIW2MoLy//zwAEYJq6HGQAAJuVIXm0sEPnAAAAAElFTkSuQmCC"]},"splitPane-vertical":function(){return[j("splitPane/vertical.gif"),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAADCAYAAABfwxXFAAAAE0lEQVQIHWMsLy//z0AOYMSnEwAIngTLoazFLgAAAABJRU5ErkJggg=="]}},
doms:{resizer:function(n){var B=new uki.theme.Template("position:absolute;width:5px;top:0;height:${height}px;cursor:col-resize;cursor:ew-resize;z-index:101;background:url("+uki.theme.imageSrc("x")+")");n=uki.createElement("div",B.render(n));if(!n.style.cursor||window.opera)n.style.cursor="e-resize";return n},"splitPane-vertical":function(n){n=n.handleWidth==1?uki.createElement("div","position:absolute;z-index:100;-moz-user-focus:none;font-family:Arial,Helvetica,sans-serif;width:100%;height:5px;margin-top:-2px;cursor:row-resize;cursor:ns-resize;z-index:200;overflow:hidden;background: url("+
uki.theme.imageSrc("x")+")",'<div style="position:absolute;z-index:100;-moz-user-focus:none;font-family:Arial,Helvetica,sans-serif;background:#999;width:100%;height:1px;left:0px;top:2px;overflow:hidden;"></div>'):uki.createElement("div","position:absolute;z-index:100;-moz-user-focus:none;font-family:Arial,Helvetica,sans-serif;width:100%;height:"+(n.handleWidth-2)+"px;border: 1px solid #CCC;border-width: 1px 0;cursor:row-resize;cursor:ns-resize;z-index:200;overflow:hidden;background: url("+uki.theme.imageSrc("splitPane-vertical")+
") 50% 50% no-repeat;");if(!n.style.cursor||window.opera)n.style.cursor="n-resize";return n},"splitPane-horizontal":function(n){n=n.handleWidth==1?uki.createElement("div","position:absolute;z-index:100;-moz-user-focus:none;font-family:Arial,Helvetica,sans-serif;height:100%;width:5px;margin-left:-2px;cursor:col-resize;cursor:ew-resize;z-index:200;overflow:hidden;background: url("+uki.theme.imageSrc("x")+")",'<div style="position:absolute;z-index:100;-moz-user-focus:none;font-family:Arial,Helvetica,sans-serif;background:#999;height:100%;width:1px;top:0px;left:2px;overflow:hidden;"></div>'):
uki.createElement("div","position:absolute;z-index:100;-moz-user-focus:none;font-family:Arial,Helvetica,sans-serif;height:100%;width:"+(n.handleWidth-2)+"px;border: 1px solid #CCC;border-width: 0 1px;cursor:col-resize;cursor:ew-resize;z-index:200;overflow:hidden;background: url("+uki.theme.imageSrc("splitPane-horizontal")+") 50% 50% no-repeat;");if(!n.style.cursor||window.opera)n.style.cursor="e-resize";return n}}});uki.theme.airport.backgrounds["button-disabled"]=uki.theme.airport.backgrounds["button-normal"];
uki.theme.airport.backgrounds["input-focus"]=uki.theme.airport.backgrounds["button-focus"];uki.theme.airport.backgrounds["toolbar-popup"]=uki.theme.airport.backgrounds["popup-normal"];uki.theme.register(uki.theme.airport)})();
