1 /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2011, 2012 - All Rights reserved.  **/
  2 (function(){
  3 var w=window,i$=function(){
  4 if(i$.qel){
  5 return i$.qel.apply(this,arguments);
  6 }
  7 };
  8 w.i$=i$;
  9 i$.global=w;
 10 if(typeof (console)=="undefined"){
 11 var f=function(){
 12 };
 13 console={log:f,debug:f,info:f,warn:f,error:f,assert:f};
 14 }
 15 i$.partial=function(f){
 16 var _1=i$.toArray(arguments).slice(1);
 17 return function(){
 18 var _2=_1.slice(0),_3=i$.toArray(arguments),i=0;
 19 for(;i<_2.length;i++){
 20 if(_2[i]===undefined){
 21 _2[i]=_3.shift();
 22 }
 23 }
 24 _2.push.apply(_2,_3);
 25 return f.apply(this,_2);
 26 };
 27 };
 28 i$.scope=function(s,f){
 29 var of=f;
 30 f=function(){
 31 return (i$.isString(of)?s[of]:of).apply(s,arguments);
 32 };
 33 return i$.partial.apply(this,i$.toArray(arguments).slice(1));
 34 };
 35 i$.error=function(_4,_5){
 36 console.error(_5||new Error(_4));
 37 };
 38 i$.forEach=function(_6,f,_7){
 39 if(_7==null){
 40 _7=0;
 41 }
 42 for(var i=(_7>=0)?_7:0;i<_6.length;i++){
 43 f(_6[i],i,_6);
 44 }
 45 };
 46 i$.forIn=function(o,f){
 47 for(var i in o){
 48 if(Object.prototype.hasOwnProperty.call(o,i)){
 49 f(o[i],i,o);
 50 }
 51 }
 52 };
 53 i$.each=function(o,f,s){
 54 if(s){
 55 f=i$.scope(s,f);
 56 }
 57 if(o){
 58 if(o instanceof Array||typeof o.length==="number"){
 59 i$.forEach(o,f);
 60 }else{
 61 i$.forIn(o,f);
 62 }
 63 }
 64 };
 65 i$.some=function(a,f,s){
 66 if(s){
 67 f=i$.scope(s,f);
 68 }
 69 for(var i=0;i<a.length;i++){
 70 if(f(a[i])){
 71 return true;
 72 }
 73 }
 74 return false;
 75 };
 76 i$.every=function(o,f,s){
 77 if(s){
 78 f=i$.scope(s,f);
 79 }
 80 return !i$.some(o,function(_8){
 81 return !f(_8);
 82 });
 83 };
 84 i$.wrap=function(o,n,f){
 85 var fn=o[n];
 86 o[n]=function(){
 87 return f.call(this,fn,arguments);
 88 };
 89 o[n]._wrapped=fn;
 90 return o[n];
 91 };
 92 i$.unwrap=function(o,n){
 93 var fn=o[n];
 94 if(fn&&fn._wrapped){
 95 o[n]=fn._wrapped;
 96 }
 97 return o[n];
 98 };
 99 i$.copyShallow=function(o){
100 var r=i$.isArrayLike(o)?[]:{};
101 i$.forIn(o,function(v,k){
102 r[k]=v;
103 });
104 return r;
105 };
106 var _9=function(_a,_b,_c,_d){
107 if(_c||_b[_d]===undefined){
108 _b[_d]=function(){
109 return this[_a][_d].apply(this[_a],arguments);
110 };
111 }
112 },_e=function(_f,_10,_11,_12){
113 if(_11||_10[_12]===undefined){
114 _10[_12]=function(){
115 return _f[_12].apply(_f,arguments);
116 };
117 }
118 };
119 i$.shadow=function(s,t,_13,_14){
120 i$.each(_13,i$.partial(i$.isString(s)?_9:_e,s,t,_14));
121 };
122 var _15=function(_16,c,s){
123 var i,p,ts=s||i$.global;
124 for(i=0;ts!=null,i<_16.length,p=_16[i];i++){
125 if(ts[p]==null){
126 if(c){
127 ts[p]={};
128 }else{
129 ts=null;
130 break;
131 }
132 }
133 ts=ts[p];
134 }
135 return ts;
136 };
137 i$.fromPath=function(n,c,s){
138 var _17=n.split(".");
139 return _15(_17,c,s);
140 };
141 i$.toPath=function(n,v,s){
142 var _18=n.split("."),p=_18.pop(),o=_15(_18,true,s);
143 o[p]=v;
144 return v;
145 };
146 i$.cachedFn=function(f,s){
147 var val;
148 var fn=function(){
149 if(!fn.called){
150 fn.called=true;
151 val=f.apply(s,arguments);
152 }
153 return val;
154 };
155 return fn;
156 };
157 i$.xhrFmts={text:function(xhr){
158 return xhr.responseText;
159 },json:function(xhr){
160 return !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(xhr.responseText.replace(/"(\\.|[^"\\])*"/g,"")))&&eval("("+xhr.responseText+")");
161 },xml:function(xhr){
162 return xhr.responseXML;
163 },javascript:function(xhr){
164 if((/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(str.replace(/"(\\.|[^"\\])*"/g,"")))){
165 throw new SyntaxError("Invalid characters in javascript object");
166 }else{
167 return eval("("+xhr.responseText+")");
168 }
169 }};
170 })();
171 (function(){
172 var i$=window.i$;
173 (function(ua){
174 var _19=function(_1a){
175 return parseFloat(_1a);
176 },_1b=[["IE",/MSIE\s*([\S]+)*/],["FF",/Firefox\/([\S]+)*/],["Opera",/Opera[\s\/]([\S]+)*/],["Safari",/Version\/([\S]+)*[\s\S]*Safari/],["Chrome",/Chrome\/([\S]+)*/],["WebKit",/AppleWebKit\/([\S]+)*/]];
177 i$.each(_1b,function(_1c){
178 var m=_1c[1].exec(ua);
179 if(m&&m.length>1){
180 i$["is"+_1c[0]]=_19(m[1]);
181 }
182 });
183 })(navigator.userAgent);
184 var _1d=document.documentMode;
185 if(_1d&&_1d!=5&&Math.floor(i$.isIE)!=_1d){
186 i$.isIE=_1d;
187 }
188 i$.isNode=function(o){
189 return typeof o==="object"&&typeof o.nodeType==="number"&&typeof o.nodeName==="string";
190 };
191 i$.isFunction=function(o){
192 return typeof o==="function"||o instanceof Function;
193 };
194 i$.isObject=function(o){
195 return typeof o==="object";
196 };
197 i$.isArray=function(o){
198 if(typeof Array.isArray==="function"){
199 return Array.isArray(o);
200 }else{
201 return Object.prototype.toString.call(o)==="[object Array]";
202 }
203 };
204 i$.isString=function(o){
205 return typeof o==="string";
206 };
207 i$.isNumber=function(o){
208 return typeof o==="number";
209 };
210 i$.isBoolean=function(o){
211 return typeof o==="boolean";
212 };
213 i$.isLikeArray=function(o){
214 return o instanceof Array||typeof o.length==="number";
215 };
216 i$.toArray=function(o){
217 return Array.prototype.slice.call(o);
218 };
219 if(i$.isIE){
220 var _1e=i$.toArray;
221 i$.toArray=function(o){
222 try{
223 return _1e(o);
224 }
225 catch(err){
226 var a=new Array(o.length);
227 for(var i=0;i<o.length;i++){
228 a[i]=o[i];
229 }
230 return a;
231 }
232 };
233 }
234 var _1f=(document.readyState==="complete"),_20=[],_21=[],_22=false;
235 i$._initPage=function(){
236 var fn;
237 _1f=true;
238 if(window.detachEvent){
239 window.detachEvent("onload",i$._initPage);
240 }
241 while(_20.length>0){
242 if(fn=_20.shift()){
243 try{
244 fn();
245 }
246 catch(err){
247 console.log(err);
248 }
249 }
250 }
251 };
252 i$._exitPage=function(){
253 var fn;
254 while(_21.length>0){
255 if(fn=_21.shift()){
256 try{
257 fn();
258 }
259 catch(err){
260 console.log(err);
261 }
262 }
263 }
264 };
265 i$._addEvent=function(e,f,o){
266 var w=o?o:window;
267 var s=w.attachEvent?e:e.substring(2);
268 var a=w.attachEvent||w.addEventListener;
269 a(s,function(){
270 f.apply(w,arguments);
271 },false);
272 };
273 if(!_1f){
274 i$._addEvent("onload",i$._initPage);
275 if(document.addEventListener){
276 document.addEventListener("DOMContentLoaded",i$._initPage,false);
277 }
278 }
279 i$.addOnLoad=function(f,o){
280 if(o){
281 f=i$.scope(o,f);
282 }
283 if(_1f){
284 f();
285 }else{
286 _20.push(f);
287 }
288 };
289 i$.addOnUnload=function(f,o){
290 if(!_22){
291 i$._addEvent("onunload",i$._exitPage);
292 _22=true;
293 }
294 if(o){
295 f=i$.scope(o,f);
296 }
297 _21.push(f);
298 };
299 var mx=function(o,m){
300 for(var p in m){
301 if(m.hasOwnProperty(p)){
302 o[p]=m[p];
303 }
304 }
305 },mxn=function(o,m,_23){
306 i$.forEach(_23,function(p){
307 if(m.hasOwnProperty(p)){
308 o[p]=m[p];
309 }
310 });
311 };
312 i$.mash=function(o){
313 i$.forEach(arguments,function(v){
314 mx(o,v);
315 },1);
316 return o;
317 };
318 i$.mashSpec=function(n,o){
319 i$.forEach(arguments,function(v){
320 mxn(o,v,n);
321 },2);
322 return o;
323 };
324 i$.augment=function(f){
325 var r=f;
326 if(f&&f.prototype){
327 f=f.prototype;
328 i$.mash.apply(i$,arguments);
329 }
330 return r;
331 };
332 i$.make=(function(){
333 var l=function(){
334 };
335 return function(o){
336 l.prototype=o;
337 o=new l();
338 return i$.mash.apply(i$,arguments);
339 };
340 })();
341 var _24=/^\s+/g;
342 i$.trim=function(str){
343 str=str.replace(_24,"");
344 var i=str.length-1;
345 while(str.charAt(i)==" "||str.charAt(i)=="\t"||str.charAt(i)=="\n"||str.charAt(i)=="\r"){
346 i--;
347 }
348 return str.substring(0,i+1);
349 };
350 var _25=i$.isArray,_26=i$.isObject;
351 i$.merge=function(_27,_28,_29){
352 var _29=_29||[],v,c;
353 _28=_28||i$.global;
354 if(_25(_27)&&_25(_28)){
355 _28.push.apply(_28,_27);
356 }else{
357 for(var x in _27){
358 if(_27.hasOwnProperty(x)){
359 v=_27[x],c=_28[x];
360 if(c!=null&&((_25(v)&&_25(c))||(_26(v)&&_26(c)))){
361 _28[x]=i$.merge(v,c,_29.concat(x));
362 }else{
363 _28[x]=v;
364 }
365 }
366 }
367 }
368 return _28;
369 };
370 var _2a;
371 i$.isRTL=function(_2b){
372 if(!_2a){
373 _2a=i$.fromPath("ibmCfg.themeConfig.RTLMap");
374 }
375 var _2c=_2a||{"iw":1,"he":1,"ar":1};
376 return (_2b.substring(0,2) in _2c);
377 };
378 })();
379 
380