/*! * jQuery JavaScript Library v1.11.0 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2014-01-23T21:02Z */ (function( global, factory ) { if ( typeof module === "object" && typeof module.exports === "object" ) { // For CommonJS and CommonJS-like environments where a proper window is present, // execute the factory and get jQuery // For environments that do not inherently posses a window with a document // (such as Node.js), expose a jQuery-making factory as module.exports // This accentuates the need for the creation of a real window // e.g. var jQuery = require("jquery")(window); // See ticket #14549 for more info module.exports = global.document ? factory( global, true ) : function( w ) { if ( !w.document ) { throw new Error( "jQuery requires a window with a document" ); } return factory( w ); }; } else { factory( global ); } // Pass this if window is not defined yet }(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { // Can't do this because several apps including ASP.NET trace // the stack via arguments.caller.callee and Firefox dies if // you try to trace through "use strict" call chains. (#13335) // Support: Firefox 18+ // var deletedIds = []; var slice = deletedIds.slice; var concat = deletedIds.concat; var push = deletedIds.push; var indexOf = deletedIds.indexOf; var class2type = {}; var toString = class2type.toString; var hasOwn = class2type.hasOwnProperty; var trim = "".trim; var support = {}; var version = "1.11.0", // Define a local copy of jQuery jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' // Need init if jQuery is called (just allow error to be thrown if not included) return new jQuery.fn.init( selector, context ); }, // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, // Matches dashed string for camelizing rmsPrefix = /^-ms-/, rdashAlpha = /-([\da-z])/gi, // Used by jQuery.camelCase as callback to replace() fcamelCase = function( all, letter ) { return letter.toUpperCase(); }; jQuery.fn = jQuery.prototype = { // The current version of jQuery being used jquery: version, constructor: jQuery, // Start with an empty selector selector: "", // The default length of a jQuery object is 0 length: 0, toArray: function() { return slice.call( this ); }, // Get the Nth element in the matched element set OR // Get the whole matched element set as a clean array get: function( num ) { return num != null ? // Return a 'clean' array ( num < 0 ? this[ num + this.length ] : this[ num ] ) : // Return just the object slice.call( this ); }, // Take an array of elements and push it onto the stack // (returning the new matched element set) pushStack: function( elems ) { // Build a new jQuery matched element set var ret = jQuery.merge( this.constructor(), elems ); // Add the old object onto the stack (as a reference) ret.prevObject = this; ret.context = this.context; // Return the newly-formed element set return ret; }, // Execute a callback for every element in the matched set. // (You can seed the arguments with an array of args, but this is // only used internally.) each: function( callback, args ) { return jQuery.each( this, callback, args ); }, map: function( callback ) { return this.pushStack( jQuery.map(this, function( elem, i ) { return callback.call( elem, i, elem ); })); }, slice: function() { return this.pushStack( slice.apply( this, arguments ) ); }, first: function() { return this.eq( 0 ); }, last: function() { return this.eq( -1 ); }, eq: function( i ) { var len = this.length, j = +i + ( i < 0 ? len : 0 ); return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); }, end: function() { return this.prevObject || this.constructor(null); }, // For internal use only. // Behaves like an Array's method, not like a jQuery method. push: push, sort: deletedIds.sort, splice: deletedIds.splice }; jQuery.extend = jQuery.fn.extend = function() { var src, copyIsArray, copy, name, options, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false; // Handle a deep copy situation if ( typeof target === "boolean" ) { deep = target; // skip the boolean and the target target = arguments[ i ] || {}; i++; } // Handle case when target is a string or something (possible in deep copy) if ( typeof target !== "object" && !jQuery.isFunction(target) ) { target = {}; } // extend jQuery itself if only one argument is passed if ( i === length ) { target = this; i--; } for ( ; i < length; i++ ) { // Only deal with non-null/undefined values if ( (options = arguments[ i ]) != null ) { // Extend the base object for ( name in options ) { src = target[ name ]; copy = options[ name ]; // Prevent never-ending loop if ( target === copy ) { continue; } // Recurse if we're merging plain objects or arrays if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { if ( copyIsArray ) { copyIsArray = false; clone = src && jQuery.isArray(src) ? src : []; } else { clone = src && jQuery.isPlainObject(src) ? src : {}; } // Never move original objects, clone them target[ name ] = jQuery.extend( deep, clone, copy ); // Don't bring in undefined values } else if ( copy !== undefined ) { target[ name ] = copy; } } } } // Return the modified object return target; }; jQuery.extend({ // Unique for each copy of jQuery on the page expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), // Assume jQuery is ready without the ready module isReady: true, error: function( msg ) { throw new Error( msg ); }, noop: function() {}, // See test/unit/core.js for details concerning isFunction. // Since version 1.3, DOM methods and functions like alert // aren't supported. They return false on IE (#2968). isFunction: function( obj ) { return jQuery.type(obj) === "function"; }, isArray: Array.isArray || function( obj ) { return jQuery.type(obj) === "array"; }, isWindow: function( obj ) { /* jshint eqeqeq: false */ return obj != null && obj == obj.window; }, isNumeric: function( obj ) { // parseFloat NaNs numeric-cast false positives (null|true|false|"") // ...but misinterprets leading-number strings, particularly hex literals ("0x...") // subtraction forces infinities to NaN return obj - parseFloat( obj ) >= 0; }, isEmptyObject: function( obj ) { var name; for ( name in obj ) { return false; } return true; }, isPlainObject: function( obj ) { var key; // Must be an Object. // Because of IE, we also have to check the presence of the constructor property. // Make sure that DOM nodes and window objects don't pass through, as well if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { return false; } try { // Not own constructor property must be Object if ( obj.constructor && !hasOwn.call(obj, "constructor") && !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { return false; } } catch ( e ) { // IE8,9 Will throw exceptions on certain host objects #9897 return false; } // Support: IE<9 // Handle iteration over inherited properties before own properties. if ( support.ownLast ) { for ( key in obj ) { return hasOwn.call( obj, key ); } } // Own properties are enumerated firstly, so to speed up, // if last one is own, then all properties are own. for ( key in obj ) {} return key === undefined || hasOwn.call( obj, key ); }, type: function( obj ) { if ( obj == null ) { return obj + ""; } return typeof obj === "object" || typeof obj === "function" ? class2type[ toString.call(obj) ] || "object" : typeof obj; }, // Evaluates a script in a global context // Workarounds based on findings by Jim Driscoll // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context globalEval: function( data ) { if ( data && jQuery.trim( data ) ) { // We use execScript on Internet Explorer // We use an anonymous function so that context is window // rather than jQuery in Firefox ( window.execScript || function( data ) { window[ "eval" ].call( window, data ); } )( data ); } }, // Convert dashed to camelCase; used by the css and data modules // Microsoft forgot to hump their vendor prefix (#9572) camelCase: function( string ) { return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); }, nodeName: function( elem, name ) { return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); }, // args is for internal usage only each: function( obj, callback, args ) { var value, i = 0, length = obj.length, isArray = isArraylike( obj ); if ( args ) { if ( isArray ) { for ( ; i < length; i++ ) { value = callback.apply( obj[ i ], args ); if ( value === false ) { break; } } } else { for ( i in obj ) { value = callback.apply( obj[ i ], args ); if ( value === false ) { break; } } } // A special, fast, case for the most common use of each } else { if ( isArray ) { for ( ; i < length; i++ ) { value = callback.call( obj[ i ], i, obj[ i ] ); if ( value === false ) { break; } } } else { for ( i in obj ) { value = callback.call( obj[ i ], i, obj[ i ] ); if ( value === false ) { break; } } } } return obj; }, // Use native String.trim function wherever possible trim: trim && !trim.call("\uFEFF\xA0") ? function( text ) { return text == null ? "" : trim.call( text ); } : // Otherwise use our own trimming functionality function( text ) { return text == null ? "" : ( text + "" ).replace( rtrim, "" ); }, // results is for internal usage only makeArray: function( arr, results ) { var ret = results || []; if ( arr != null ) { if ( isArraylike( Object(arr) ) ) { jQuery.merge( ret, typeof arr === "string" ? [ arr ] : arr ); } else { push.call( ret, arr ); } } return ret; }, inArray: function( elem, arr, i ) { var len; if ( arr ) { if ( indexOf ) { return indexOf.call( arr, elem, i ); } len = arr.length; i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; for ( ; i < len; i++ ) { // Skip accessing in sparse arrays if ( i in arr && arr[ i ] === elem ) { return i; } } } return -1; }, merge: function( first, second ) { var len = +second.length, j = 0, i = first.length; while ( j < len ) { first[ i++ ] = second[ j++ ]; } // Support: IE<9 // Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists) if ( len !== len ) { while ( second[j] !== undefined ) { first[ i++ ] = second[ j++ ]; } } first.length = i; return first; }, grep: function( elems, callback, invert ) { var callbackInverse, matches = [], i = 0, length = elems.length, callbackExpect = !invert; // Go through the array, only saving the items // that pass the validator function for ( ; i < length; i++ ) { callbackInverse = !callback( elems[ i ], i ); if ( callbackInverse !== callbackExpect ) { matches.push( elems[ i ] ); } } return matches; }, // arg is for internal usage only map: function( elems, callback, arg ) { var value, i = 0, length = elems.length, isArray = isArraylike( elems ), ret = []; // Go through the array, translating each of the items to their new values if ( isArray ) { for ( ; i < length; i++ ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret.push( value ); } } // Go through every key on the object, } else { for ( i in elems ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret.push( value ); } } } // Flatten any nested arrays return concat.apply( [], ret ); }, // A global GUID counter for objects guid: 1, // Bind a function to a context, optionally partially applying any // arguments. proxy: function( fn, context ) { var args, proxy, tmp; if ( typeof context === "string" ) { tmp = fn[ context ]; context = fn; fn = tmp; } // Quick check to determine if target is callable, in the spec // this throws a TypeError, but we will just return undefined. if ( !jQuery.isFunction( fn ) ) { return undefined; } // Simulated bind args = slice.call( arguments, 2 ); proxy = function() { return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); }; // Set the guid of unique handler to the same of original handler, so it can be removed proxy.guid = fn.guid = fn.guid || jQuery.guid++; return proxy; }, now: function() { return +( new Date() ); }, // jQuery.support is not used in Core but other projects attach their // properties to it so it needs to exist. support: support }); // Populate the class2type map jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { class2type[ "[object " + name + "]" ] = name.toLowerCase(); }); function isArraylike( obj ) { var length = obj.length, type = jQuery.type( obj ); if ( type === "function" || jQuery.isWindow( obj ) ) { return false; } if ( obj.nodeType === 1 && length ) { return true; } return type === "array" || length === 0 || typeof length === "number" && length > 0 && ( length - 1 ) in obj; } var Sizzle = /*! * Sizzle CSS Selector Engine v1.10.16 * http://sizzlejs.com/ * * Copyright 2013 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2014-01-13 */ (function( window ) { var i, support, Expr, getText, isXML, compile, outermostContext, sortInput, hasDuplicate, // Local document vars setDocument, document, docElem, documentIsHTML, rbuggyQSA, rbuggyMatches, matches, contains, // Instance-specific data expando = "sizzle" + -(new Date()), preferredDoc = window.document, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), sortOrder = function( a, b ) { if ( a === b ) { hasDuplicate = true; } return 0; }, // General-purpose constants strundefined = typeof undefined, MAX_NEGATIVE = 1 << 31, // Instance methods hasOwn = ({}).hasOwnProperty, arr = [], pop = arr.pop, push_native = arr.push, push = arr.push, slice = arr.slice, // Use a stripped-down indexOf if we can't use a native one indexOf = arr.indexOf || function( elem ) { var i = 0, len = this.length; for ( ; i < len; i++ ) { if ( this[i] === elem ) { return i; } } return -1; }, booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", // Regular expressions // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace whitespace = "[\\x20\\t\\r\\n\\f]", // http://www.w3.org/TR/css3-syntax/#characters characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", // Loosely modeled on CSS identifier characters // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier identifier = characterEncoding.replace( "w", "w#" ), // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", // Prefer arguments quoted, // then not containing pseudos/brackets, // then attribute selectors/non-parenthetical expressions, // then anything else // These preferences are here to reduce the number of selectors // needing tokenize in the PSEUDO preFilter pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), rpseudo = new RegExp( pseudos ), ridentifier = new RegExp( "^" + identifier + "$" ), matchExpr = { "ID": new RegExp( "^#(" + characterEncoding + ")" ), "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), "ATTR": new RegExp( "^" + attributes ), "PSEUDO": new RegExp( "^" + pseudos ), "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), // For use in libraries implementing .is() // We use this for POS matching in `select` "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) }, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rnative = /^[^{]+\{\s*\[native \w/, // Easily-parseable/retrievable ID or TAG or CLASS selectors rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, rescape = /'|\\/g, // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), funescape = function( _, escaped, escapedWhitespace ) { var high = "0x" + escaped - 0x10000; // NaN means non-codepoint // Support: Firefox // Workaround erroneous numeric interpretation of +"0x" return high !== high || escapedWhitespace ? escaped : high < 0 ? // BMP codepoint String.fromCharCode( high + 0x10000 ) : // Supplemental Plane codepoint (surrogate pair) String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); }; // Optimize for push.apply( _, NodeList ) try { push.apply( (arr = slice.call( preferredDoc.childNodes )), preferredDoc.childNodes ); // Support: Android<4.0 // Detect silently failing push.apply arr[ preferredDoc.childNodes.length ].nodeType; } catch ( e ) { push = { apply: arr.length ? // Leverage slice if possible function( target, els ) { push_native.apply( target, slice.call(els) ); } : // Support: IE<9 // Otherwise append directly function( target, els ) { var j = target.length, i = 0; // Can't trust NodeList.length while ( (target[j++] = els[i++]) ) {} target.length = j - 1; } }; } function Sizzle( selector, context, results, seed ) { var match, elem, m, nodeType, // QSA vars i, groups, old, nid, newContext, newSelector; if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { setDocument( context ); } context = context || document; results = results || []; if ( !selector || typeof selector !== "string" ) { return results; } if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { return []; } if ( documentIsHTML && !seed ) { // Shortcuts if ( (match = rquickExpr.exec( selector )) ) { // Speed-up: Sizzle("#ID") if ( (m = match[1]) ) { if ( nodeType === 9 ) { elem = context.getElementById( m ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document (jQuery #6963) if ( elem && elem.parentNode ) { // Handle the case where IE, Opera, and Webkit return items // by name instead of ID if ( elem.id === m ) { results.push( elem ); return results; } } else { return results; } } else { // Context is not a document if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && contains( context, elem ) && elem.id === m ) { results.push( elem ); return results; } } // Speed-up: Sizzle("TAG") } else if ( match[2] ) { push.apply( results, context.getElementsByTagName( selector ) ); return results; // Speed-up: Sizzle(".CLASS") } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { push.apply( results, context.getElementsByClassName( m ) ); return results; } } // QSA path if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { nid = old = expando; newContext = context; newSelector = nodeType === 9 && selector; // qSA works strangely on Element-rooted queries // We can work around this by specifying an extra ID on the root // and working up from there (Thanks to Andrew Dupont for the technique) // IE 8 doesn't work on object elements if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { groups = tokenize( selector ); if ( (old = context.getAttribute("id")) ) { nid = old.replace( rescape, "\\$&" ); } else { context.setAttribute( "id", nid ); } nid = "[id='" + nid + "'] "; i = groups.length; while ( i-- ) { groups[i] = nid + toSelector( groups[i] ); } newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; newSelector = groups.join(","); } if ( newSelector ) { try { push.apply( results, newContext.querySelectorAll( newSelector ) ); return results; } catch(qsaError) { } finally { if ( !old ) { context.removeAttribute("id"); } } } } } // All others return select( selector.replace( rtrim, "$1" ), context, results, seed ); } /** * Create key-value caches of limited size * @returns {Function(string, Object)} Returns the Object data after storing it on itself with * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) * deleting the oldest entry */ function createCache() { var keys = []; function cache( key, value ) { // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) if ( keys.push( key + " " ) > Expr.cacheLength ) { // Only keep the most recent entries delete cache[ keys.shift() ]; } return (cache[ key + " " ] = value); } return cache; } /** * Mark a function for special use by Sizzle * @param {Function} fn The function to mark */ function markFunction( fn ) { fn[ expando ] = true; return fn; } /** * Support testing using an element * @param {Function} fn Passed the created div and expects a boolean result */ function assert( fn ) { var div = document.createElement("div"); try { return !!fn( div ); } catch (e) { return false; } finally { // Remove from its parent by default if ( div.parentNode ) { div.parentNode.removeChild( div ); } // release memory in IE div = null; } } /** * Adds the same handler for all of the specified attrs * @param {String} attrs Pipe-separated list of attributes * @param {Function} handler The method that will be applied */ function addHandle( attrs, handler ) { var arr = attrs.split("|"), i = attrs.length; while ( i-- ) { Expr.attrHandle[ arr[i] ] = handler; } } /** * Checks document order of two siblings * @param {Element} a * @param {Element} b * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b */ function siblingCheck( a, b ) { var cur = b && a, diff = cur && a.nodeType === 1 && b.nodeType === 1 && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE ); // Use IE sourceIndex if available on both nodes if ( diff ) { return diff; } // Check if b follows a if ( cur ) { while ( (cur = cur.nextSibling) ) { if ( cur === b ) { return -1; } } } return a ? 1 : -1; } /** * Returns a function to use in pseudos for input types * @param {String} type */ function createInputPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === type; }; } /** * Returns a function to use in pseudos for buttons * @param {String} type */ function createButtonPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && elem.type === type; }; } /** * Returns a function to use in pseudos for positionals * @param {Function} fn */ function createPositionalPseudo( fn ) { return markFunction(function( argument ) { argument = +argument; return markFunction(function( seed, matches ) { var j, matchIndexes = fn( [], seed.length, argument ), i = matchIndexes.length; // Match elements found at the specified indexes while ( i-- ) { if ( seed[ (j = matchIndexes[i]) ] ) { seed[j] = !(matches[j] = seed[j]); } } }); }); } /** * Checks a node for validity as a Sizzle context * @param {Element|Object=} context * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value */ function testContext( context ) { return context && typeof context.getElementsByTagName !== strundefined && context; } // Expose support vars for convenience support = Sizzle.support = {}; /** * Detects XML nodes * @param {Element|Object} elem An element or a document * @returns {Boolean} True iff elem is a non-HTML XML node */ isXML = Sizzle.isXML = function( elem ) { // documentElement is verified for cases where it doesn't yet exist // (such as loading iframes in IE - #4833) var documentElement = elem && (elem.ownerDocument || elem).documentElement; return documentElement ? documentElement.nodeName !== "HTML" : false; }; /** * Sets document-related variables once based on the current document * @param {Element|Object} [doc] An element or document object to use to set the document * @returns {Object} Returns the current document */ setDocument = Sizzle.setDocument = function( node ) { var hasCompare, doc = node ? node.ownerDocument || node : preferredDoc, parent = doc.defaultView; // If no document and documentElement is available, return if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { return document; } // Set our document document = doc; docElem = doc.documentElement; // Support tests documentIsHTML = !isXML( doc ); // Support: IE>8 // If iframe document is assigned to "document" variable and if iframe has been reloaded, // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 // IE6-8 do not support the defaultView property so parent will be undefined if ( parent && parent !== parent.top ) { // IE11 does not have attachEvent, so all must suffer if ( parent.addEventListener ) { parent.addEventListener( "unload", function() { setDocument(); }, false ); } else if ( parent.attachEvent ) { parent.attachEvent( "onunload", function() { setDocument(); }); } } /* Attributes ---------------------------------------------------------------------- */ // Support: IE<8 // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) support.attributes = assert(function( div ) { div.className = "i"; return !div.getAttribute("className"); }); /* getElement(s)By* ---------------------------------------------------------------------- */ // Check if getElementsByTagName("*") returns only elements support.getElementsByTagName = assert(function( div ) { div.appendChild( doc.createComment("") ); return !div.getElementsByTagName("*").length; }); // Check if getElementsByClassName can be trusted support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) { div.innerHTML = "
"; // Support: Safari<4 // Catch class over-caching div.firstChild.className = "i"; // Support: Opera<10 // Catch gEBCN failure to find non-leading classes return div.getElementsByClassName("i").length === 2; }); // Support: IE<10 // Check if getElementById returns elements by name // The broken getElementById methods don't pick up programatically-set names, // so use a roundabout getElementsByName test support.getById = assert(function( div ) { docElem.appendChild( div ).id = expando; return !doc.getElementsByName || !doc.getElementsByName( expando ).length; }); // ID find and filter if ( support.getById ) { Expr.find["ID"] = function( id, context ) { if ( typeof context.getElementById !== strundefined && documentIsHTML ) { var m = context.getElementById( id ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 return m && m.parentNode ? [m] : []; } }; Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { return elem.getAttribute("id") === attrId; }; }; } else { // Support: IE6/7 // getElementById is not reliable as a find shortcut delete Expr.find["ID"]; Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); return node && node.value === attrId; }; }; } // Tag Expr.find["TAG"] = support.getElementsByTagName ? function( tag, context ) { if ( typeof context.getElementsByTagName !== strundefined ) { return context.getElementsByTagName( tag ); } } : function( tag, context ) { var elem, tmp = [], i = 0, results = context.getElementsByTagName( tag ); // Filter out possible comments if ( tag === "*" ) { while ( (elem = results[i++]) ) { if ( elem.nodeType === 1 ) { tmp.push( elem ); } } return tmp; } return results; }; // Class Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { return context.getElementsByClassName( className ); } }; /* QSA/matchesSelector ---------------------------------------------------------------------- */ // QSA and matchesSelector support // matchesSelector(:active) reports false when true (IE9/Opera 11.5) rbuggyMatches = []; // qSa(:focus) reports false when true (Chrome 21) // We allow this because of a bug in IE8/9 that throws an error // whenever `document.activeElement` is accessed on an iframe // So, we allow :focus to pass through QSA all the time to avoid the IE error // See http://bugs.jquery.com/ticket/13378 rbuggyQSA = []; if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { // Build QSA regex // Regex strategy adopted from Diego Perini assert(function( div ) { // Select is set to empty string on purpose // This is to test IE's treatment of not explicitly // setting a boolean content attribute, // since its presence should be enough // http://bugs.jquery.com/ticket/12359 div.innerHTML = ""; // Support: IE8, Opera 10-12 // Nothing should be selected when empty strings follow ^= or $= or *= if ( div.querySelectorAll("[t^='']").length ) { rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); } // Support: IE8 // Boolean attributes and "value" are not treated correctly if ( !div.querySelectorAll("[selected]").length ) { rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); } // Webkit/Opera - :checked should return selected option elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked // IE8 throws error here and will not see later tests if ( !div.querySelectorAll(":checked").length ) { rbuggyQSA.push(":checked"); } }); assert(function( div ) { // Support: Windows 8 Native Apps // The type and name attributes are restricted during .innerHTML assignment var input = doc.createElement("input"); input.setAttribute( "type", "hidden" ); div.appendChild( input ).setAttribute( "name", "D" ); // Support: IE8 // Enforce case-sensitivity of name attribute if ( div.querySelectorAll("[name=d]").length ) { rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); } // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) // IE8 throws error here and will not see later tests if ( !div.querySelectorAll(":enabled").length ) { rbuggyQSA.push( ":enabled", ":disabled" ); } // Opera 10-11 does not throw on post-comma invalid pseudos div.querySelectorAll("*,:x"); rbuggyQSA.push(",.*:"); }); } if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector) )) ) { assert(function( div ) { // Check to see if it's possible to do matchesSelector // on a disconnected node (IE 9) support.disconnectedMatch = matches.call( div, "div" ); // This should fail with an exception // Gecko does not error, returns false instead matches.call( div, "[s!='']:x" ); rbuggyMatches.push( "!=", pseudos ); }); } rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); /* Contains ---------------------------------------------------------------------- */ hasCompare = rnative.test( docElem.compareDocumentPosition ); // Element contains another // Purposefully does not implement inclusive descendent // As in, an element does not contain itself contains = hasCompare || rnative.test( docElem.contains ) ? function( a, b ) { var adown = a.nodeType === 9 ? a.documentElement : a, bup = b && b.parentNode; return a === bup || !!( bup && bup.nodeType === 1 && ( adown.contains ? adown.contains( bup ) : a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 )); } : function( a, b ) { if ( b ) { while ( (b = b.parentNode) ) { if ( b === a ) { return true; } } } return false; }; /* Sorting ---------------------------------------------------------------------- */ // Document order sorting sortOrder = hasCompare ? function( a, b ) { // Flag for duplicate removal if ( a === b ) { hasDuplicate = true; return 0; } // Sort on method existence if only one input has compareDocumentPosition var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; if ( compare ) { return compare; } // Calculate position if both inputs belong to the same document compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? a.compareDocumentPosition( b ) : // Otherwise we know they are disconnected 1; // Disconnected nodes if ( compare & 1 || (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { // Choose the first element that is related to our preferred document if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { return -1; } if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { return 1; } // Maintain original order return sortInput ? ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : 0; } return compare & 4 ? -1 : 1; } : function( a, b ) { // Exit early if the nodes are identical if ( a === b ) { hasDuplicate = true; return 0; } var cur, i = 0, aup = a.parentNode, bup = b.parentNode, ap = [ a ], bp = [ b ]; // Parentless nodes are either documents or disconnected if ( !aup || !bup ) { return a === doc ? -1 : b === doc ? 1 : aup ? -1 : bup ? 1 : sortInput ? ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : 0; // If the nodes are siblings, we can do a quick check } else if ( aup === bup ) { return siblingCheck( a, b ); } // Otherwise we need full lists of their ancestors for comparison cur = a; while ( (cur = cur.parentNode) ) { ap.unshift( cur ); } cur = b; while ( (cur = cur.parentNode) ) { bp.unshift( cur ); } // Walk down the tree looking for a discrepancy while ( ap[i] === bp[i] ) { i++; } return i ? // Do a sibling check if the nodes have a common ancestor siblingCheck( ap[i], bp[i] ) : // Otherwise nodes in our document sort first ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0; }; return doc; }; Sizzle.matches = function( expr, elements ) { return Sizzle( expr, null, null, elements ); }; Sizzle.matchesSelector = function( elem, expr ) { // Set document vars if needed if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } // Make sure that attribute selectors are quoted expr = expr.replace( rattributeQuotes, "='$1']" ); if ( support.matchesSelector && documentIsHTML && ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { try { var ret = matches.call( elem, expr ); // IE 9's matchesSelector returns false on disconnected nodes if ( ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document // fragment in IE 9 elem.document && elem.document.nodeType !== 11 ) { return ret; } } catch(e) {} } return Sizzle( expr, document, null, [elem] ).length > 0; }; Sizzle.contains = function( context, elem ) { // Set document vars if needed if ( ( context.ownerDocument || context ) !== document ) { setDocument( context ); } return contains( context, elem ); }; Sizzle.attr = function( elem, name ) { // Set document vars if needed if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } var fn = Expr.attrHandle[ name.toLowerCase() ], // Don't get fooled by Object.prototype properties (jQuery #13807) val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? fn( elem, name, !documentIsHTML ) : undefined; return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute( name ) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null; }; Sizzle.error = function( msg ) { throw new Error( "Syntax error, unrecognized expression: " + msg ); }; /** * Document sorting and removing duplicates * @param {ArrayLike} results */ Sizzle.uniqueSort = function( results ) { var elem, duplicates = [], j = 0, i = 0; // Unless we *know* we can detect duplicates, assume their presence hasDuplicate = !support.detectDuplicates; sortInput = !support.sortStable && results.slice( 0 ); results.sort( sortOrder ); if ( hasDuplicate ) { while ( (elem = results[i++]) ) { if ( elem === results[ i ] ) { j = duplicates.push( i ); } } while ( j-- ) { results.splice( duplicates[ j ], 1 ); } } // Clear input after sorting to release objects // See https://github.com/jquery/sizzle/pull/225 sortInput = null; return results; }; /** * Utility function for retrieving the text value of an array of DOM nodes * @param {Array|Element} elem */ getText = Sizzle.getText = function( elem ) { var node, ret = "", i = 0, nodeType = elem.nodeType; if ( !nodeType ) { // If no nodeType, this is expected to be an array while ( (node = elem[i++]) ) { // Do not traverse comment nodes ret += getText( node ); } } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { // Use textContent for elements // innerText usage removed for consistency of new lines (jQuery #11153) if ( typeof elem.textContent === "string" ) { return elem.textContent; } else { // Traverse its children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { ret += getText( elem ); } } } else if ( nodeType === 3 || nodeType === 4 ) { return elem.nodeValue; } // Do not include comment or processing instruction nodes return ret; }; Expr = Sizzle.selectors = { // Can be adjusted by the user cacheLength: 50, createPseudo: markFunction, match: matchExpr, attrHandle: {}, find: {}, relative: { ">": { dir: "parentNode", first: true }, " ": { dir: "parentNode" }, "+": { dir: "previousSibling", first: true }, "~": { dir: "previousSibling" } }, preFilter: { "ATTR": function( match ) { match[1] = match[1].replace( runescape, funescape ); // Move the given value to match[3] whether quoted or unquoted match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); if ( match[2] === "~=" ) { match[3] = " " + match[3] + " "; } return match.slice( 0, 4 ); }, "CHILD": function( match ) { /* matches from matchExpr["CHILD"] 1 type (only|nth|...) 2 what (child|of-type) 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 4 xn-component of xn+y argument ([+-]?\d*n|) 5 sign of xn-component 6 x of xn-component 7 sign of y-component 8 y of y-component */ match[1] = match[1].toLowerCase(); if ( match[1].slice( 0, 3 ) === "nth" ) { // nth-* requires argument if ( !match[3] ) { Sizzle.error( match[0] ); } // numeric x and y parameters for Expr.filter.CHILD // remember that false/true cast respectively to 0/1 match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); // other types prohibit arguments } else if ( match[3] ) { Sizzle.error( match[0] ); } return match; }, "PSEUDO": function( match ) { var excess, unquoted = !match[5] && match[2]; if ( matchExpr["CHILD"].test( match[0] ) ) { return null; } // Accept quoted arguments as-is if ( match[3] && match[4] !== undefined ) { match[2] = match[4]; // Strip excess characters from unquoted arguments } else if ( unquoted && rpseudo.test( unquoted ) && // Get excess from tokenize (recursively) (excess = tokenize( unquoted, true )) && // advance to the next closing parenthesis (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { // excess is a negative index match[0] = match[0].slice( 0, excess ); match[2] = unquoted.slice( 0, excess ); } // Return only captures needed by the pseudo filter method (type and argument) return match.slice( 0, 3 ); } }, filter: { "TAG": function( nodeNameSelector ) { var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); return nodeNameSelector === "*" ? function() { return true; } : function( elem ) { return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; }; }, "CLASS": function( className ) { var pattern = classCache[ className + " " ]; return pattern || (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && classCache( className, function( elem ) { return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); }); }, "ATTR": function( name, operator, check ) { return function( elem ) { var result = Sizzle.attr( elem, name ); if ( result == null ) { return operator === "!="; } if ( !operator ) { return true; } result += ""; return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf( check ) === 0 : operator === "*=" ? check && result.indexOf( check ) > -1 : operator === "$=" ? check && result.slice( -check.length ) === check : operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : false; }; }, "CHILD": function( type, what, argument, first, last ) { var simple = type.slice( 0, 3 ) !== "nth", forward = type.slice( -4 ) !== "last", ofType = what === "of-type"; return first === 1 && last === 0 ? // Shortcut for :nth-*(n) function( elem ) { return !!elem.parentNode; } : function( elem, context, xml ) { var cache, outerCache, node, diff, nodeIndex, start, dir = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType; if ( parent ) { // :(first|last|only)-(child|of-type) if ( simple ) { while ( dir ) { node = elem; while ( (node = node[ dir ]) ) { if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { return false; } } // Reverse direction for :only-* (if we haven't yet done so) start = dir = type === "only" && !start && "nextSibling"; } return true; } start = [ forward ? parent.firstChild : parent.lastChild ]; // non-xml :nth-child(...) stores cache data on `parent` if ( forward && useCache ) { // Seek `elem` from a previously-cached index outerCache = parent[ expando ] || (parent[ expando ] = {}); cache = outerCache[ type ] || []; nodeIndex = cache[0] === dirruns && cache[1]; diff = cache[0] === dirruns && cache[2]; node = nodeIndex && parent.childNodes[ nodeIndex ]; while ( (node = ++nodeIndex && node && node[ dir ] || // Fallback to seeking `elem` from the start (diff = nodeIndex = 0) || start.pop()) ) { // When found, cache indexes on `parent` and break if ( node.nodeType === 1 && ++diff && node === elem ) { outerCache[ type ] = [ dirruns, nodeIndex, diff ]; break; } } // Use previously-cached element index if available } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { diff = cache[1]; // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) } else { // Use the same loop as above to seek `elem` from the start while ( (node = ++nodeIndex && node && node[ dir ] || (diff = nodeIndex = 0) || start.pop()) ) { if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { // Cache the index of each encountered element if ( useCache ) { (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; } if ( node === elem ) { break; } } } } // Incorporate the offset, then check against cycle size diff -= last; return diff === first || ( diff % first === 0 && diff / first >= 0 ); } }; }, "PSEUDO": function( pseudo, argument ) { // pseudo-class names are case-insensitive // http://www.w3.org/TR/selectors/#pseudo-classes // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters // Remember that setFilters inherits from pseudos var args, fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || Sizzle.error( "unsupported pseudo: " + pseudo ); // The user may use createPseudo to indicate that // arguments are needed to create the filter function // just as Sizzle does if ( fn[ expando ] ) { return fn( argument ); } // But maintain support for old signatures if ( fn.length > 1 ) { args = [ pseudo, pseudo, "", argument ]; return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? markFunction(function( seed, matches ) { var idx, matched = fn( seed, argument ), i = matched.length; while ( i-- ) { idx = indexOf.call( seed, matched[i] ); seed[ idx ] = !( matches[ idx ] = matched[i] ); } }) : function( elem ) { return fn( elem, 0, args ); }; } return fn; } }, pseudos: { // Potentially complex pseudos "not": markFunction(function( selector ) { // Trim the selector passed to compile // to avoid treating leading and trailing // spaces as combinators var input = [], results = [], matcher = compile( selector.replace( rtrim, "$1" ) ); return matcher[ expando ] ? markFunction(function( seed, matches, context, xml ) { var elem, unmatched = matcher( seed, null, xml, [] ), i = seed.length; // Match elements unmatched by `matcher` while ( i-- ) { if ( (elem = unmatched[i]) ) { seed[i] = !(matches[i] = elem); } } }) : function( elem, context, xml ) { input[0] = elem; matcher( input, null, xml, results ); return !results.pop(); }; }), "has": markFunction(function( selector ) { return function( elem ) { return Sizzle( selector, elem ).length > 0; }; }), "contains": markFunction(function( text ) { return function( elem ) { return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; }; }), // "Whether an element is represented by a :lang() selector // is based solely on the element's language value // being equal to the identifier C, // or beginning with the identifier C immediately followed by "-". // The matching of C against the element's language value is performed case-insensitively. // The identifier C does not have to be a valid language name." // http://www.w3.org/TR/selectors/#lang-pseudo "lang": markFunction( function( lang ) { // lang value must be a valid identifier if ( !ridentifier.test(lang || "") ) { Sizzle.error( "unsupported lang: " + lang ); } lang = lang.replace( runescape, funescape ).toLowerCase(); return function( elem ) { var elemLang; do { if ( (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { elemLang = elemLang.toLowerCase(); return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; } } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); return false; }; }), // Miscellaneous "target": function( elem ) { var hash = window.location && window.location.hash; return hash && hash.slice( 1 ) === elem.id; }, "root": function( elem ) { return elem === docElem; }, "focus": function( elem ) { return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); }, // Boolean properties "enabled": function( elem ) { return elem.disabled === false; }, "disabled": function( elem ) { return elem.disabled === true; }, "checked": function( elem ) { // In CSS3, :checked should return both checked and selected elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked var nodeName = elem.nodeName.toLowerCase(); return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); }, "selected": function( elem ) { // Accessing this property makes selected-by-default // options in Safari work properly if ( elem.parentNode ) { elem.parentNode.selectedIndex; } return elem.selected === true; }, // Contents "empty": function( elem ) { // http://www.w3.org/TR/selectors/#empty-pseudo // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), // but not by others (comment: 8; processing instruction: 7; etc.) // nodeType < 6 works because attributes (2) do not appear as children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { if ( elem.nodeType < 6 ) { return false; } } return true; }, "parent": function( elem ) { return !Expr.pseudos["empty"]( elem ); }, // Element/input types "header": function( elem ) { return rheader.test( elem.nodeName ); }, "input": function( elem ) { return rinputs.test( elem.nodeName ); }, "button": function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === "button" || name === "button"; }, "text": function( elem ) { var attr; return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && // Support: IE<8 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); }, // Position-in-collection "first": createPositionalPseudo(function() { return [ 0 ]; }), "last": createPositionalPseudo(function( matchIndexes, length ) { return [ length - 1 ]; }), "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { return [ argument < 0 ? argument + length : argument ]; }), "even": createPositionalPseudo(function( matchIndexes, length ) { var i = 0; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; }), "odd": createPositionalPseudo(function( matchIndexes, length ) { var i = 1; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; }), "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; --i >= 0; ) { matchIndexes.push( i ); } return matchIndexes; }), "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; ++i < length; ) { matchIndexes.push( i ); } return matchIndexes; }) } }; Expr.pseudos["nth"] = Expr.pseudos["eq"]; // Add button/input type pseudos for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { Expr.pseudos[ i ] = createInputPseudo( i ); } for ( i in { submit: true, reset: true } ) { Expr.pseudos[ i ] = createButtonPseudo( i ); } // Easy API for creating new setFilters function setFilters() {} setFilters.prototype = Expr.filters = Expr.pseudos; Expr.setFilters = new setFilters(); function tokenize( selector, parseOnly ) { var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[ selector + " " ]; if ( cached ) { return parseOnly ? 0 : cached.slice( 0 ); } soFar = selector; groups = []; preFilters = Expr.preFilter; while ( soFar ) { // Comma and first run if ( !matched || (match = rcomma.exec( soFar )) ) { if ( match ) { // Don't consume trailing commas as valid soFar = soFar.slice( match[0].length ) || soFar; } groups.push( (tokens = []) ); } matched = false; // Combinators if ( (match = rcombinators.exec( soFar )) ) { matched = match.shift(); tokens.push({ value: matched, // Cast descendant combinators to space type: match[0].replace( rtrim, " " ) }); soFar = soFar.slice( matched.length ); } // Filters for ( type in Expr.filter ) { if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || (match = preFilters[ type ]( match ))) ) { matched = match.shift(); tokens.push({ value: matched, type: type, matches: match }); soFar = soFar.slice( matched.length ); } } if ( !matched ) { break; } } // Return the length of the invalid excess // if we're just parsing // Otherwise, throw an error or return tokens return parseOnly ? soFar.length : soFar ? Sizzle.error( selector ) : // Cache the tokens tokenCache( selector, groups ).slice( 0 ); } function toSelector( tokens ) { var i = 0, len = tokens.length, selector = ""; for ( ; i < len; i++ ) { selector += tokens[i].value; } return selector; } function addCombinator( matcher, combinator, base ) { var dir = combinator.dir, checkNonElements = base && dir === "parentNode", doneName = done++; return combinator.first ? // Check against closest ancestor/preceding element function( elem, context, xml ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { return matcher( elem, context, xml ); } } } : // Check against all ancestor/preceding elements function( elem, context, xml ) { var oldCache, outerCache, newCache = [ dirruns, doneName ]; // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching if ( xml ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { if ( matcher( elem, context, xml ) ) { return true; } } } } else { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { outerCache = elem[ expando ] || (elem[ expando ] = {}); if ( (oldCache = outerCache[ dir ]) && oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { // Assign to newCache so results back-propagate to previous elements return (newCache[ 2 ] = oldCache[ 2 ]); } else { // Reuse newcache so results back-propagate to previous elements outerCache[ dir ] = newCache; // A match means we're done; a fail means we have to keep checking if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { return true; } } } } } }; } function elementMatcher( matchers ) { return matchers.length > 1 ? function( elem, context, xml ) { var i = matchers.length; while ( i-- ) { if ( !matchers[i]( elem, context, xml ) ) { return false; } } return true; } : matchers[0]; } function condense( unmatched, map, filter, context, xml ) { var elem, newUnmatched = [], i = 0, len = unmatched.length, mapped = map != null; for ( ; i < len; i++ ) { if ( (elem = unmatched[i]) ) { if ( !filter || filter( elem, context, xml ) ) { newUnmatched.push( elem ); if ( mapped ) { map.push( i ); } } } } return newUnmatched; } function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { if ( postFilter && !postFilter[ expando ] ) { postFilter = setMatcher( postFilter ); } if ( postFinder && !postFinder[ expando ] ) { postFinder = setMatcher( postFinder, postSelector ); } return markFunction(function( seed, results, context, xml ) { var temp, i, elem, preMap = [], postMap = [], preexisting = results.length, // Get initial elements from seed or context elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), // Prefilter to get matcher input, preserving a map for seed-results synchronization matcherIn = preFilter && ( seed || !selector ) ? condense( elems, preMap, preFilter, context, xml ) : elems, matcherOut = matcher ? // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, postFinder || ( seed ? preFilter : preexisting || postFilter ) ? // ...intermediate processing is necessary [] : // ...otherwise use results directly results : matcherIn; // Find primary matches if ( matcher ) { matcher( matcherIn, matcherOut, context, xml ); } // Apply postFilter if ( postFilter ) { temp = condense( matcherOut, postMap ); postFilter( temp, [], context, xml ); // Un-match failing elements by moving them back to matcherIn i = temp.length; while ( i-- ) { if ( (elem = temp[i]) ) { matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); } } } if ( seed ) { if ( postFinder || preFilter ) { if ( postFinder ) { // Get the final matcherOut by condensing this intermediate into postFinder contexts temp = []; i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) ) { // Restore matcherIn since elem is not yet a final match temp.push( (matcherIn[i] = elem) ); } } postFinder( null, (matcherOut = []), temp, xml ); } // Move matched elements from seed to results to keep them synchronized i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) && (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { seed[temp] = !(results[temp] = elem); } } } // Add elements to results, through postFinder if defined } else { matcherOut = condense( matcherOut === results ? matcherOut.splice( preexisting, matcherOut.length ) : matcherOut ); if ( postFinder ) { postFinder( null, results, matcherOut, xml ); } else { push.apply( results, matcherOut ); } } }); } function matcherFromTokens( tokens ) { var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[ tokens[0].type ], implicitRelative = leadingRelative || Expr.relative[" "], i = leadingRelative ? 1 : 0, // The foundational matcher ensures that elements are reachable from top-level context(s) matchContext = addCombinator( function( elem ) { return elem === checkContext; }, implicitRelative, true ), matchAnyContext = addCombinator( function( elem ) { return indexOf.call( checkContext, elem ) > -1; }, implicitRelative, true ), matchers = [ function( elem, context, xml ) { return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( (checkContext = context).nodeType ? matchContext( elem, context, xml ) : matchAnyContext( elem, context, xml ) ); } ]; for ( ; i < len; i++ ) { if ( (matcher = Expr.relative[ tokens[i].type ]) ) { matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; } else { matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); // Return special upon seeing a positional matcher if ( matcher[ expando ] ) { // Find the next relative operator (if any) for proper handling j = ++i; for ( ; j < len; j++ ) { if ( Expr.relative[ tokens[j].type ] ) { break; } } return setMatcher( i > 1 && elementMatcher( matchers ), i > 1 && toSelector( // If the preceding token was a descendant combinator, insert an implicit any-element `*` tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) ).replace( rtrim, "$1" ), matcher, i < j && matcherFromTokens( tokens.slice( i, j ) ), j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), j < len && toSelector( tokens ) ); } matchers.push( matcher ); } } return elementMatcher( matchers ); } function matcherFromGroupMatchers( elementMatchers, setMatchers ) { var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function( seed, context, xml, results, outermost ) { var elem, j, matcher, matchedCount = 0, i = "0", unmatched = seed && [], setMatched = [], contextBackup = outermostContext, // We must always have either seed elements or outermost context elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), // Use integer dirruns iff this is the outermost matcher dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), len = elems.length; if ( outermost ) { outermostContext = context !== document && context; } // Add elements passing elementMatchers directly to results // Keep `i` a string if there are no elements so `matchedCount` will be "00" below // Support: IE<9, Safari // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id for ( ; i !== len && (elem = elems[i]) != null; i++ ) { if ( byElement && elem ) { j = 0; while ( (matcher = elementMatchers[j++]) ) { if ( matcher( elem, context, xml ) ) { results.push( elem ); break; } } if ( outermost ) { dirruns = dirrunsUnique; } } // Track unmatched elements for set filters if ( bySet ) { // They will have gone through all possible matchers if ( (elem = !matcher && elem) ) { matchedCount--; } // Lengthen the array for every element, matched or not if ( seed ) { unmatched.push( elem ); } } } // Apply set filters to unmatched elements matchedCount += i; if ( bySet && i !== matchedCount ) { j = 0; while ( (matcher = setMatchers[j++]) ) { matcher( unmatched, setMatched, context, xml ); } if ( seed ) { // Reintegrate element matches to eliminate the need for sorting if ( matchedCount > 0 ) { while ( i-- ) { if ( !(unmatched[i] || setMatched[i]) ) { setMatched[i] = pop.call( results ); } } } // Discard index placeholder values to get only actual matches setMatched = condense( setMatched ); } // Add matches to results push.apply( results, setMatched ); // Seedless set matches succeeding multiple successful matchers stipulate sorting if ( outermost && !seed && setMatched.length > 0 && ( matchedCount + setMatchers.length ) > 1 ) { Sizzle.uniqueSort( results ); } } // Override manipulation of globals by nested matchers if ( outermost ) { dirruns = dirrunsUnique; outermostContext = contextBackup; } return unmatched; }; return bySet ? markFunction( superMatcher ) : superMatcher; } compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { var i, setMatchers = [], elementMatchers = [], cached = compilerCache[ selector + " " ]; if ( !cached ) { // Generate a function of recursive functions that can be used to check each element if ( !group ) { group = tokenize( selector ); } i = group.length; while ( i-- ) { cached = matcherFromTokens( group[i] ); if ( cached[ expando ] ) { setMatchers.push( cached ); } else { elementMatchers.push( cached ); } } // Cache the compiled function cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); } return cached; }; function multipleContexts( selector, contexts, results ) { var i = 0, len = contexts.length; for ( ; i < len; i++ ) { Sizzle( selector, contexts[i], results ); } return results; } function select( selector, context, results, seed ) { var i, tokens, token, type, find, match = tokenize( selector ); if ( !seed ) { // Try to minimize operations if there is only one group if ( match.length === 1 ) { // Take a shortcut and set the context if the root selector is an ID tokens = match[0] = match[0].slice( 0 ); if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && support.getById && context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) { context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; if ( !context ) { return results; } selector = selector.slice( tokens.shift().value.length ); } // Fetch a seed set for right-to-left matching i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; while ( i-- ) { token = tokens[i]; // Abort if we hit a combinator if ( Expr.relative[ (type = token.type) ] ) { break; } if ( (find = Expr.find[ type ]) ) { // Search, expanding context for leading sibling combinators if ( (seed = find( token.matches[0].replace( runescape, funescape ), rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context )) ) { // If seed is empty or no tokens remain, we can return early tokens.splice( i, 1 ); selector = seed.length && toSelector( tokens ); if ( !selector ) { push.apply( results, seed ); return results; } break; } } } } } // Compile and execute a filtering function // Provide `match` to avoid retokenization if we modified the selector above compile( selector, match )( seed, context, !documentIsHTML, results, rsibling.test( selector ) && testContext( context.parentNode ) || context ); return results; } // One-time assignments // Sort stability support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; // Support: Chrome<14 // Always assume duplicates if they aren't passed to the comparison function support.detectDuplicates = !!hasDuplicate; // Initialize against the default document setDocument(); // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) // Detached nodes confoundingly follow *each other* support.sortDetached = assert(function( div1 ) { // Should return 1, but returns 4 (following) return div1.compareDocumentPosition( document.createElement("div") ) & 1; }); // Support: IE<8 // Prevent attribute/property "interpolation" // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx if ( !assert(function( div ) { div.innerHTML = ""; return div.firstChild.getAttribute("href") === "#" ; }) ) { addHandle( "type|href|height|width", function( elem, name, isXML ) { if ( !isXML ) { return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); } }); } // Support: IE<9 // Use defaultValue in place of getAttribute("value") if ( !support.attributes || !assert(function( div ) { div.innerHTML = ""; div.firstChild.setAttribute( "value", "" ); return div.firstChild.getAttribute( "value" ) === ""; }) ) { addHandle( "value", function( elem, name, isXML ) { if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { return elem.defaultValue; } }); } // Support: IE<9 // Use getAttributeNode to fetch booleans when getAttribute lies if ( !assert(function( div ) { return div.getAttribute("disabled") == null; }) ) { addHandle( booleans, function( elem, name, isXML ) { var val; if ( !isXML ) { return elem[ name ] === true ? name.toLowerCase() : (val = elem.getAttributeNode( name )) && val.specified ? val.value : null; } }); } return Sizzle; })( window ); jQuery.find = Sizzle; jQuery.expr = Sizzle.selectors; jQuery.expr[":"] = jQuery.expr.pseudos; jQuery.unique = Sizzle.uniqueSort; jQuery.text = Sizzle.getText; jQuery.isXMLDoc = Sizzle.isXML; jQuery.contains = Sizzle.contains; var rneedsContext = jQuery.expr.match.needsContext; var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); var risSimple = /^.[^:#\[\.,]*$/; // Implement the identical functionality for filter and not function winnow( elements, qualifier, not ) { if ( jQuery.isFunction( qualifier ) ) { return jQuery.grep( elements, function( elem, i ) { /* jshint -W018 */ return !!qualifier.call( elem, i, elem ) !== not; }); } if ( qualifier.nodeType ) { return jQuery.grep( elements, function( elem ) { return ( elem === qualifier ) !== not; }); } if ( typeof qualifier === "string" ) { if ( risSimple.test( qualifier ) ) { return jQuery.filter( qualifier, elements, not ); } qualifier = jQuery.filter( qualifier, elements ); } return jQuery.grep( elements, function( elem ) { return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not; }); } jQuery.filter = function( expr, elems, not ) { var elem = elems[ 0 ]; if ( not ) { expr = ":not(" + expr + ")"; } return elems.length === 1 && elem.nodeType === 1 ? jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { return elem.nodeType === 1; })); }; jQuery.fn.extend({ find: function( selector ) { var i, ret = [], self = this, len = self.length; if ( typeof selector !== "string" ) { return this.pushStack( jQuery( selector ).filter(function() { for ( i = 0; i < len; i++ ) { if ( jQuery.contains( self[ i ], this ) ) { return true; } } }) ); } for ( i = 0; i < len; i++ ) { jQuery.find( selector, self[ i ], ret ); } // Needed because $( selector, context ) becomes $( context ).find( selector ) ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); ret.selector = this.selector ? this.selector + " " + selector : selector; return ret; }, filter: function( selector ) { return this.pushStack( winnow(this, selector || [], false) ); }, not: function( selector ) { return this.pushStack( winnow(this, selector || [], true) ); }, is: function( selector ) { return !!winnow( this, // If this is a positional/relative selector, check membership in the returned set // so $("p:first").is("p:last") won't return true for a doc with two "p". typeof selector === "string" && rneedsContext.test( selector ) ? jQuery( selector ) : selector || [], false ).length; } }); // Initialize a jQuery object // A central reference to the root jQuery(document) var rootjQuery, // Use the correct document accordingly with window argument (sandbox) document = window.document, // A simple way to check for HTML strings // Prioritize #id over to avoid XSS via location.hash (#9521) // Strict HTML recognition (#11290: must start with <) rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, init = jQuery.fn.init = function( selector, context ) { var match, elem; // HANDLE: $(""), $(null), $(undefined), $(false) if ( !selector ) { return this; } // Handle HTML strings if ( typeof selector === "string" ) { if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { // Assume that strings that start and end with <> are HTML and skip the regex check match = [ null, selector, null ]; } else { match = rquickExpr.exec( selector ); } // Match html or make sure no context is specified for #id if ( match && (match[1] || !context) ) { // HANDLE: $(html) -> $(array) if ( match[1] ) { context = context instanceof jQuery ? context[0] : context; // scripts is true for back-compat // Intentionally let the error be thrown if parseHTML is not present jQuery.merge( this, jQuery.parseHTML( match[1], context && context.nodeType ? context.ownerDocument || context : document, true ) ); // HANDLE: $(html, props) if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { for ( match in context ) { // Properties of context are called as methods if possible if ( jQuery.isFunction( this[ match ] ) ) { this[ match ]( context[ match ] ); // ...and otherwise set as attributes } else { this.attr( match, context[ match ] ); } } } return this; // HANDLE: $(#id) } else { elem = document.getElementById( match[2] ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 if ( elem && elem.parentNode ) { // Handle the case where IE and Opera return items // by name instead of ID if ( elem.id !== match[2] ) { return rootjQuery.find( selector ); } // Otherwise, we inject the element directly into the jQuery object this.length = 1; this[0] = elem; } this.context = document; this.selector = selector; return this; } // HANDLE: $(expr, $(...)) } else if ( !context || context.jquery ) { return ( context || rootjQuery ).find( selector ); // HANDLE: $(expr, context) // (which is just equivalent to: $(context).find(expr) } else { return this.constructor( context ).find( selector ); } // HANDLE: $(DOMElement) } else if ( selector.nodeType ) { this.context = this[0] = selector; this.length = 1; return this; // HANDLE: $(function) // Shortcut for document ready } else if ( jQuery.isFunction( selector ) ) { return typeof rootjQuery.ready !== "undefined" ? rootjQuery.ready( selector ) : // Execute immediately if ready is not present selector( jQuery ); } if ( selector.selector !== undefined ) { this.selector = selector.selector; this.context = selector.context; } return jQuery.makeArray( selector, this ); }; // Give the init function the jQuery prototype for later instantiation init.prototype = jQuery.fn; // Initialize central reference rootjQuery = jQuery( document ); var rparentsprev = /^(?:parents|prev(?:Until|All))/, // methods guaranteed to produce a unique set when starting from a unique set guaranteedUnique = { children: true, contents: true, next: true, prev: true }; jQuery.extend({ dir: function( elem, dir, until ) { var matched = [], cur = elem[ dir ]; while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { if ( cur.nodeType === 1 ) { matched.push( cur ); } cur = cur[dir]; } return matched; }, sibling: function( n, elem ) { var r = []; for ( ; n; n = n.nextSibling ) { if ( n.nodeType === 1 && n !== elem ) { r.push( n ); } } return r; } }); jQuery.fn.extend({ has: function( target ) { var i, targets = jQuery( target, this ), len = targets.length; return this.filter(function() { for ( i = 0; i < len; i++ ) { if ( jQuery.contains( this, targets[i] ) ) { return true; } } }); }, closest: function( selectors, context ) { var cur, i = 0, l = this.length, matched = [], pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? jQuery( selectors, context || this.context ) : 0; for ( ; i < l; i++ ) { for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { // Always skip document fragments if ( cur.nodeType < 11 && (pos ? pos.index(cur) > -1 : // Don't pass non-elements to Sizzle cur.nodeType === 1 && jQuery.find.matchesSelector(cur, selectors)) ) { matched.push( cur ); break; } } } return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); }, // Determine the position of an element within // the matched set of elements index: function( elem ) { // No argument, return index in parent if ( !elem ) { return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; } // index in selector if ( typeof elem === "string" ) { return jQuery.inArray( this[0], jQuery( elem ) ); } // Locate the position of the desired element return jQuery.inArray( // If it receives a jQuery object, the first element is used elem.jquery ? elem[0] : elem, this ); }, add: function( selector, context ) { return this.pushStack( jQuery.unique( jQuery.merge( this.get(), jQuery( selector, context ) ) ) ); }, addBack: function( selector ) { return this.add( selector == null ? this.prevObject : this.prevObject.filter(selector) ); } }); function sibling( cur, dir ) { do { cur = cur[ dir ]; } while ( cur && cur.nodeType !== 1 ); return cur; } jQuery.each({ parent: function( elem ) { var parent = elem.parentNode; return parent && parent.nodeType !== 11 ? parent : null; }, parents: function( elem ) { return jQuery.dir( elem, "parentNode" ); }, parentsUntil: function( elem, i, until ) { return jQuery.dir( elem, "parentNode", until ); }, next: function( elem ) { return sibling( elem, "nextSibling" ); }, prev: function( elem ) { return sibling( elem, "previousSibling" ); }, nextAll: function( elem ) { return jQuery.dir( elem, "nextSibling" ); }, prevAll: function( elem ) { return jQuery.dir( elem, "previousSibling" ); }, nextUntil: function( elem, i, until ) { return jQuery.dir( elem, "nextSibling", until ); }, prevUntil: function( elem, i, until ) { return jQuery.dir( elem, "previousSibling", until ); }, siblings: function( elem ) { return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); }, children: function( elem ) { return jQuery.sibling( elem.firstChild ); }, contents: function( elem ) { return jQuery.nodeName( elem, "iframe" ) ? elem.contentDocument || elem.contentWindow.document : jQuery.merge( [], elem.childNodes ); } }, function( name, fn ) { jQuery.fn[ name ] = function( until, selector ) { var ret = jQuery.map( this, fn, until ); if ( name.slice( -5 ) !== "Until" ) { selector = until; } if ( selector && typeof selector === "string" ) { ret = jQuery.filter( selector, ret ); } if ( this.length > 1 ) { // Remove duplicates if ( !guaranteedUnique[ name ] ) { ret = jQuery.unique( ret ); } // Reverse order for parents* and prev-derivatives if ( rparentsprev.test( name ) ) { ret = ret.reverse(); } } return this.pushStack( ret ); }; }); var rnotwhite = (/\S+/g); // String to Object options format cache var optionsCache = {}; // Convert String-formatted options into Object-formatted ones and store in cache function createOptions( options ) { var object = optionsCache[ options ] = {}; jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { object[ flag ] = true; }); return object; } /* * Create a callback list using the following parameters: * * options: an optional list of space-separated options that will change how * the callback list behaves or a more traditional option object * * By default a callback list will act like an event callback list and can be * "fired" multiple times. * * Possible options: * * once: will ensure the callback list can only be fired once (like a Deferred) * * memory: will keep track of previous values and will call any callback added * after the list has been fired right away with the latest "memorized" * values (like a Deferred) * * unique: will ensure a callback can only be added once (no duplicate in the list) * * stopOnFalse: interrupt callings when a callback returns false * */ jQuery.Callbacks = function( options ) { // Convert options from String-formatted to Object-formatted if needed // (we check in cache first) options = typeof options === "string" ? ( optionsCache[ options ] || createOptions( options ) ) : jQuery.extend( {}, options ); var // Flag to know if list is currently firing firing, // Last fire value (for non-forgettable lists) memory, // Flag to know if list was already fired fired, // End of the loop when firing firingLength, // Index of currently firing callback (modified by remove if needed) firingIndex, // First callback to fire (used internally by add and fireWith) firingStart, // Actual callback list list = [], // Stack of fire calls for repeatable lists stack = !options.once && [], // Fire callbacks fire = function( data ) { memory = options.memory && data; fired = true; firingIndex = firingStart || 0; firingStart = 0; firingLength = list.length; firing = true; for ( ; list && firingIndex < firingLength; firingIndex++ ) { if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { memory = false; // To prevent further calls using add break; } } firing = false; if ( list ) { if ( stack ) { if ( stack.length ) { fire( stack.shift() ); } } else if ( memory ) { list = []; } else { self.disable(); } } }, // Actual Callbacks object self = { // Add a callback or a collection of callbacks to the list add: function() { if ( list ) { // First, we save the current length var start = list.length; (function add( args ) { jQuery.each( args, function( _, arg ) { var type = jQuery.type( arg ); if ( type === "function" ) { if ( !options.unique || !self.has( arg ) ) { list.push( arg ); } } else if ( arg && arg.length && type !== "string" ) { // Inspect recursively add( arg ); } }); })( arguments ); // Do we need to add the callbacks to the // current firing batch? if ( firing ) { firingLength = list.length; // With memory, if we're not firing then // we should call right away } else if ( memory ) { firingStart = start; fire( memory ); } } return this; }, // Remove a callback from the list remove: function() { if ( list ) { jQuery.each( arguments, function( _, arg ) { var index; while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { list.splice( index, 1 ); // Handle firing indexes if ( firing ) { if ( index <= firingLength ) { firingLength--; } if ( index <= firingIndex ) { firingIndex--; } } } }); } return this; }, // Check if a given callback is in the list. // If no argument is given, return whether or not list has callbacks attached. has: function( fn ) { return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); }, // Remove all callbacks from the list empty: function() { list = []; firingLength = 0; return this; }, // Have the list do nothing anymore disable: function() { list = stack = memory = undefined; return this; }, // Is it disabled? disabled: function() { return !list; }, // Lock the list in its current state lock: function() { stack = undefined; if ( !memory ) { self.disable(); } return this; }, // Is it locked? locked: function() { return !stack; }, // Call all callbacks with the given context and arguments fireWith: function( context, args ) { if ( list && ( !fired || stack ) ) { args = args || []; args = [ context, args.slice ? args.slice() : args ]; if ( firing ) { stack.push( args ); } else { fire( args ); } } return this; }, // Call all the callbacks with the given arguments fire: function() { self.fireWith( this, arguments ); return this; }, // To know if the callbacks have already been called at least once fired: function() { return !!fired; } }; return self; }; jQuery.extend({ Deferred: function( func ) { var tuples = [ // action, add listener, listener list, final state [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], [ "notify", "progress", jQuery.Callbacks("memory") ] ], state = "pending", promise = { state: function() { return state; }, always: function() { deferred.done( arguments ).fail( arguments ); return this; }, then: function( /* fnDone, fnFail, fnProgress */ ) { var fns = arguments; return jQuery.Deferred(function( newDefer ) { jQuery.each( tuples, function( i, tuple ) { var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; // deferred[ done | fail | progress ] for forwarding actions to newDefer deferred[ tuple[1] ](function() { var returned = fn && fn.apply( this, arguments ); if ( returned && jQuery.isFunction( returned.promise ) ) { returned.promise() .done( newDefer.resolve ) .fail( newDefer.reject ) .progress( newDefer.notify ); } else { newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); } }); }); fns = null; }).promise(); }, // Get a promise for this deferred // If obj is provided, the promise aspect is added to the object promise: function( obj ) { return obj != null ? jQuery.extend( obj, promise ) : promise; } }, deferred = {}; // Keep pipe for back-compat promise.pipe = promise.then; // Add list-specific methods jQuery.each( tuples, function( i, tuple ) { var list = tuple[ 2 ], stateString = tuple[ 3 ]; // promise[ done | fail | progress ] = list.add promise[ tuple[1] ] = list.add; // Handle state if ( stateString ) { list.add(function() { // state = [ resolved | rejected ] state = stateString; // [ reject_list | resolve_list ].disable; progress_list.lock }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); } // deferred[ resolve | reject | notify ] deferred[ tuple[0] ] = function() { deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); return this; }; deferred[ tuple[0] + "With" ] = list.fireWith; }); // Make the deferred a promise promise.promise( deferred ); // Call given func if any if ( func ) { func.call( deferred, deferred ); } // All done! return deferred; }, // Deferred helper when: function( subordinate /* , ..., subordinateN */ ) { var i = 0, resolveValues = slice.call( arguments ), length = resolveValues.length, // the count of uncompleted subordinates remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, // the master Deferred. If resolveValues consist of only a single Deferred, just use that. deferred = remaining === 1 ? subordinate : jQuery.Deferred(), // Update function for both resolve and progress values updateFunc = function( i, contexts, values ) { return function( value ) { contexts[ i ] = this; values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; if ( values === progressValues ) { deferred.notifyWith( contexts, values ); } else if ( !(--remaining) ) { deferred.resolveWith( contexts, values ); } }; }, progressValues, progressContexts, resolveContexts; // add listeners to Deferred subordinates; treat others as resolved if ( length > 1 ) { progressValues = new Array( length ); progressContexts = new Array( length ); resolveContexts = new Array( length ); for ( ; i < length; i++ ) { if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { resolveValues[ i ].promise() .done( updateFunc( i, resolveContexts, resolveValues ) ) .fail( deferred.reject ) .progress( updateFunc( i, progressContexts, progressValues ) ); } else { --remaining; } } } // if we're not waiting on anything, resolve the master if ( !remaining ) { deferred.resolveWith( resolveContexts, resolveValues ); } return deferred.promise(); } }); // The deferred used on DOM ready var readyList; jQuery.fn.ready = function( fn ) { // Add the callback jQuery.ready.promise().done( fn ); return this; }; jQuery.extend({ // Is the DOM ready to be used? Set to true once it occurs. isReady: false, // A counter to track how many items to wait for before // the ready event fires. See #6781 readyWait: 1, // Hold (or release) the ready event holdReady: function( hold ) { if ( hold ) { jQuery.readyWait++; } else { jQuery.ready( true ); } }, // Handle when the DOM is ready ready: function( wait ) { // Abort if there are pending holds or we're already ready if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { return; } // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). if ( !document.body ) { return setTimeout( jQuery.ready ); } // Remember that the DOM is ready jQuery.isReady = true; // If a normal DOM Ready event fired, decrement, and wait if need be if ( wait !== true && --jQuery.readyWait > 0 ) { return; } // If there are functions bound, to execute readyList.resolveWith( document, [ jQuery ] ); // Trigger any bound ready events if ( jQuery.fn.trigger ) { jQuery( document ).trigger("ready").off("ready"); } } }); /** * Clean-up method for dom ready events */ function detach() { if ( document.addEventListener ) { document.removeEventListener( "DOMContentLoaded", completed, false ); window.removeEventListener( "load", completed, false ); } else { document.detachEvent( "onreadystatechange", completed ); window.detachEvent( "onload", completed ); } } /** * The ready event handler and self cleanup method */ function completed() { // readyState === "complete" is good enough for us to call the dom ready in oldIE if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { detach(); jQuery.ready(); } } jQuery.ready.promise = function( obj ) { if ( !readyList ) { readyList = jQuery.Deferred(); // Catch cases where $(document).ready() is called after the browser event has already occurred. // we once tried to use readyState "interactive" here, but it caused issues like the one // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 if ( document.readyState === "complete" ) { // Handle it asynchronously to allow scripts the opportunity to delay ready setTimeout( jQuery.ready ); // Standards-based browsers support DOMContentLoaded } else if ( document.addEventListener ) { // Use the handy event callback document.addEventListener( "DOMContentLoaded", completed, false ); // A fallback to window.onload, that will always work window.addEventListener( "load", completed, false ); // If IE event model is used } else { // Ensure firing before onload, maybe late but safe also for iframes document.attachEvent( "onreadystatechange", completed ); // A fallback to window.onload, that will always work window.attachEvent( "onload", completed ); // If IE and not a frame // continually check to see if the document is ready var top = false; try { top = window.frameElement == null && document.documentElement; } catch(e) {} if ( top && top.doScroll ) { (function doScrollCheck() { if ( !jQuery.isReady ) { try { // Use the trick by Diego Perini // http://javascript.nwbox.com/IEContentLoaded/ top.doScroll("left"); } catch(e) { return setTimeout( doScrollCheck, 50 ); } // detach all dom ready events detach(); // and execute any waiting functions jQuery.ready(); } })(); } } } return readyList.promise( obj ); }; var strundefined = typeof undefined; // Support: IE<9 // Iteration over object's inherited properties before its own var i; for ( i in jQuery( support ) ) { break; } support.ownLast = i !== "0"; // Note: most support tests are defined in their respective modules. // false until the test is run support.inlineBlockNeedsLayout = false; jQuery(function() { // We need to execute this one support test ASAP because we need to know // if body.style.zoom needs to be set. var container, div, body = document.getElementsByTagName("body")[0]; if ( !body ) { // Return for frameset docs that don't have a body return; } // Setup container = document.createElement( "div" ); container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; div = document.createElement( "div" ); body.appendChild( container ).appendChild( div ); if ( typeof div.style.zoom !== strundefined ) { // Support: IE<8 // Check if natively block-level elements act like inline-block // elements when setting their display to 'inline' and giving // them layout div.style.cssText = "border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1"; if ( (support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 )) ) { // Prevent IE 6 from affecting layout for positioned elements #11048 // Prevent IE from shrinking the body in IE 7 mode #12869 // Support: IE<8 body.style.zoom = 1; } } body.removeChild( container ); // Null elements to avoid leaks in IE container = div = null; }); (function() { var div = document.createElement( "div" ); // Execute the test only if not already executed in another module. if (support.deleteExpando == null) { // Support: IE<9 support.deleteExpando = true; try { delete div.test; } catch( e ) { support.deleteExpando = false; } } // Null elements to avoid leaks in IE. div = null; })(); /** * Determines whether an object can have data */ jQuery.acceptData = function( elem ) { var noData = jQuery.noData[ (elem.nodeName + " ").toLowerCase() ], nodeType = +elem.nodeType || 1; // Do not set data on non-element DOM nodes because it will not be cleared (#8335). return nodeType !== 1 && nodeType !== 9 ? false : // Nodes accept data unless otherwise specified; rejection can be conditional !noData || noData !== true && elem.getAttribute("classid") === noData; }; var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, rmultiDash = /([A-Z])/g; function dataAttr( elem, key, data ) { // If nothing was found internally, try to fetch any // data from the HTML5 data-* attribute if ( data === undefined && elem.nodeType === 1 ) { var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); data = elem.getAttribute( name ); if ( typeof data === "string" ) { try { data = data === "true" ? true : data === "false" ? false : data === "null" ? null : // Only convert to a number if it doesn't change the string +data + "" === data ? +data : rbrace.test( data ) ? jQuery.parseJSON( data ) : data; } catch( e ) {} // Make sure we set the data so it isn't changed later jQuery.data( elem, key, data ); } else { data = undefined; } } return data; } // checks a cache object for emptiness function isEmptyDataObject( obj ) { var name; for ( name in obj ) { // if the public data object is empty, the private is still empty if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { continue; } if ( name !== "toJSON" ) { return false; } } return true; } function internalData( elem, name, data, pvt /* Internal Use Only */ ) { if ( !jQuery.acceptData( elem ) ) { return; } var ret, thisCache, internalKey = jQuery.expando, // We have to handle DOM nodes and JS objects differently because IE6-7 // can't GC object references properly across the DOM-JS boundary isNode = elem.nodeType, // Only DOM nodes need the global jQuery cache; JS object data is // attached directly to the object so GC can occur automatically cache = isNode ? jQuery.cache : elem, // Only defining an ID for JS objects if its cache already exists allows // the code to shortcut on the same path as a DOM node with no cache id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; // Avoid doing any more work than we need to when trying to get data on an // object that has no data at all if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) { return; } if ( !id ) { // Only DOM nodes need a new unique ID for each element since their data // ends up in the global cache if ( isNode ) { id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++; } else { id = internalKey; } } if ( !cache[ id ] ) { // Avoid exposing jQuery metadata on plain JS objects when the object // is serialized using JSON.stringify cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; } // An object can be passed to jQuery.data instead of a key/value pair; this gets // shallow copied over onto the existing cache if ( typeof name === "object" || typeof name === "function" ) { if ( pvt ) { cache[ id ] = jQuery.extend( cache[ id ], name ); } else { cache[ id ].data = jQuery.extend( cache[ id ].data, name ); } } thisCache = cache[ id ]; // jQuery data() is stored in a separate object inside the object's internal data // cache in order to avoid key collisions between internal data and user-defined // data. if ( !pvt ) { if ( !thisCache.data ) { thisCache.data = {}; } thisCache = thisCache.data; } if ( data !== undefined ) { thisCache[ jQuery.camelCase( name ) ] = data; } // Check for both converted-to-camel and non-converted data property names // If a data property was specified if ( typeof name === "string" ) { // First Try to find as-is property data ret = thisCache[ name ]; // Test for null|undefined property data if ( ret == null ) { // Try to find the camelCased property ret = thisCache[ jQuery.camelCase( name ) ]; } } else { ret = thisCache; } return ret; } function internalRemoveData( elem, name, pvt ) { if ( !jQuery.acceptData( elem ) ) { return; } var thisCache, i, isNode = elem.nodeType, // See jQuery.data for more information cache = isNode ? jQuery.cache : elem, id = isNode ? elem[ jQuery.expando ] : jQuery.expando; // If there is already no cache entry for this object, there is no // purpose in continuing if ( !cache[ id ] ) { return; } if ( name ) { thisCache = pvt ? cache[ id ] : cache[ id ].data; if ( thisCache ) { // Support array or space separated string names for data keys if ( !jQuery.isArray( name ) ) { // try the string as a key before any manipulation if ( name in thisCache ) { name = [ name ]; } else { // split the camel cased version by spaces unless a key with the spaces exists name = jQuery.camelCase( name ); if ( name in thisCache ) { name = [ name ]; } else { name = name.split(" "); } } } else { // If "name" is an array of keys... // When data is initially created, via ("key", "val") signature, // keys will be converted to camelCase. // Since there is no way to tell _how_ a key was added, remove // both plain key and camelCase key. #12786 // This will only penalize the array argument path. name = name.concat( jQuery.map( name, jQuery.camelCase ) ); } i = name.length; while ( i-- ) { delete thisCache[ name[i] ]; } // If there is no data left in the cache, we want to continue // and let the cache object itself get destroyed if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) { return; } } } // See jQuery.data for more information if ( !pvt ) { delete cache[ id ].data; // Don't destroy the parent cache unless the internal data object // had been the only thing left in it if ( !isEmptyDataObject( cache[ id ] ) ) { return; } } // Destroy the cache if ( isNode ) { jQuery.cleanData( [ elem ], true ); // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) /* jshint eqeqeq: false */ } else if ( support.deleteExpando || cache != cache.window ) { /* jshint eqeqeq: true */ delete cache[ id ]; // When all else fails, null } else { cache[ id ] = null; } } jQuery.extend({ cache: {}, // The following elements (space-suffixed to avoid Object.prototype collisions) // throw uncatchable exceptions if you attempt to set expando properties noData: { "applet ": true, "embed ": true, // ...but Flash objects (which have this classid) *can* handle expandos "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" }, hasData: function( elem ) { elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; return !!elem && !isEmptyDataObject( elem ); }, data: function( elem, name, data ) { return internalData( elem, name, data ); }, removeData: function( elem, name ) { return internalRemoveData( elem, name ); }, // For internal use only. _data: function( elem, name, data ) { return internalData( elem, name, data, true ); }, _removeData: function( elem, name ) { return internalRemoveData( elem, name, true ); } }); jQuery.fn.extend({ data: function( key, value ) { var i, name, data, elem = this[0], attrs = elem && elem.attributes; // Special expections of .data basically thwart jQuery.access, // so implement the relevant behavior ourselves // Gets all values if ( key === undefined ) { if ( this.length ) { data = jQuery.data( elem ); if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { i = attrs.length; while ( i-- ) { name = attrs[i].name; if ( name.indexOf("data-") === 0 ) { name = jQuery.camelCase( name.slice(5) ); dataAttr( elem, name, data[ name ] ); } } jQuery._data( elem, "parsedAttrs", true ); } } return data; } // Sets multiple values if ( typeof key === "object" ) { return this.each(function() { jQuery.data( this, key ); }); } return arguments.length > 1 ? // Sets one value this.each(function() { jQuery.data( this, key, value ); }) : // Gets one value // Try to fetch any internally stored data first elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined; }, removeData: function( key ) { return this.each(function() { jQuery.removeData( this, key ); }); } }); jQuery.extend({ queue: function( elem, type, data ) { var queue; if ( elem ) { type = ( type || "fx" ) + "queue"; queue = jQuery._data( elem, type ); // Speed up dequeue by getting out quickly if this is just a lookup if ( data ) { if ( !queue || jQuery.isArray(data) ) { queue = jQuery._data( elem, type, jQuery.makeArray(data) ); } else { queue.push( data ); } } return queue || []; } }, dequeue: function( elem, type ) { type = type || "fx"; var queue = jQuery.queue( elem, type ), startLength = queue.length, fn = queue.shift(), hooks = jQuery._queueHooks( elem, type ), next = function() { jQuery.dequeue( elem, type ); }; // If the fx queue is dequeued, always remove the progress sentinel if ( fn === "inprogress" ) { fn = queue.shift(); startLength--; } if ( fn ) { // Add a progress sentinel to prevent the fx queue from being // automatically dequeued if ( type === "fx" ) { queue.unshift( "inprogress" ); } // clear up the last queue stop function delete hooks.stop; fn.call( elem, next, hooks ); } if ( !startLength && hooks ) { hooks.empty.fire(); } }, // not intended for public consumption - generates a queueHooks object, or returns the current one _queueHooks: function( elem, type ) { var key = type + "queueHooks"; return jQuery._data( elem, key ) || jQuery._data( elem, key, { empty: jQuery.Callbacks("once memory").add(function() { jQuery._removeData( elem, type + "queue" ); jQuery._removeData( elem, key ); }) }); } }); jQuery.fn.extend({ queue: function( type, data ) { var setter = 2; if ( typeof type !== "string" ) { data = type; type = "fx"; setter--; } if ( arguments.length < setter ) { return jQuery.queue( this[0], type ); } return data === undefined ? this : this.each(function() { var queue = jQuery.queue( this, type, data ); // ensure a hooks for this queue jQuery._queueHooks( this, type ); if ( type === "fx" && queue[0] !== "inprogress" ) { jQuery.dequeue( this, type ); } }); }, dequeue: function( type ) { return this.each(function() { jQuery.dequeue( this, type ); }); }, clearQueue: function( type ) { return this.queue( type || "fx", [] ); }, // Get a promise resolved when queues of a certain type // are emptied (fx is the type by default) promise: function( type, obj ) { var tmp, count = 1, defer = jQuery.Deferred(), elements = this, i = this.length, resolve = function() { if ( !( --count ) ) { defer.resolveWith( elements, [ elements ] ); } }; if ( typeof type !== "string" ) { obj = type; type = undefined; } type = type || "fx"; while ( i-- ) { tmp = jQuery._data( elements[ i ], type + "queueHooks" ); if ( tmp && tmp.empty ) { count++; tmp.empty.add( resolve ); } } resolve(); return defer.promise( obj ); } }); var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; var isHidden = function( elem, el ) { // isHidden might be called from jQuery#filter function; // in that case, element will be second argument elem = el || elem; return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); }; // Multifunctional method to get and set values of a collection // The value/s can optionally be executed if it's a function var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { var i = 0, length = elems.length, bulk = key == null; // Sets many values if ( jQuery.type( key ) === "object" ) { chainable = true; for ( i in key ) { jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); } // Sets one value } else if ( value !== undefined ) { chainable = true; if ( !jQuery.isFunction( value ) ) { raw = true; } if ( bulk ) { // Bulk operations run against the entire set if ( raw ) { fn.call( elems, value ); fn = null; // ...except when executing function values } else { bulk = fn; fn = function( elem, key, value ) { return bulk.call( jQuery( elem ), value ); }; } } if ( fn ) { for ( ; i < length; i++ ) { fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); } } } return chainable ? elems : // Gets bulk ? fn.call( elems ) : length ? fn( elems[0], key ) : emptyGet; }; var rcheckableType = (/^(?:checkbox|radio)$/i); (function() { var fragment = document.createDocumentFragment(), div = document.createElement("div"), input = document.createElement("input"); // Setup div.setAttribute( "className", "t" ); div.innerHTML = "
a"; // IE strips leading whitespace when .innerHTML is used support.leadingWhitespace = div.firstChild.nodeType === 3; // Make sure that tbody elements aren't automatically inserted // IE will insert them into empty tables support.tbody = !div.getElementsByTagName( "tbody" ).length; // Make sure that link elements get serialized correctly by innerHTML // This requires a wrapper element in IE support.htmlSerialize = !!div.getElementsByTagName( "link" ).length; // Makes sure cloning an html5 element does not cause problems // Where outerHTML is undefined, this still works support.html5Clone = document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav>"; // Check if a disconnected checkbox will retain its checked // value of true after appended to the DOM (IE6/7) input.type = "checkbox"; input.checked = true; fragment.appendChild( input ); support.appendChecked = input.checked; // Make sure textarea (and checkbox) defaultValue is properly cloned // Support: IE6-IE11+ div.innerHTML = ""; support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; // #11217 - WebKit loses check when the name is after the checked attribute fragment.appendChild( div ); div.innerHTML = ""; // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 // old WebKit doesn't clone checked state correctly in fragments support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; // Support: IE<9 // Opera does not clone events (and typeof div.attachEvent === undefined). // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() support.noCloneEvent = true; if ( div.attachEvent ) { div.attachEvent( "onclick", function() { support.noCloneEvent = false; }); div.cloneNode( true ).click(); } // Execute the test only if not already executed in another module. if (support.deleteExpando == null) { // Support: IE<9 support.deleteExpando = true; try { delete div.test; } catch( e ) { support.deleteExpando = false; } } // Null elements to avoid leaks in IE. fragment = div = input = null; })(); (function() { var i, eventName, div = document.createElement( "div" ); // Support: IE<9 (lack submit/change bubble), Firefox 23+ (lack focusin event) for ( i in { submit: true, change: true, focusin: true }) { eventName = "on" + i; if ( !(support[ i + "Bubbles" ] = eventName in window) ) { // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) div.setAttribute( eventName, "t" ); support[ i + "Bubbles" ] = div.attributes[ eventName ].expando === false; } } // Null elements to avoid leaks in IE. div = null; })(); var rformElems = /^(?:input|select|textarea)$/i, rkeyEvent = /^key/, rmouseEvent = /^(?:mouse|contextmenu)|click/, rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; function returnTrue() { return true; } function returnFalse() { return false; } function safeActiveElement() { try { return document.activeElement; } catch ( err ) { } } /* * Helper functions for managing events -- not part of the public interface. * Props to Dean Edwards' addEvent library for many of the ideas. */ jQuery.event = { global: {}, add: function( elem, types, handler, data, selector ) { var tmp, events, t, handleObjIn, special, eventHandle, handleObj, handlers, type, namespaces, origType, elemData = jQuery._data( elem ); // Don't attach events to noData or text/comment nodes (but allow plain objects) if ( !elemData ) { return; } // Caller can pass in an object of custom data in lieu of the handler if ( handler.handler ) { handleObjIn = handler; handler = handleObjIn.handler; selector = handleObjIn.selector; } // Make sure that the handler has a unique ID, used to find/remove it later if ( !handler.guid ) { handler.guid = jQuery.guid++; } // Init the element's event structure and main handler, if this is the first if ( !(events = elemData.events) ) { events = elemData.events = {}; } if ( !(eventHandle = elemData.handle) ) { eventHandle = elemData.handle = function( e ) { // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded return typeof jQuery !== strundefined && (!e || jQuery.event.triggered !== e.type) ? jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : undefined; }; // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events eventHandle.elem = elem; } // Handle multiple events separated by a space types = ( types || "" ).match( rnotwhite ) || [ "" ]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[t] ) || []; type = origType = tmp[1]; namespaces = ( tmp[2] || "" ).split( "." ).sort(); // There *must* be a type, no attaching namespace-only handlers if ( !type ) { continue; } // If event changes its type, use the special event handlers for the changed type special = jQuery.event.special[ type ] || {}; // If selector defined, determine special event api type, otherwise given type type = ( selector ? special.delegateType : special.bindType ) || type; // Update special based on newly reset type special = jQuery.event.special[ type ] || {}; // handleObj is passed to all event handlers handleObj = jQuery.extend({ type: type, origType: origType, data: data, handler: handler, guid: handler.guid, selector: selector, needsContext: selector && jQuery.expr.match.needsContext.test( selector ), namespace: namespaces.join(".") }, handleObjIn ); // Init the event handler queue if we're the first if ( !(handlers = events[ type ]) ) { handlers = events[ type ] = []; handlers.delegateCount = 0; // Only use addEventListener/attachEvent if the special events handler returns false if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { // Bind the global event handler to the element if ( elem.addEventListener ) { elem.addEventListener( type, eventHandle, false ); } else if ( elem.attachEvent ) { elem.attachEvent( "on" + type, eventHandle ); } } } if ( special.add ) { special.add.call( elem, handleObj ); if ( !handleObj.handler.guid ) { handleObj.handler.guid = handler.guid; } } // Add to the element's handler list, delegates in front if ( selector ) { handlers.splice( handlers.delegateCount++, 0, handleObj ); } else { handlers.push( handleObj ); } // Keep track of which events have ever been used, for event optimization jQuery.event.global[ type ] = true; } // Nullify elem to prevent memory leaks in IE elem = null; }, // Detach an event or set of events from an element remove: function( elem, types, handler, selector, mappedTypes ) { var j, handleObj, tmp, origCount, t, events, special, handlers, type, namespaces, origType, elemData = jQuery.hasData( elem ) && jQuery._data( elem ); if ( !elemData || !(events = elemData.events) ) { return; } // Once for each type.namespace in types; type may be omitted types = ( types || "" ).match( rnotwhite ) || [ "" ]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[t] ) || []; type = origType = tmp[1]; namespaces = ( tmp[2] || "" ).split( "." ).sort(); // Unbind all events (on this namespace, if provided) for the element if ( !type ) { for ( type in events ) { jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); } continue; } special = jQuery.event.special[ type ] || {}; type = ( selector ? special.delegateType : special.bindType ) || type; handlers = events[ type ] || []; tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); // Remove matching events origCount = j = handlers.length; while ( j-- ) { handleObj = handlers[ j ]; if ( ( mappedTypes || origType === handleObj.origType ) && ( !handler || handler.guid === handleObj.guid ) && ( !tmp || tmp.test( handleObj.namespace ) ) && ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { handlers.splice( j, 1 ); if ( handleObj.selector ) { handlers.delegateCount--; } if ( special.remove ) { special.remove.call( elem, handleObj ); } } } // Remove generic event handler if we removed something and no more handlers exist // (avoids potential for endless recursion during removal of special event handlers) if ( origCount && !handlers.length ) { if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { jQuery.removeEvent( elem, type, elemData.handle ); } delete events[ type ]; } } // Remove the expando if it's no longer used if ( jQuery.isEmptyObject( events ) ) { delete elemData.handle; // removeData also checks for emptiness and clears the expando if empty // so use it instead of delete jQuery._removeData( elem, "events" ); } }, trigger: function( event, data, elem, onlyHandlers ) { var handle, ontype, cur, bubbleType, special, tmp, i, eventPath = [ elem || document ], type = hasOwn.call( event, "type" ) ? event.type : event, namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; cur = tmp = elem = elem || document; // Don't do events on text and comment nodes if ( elem.nodeType === 3 || elem.nodeType === 8 ) { return; } // focus/blur morphs to focusin/out; ensure we're not firing them right now if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { return; } if ( type.indexOf(".") >= 0 ) { // Namespaced trigger; create a regexp to match event type in handle() namespaces = type.split("."); type = namespaces.shift(); namespaces.sort(); } ontype = type.indexOf(":") < 0 && "on" + type; // Caller can pass in a jQuery.Event object, Object, or just an event type string event = event[ jQuery.expando ] ? event : new jQuery.Event( type, typeof event === "object" && event ); // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) event.isTrigger = onlyHandlers ? 2 : 3; event.namespace = namespaces.join("."); event.namespace_re = event.namespace ? new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : null; // Clean up the event in case it is being reused event.result = undefined; if ( !event.target ) { event.target = elem; } // Clone any incoming data and prepend the event, creating the handler arg list data = data == null ? [ event ] : jQuery.makeArray( data, [ event ] ); // Allow special events to draw outside the lines special = jQuery.event.special[ type ] || {}; if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { return; } // Determine event propagation path in advance, per W3C events spec (#9951) // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { bubbleType = special.delegateType || type; if ( !rfocusMorph.test( bubbleType + type ) ) { cur = cur.parentNode; } for ( ; cur; cur = cur.parentNode ) { eventPath.push( cur ); tmp = cur; } // Only add window if we got to document (e.g., not plain obj or detached DOM) if ( tmp === (elem.ownerDocument || document) ) { eventPath.push( tmp.defaultView || tmp.parentWindow || window ); } } // Fire handlers on the event path i = 0; while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { event.type = i > 1 ? bubbleType : special.bindType || type; // jQuery handler handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); if ( handle ) { handle.apply( cur, data ); } // Native handler handle = ontype && cur[ ontype ]; if ( handle && handle.apply && jQuery.acceptData( cur ) ) { event.result = handle.apply( cur, data ); if ( event.result === false ) { event.preventDefault(); } } } event.type = type; // If nobody prevented the default action, do it now if ( !onlyHandlers && !event.isDefaultPrevented() ) { if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && jQuery.acceptData( elem ) ) { // Call a native DOM method on the target with the same name name as the event. // Can't use an .isFunction() check here because IE6/7 fails that test. // Don't do default actions on window, that's where global variables be (#6170) if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { // Don't re-trigger an onFOO event when we call its FOO() method tmp = elem[ ontype ]; if ( tmp ) { elem[ ontype ] = null; } // Prevent re-triggering of the same event, since we already bubbled it above jQuery.event.triggered = type; try { elem[ type ](); } catch ( e ) { // IE<9 dies on focus/blur to hidden element (#1486,#12518) // only reproducible on winXP IE8 native, not IE9 in IE8 mode } jQuery.event.triggered = undefined; if ( tmp ) { elem[ ontype ] = tmp; } } } } return event.result; }, dispatch: function( event ) { // Make a writable jQuery.Event from the native event object event = jQuery.event.fix( event ); var i, ret, handleObj, matched, j, handlerQueue = [], args = slice.call( arguments ), handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], special = jQuery.event.special[ event.type ] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event args[0] = event; event.delegateTarget = this; // Call the preDispatch hook for the mapped type, and let it bail if desired if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { return; } // Determine handlers handlerQueue = jQuery.event.handlers.call( this, event, handlers ); // Run delegates first; they may want to stop propagation beneath us i = 0; while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { event.currentTarget = matched.elem; j = 0; while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { // Triggered event must either 1) have no namespace, or // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { event.handleObj = handleObj; event.data = handleObj.data; ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) .apply( matched.elem, args ); if ( ret !== undefined ) { if ( (event.result = ret) === false ) { event.preventDefault(); event.stopPropagation(); } } } } } // Call the postDispatch hook for the mapped type if ( special.postDispatch ) { special.postDispatch.call( this, event ); } return event.result; }, handlers: function( event, handlers ) { var sel, handleObj, matches, i, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target; // Find delegate handlers // Black-hole SVG instance trees (#13180) // Avoid non-left-click bubbling in Firefox (#3861) if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { /* jshint eqeqeq: false */ for ( ; cur != this; cur = cur.parentNode || this ) { /* jshint eqeqeq: true */ // Don't check non-elements (#13208) // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { matches = []; for ( i = 0; i < delegateCount; i++ ) { handleObj = handlers[ i ]; // Don't conflict with Object.prototype properties (#13203) sel = handleObj.selector + " "; if ( matches[ sel ] === undefined ) { matches[ sel ] = handleObj.needsContext ? jQuery( sel, this ).index( cur ) >= 0 : jQuery.find( sel, this, null, [ cur ] ).length; } if ( matches[ sel ] ) { matches.push( handleObj ); } } if ( matches.length ) { handlerQueue.push({ elem: cur, handlers: matches }); } } } } // Add the remaining (directly-bound) handlers if ( delegateCount < handlers.length ) { handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); } return handlerQueue; }, fix: function( event ) { if ( event[ jQuery.expando ] ) { return event; } // Create a writable copy of the event object and normalize some properties var i, prop, copy, type = event.type, originalEvent = event, fixHook = this.fixHooks[ type ]; if ( !fixHook ) { this.fixHooks[ type ] = fixHook = rmouseEvent.test( type ) ? this.mouseHooks : rkeyEvent.test( type ) ? this.keyHooks : {}; } copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; event = new jQuery.Event( originalEvent ); i = copy.length; while ( i-- ) { prop = copy[ i ]; event[ prop ] = originalEvent[ prop ]; } // Support: IE<9 // Fix target property (#1925) if ( !event.target ) { event.target = originalEvent.srcElement || document; } // Support: Chrome 23+, Safari? // Target should not be a text node (#504, #13143) if ( event.target.nodeType === 3 ) { event.target = event.target.parentNode; } // Support: IE<9 // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) event.metaKey = !!event.metaKey; return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; }, // Includes some event props shared by KeyEvent and MouseEvent props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), fixHooks: {}, keyHooks: { props: "char charCode key keyCode".split(" "), filter: function( event, original ) { // Add which for key events if ( event.which == null ) { event.which = original.charCode != null ? original.charCode : original.keyCode; } return event; } }, mouseHooks: { props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), filter: function( event, original ) { var body, eventDoc, doc, button = original.button, fromElement = original.fromElement; // Calculate pageX/Y if missing and clientX/Y available if ( event.pageX == null && original.clientX != null ) { eventDoc = event.target.ownerDocument || document; doc = eventDoc.documentElement; body = eventDoc.body; event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); } // Add relatedTarget, if necessary if ( !event.relatedTarget && fromElement ) { event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; } // Add which for click: 1 === left; 2 === middle; 3 === right // Note: button is not normalized, so don't use it if ( !event.which && button !== undefined ) { event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); } return event; } }, special: { load: { // Prevent triggered image.load events from bubbling to window.load noBubble: true }, focus: { // Fire native event if possible so blur/focus sequence is correct trigger: function() { if ( this !== safeActiveElement() && this.focus ) { try { this.focus(); return false; } catch ( e ) { // Support: IE<9 // If we error on focus to hidden element (#1486, #12518), // let .trigger() run the handlers } } }, delegateType: "focusin" }, blur: { trigger: function() { if ( this === safeActiveElement() && this.blur ) { this.blur(); return false; } }, delegateType: "focusout" }, click: { // For checkbox, fire native event so checked state will be right trigger: function() { if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { this.click(); return false; } }, // For cross-browser consistency, don't fire native .click() on links _default: function( event ) { return jQuery.nodeName( event.target, "a" ); } }, beforeunload: { postDispatch: function( event ) { // Even when returnValue equals to undefined Firefox will still show alert if ( event.result !== undefined ) { event.originalEvent.returnValue = event.result; } } } }, simulate: function( type, elem, event, bubble ) { // Piggyback on a donor event to simulate a different one. // Fake originalEvent to avoid donor's stopPropagation, but if the // simulated event prevents default then we do the same on the donor. var e = jQuery.extend( new jQuery.Event(), event, { type: type, isSimulated: true, originalEvent: {} } ); if ( bubble ) { jQuery.event.trigger( e, null, elem ); } else { jQuery.event.dispatch.call( elem, e ); } if ( e.isDefaultPrevented() ) { event.preventDefault(); } } }; jQuery.removeEvent = document.removeEventListener ? function( elem, type, handle ) { if ( elem.removeEventListener ) { elem.removeEventListener( type, handle, false ); } } : function( elem, type, handle ) { var name = "on" + type; if ( elem.detachEvent ) { // #8545, #7054, preventing memory leaks for custom events in IE6-8 // detachEvent needed property on element, by name of that event, to properly expose it to GC if ( typeof elem[ name ] === strundefined ) { elem[ name ] = null; } elem.detachEvent( name, handle ); } }; jQuery.Event = function( src, props ) { // Allow instantiation without the 'new' keyword if ( !(this instanceof jQuery.Event) ) { return new jQuery.Event( src, props ); } // Event object if ( src && src.type ) { this.originalEvent = src; this.type = src.type; // Events bubbling up the document may have been marked as prevented // by a handler lower down the tree; reflect the correct value. this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined && ( // Support: IE < 9 src.returnValue === false || // Support: Android < 4.0 src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; // Event type } else { this.type = src; } // Put explicitly provided properties onto the event object if ( props ) { jQuery.extend( this, props ); } // Create a timestamp if incoming event doesn't have one this.timeStamp = src && src.timeStamp || jQuery.now(); // Mark it as fixed this[ jQuery.expando ] = true; }; // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html jQuery.Event.prototype = { isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse, preventDefault: function() { var e = this.originalEvent; this.isDefaultPrevented = returnTrue; if ( !e ) { return; } // If preventDefault exists, run it on the original event if ( e.preventDefault ) { e.preventDefault(); // Support: IE // Otherwise set the returnValue property of the original event to false } else { e.returnValue = false; } }, stopPropagation: function() { var e = this.originalEvent; this.isPropagationStopped = returnTrue; if ( !e ) { return; } // If stopPropagation exists, run it on the original event if ( e.stopPropagation ) { e.stopPropagation(); } // Support: IE // Set the cancelBubble property of the original event to true e.cancelBubble = true; }, stopImmediatePropagation: function() { this.isImmediatePropagationStopped = returnTrue; this.stopPropagation(); } }; // Create mouseenter/leave events using mouseover/out and event-time checks jQuery.each({ mouseenter: "mouseover", mouseleave: "mouseout" }, function( orig, fix ) { jQuery.event.special[ orig ] = { delegateType: fix, bindType: fix, handle: function( event ) { var ret, target = this, related = event.relatedTarget, handleObj = event.handleObj; // For mousenter/leave call the handler if related is outside the target. // NB: No relatedTarget if the mouse left/entered the browser window if ( !related || (related !== target && !jQuery.contains( target, related )) ) { event.type = handleObj.origType; ret = handleObj.handler.apply( this, arguments ); event.type = fix; } return ret; } }; }); // IE submit delegation if ( !support.submitBubbles ) { jQuery.event.special.submit = { setup: function() { // Only need this for delegated form submit events if ( jQuery.nodeName( this, "form" ) ) { return false; } // Lazy-add a submit handler when a descendant form may potentially be submitted jQuery.event.add( this, "click._submit keypress._submit", function( e ) { // Node name check avoids a VML-related crash in IE (#9807) var elem = e.target, form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; if ( form && !jQuery._data( form, "submitBubbles" ) ) { jQuery.event.add( form, "submit._submit", function( event ) { event._submit_bubble = true; }); jQuery._data( form, "submitBubbles", true ); } }); // return undefined since we don't need an event listener }, postDispatch: function( event ) { // If form was submitted by the user, bubble the event up the tree if ( event._submit_bubble ) { delete event._submit_bubble; if ( this.parentNode && !event.isTrigger ) { jQuery.event.simulate( "submit", this.parentNode, event, true ); } } }, teardown: function() { // Only need this for delegated form submit events if ( jQuery.nodeName( this, "form" ) ) { return false; } // Remove delegated handlers; cleanData eventually reaps submit handlers attached above jQuery.event.remove( this, "._submit" ); } }; } // IE change delegation and checkbox/radio fix if ( !support.changeBubbles ) { jQuery.event.special.change = { setup: function() { if ( rformElems.test( this.nodeName ) ) { // IE doesn't fire change on a check/radio until blur; trigger it on click // after a propertychange. Eat the blur-change in special.change.handle. // This still fires onchange a second time for check/radio after blur. if ( this.type === "checkbox" || this.type === "radio" ) { jQuery.event.add( this, "propertychange._change", function( event ) { if ( event.originalEvent.propertyName === "checked" ) { this._just_changed = true; } }); jQuery.event.add( this, "click._change", function( event ) { if ( this._just_changed && !event.isTrigger ) { this._just_changed = false; } // Allow triggered, simulated change events (#11500) jQuery.event.simulate( "change", this, event, true ); }); } return false; } // Delegated event; lazy-add a change handler on descendant inputs jQuery.event.add( this, "beforeactivate._change", function( e ) { var elem = e.target; if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { jQuery.event.add( elem, "change._change", function( event ) { if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { jQuery.event.simulate( "change", this.parentNode, event, true ); } }); jQuery._data( elem, "changeBubbles", true ); } }); }, handle: function( event ) { var elem = event.target; // Swallow native change events from checkbox/radio, we already triggered them above if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { return event.handleObj.handler.apply( this, arguments ); } }, teardown: function() { jQuery.event.remove( this, "._change" ); return !rformElems.test( this.nodeName ); } }; } // Create "bubbling" focus and blur events if ( !support.focusinBubbles ) { jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { // Attach a single capturing handler on the document while someone wants focusin/focusout var handler = function( event ) { jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); }; jQuery.event.special[ fix ] = { setup: function() { var doc = this.ownerDocument || this, attaches = jQuery._data( doc, fix ); if ( !attaches ) { doc.addEventListener( orig, handler, true ); } jQuery._data( doc, fix, ( attaches || 0 ) + 1 ); }, teardown: function() { var doc = this.ownerDocument || this, attaches = jQuery._data( doc, fix ) - 1; if ( !attaches ) { doc.removeEventListener( orig, handler, true ); jQuery._removeData( doc, fix ); } else { jQuery._data( doc, fix, attaches ); } } }; }); } jQuery.fn.extend({ on: function( types, selector, data, fn, /*INTERNAL*/ one ) { var type, origFn; // Types can be a map of types/handlers if ( typeof types === "object" ) { // ( types-Object, selector, data ) if ( typeof selector !== "string" ) { // ( types-Object, data ) data = data || selector; selector = undefined; } for ( type in types ) { this.on( type, selector, data, types[ type ], one ); } return this; } if ( data == null && fn == null ) { // ( types, fn ) fn = selector; data = selector = undefined; } else if ( fn == null ) { if ( typeof selector === "string" ) { // ( types, selector, fn ) fn = data; data = undefined; } else { // ( types, data, fn ) fn = data; data = selector; selector = undefined; } } if ( fn === false ) { fn = returnFalse; } else if ( !fn ) { return this; } if ( one === 1 ) { origFn = fn; fn = function( event ) { // Can use an empty set, since event contains the info jQuery().off( event ); return origFn.apply( this, arguments ); }; // Use same guid so caller can remove using origFn fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); } return this.each( function() { jQuery.event.add( this, types, fn, data, selector ); }); }, one: function( types, selector, data, fn ) { return this.on( types, selector, data, fn, 1 ); }, off: function( types, selector, fn ) { var handleObj, type; if ( types && types.preventDefault && types.handleObj ) { // ( event ) dispatched jQuery.Event handleObj = types.handleObj; jQuery( types.delegateTarget ).off( handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler ); return this; } if ( typeof types === "object" ) { // ( types-object [, selector] ) for ( type in types ) { this.off( type, selector, types[ type ] ); } return this; } if ( selector === false || typeof selector === "function" ) { // ( types [, fn] ) fn = selector; selector = undefined; } if ( fn === false ) { fn = returnFalse; } return this.each(function() { jQuery.event.remove( this, types, fn, selector ); }); }, trigger: function( type, data ) { return this.each(function() { jQuery.event.trigger( type, data, this ); }); }, triggerHandler: function( type, data ) { var elem = this[0]; if ( elem ) { return jQuery.event.trigger( type, data, elem, true ); } } }); function createSafeFragment( document ) { var list = nodeNames.split( "|" ), safeFrag = document.createDocumentFragment(); if ( safeFrag.createElement ) { while ( list.length ) { safeFrag.createElement( list.pop() ); } } return safeFrag; } var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), rleadingWhitespace = /^\s+/, rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, rtagName = /<([\w:]+)/, rtbody = /\s*$/g, // We have to close these tags to support XHTML (#13200) wrapMap = { option: [ 1, "" ], legend: [ 1, "
", "
" ], area: [ 1, "", "" ], param: [ 1, "", "" ], thead: [ 1, "", "
" ], tr: [ 2, "", "
" ], col: [ 2, "", "
" ], td: [ 3, "", "
" ], // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, // unless wrapped in a div with non-breaking characters in front of it. _default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
", "
" ] }, safeFragment = createSafeFragment( document ), fragmentDiv = safeFragment.appendChild( document.createElement("div") ); wrapMap.optgroup = wrapMap.option; wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; function getAll( context, tag ) { var elems, elem, i = 0, found = typeof context.getElementsByTagName !== strundefined ? context.getElementsByTagName( tag || "*" ) : typeof context.querySelectorAll !== strundefined ? context.querySelectorAll( tag || "*" ) : undefined; if ( !found ) { for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { if ( !tag || jQuery.nodeName( elem, tag ) ) { found.push( elem ); } else { jQuery.merge( found, getAll( elem, tag ) ); } } } return tag === undefined || tag && jQuery.nodeName( context, tag ) ? jQuery.merge( [ context ], found ) : found; } // Used in buildFragment, fixes the defaultChecked property function fixDefaultChecked( elem ) { if ( rcheckableType.test( elem.type ) ) { elem.defaultChecked = elem.checked; } } // Support: IE<8 // Manipulating tables requires a tbody function manipulationTarget( elem, content ) { return jQuery.nodeName( elem, "table" ) && jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? elem.getElementsByTagName("tbody")[0] || elem.appendChild( elem.ownerDocument.createElement("tbody") ) : elem; } // Replace/restore the type attribute of script elements for safe DOM manipulation function disableScript( elem ) { elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type; return elem; } function restoreScript( elem ) { var match = rscriptTypeMasked.exec( elem.type ); if ( match ) { elem.type = match[1]; } else { elem.removeAttribute("type"); } return elem; } // Mark scripts as having already been evaluated function setGlobalEval( elems, refElements ) { var elem, i = 0; for ( ; (elem = elems[i]) != null; i++ ) { jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); } } function cloneCopyEvent( src, dest ) { if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { return; } var type, i, l, oldData = jQuery._data( src ), curData = jQuery._data( dest, oldData ), events = oldData.events; if ( events ) { delete curData.handle; curData.events = {}; for ( type in events ) { for ( i = 0, l = events[ type ].length; i < l; i++ ) { jQuery.event.add( dest, type, events[ type ][ i ] ); } } } // make the cloned public data object a copy from the original if ( curData.data ) { curData.data = jQuery.extend( {}, curData.data ); } } function fixCloneNodeIssues( src, dest ) { var nodeName, e, data; // We do not need to do anything for non-Elements if ( dest.nodeType !== 1 ) { return; } nodeName = dest.nodeName.toLowerCase(); // IE6-8 copies events bound via attachEvent when using cloneNode. if ( !support.noCloneEvent && dest[ jQuery.expando ] ) { data = jQuery._data( dest ); for ( e in data.events ) { jQuery.removeEvent( dest, e, data.handle ); } // Event data gets referenced instead of copied if the expando gets copied too dest.removeAttribute( jQuery.expando ); } // IE blanks contents when cloning scripts, and tries to evaluate newly-set text if ( nodeName === "script" && dest.text !== src.text ) { disableScript( dest ).text = src.text; restoreScript( dest ); // IE6-10 improperly clones children of object elements using classid. // IE10 throws NoModificationAllowedError if parent is null, #12132. } else if ( nodeName === "object" ) { if ( dest.parentNode ) { dest.outerHTML = src.outerHTML; } // This path appears unavoidable for IE9. When cloning an object // element in IE9, the outerHTML strategy above is not sufficient. // If the src has innerHTML and the destination does not, // copy the src.innerHTML into the dest.innerHTML. #10324 if ( support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { dest.innerHTML = src.innerHTML; } } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { // IE6-8 fails to persist the checked state of a cloned checkbox // or radio button. Worse, IE6-7 fail to give the cloned element // a checked appearance if the defaultChecked value isn't also set dest.defaultChecked = dest.checked = src.checked; // IE6-7 get confused and end up setting the value of a cloned // checkbox/radio button to an empty string instead of "on" if ( dest.value !== src.value ) { dest.value = src.value; } // IE6-8 fails to return the selected option to the default selected // state when cloning options } else if ( nodeName === "option" ) { dest.defaultSelected = dest.selected = src.defaultSelected; // IE6-8 fails to set the defaultValue to the correct value when // cloning other types of input fields } else if ( nodeName === "input" || nodeName === "textarea" ) { dest.defaultValue = src.defaultValue; } } jQuery.extend({ clone: function( elem, dataAndEvents, deepDataAndEvents ) { var destElements, node, clone, i, srcElements, inPage = jQuery.contains( elem.ownerDocument, elem ); if ( support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { clone = elem.cloneNode( true ); // IE<=8 does not properly clone detached, unknown element nodes } else { fragmentDiv.innerHTML = elem.outerHTML; fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); } if ( (!support.noCloneEvent || !support.noCloneChecked) && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 destElements = getAll( clone ); srcElements = getAll( elem ); // Fix all IE cloning issues for ( i = 0; (node = srcElements[i]) != null; ++i ) { // Ensure that the destination node is not null; Fixes #9587 if ( destElements[i] ) { fixCloneNodeIssues( node, destElements[i] ); } } } // Copy the events from the original to the clone if ( dataAndEvents ) { if ( deepDataAndEvents ) { srcElements = srcElements || getAll( elem ); destElements = destElements || getAll( clone ); for ( i = 0; (node = srcElements[i]) != null; i++ ) { cloneCopyEvent( node, destElements[i] ); } } else { cloneCopyEvent( elem, clone ); } } // Preserve script evaluation history destElements = getAll( clone, "script" ); if ( destElements.length > 0 ) { setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); } destElements = srcElements = node = null; // Return the cloned set return clone; }, buildFragment: function( elems, context, scripts, selection ) { var j, elem, contains, tmp, tag, tbody, wrap, l = elems.length, // Ensure a safe fragment safe = createSafeFragment( context ), nodes = [], i = 0; for ( ; i < l; i++ ) { elem = elems[ i ]; if ( elem || elem === 0 ) { // Add nodes directly if ( jQuery.type( elem ) === "object" ) { jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); // Convert non-html into a text node } else if ( !rhtml.test( elem ) ) { nodes.push( context.createTextNode( elem ) ); // Convert html into DOM nodes } else { tmp = tmp || safe.appendChild( context.createElement("div") ); // Deserialize a standard representation tag = (rtagName.exec( elem ) || [ "", "" ])[ 1 ].toLowerCase(); wrap = wrapMap[ tag ] || wrapMap._default; tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[2]; // Descend through wrappers to the right content j = wrap[0]; while ( j-- ) { tmp = tmp.lastChild; } // Manually add leading whitespace removed by IE if ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); } // Remove IE's autoinserted from table fragments if ( !support.tbody ) { // String was a , *may* have spurious elem = tag === "table" && !rtbody.test( elem ) ? tmp.firstChild : // String was a bare or wrap[1] === "
" && !rtbody.test( elem ) ? tmp : 0; j = elem && elem.childNodes.length; while ( j-- ) { if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { elem.removeChild( tbody ); } } } jQuery.merge( nodes, tmp.childNodes ); // Fix #12392 for WebKit and IE > 9 tmp.textContent = ""; // Fix #12392 for oldIE while ( tmp.firstChild ) { tmp.removeChild( tmp.firstChild ); } // Remember the top-level container for proper cleanup tmp = safe.lastChild; } } } // Fix #11356: Clear elements from fragment if ( tmp ) { safe.removeChild( tmp ); } // Reset defaultChecked for any radios and checkboxes // about to be appended to the DOM in IE 6/7 (#8060) if ( !support.appendChecked ) { jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); } i = 0; while ( (elem = nodes[ i++ ]) ) { // #4087 - If origin and destination elements are the same, and this is // that element, do not do anything if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { continue; } contains = jQuery.contains( elem.ownerDocument, elem ); // Append to fragment tmp = getAll( safe.appendChild( elem ), "script" ); // Preserve script evaluation history if ( contains ) { setGlobalEval( tmp ); } // Capture executables if ( scripts ) { j = 0; while ( (elem = tmp[ j++ ]) ) { if ( rscriptType.test( elem.type || "" ) ) { scripts.push( elem ); } } } } tmp = null; return safe; }, cleanData: function( elems, /* internal */ acceptData ) { var elem, type, id, data, i = 0, internalKey = jQuery.expando, cache = jQuery.cache, deleteExpando = support.deleteExpando, special = jQuery.event.special; for ( ; (elem = elems[i]) != null; i++ ) { if ( acceptData || jQuery.acceptData( elem ) ) { id = elem[ internalKey ]; data = id && cache[ id ]; if ( data ) { if ( data.events ) { for ( type in data.events ) { if ( special[ type ] ) { jQuery.event.remove( elem, type ); // This is a shortcut to avoid jQuery.event.remove's overhead } else { jQuery.removeEvent( elem, type, data.handle ); } } } // Remove cache only if it was not already removed by jQuery.event.remove if ( cache[ id ] ) { delete cache[ id ]; // IE does not allow us to delete expando properties from nodes, // nor does it have a removeAttribute function on Document nodes; // we must handle all of these cases if ( deleteExpando ) { delete elem[ internalKey ]; } else if ( typeof elem.removeAttribute !== strundefined ) { elem.removeAttribute( internalKey ); } else { elem[ internalKey ] = null; } deletedIds.push( id ); } } } } } }); jQuery.fn.extend({ text: function( value ) { return access( this, function( value ) { return value === undefined ? jQuery.text( this ) : this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); }, null, value, arguments.length ); }, append: function() { return this.domManip( arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.appendChild( elem ); } }); }, prepend: function() { return this.domManip( arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.insertBefore( elem, target.firstChild ); } }); }, before: function() { return this.domManip( arguments, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this ); } }); }, after: function() { return this.domManip( arguments, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this.nextSibling ); } }); }, remove: function( selector, keepData /* Internal Use Only */ ) { var elem, elems = selector ? jQuery.filter( selector, this ) : this, i = 0; for ( ; (elem = elems[i]) != null; i++ ) { if ( !keepData && elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem ) ); } if ( elem.parentNode ) { if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { setGlobalEval( getAll( elem, "script" ) ); } elem.parentNode.removeChild( elem ); } } return this; }, empty: function() { var elem, i = 0; for ( ; (elem = this[i]) != null; i++ ) { // Remove element nodes and prevent memory leaks if ( elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem, false ) ); } // Remove any remaining nodes while ( elem.firstChild ) { elem.removeChild( elem.firstChild ); } // If this is a select, ensure that it displays empty (#12336) // Support: IE<9 if ( elem.options && jQuery.nodeName( elem, "select" ) ) { elem.options.length = 0; } } return this; }, clone: function( dataAndEvents, deepDataAndEvents ) { dataAndEvents = dataAndEvents == null ? false : dataAndEvents; deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; return this.map(function() { return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); }); }, html: function( value ) { return access( this, function( value ) { var elem = this[ 0 ] || {}, i = 0, l = this.length; if ( value === undefined ) { return elem.nodeType === 1 ? elem.innerHTML.replace( rinlinejQuery, "" ) : undefined; } // See if we can take a shortcut and just use innerHTML if ( typeof value === "string" && !rnoInnerhtml.test( value ) && ( support.htmlSerialize || !rnoshimcache.test( value ) ) && ( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && !wrapMap[ (rtagName.exec( value ) || [ "", "" ])[ 1 ].toLowerCase() ] ) { value = value.replace( rxhtmlTag, "<$1>" ); try { for (; i < l; i++ ) { // Remove element nodes and prevent memory leaks elem = this[i] || {}; if ( elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem, false ) ); elem.innerHTML = value; } } elem = 0; // If using innerHTML throws an exception, use the fallback method } catch(e) {} } if ( elem ) { this.empty().append( value ); } }, null, value, arguments.length ); }, replaceWith: function() { var arg = arguments[ 0 ]; // Make the changes, replacing each context element with the new content this.domManip( arguments, function( elem ) { arg = this.parentNode; jQuery.cleanData( getAll( this ) ); if ( arg ) { arg.replaceChild( elem, this ); } }); // Force removal if there was no new content (e.g., from empty arguments) return arg && (arg.length || arg.nodeType) ? this : this.remove(); }, detach: function( selector ) { return this.remove( selector, true ); }, domManip: function( args, callback ) { // Flatten any nested arrays args = concat.apply( [], args ); var first, node, hasScripts, scripts, doc, fragment, i = 0, l = this.length, set = this, iNoClone = l - 1, value = args[0], isFunction = jQuery.isFunction( value ); // We can't cloneNode fragments that contain checked, in WebKit if ( isFunction || ( l > 1 && typeof value === "string" && !support.checkClone && rchecked.test( value ) ) ) { return this.each(function( index ) { var self = set.eq( index ); if ( isFunction ) { args[0] = value.call( this, index, self.html() ); } self.domManip( args, callback ); }); } if ( l ) { fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); first = fragment.firstChild; if ( fragment.childNodes.length === 1 ) { fragment = first; } if ( first ) { scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); hasScripts = scripts.length; // Use the original fragment for the last item instead of the first because it can end up // being emptied incorrectly in certain situations (#8070). for ( ; i < l; i++ ) { node = fragment; if ( i !== iNoClone ) { node = jQuery.clone( node, true, true ); // Keep references to cloned scripts for later restoration if ( hasScripts ) { jQuery.merge( scripts, getAll( node, "script" ) ); } } callback.call( this[i], node, i ); } if ( hasScripts ) { doc = scripts[ scripts.length - 1 ].ownerDocument; // Reenable scripts jQuery.map( scripts, restoreScript ); // Evaluate executable scripts on first document insertion for ( i = 0; i < hasScripts; i++ ) { node = scripts[ i ]; if ( rscriptType.test( node.type || "" ) && !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { if ( node.src ) { // Optional AJAX dependency, but won't run scripts if not present if ( jQuery._evalUrl ) { jQuery._evalUrl( node.src ); } } else { jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); } } } } // Fix #11809: Avoid leaking memory fragment = first = null; } } return this; } }); jQuery.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function( name, original ) { jQuery.fn[ name ] = function( selector ) { var elems, i = 0, ret = [], insert = jQuery( selector ), last = insert.length - 1; for ( ; i <= last; i++ ) { elems = i === last ? this : this.clone(true); jQuery( insert[i] )[ original ]( elems ); // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() push.apply( ret, elems.get() ); } return this.pushStack( ret ); }; }); var iframe, elemdisplay = {}; /** * Retrieve the actual display of a element * @param {String} name nodeName of the element * @param {Object} doc Document object */ // Called only from within defaultDisplay function actualDisplay( name, doc ) { var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), // getDefaultComputedStyle might be reliably used only on attached element display = window.getDefaultComputedStyle ? // Use of this method is a temporary fix (more like optmization) until something better comes along, // since it was removed from specification and supported only in FF window.getDefaultComputedStyle( elem[ 0 ] ).display : jQuery.css( elem[ 0 ], "display" ); // We don't have any data stored on the element, // so use "detach" method as fast way to get rid of the element elem.detach(); return display; } /** * Try to determine the default display value of an element * @param {String} nodeName */ function defaultDisplay( nodeName ) { var doc = document, display = elemdisplay[ nodeName ]; if ( !display ) { display = actualDisplay( nodeName, doc ); // If the simple way fails, read from inside an iframe if ( display === "none" || !display ) { // Use the already-created iframe if possible iframe = (iframe || jQuery( "");}};_e7.setInitialState=function(args){_ed=_fa(_eb,args,_ec);};_e7.addToHistory=function(args){_f1=[];var hash=null;var url=null;if(!_f0){if(_e1.config["useXDomain"]&&!_e1.config["dojoIframeHistoryUrl"]){console.warn("dojo.back: When using cross-domain Dojo builds,"+" please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl"+" to the path on your domain to iframe_history.html");}_f0=window.frames["dj_history"];}if(!_ef){_ef=_e4.create("a",{style:{display:"none"}},_e5.body());}if(args["changeUrl"]){hash=""+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime());if(_f2.length==0&&_ed.urlHash==hash){_ed=_fa(url,args,hash);return;}else{if(_f2.length>0&&_f2[_f2.length-1].urlHash==hash){_f2[_f2.length-1]=_fa(url,args,hash);return;}}_f4=true;setTimeout(function(){_e9(hash);_f4=false;},1);_ef.href=hash;if(_e3("ie")){url=_ff();var _101=args["back"]||args["backButton"]||args["handle"];var tcb=function(_102){if(_e8()!=""){setTimeout(function(){_e9(hash);},1);}_101.apply(this,[_102]);};if(args["back"]){args.back=tcb;}else{if(args["backButton"]){args.backButton=tcb;}else{if(args["handle"]){args.handle=tcb;}}}var _103=args["forward"]||args["forwardButton"]||args["handle"];var tfw=function(_104){if(_e8()!=""){_e9(hash);}if(_103){_103.apply(this,[_104]);}};if(args["forward"]){args.forward=tfw;}else{if(args["forwardButton"]){args.forwardButton=tfw;}else{if(args["handle"]){args.handle=tfw;}}}}else{if(!_e3("ie")){if(!_ee){_ee=setInterval(_100,200);}}}}else{url=_ff();}_f2.push(_fa(url,args,hash));};_e7._iframeLoaded=function(evt,_105){var _106=_fd(_105.href);if(_106==null){if(_f2.length==1){_f5();}return;}if(_f3){_f3=false;return;}if(_f2.length>=2&&_106==_fd(_f2[_f2.length-2].url)){_f5();}else{if(_f1.length>0&&_106==_fd(_f1[_f1.length-1].url)){_f8();}}};return _e1.back;});},"dojo/text":function(){define("dojo/text",["./_base/kernel","require","./has","./_base/xhr"],function(dojo,_107,has,xhr){var _108;if(1){_108=function(url,sync,load){xhr("GET",{url:url,sync:!!sync,load:load});};}else{if(_107.getText){_108=_107.getText;}else{console.error("dojo/text plugin failed to load because loader does not support getText");}}var _109={},_10a=function(text){if(text){text=text.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var _10b=text.match(/]*>\s*([\s\S]+)\s*<\/body>/im);if(_10b){text=_10b[1];}}else{text="";}return text;},_10c={},_10d={},_10e={dynamic:true,normalize:function(id,_10f){var _110=id.split("!"),url=_110[0];return (/^\./.test(url)?_10f(url):url)+(_110[1]?"!"+_110[1]:"");},load:function(id,_111,load){var _112=id.split("!"),_113=_112.length>1,_114=_112[0],url=_111.toUrl(_112[0]),text=_10c,_115=function(text){load(_113?_10a(text):text);};if(_114 in _109){text=_109[_114];}else{if(url in _111.cache){text=_111.cache[url];}else{if(url in _109){text=_109[url];}}}if(text===_10c){if(_10d[url]){_10d[url].push(_115);}else{var _116=_10d[url]=[_115];_108(url,!_111.async,function(text){_109[_114]=_109[url]=text;for(var i=0;i<_116.length;){_116[i++](text);}delete _10d[url];});}}else{_115(text);}}};dojo.cache=function(_117,url,_118){var key;if(typeof _117=="string"){if(/\//.test(_117)){key=_117;_118=url;}else{key=_107.toUrl(_117.replace(/\./g,"/")+(url?("/"+url):""));}}else{key=_117+"";_118=url;}var val=(_118!=undefined&&typeof _118!="string")?_118.value:_118,_119=_118&&_118.sanitize;if(typeof val=="string"){_109[key]=val;return _119?_10a(val):val;}else{if(val===null){delete _109[key];return null;}else{if(!(key in _109)){_108(key,true,function(text){_109[key]=text;});}return _119?_10a(_109[key]):_109[key];}}};return _10e;});},"dojo/DeferredList":function(){define("dojo/DeferredList",["./_base/kernel","./_base/Deferred","./_base/array"],function(dojo,_11a,_11b){dojo.DeferredList=function(list,_11c,_11d,_11e,_11f){var _120=[];_11a.call(this);var self=this;if(list.length===0&&!_11c){this.resolve([0,[]]);}var _121=0;_11b.forEach(list,function(item,i){item.then(function(_122){if(_11c){self.resolve([i,_122]);}else{_123(true,_122);}},function(_124){if(_11d){self.reject(_124);}else{_123(false,_124);}if(_11e){return null;}throw _124;});function _123(_125,_126){_120[i]=[_125,_126];_121++;if(_121===list.length){self.resolve(_120);}};});};dojo.DeferredList.prototype=new _11a();dojo.DeferredList.prototype.gatherResults=function(_127){var d=new dojo.DeferredList(_127,false,true,false);d.addCallback(function(_128){var ret=[];_11b.forEach(_128,function(_129){ret.push(_129[1]);});return ret;});return d;};return dojo.DeferredList;});},"dojo/cookie":function(){define("dojo/cookie",["./_base/kernel","./regexp"],function(dojo,_12a){dojo.cookie=function(name,_12b,_12c){var c=document.cookie,ret;if(arguments.length==1){var _12d=c.match(new RegExp("(?:^|; )"+_12a.escapeString(name)+"=([^;]*)"));ret=_12d?decodeURIComponent(_12d[1]):undefined;}else{_12c=_12c||{};var exp=_12c.expires;if(typeof exp=="number"){var d=new Date();d.setTime(d.getTime()+exp*24*60*60*1000);exp=_12c.expires=d;}if(exp&&exp.toUTCString){_12c.expires=exp.toUTCString();}_12b=encodeURIComponent(_12b);var _12e=name+"="+_12b,_12f;for(_12f in _12c){_12e+="; "+_12f;var _130=_12c[_12f];if(_130!==true){_12e+="="+_130;}}document.cookie=_12e;}return ret;};dojo.cookie.isSupported=function(){if(!("cookieEnabled" in navigator)){this("__djCookieTest__","CookiesAllowed");navigator.cookieEnabled=this("__djCookieTest__")=="CookiesAllowed";if(navigator.cookieEnabled){this("__djCookieTest__","",{expires:-1});}}return navigator.cookieEnabled;};return dojo.cookie;});},"dojo/regexp":function(){define("dojo/regexp",["./_base/kernel","./_base/lang"],function(dojo,lang){lang.getObject("regexp",true,dojo);dojo.regexp.escapeString=function(str,_131){return str.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(ch){if(_131&&_131.indexOf(ch)!=-1){return ch;}return "\\"+ch;});};dojo.regexp.buildGroupRE=function(arr,re,_132){if(!(arr instanceof Array)){return re(arr);}var b=[];for(var i=0;i= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ /* This is an optimized version of Dojo, built for deployment and not for development. To get sources and documentation, please visit: http://dojotoolkit.org */ //>>built require({cache:{"dijit/hccss":function(){define("dijit/hccss",["require","dojo/_base/config","dojo/dom-class","dojo/dom-construct","dojo/dom-style","dojo/ready","dojo/_base/sniff","dojo/_base/window"],function(_1,_2,_3,_4,_5,_6,_7,_8){if(_7("ie")||_7("mozilla")){_6(90,function(){var _9=_4.create("div",{id:"a11yTestNode",style:{cssText:"border: 1px solid;"+"border-color:red green;"+"position: absolute;"+"height: 5px;"+"top: -999px;"+"background-image: url(\""+(_2.blankGif||_1.toUrl("dojo/resources/blank.gif"))+"\");"}},_8.body());var cs=_5.getComputedStyle(_9);if(cs){var _a=cs.backgroundImage;var _b=(cs.borderTopColor==cs.borderRightColor)||(_a!=null&&(_a=="none"||_a=="url(invalid-url:)"));if(_b){_3.add(_8.body(),"dijit_a11y");}if(_7("ie")){_9.outerHTML="";}else{_8.body().removeChild(_9);}}});}});},"dijit/_Contained":function(){define("dijit/_Contained",["dojo/_base/declare","./registry"],function(_c,_d){return _c("dijit._Contained",null,{_getSibling:function(_e){var _f=this.domNode;do{_f=_f[_e+"Sibling"];}while(_f&&_f.nodeType!=1);return _f&&_d.byNode(_f);},getPreviousSibling:function(){return this._getSibling("previous");},getNextSibling:function(){return this._getSibling("next");},getIndexInParent:function(){var p=this.getParent();if(!p||!p.getIndexOfChild){return -1;}return p.getIndexOfChild(this);}});});},"dijit/Viewport":function(){define("dijit/Viewport",["dojo/Evented","dojo/on","dojo/ready","dojo/_base/sniff","dojo/_base/window","dojo/window"],function(_10,on,_11,has,win,_12){var _13=new _10();var _14;_11(200,function(){var _15=_12.getBox();_13._rlh=on(win.global,"resize",function(){var _16=_12.getBox();if(_15.h==_16.h&&_15.w==_16.w){return;}_15=_16;_13.emit("resize");});if(has("ie")==8){var _17=screen.deviceXDPI;setInterval(function(){if(screen.deviceXDPI!=_17){_17=screen.deviceXDPI;_13.emit("resize");}},500);}if(has("ios")){on(document,"focusin",function(evt){_14=evt.target;});on(document,"focusout",function(evt){_14=null;});}});_13.getEffectiveBox=function(doc){var box=_12.getBox(doc);var tag=_14&&_14.tagName&&_14.tagName.toLowerCase();if(has("ios")&&_14&&!_14.readOnly&&(tag=="textarea"||(tag=="input"&&/^(color|email|number|password|search|tel|text|url)$/.test(_14.type)))){box.h*=(orientation==0||orientation==180?0.66:0.4);var _18=_14.getBoundingClientRect();box.h=Math.max(box.h,_18.top+_18.height);}return box;};return _13;});},"dijit/_Container":function(){define("dijit/_Container",["dojo/_base/array","dojo/_base/declare","dojo/dom-construct","./registry"],function(_19,_1a,_1b,_1c){return _1a("dijit._Container",null,{buildRendering:function(){this.inherited(arguments);if(!this.containerNode){this.containerNode=this.domNode;}},addChild:function(_1d,_1e){var _1f=this.containerNode;if(_1e&&typeof _1e=="number"){var _20=this.getChildren();if(_20&&_20.length>=_1e){_1f=_20[_1e-1].domNode;_1e="after";}}_1b.place(_1d.domNode,_1f,_1e);if(this._started&&!_1d._started){_1d.startup();}},removeChild:function(_21){if(typeof _21=="number"){_21=this.getChildren()[_21];}if(_21){var _22=_21.domNode;if(_22&&_22.parentNode){_22.parentNode.removeChild(_22);}}},hasChildren:function(){return this.getChildren().length>0;},_getSiblingOfChild:function(_23,dir){var _24=_23.domNode,_25=(dir>0?"nextSibling":"previousSibling");do{_24=_24[_25];}while(_24&&(_24.nodeType!=1||!_1c.byNode(_24)));return _24&&_1c.byNode(_24);},getIndexOfChild:function(_26){return _19.indexOf(this.getChildren(),_26);}});});},"dijit/_base/scroll":function(){define("dijit/_base/scroll",["dojo/window",".."],function(_27,_28){_28.scrollIntoView=function(_29,pos){_27.scrollIntoView(_29,pos);};});},"dijit/layout/_LayoutWidget":function(){define("dijit/layout/_LayoutWidget",["dojo/_base/lang","../_Widget","../_Container","../_Contained","dojo/_base/declare","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dojo/_base/sniff","dojo/_base/window"],function(_2a,_2b,_2c,_2d,_2e,_2f,_30,_31,has,win){return _2e("dijit.layout._LayoutWidget",[_2b,_2c,_2d],{baseClass:"dijitLayoutContainer",isLayoutContainer:true,buildRendering:function(){this.inherited(arguments);_2f.add(this.domNode,"dijitContainer");},startup:function(){if(this._started){return;}this.inherited(arguments);var _32=this.getParent&&this.getParent();if(!(_32&&_32.isLayoutContainer)){this.resize();this.connect(win.global,"onresize",function(){this.resize();});}},resize:function(_33,_34){var _35=this.domNode;if(_33){_30.setMarginBox(_35,_33);}var mb=_34||{};_2a.mixin(mb,_33||{});if(!("h" in mb)||!("w" in mb)){mb=_2a.mixin(_30.getMarginBox(_35),mb);}var cs=_31.getComputedStyle(_35);var me=_30.getMarginExtents(_35,cs);var be=_30.getBorderExtents(_35,cs);var bb=(this._borderBox={w:mb.w-(me.w+be.w),h:mb.h-(me.h+be.h)});var pe=_30.getPadExtents(_35,cs);this._contentBox={l:_31.toPixelValue(_35,cs.paddingLeft),t:_31.toPixelValue(_35,cs.paddingTop),w:bb.w-pe.w,h:bb.h-pe.h};this.layout();},layout:function(){},_setupChild:function(_36){var cls=this.baseClass+"-child "+(_36.baseClass?this.baseClass+"-"+_36.baseClass:"");_2f.add(_36.domNode,cls);},addChild:function(_37,_38){this.inherited(arguments);if(this._started){this._setupChild(_37);}},removeChild:function(_39){var cls=this.baseClass+"-child"+(_39.baseClass?" "+this.baseClass+"-"+_39.baseClass:"");_2f.remove(_39.domNode,cls);this.inherited(arguments);}});});},"dijit/_base":function(){define("dijit/_base",[".","./a11y","./WidgetSet","./_base/focus","./_base/manager","./_base/place","./_base/popup","./_base/scroll","./_base/sniff","./_base/typematic","./_base/wai","./_base/window"],function(_3a){return _3a._base;});},"dijit/form/_FormWidgetMixin":function(){define("dijit/form/_FormWidgetMixin",["dojo/_base/array","dojo/_base/declare","dojo/dom-attr","dojo/dom-style","dojo/_base/lang","dojo/mouse","dojo/_base/sniff","dojo/_base/window","dojo/window","../a11y"],function(_3b,_3c,_3d,_3e,_3f,_40,has,win,_41,_42){return _3c("dijit.form._FormWidgetMixin",null,{name:"",alt:"",value:"",type:"text",tabIndex:"0",_setTabIndexAttr:"focusNode",disabled:false,intermediateChanges:false,scrollOnFocus:true,_setIdAttr:"focusNode",_setDisabledAttr:function(_43){this._set("disabled",_43);_3d.set(this.focusNode,"disabled",_43);if(this.valueNode){_3d.set(this.valueNode,"disabled",_43);}this.focusNode.setAttribute("aria-disabled",_43?"true":"false");if(_43){this._set("hovering",false);this._set("active",false);var _44="tabIndex" in this.attributeMap?this.attributeMap.tabIndex:("_setTabIndexAttr" in this)?this._setTabIndexAttr:"focusNode";_3b.forEach(_3f.isArray(_44)?_44:[_44],function(_45){var _46=this[_45];if(has("webkit")||_42.hasDefaultTabStop(_46)){_46.setAttribute("tabIndex","-1");}else{_46.removeAttribute("tabIndex");}},this);}else{if(this.tabIndex!=""){this.set("tabIndex",this.tabIndex);}}},_onFocus:function(by){if(by=="mouse"&&this.isFocusable()){var _47=this.connect(this.focusNode,"onfocus",function(){this.disconnect(_48);this.disconnect(_47);});var _48=this.connect(win.body(),"onmouseup",function(){this.disconnect(_48);this.disconnect(_47);if(this.focused){this.focus();}});}if(this.scrollOnFocus){this.defer(function(){_41.scrollIntoView(this.domNode);});}this.inherited(arguments);},isFocusable:function(){return !this.disabled&&this.focusNode&&(_3e.get(this.domNode,"display")!="none");},focus:function(){if(!this.disabled&&this.focusNode.focus){try{this.focusNode.focus();}catch(e){}}},compare:function(_49,_4a){if(typeof _49=="number"&&typeof _4a=="number"){return (isNaN(_49)&&isNaN(_4a))?0:_49-_4a;}else{if(_49>_4a){return 1;}else{if(_49<_4a){return -1;}else{return 0;}}}},onChange:function(){},_onChangeActive:false,_handleOnChange:function(_4b,_4c){if(this._lastValueReported==undefined&&(_4c===null||!this._onChangeActive)){this._resetValue=this._lastValueReported=_4b;}this._pendingOnChange=this._pendingOnChange||(typeof _4b!=typeof this._lastValueReported)||(this.compare(_4b,this._lastValueReported)!=0);if((this.intermediateChanges||_4c||_4c===undefined)&&this._pendingOnChange){this._lastValueReported=_4b;this._pendingOnChange=false;if(this._onChangeActive){if(this._onChangeHandle){this._onChangeHandle.remove();}this._onChangeHandle=this.defer(function(){this._onChangeHandle=null;this.onChange(_4b);});}}},create:function(){this.inherited(arguments);this._onChangeActive=true;},destroy:function(){if(this._onChangeHandle){this._onChangeHandle.remove();this.onChange(this._lastValueReported);}this.inherited(arguments);}});});},"dijit/BackgroundIframe":function(){define("dijit/BackgroundIframe",["require",".","dojo/_base/config","dojo/dom-construct","dojo/dom-style","dojo/_base/lang","dojo/on","dojo/_base/sniff","dojo/_base/window"],function(_4d,_4e,_4f,_50,_51,_52,on,has,win){has.add("bgIframe",has("ie")||has("mozilla"));var _53=new function(){var _54=[];this.pop=function(){var _55;if(_54.length){_55=_54.pop();_55.style.display="";}else{if(has("ie")<9){var _56=_4f["dojoBlankHtmlUrl"]||_4d.toUrl("dojo/resources/blank.html")||"javascript:\"\"";var _57="",{id:w.id,url:i$.isIE?"":p.url,title:p.title||p.description||"dialog contents",blank:this.blankImgSrc,loading:"loading...",border:i$.isIE?"border='0'":"",visibility:i$.isIE?"visibility:hidden;":"opacity:0;filter:Alpha(opacity=0)"}); var f=_11(w); if(i$.isIE){ f.src=p.url; this._initCallbacksOnloadIE(); this._ieRefreshListener=i$.addListener("wpModules/dialog/Dialog/ieRefresh",i$.scope(this,this._handleIeRefreshEvent)); }else{ f.onload=i$.scope(this,this._initCallbacks); } } wd.style.visibility="hidden"; w.show(); if(m){ if(!p.autoPosition){ m.top&&(tb.top=m.top); m.left&&(tb.left=m.left); } m.width&&(tb.width=m.width); m.height&&(tb.height=m.height); } _f(p,wd,tb); setTimeout(function(){ wd.style.visibility="visible"; },100); return false; },_initCallbacks:function(){ var w=this.widget; var p=this.prm; var f=_11(w); var _1d=i$.scope(this,function(){ var fw=f.contentWindow,_1e=fw.contentDocument||fw.document,_1f=i$.scope(this,function(){ this.onLoadFrame(); p.onLoadCallbackFn&&p.onLoadCallbackFn(_1e); }); fw.onunload=function(){ p.onUnloadCallbackFn&&p.onUnloadCallbackFn(_1e); }; fw.onload=_1f; fw.resize=i$.scope(this,"resize"); fw.close=fw.closeDialog=f.onCloseModalDialog=i$.scope(this,"close"); _1f(); }); _1d(); },_initCallbacksOnloadIE:function(){ var _20=this; var w=this.widget; var p=this.prm; var f=_11(w); var fn=function(i){ p.window.setTimeout(function(){ if((f.contentDocument.readyState&&f.contentDocument.readyState==="complete")||(f.readyState&&f.readyState==="complete")){ _20._initCallbacks(); }else{ if(i<300){ fn(i+1); } } },200+10); }; fn(0); },_handleIeRefreshEvent:function(_21){ var w=this.widget; var f=_11(w); var cw=f.contentWindow; if(_21==cw){ this._initCallbacksOnloadIE(); } },isActive:function(){ return _3.length>0&&this.widget.id===_3[_3.length-1].widget.id; },onLoadFrame:function(){ var w=this.widget,wd=w.domNode,p=this.prm,_22=p.targetBox,_23=p.autoResize,_24=_b(p.window.document),_25=_11(w),bs=wd.style; bs.maxWidth="none"; bs.maxHeight="none"; bs.minWidth="0"; bs.minHeight="0"; var _26=p.window.document.getElementById(w.id+"-progressLoading"); if(_26){ _26.style.display="none"; } var cs=w.containerNode.style,fs=_25.style; cs.paddingBottom="0px"; cs.marginBottom="0px"; if(i$.isIE){ fs.visibility="visible"; }else{ fs.opacity="100"; fs.filter="Alpha(opacity=100)"; } var fw=_25.contentWindow,_27=fw.contentDocument||fw.document,fde=_27.documentElement,_28=_27.body; if(i$.isWebKit){ _28.style.overflow="auto"; } _13(_25,{width:300,height:150}); var _29=Math.max(_28.scrollHeight,fde.scrollHeight,_28.offsetHeight,fde.offsetHeight,fde.clientHeight),_2a=Math.max(_28.scrollWidth,fde.scrollWidth,_28.offsetWidth,fde.offsetWidth,fde.clientWidth),_2b=_d(wd),_2c=_d(_25),_2d=_2b.width-_2c.width,_2e=_2b.height-_2c.height,_2f=_24.width-2*p.viewMargin-_2d,_30=_24.height-2*p.viewMargin-_2e,_31=_22.height||(_23?_29:_24.height/3),_32=_22.width||(_23?_2a:_24.width/3); _2a=Math.min(_32,_2f); _29=Math.min(_31,_30); _13(wd,{top:0,left:0}); _13(_25,{width:_2a,height:_29}); if(_23&&!_22.width){ if(i$.isIE>=11){ _2a+=2; _13(_25,{width:_2a}); } if(i$.isFF){ if(fde.clientWidth_30){ var _33=Math.max(_28.scrollWidth,fde.scrollWidth),_34=Math.max(_28.clientWidth,fde.clientWidth); if(_34<_33){ var _35=_33-_34; if(_2a+_35<=_2f){ _2a+=_35; _13(_25,{width:_2a}); } } } } _f(p,wd,{top:p.targetBox.top,left:p.targetBox.left,width:_2a+_2d,height:_29+_2e}); i$.bindDomEvt(_28,"onkeydown",i$.scope(this,function(e){ if(e.keyCode===27){ this._close(); } })); p.window.setTimeout(function(){ _25.focus(); },100); },resize:function(_36){ var is=_36&&(_36.width||_36.height); if(is){ i$.mash(this.prm.targetBox,_36); } this.prm.autoResize=!is; this.onLoadFrame(); },setFocus:function(){ },setMarkup:function(_37){ this.widget.containerNode.innerHTML=_37; },_close:function(){ this.close(); },close:function(_38){ var w=this.widget,r=w.rootNode,p=this.prm,_39=_11(w),fw=_39&&_39.contentWindow; if(fw&&fw.onbeforeunload){ var _3a=fw.onbeforeunload(); if(_3a&&!confirm(_3a)){ return; } } w.hide(); for(var da=_3,i=da.length;i>0;i--){ if(da[i-1].widget.id===w.id){ da.splice(i-1,1); break; } } p.callbackFn&&p.callbackFn(_38); r&&r.parentNode.removeChild(r); if(i$.isIE){ i$.removeListener(this._ieRefreshListener); } }}); }(window)); } /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2012 - All Rights reserved. **/ (function(_1){ var _2=_1.document; var _3=false; var _4=function(){ return !!(i$.query); }; function _5(){ return Math.round(Math.random()*1000000000); }; var _6={cache:{},triggerRegisterHandlers:{},triggerUnregisterHandlers:{},positioningHandlers:{},defaultCss:{focus:"wpthemeMenuFocus",disabled:"wpthemeMenuDisabled",show:"wpthemeMenuShow",error:"wpthemeMenuError",menuTemplate:"wpthemeTemplateMenu",submenuTemplate:"wpthemeTemplateSubmenu",loadingTemplate:"wpthemeTemplateLoading",firstItem:"wpthemeFirst",lastItem:"wpthemeLast"},init:function(_7){ var _8=_7.refNode; var _9=_8||_7.node; var _a=_9._contextMenu=_9._contextMenu||{}; var _b=(_8?_a.menuId:_7.menuId); var _c=_6._sticky; if(_9._contextMenu.preventOpen||_c){ delete _9._contextMenu.preventOpen; return; } _a.id=_a.id||_9.getAttribute("id")||_5(); _9.setAttribute("id",_a.id); _a.menuId=_b; _a.closeFn=_7.onClose||null; _a.params=_a.params||{}; if(_7.params){ _7.params.sticky&&(_6._sticky=true); i$.mash(_a.params,_7.params); } _a.jsonQuery=_a.jsonQuery||{}; _a.jsonQuery=i$.mash(_a.jsonQuery,_7.jsonQuery); _a.css=_8?_a.css:_6._getCssClasses(_9); _a.defaultTemplateId=_a.defaultTemplateId||(_b+"Template"); _a.templateId=_a.templateId||_a.params.templateId||null; var _d=function(_e){ if(!_e.displayMenu){ return; } i$.fireEvent("wptheme/contextMenu/close/all"); if(_a.params._executeDefaultAction){ delete _a.params._executeDefaultAction; delete _7.params._executeDefaultAction; _6._hideLoadingAnimation(_a); _6._registerEventHandlers(_a); i$.fireEvent("wpModules/contextMenu/close/id/"+_a.id); _6._executeDefaultAction(_a); return; } if(_a._loading||!i$.hasClass((_a.shadowNode)?_a.shadowNode:i$.byId(_a.id),_6.defaultCss.show)){ var _f=_a.menuNode; i$.when(_6._updateVisibility(_f,_a)).then(function(_10){ if(_a._loading){ _a.loadingNode.style.display="none"; _a._loading=false; } if(!_10){ return; } _6._updateAbsolutePosition(i$.byId(_a.id)); var _11=_6._adjustScreenPositionStart(); if(!_a._hoverEventRegistered){ _6._addHoverEventListeners(_7); } i$.addClass((_a.shadowNode)?_a.shadowNode:i$.byId(_a.id),_6.defaultCss.show); _6._adjustScreenPositionEnd(_11); if(_a.params._setFocus){ delete _a.params._setFocus; delete _7.params._setFocus; var n=i$.byId(_a.id),_12=n&&n._firstSelectable; if(_12){ _12.focus(); n._currentSelected=_12; } } _6._registerEventHandlers(_a); }); } }; _6._initialize(_9).then(_d,_d); _9=null; return function(_13){ if(_a._preventClose||_a._closing){ delete _a._preventClose; delete _7._preventClose; return; } _a._closing=true; _6._executeMenuAction(_13,_a); _1.setTimeout(function(){ i$.fireEvent("wpModules/contextMenu/close/id/"+_a.id,[true]); },1); delete _a._closing; }; },lock:function(_14){ var cm=_14._contextMenu=_14._contextMenu||{}; cm._lockMenu=true; },unlock:function(_15){ var cm=_15._contextMenu||{}; cm._lockMenu=false; },reposition:function(_16){ var _17=_16._contextMenu; _6._updateAbsolutePosition(_16); var _18=_6._adjustScreenPositionStart(); i$.addClass((_17.shadowNode)?_17.shadowNode:i$.byId(_17.id),_6.defaultCss.show); _6._adjustScreenPositionEnd(_18); },_hideLoadingAnimation:function(_19){ if(_19._loading){ _19.loadingNode.style.display="none"; _19._loading=false; } },_executeDefaultAction:function(_1a){ var _1b=_1a.menuNode; var _1c=_6._findNodes(_1b),_1d=_1c.menu,_1e=_1d.children; var _1f,_20; for(var i=0,l=_1e.length;i=0;i--){ _42=_46.childNodes[i]; if(i$.hasClass(_42,_43.menuTemplate)){ _3f=_42; continue; } if(i$.hasClass(_42,_43.submenuTemplate)){ _40=_42; continue; } if(i$.hasClass(_42,_43.loadingTemplate)){ _41=_42; continue; } if(_42.childNodes){ i=_45(_42,i); } } return _47; }; _45(_44); return {"menu":_3f,"submenu":_40,"loading":_41}; },_findMenuNode:function(_48){ var _49,cm=_48._contextMenu,_4a=cm.templateId,_4b=cm.defaultTemplateId; if(_4a){ _49=_2.getElementById(_4a); } _49=_49||(_4()?_6._findMenuNodeSelector(_48):_6._findMenuNodeRecursive(_48)); _49=_49||_2.getElementById(_4b); return _49; },_findMenuNodeSelector:function(_4c){ return i$.query([".wpthemeMenu",", .wpthemeMenuRight",", .wpthemeMenuLeft"].join(""),_4c).shift(); },_findMenuNodeRecursive:function(_4d){ var _4e,i,_4f; var _50=function(_51,_52){ for(i=_51.childNodes.length-1;i>=0;i--){ _4f=_51.childNodes[i]; if(i$.hasClass(_4f,"wpthemeMenu")||i$.hasClass(_4f,"wpthemeMenuRight")||i$.hasClass(_4f,"wpthemeMenuLeft")){ _4e=_4f; break; } if(_4f.childNodes){ i=_50(_4f,i); } } return _52; }; _50(_4d); return _4e; },_invalidateCallback:function(){ _6.cache={}; },_initialize:function(_53){ var _54=true; var _55=_53._contextMenu,_56=_55.css; if(_6.cache[_55.id]||_55._inProgress){ return i$.promise.resolved({displayMenu:_54}); } if(!_55._menuTemplateNode){ _55._menuTemplateNode=_6._findMenuNode(_53); if(_55._menuTemplateNode.parentNode!=_53){ _55._menuTemplateNode=_55._menuTemplateNode.cloneNode(true); _55._menuTemplateNode.removeAttribute("id"); _53.appendChild(_55._menuTemplateNode); } } _55._inProgress=true; i$.addListener("wptheme/contextMenu/invalidate/all",_6._invalidateCallback); var _57,_58,tmp=i$.createDom("div"); if(_55._submenu){ tmp.innerHTML=_55._subMenuTemplate.replace(/\$\{submenu-id\}/g,_55.id+"_menu"); _53.appendChild(tmp.firstChild); _57=i$.byId(_55.id+"_menu"); _58=i$.createDom("div"); _58.innerHTML=_55._loadingTemplate; }else{ var _59=_6._findNodes((_55.shadowNode)?_55.shadowNode:_53); _57=_59.menu; if(!_55._menuitemTemplate){ _55._menuitemTemplate=i$.trim(_57.innerHTML); } if(!_55._loadingTemplate&&_59.loading){ _58=i$.createDom("div"); _58.appendChild(_59.loading); _58.innerHTML=_58.innerHTML.replace(/\$\{loading\}/g,_6.nls.LOADING_0); _55._loadingTemplate=i$.trim(_58.innerHTML); _58=null; } _58=i$.createDom("div"); _58.innerHTML=_55._loadingTemplate||""; if(_59.submenu){ tmp.appendChild(_59.submenu.cloneNode(true)); if(!_55._subMenuTemplate){ _55._subMenuTemplate=i$.trim(tmp.innerHTML); } } } while(_57.firstChild){ _57.removeChild(_57.firstChild); } _57.appendChild(_58); _55.loadingNode=_58; var _5a; if(_55.shadowNode){ _5a=_55.shadowNode; }else{ _5a=_6._transformIntoAbsolutePosition(_53); } i$.addClass((_5a)?_5a:_53,_56.show); return _6._load(_55).then(function(_5b){ var _5c=_6._parseData(_5b).then(function(_5d){ _5d=_6._filterMenu(_5d); if(!_5d||_5d.length==0){ var tmp=i$.createDom("div"); tmp.innerHTML=_6._fromTemplate(_55._menuitemTemplate,_56.error,_6.nls.NO_ITEMS_0); while(_57.firstChild){ _57.removeChild(_57.firstChild); } _57.appendChild(tmp); }else{ _6._buildMenu(_55,_57,_5d); } _55._inProgress=false; _55._loading=true; _6.cache[_55.id]=true; return {displayMenu:_54}; }); return _5c; },function(){ var tmp=i$.createDom("div"); tmp.innerHTML=_6._fromTemplate(_55._menuitemTemplate,_56.error,_6.nls.ERROR_LOADING_0); while(_57.firstChild){ _57.removeChild(_57.firstChild); } _57.appendChild(tmp); _55._inProgress=false; _6.cache[_55.id]=true; return {displayMenu:_54}; }); },_updateVisibility:function(_5e,_5f){ var _60=_6._findNodes(_5e),_61=_60.menu,_62=_61.children,_63=[]; var _64,_65; for(var i=0,l=_62.length;i-1){ var n=i$.byId(_5f.id); n._firstSelectable=_70; n._currentSelected=null; i$.addClass(_62[_68],_5f.css.firstItem); } (_69>-1)&&i$.addClass(_62[_69],_5f.css.lastItem); _6a.resolve(_6b); }); return _6a; },_filterMenu:function(_72){ var _73=[],_74,_75={"type":"Separator"}; for(var i=_72.length-1;i>=0;i--){ _74=_72[i]; if(_74.type=="Separator"){ if(_75.type=="Separator"){ continue; } }else{ if(_74.type=="Header"){ if((_75.type=="Separator")||(_75.type=="Header")){ continue; } } } _75=_74; _73.unshift(_74); } while(_73.length>0&&_73[0].type=="Separator"){ _73=_73.slice(1); } return _73; },_buildMenu:function(_76,_77,_78){ var _79=_2.createDocumentFragment(),tmp=i$.createDom("div"),_7a,_7b,_7c=_76.id,_7d,_7e=i$.byId(_76.id); for(var i=0,l=_78.length;i 0) { if (projectLink != null && projectLink.length > 0) { message = dojo.replace(wcmModules.nls.inplace["added_item_to_the_project_1"], [contentTitle]); } else { message = dojo.replace(wcmModules.nls.inplace["draft_of_item_was_created_1"], [contentTitle]); } } var messageObject = new com.ibm.widgets.StatusMessage("info", message , ""); i$.fireEvent("/portal/status",[{message: messageObject, uid: 'ibmStatusBox'}]); inplaceMenu._createdDrafts[publishedId] = draftId; }, /** Get the id of the auto-created draft given a published id. * Returns null if no draft has been created. */ /*String*/getCreatedDraft: function(/*String*/publishedId) { return inplaceMenu._createdDrafts[publishedId]; }, /** Called to edit property or element using true inplace editing */ edit : function(/*Object*/jsonData) { var wcmMetaData = inplaceMenu._extractWcmMetaData(jsonData); // Can't edit while saving if (inplaceMenu.isSaving(wcmMetaData.editableRegionId)) { return; } // Node to which the CAM menu is attached var attachNode = i$.byId(wcmMetaData.editableRegionId); // Lock the CAM menu. It will be unlocked again once we've loaded an editor wpModules.contextMenu.lock(attachNode); try { //console.log("wcmInplaceModule: edit: wcmMetaData", wcmMetaData); inplaceMenu.setEditing(wcmMetaData.editableRegionId, true); // If a draft has been created since page load, we need to edit that instead of the published item var draftId = inplaceMenu.getCreatedDraft(wcmMetaData.itemId); if (draftId != null) { //console.log("Identified that we should edit draft with id " + draftId + " instead of published item " + wcmMetaData.itemId); wcmMetaData.itemId = draftId; } //Property here is defined by 'wcm/TagType.PROPERTY', if (wcmMetaData.tagType === "Property") { wcmModules.inplaceMenu.editProperty(wcmMetaData); } else { wcmModules.inplaceMenu.editElement(wcmMetaData); } } catch (e) { // If anything goes wrong, make sure to unlock the CAM menu again wpModules.contextMenu.unlock(attachNode); inplaceMenu.setEditing(wcmMetaData.editableRegionId, false); throw e; } }, /** Called to edit property using true inplace editing */ editProperty : function(/*Object*/wcmMetaData) { //console.log("Entered editProperty: ", wcmMetaData); if (inplaceMenu._textBox[wcmMetaData.editableRegionId]) { // Reuse textBox if already created var textBox = inplaceMenu._textBox[wcmMetaData.editableRegionId]; // Don't reload the item value - the user may already have edited this value textBox.editInplace(false); } else { require({ packages : [ { name : 'wcm', location : wcmModules.config.inplaceResourceRoot + '/js' } ] }, [ 'wcm/InplaceTextBox', 'wcm/InplaceEditable', 'wcm/SavePropertyHandler', 'wcm/ItemRepository' ], function(InplaceTextBox, InplaceEditable, SavePropertyHandler, ItemRepository) { var saveHandlerObject = new SavePropertyHandler({ wcmMetaData : wcmMetaData }); var saveHandler = saveHandlerObject.createHandler(); var useEmbedEdit = (wcmMetaData.editMode == "embed") || (wcmMetaData.editMode == "default" && wcmMetaData.defaultMode == "embed"); var textBox = null; if (useEmbedEdit) { textBox = new InplaceEditable({ onChange : saveHandler, renderAsHtml : false, getItemValue : function(callback) { var rep = new ItemRepository({ wcmMetaData : wcmMetaData }); var propValue = rep.getPropertyValue(wcmMetaData.itemId, wcmMetaData.propertyType); propValue.then(function(value) { callback(value); }); }, uniqueId : wcmMetaData.editableRegionId }, wcmMetaData.contentRegion); } else { textBox = new InplaceTextBox({ onChange : saveHandler, autoSave : false, // don't use dijit's autosave - we'll implement this ourselves editorParams : { // TODO: We should set this max using the value from the template. For now, this // will be checked on the server //maxLength : 250 }, editor : 'dijit.form.Textarea', renderAsHtml : false, getItemValue : function(callback) { var rep = new ItemRepository({ wcmMetaData : wcmMetaData }); var propValue = rep.getPropertyValue(wcmMetaData.itemId, wcmMetaData.propertyType); propValue.then(function(value) { callback(value); }); }, uniqueId : wcmMetaData.editableRegionId }, wcmMetaData.contentRegion); } inplaceMenu._textBox[wcmMetaData.editableRegionId] = textBox; // Load the item value - we want to edit the real item value, not the rendered value textBox.editInplace(true); }); } }, /** Called to edit element using true inplace editing */ editElement : function(/*Object*/wcmMetaData) { //console.log("wcmInplaceModule: Entered editElement: ", wcmMetaData); if (inplaceMenu._textBox[wcmMetaData.editableRegionId]) { // Reuse textBox if already created var textBox = inplaceMenu._textBox[wcmMetaData.editableRegionId]; //console.log("wcmInplaceModule: editElement reused textBox: ", textBox); // Don't reload the item value - the user may already have edited this value textBox.editInplace(false); } else { require({ packages : [ { name : 'wcm', location : wcmModules.config.inplaceResourceRoot + '/js' } ] }, [ 'dojo/dom', 'dojo/DeferredList', 'wcm/InplaceTextBox', 'wcm/InplaceEditable', 'wcm/SaveElementHandler', 'wcm/ItemRepository', 'wcm/ElementType' ], function(dom, DeferredList, InplaceTextBox, InplaceEditable, SaveElementHandler, ItemRepository, ElementType) { //console.log("wcmMetaData.elementType", wcmMetaData.elementType); var saveHandlerObject = new SaveElementHandler({ wcmMetaData : wcmMetaData, isNumber : (wcmMetaData.elementType === ElementType.NUMBER) }); var saveHandler = saveHandlerObject.createHandler(); var isRichText = (wcmMetaData.elementType === ElementType.RICH_TEXT); var useEmbedEdit = (wcmMetaData.editMode == "embed") || (wcmMetaData.editMode == "default" && wcmMetaData.defaultMode == "embed"); var textBox = null; if (useEmbedEdit) { textBox = new InplaceEditable({ onChange : saveHandler, renderAsHtml : (wcmMetaData.elementType === ElementType.RICH_TEXT), // Render everything as text, apart from RICH_TEXT getItemValue : function(callback) { var rep = new ItemRepository({ wcmMetaData : wcmMetaData }); var elementValue = rep.getElementValue(wcmMetaData.itemId, wcmMetaData.elementName); elementValue.then(function(value) { //console.log("wcmInplaceModule: editElement: Element Value is", value); callback(value); }); }, uniqueId : wcmMetaData.editableRegionId, isRichText : isRichText }, wcmMetaData.contentRegion); } else { textBox = new InplaceTextBox({ onChange : saveHandler, autoSave : false, // don't use dijit's autosave - we'll implement this ourselves editorParams : { // TODO: We should set this max using the value from the template. For now, this // will be checked on the server //maxLength : 250 }, editor : 'dijit.form.Textarea', renderAsHtml : (wcmMetaData.elementType === ElementType.RICH_TEXT), // Render everything as text, apart from RICH_TEXT getItemValue : function(callback) { var rep = new ItemRepository({ wcmMetaData : wcmMetaData }); var elementValue = rep.getElementValue(wcmMetaData.itemId, wcmMetaData.elementName); elementValue.then(function(value) { //console.log("wcmInplaceModule: editElement: Element Value is", value); callback(value); }); }, uniqueId : wcmMetaData.editableRegionId, isRichText : isRichText }, wcmMetaData.contentRegion); } inplaceMenu._textBox[wcmMetaData.editableRegionId] = textBox; // Initiate edit inplace if (wcmMetaData.elementType === ElementType.RICH_TEXT) { var contentRegionNode = i$.byId(wcmMetaData.contentRegion); // Show RTE has inactive while it's loading - this is equivalent to 'saving' i$.addClass(contentRegionNode.parentNode, "saving"); // Load all required scripts for RTE in paralled. When all are loaded, initiate inplace edit // The inplace edit will fail if the scripts have not all been loaded in time. var deferred1 = dojo.io.script.get({ url : wcmModules.config.inplaceResourceRoot + "/ckeditor/ckeditor.js" }); var deferred2 = dojo.io.script.get({ url : wcmModules.config.inplaceResourceRoot + "/js/editor/ckeditorIntegration.js" }); var deferred3 = dojo.io.script.get({ url : wcmModules.config.inplaceResourceRoot + "/js/editor/RTEFieldActions.js" }); var deferredList = new DeferredList([deferred1, deferred2, deferred3]); deferredList.then(function() { // Remove loading indicator i$.removeClass(contentRegionNode.parentNode, "saving"); // Load the item value - we want to edit the real item value, not the rendered value textBox.editInplace(true); }); } else { // Load the item value - we want to edit the real item value, not the rendered value textBox.editInplace(true); } }); } }, /** Called to save item using true inplace editing */ save : function(/*Object*/jsonData) { var wcmMetaData = inplaceMenu._extractWcmMetaData(jsonData); inplaceMenu.setEditing(wcmMetaData.editableRegionId, false); if (inplaceMenu._textBox[wcmMetaData.editableRegionId]) { var textBox = inplaceMenu._textBox[wcmMetaData.editableRegionId]; textBox.save(); } else { console.log("wcmInplaceModule: No Inplace Widget for : " + wcmMetaData.editableRegionId); } }, /** Called to cancel item using true inplace editing */ cancel : function(/*Object*/jsonData) { var wcmMetaData = inplaceMenu._extractWcmMetaData(jsonData); inplaceMenu.setEditing(wcmMetaData.editableRegionId, false); if (inplaceMenu._textBox[wcmMetaData.editableRegionId]) { var textBox = inplaceMenu._textBox[wcmMetaData.editableRegionId]; textBox.cancel(); } else { console.log("wcmInplaceModule: No Inplace Widget for : " + wcmMetaData.editableRegionId); } }, /** * Whether the property/element corresponding to the jsonData is NOT being * edited using true inplace editing. This is used in the Java code as a CAM visibility function. */ isNotEditing : function(/*Object*/jsonData) { var wcmMetaData = inplaceMenu._extractWcmMetaData(jsonData); var notEditing = (!inplaceMenu.isEditing(jsonData) ); var notSaving = !inplaceMenu.isSaving(wcmMetaData.editableRegionId); return (notEditing && notSaving); }, /** * Whether the property/element corresponding to the jsonData is being * edited using true inplace editing. */ isEditing : function(/*Object*/jsonData) { var wcmMetaData = inplaceMenu._extractWcmMetaData(jsonData); var isEdit = (inplaceMenu._isEditing[wcmMetaData.editableRegionId] === true); //console.log("isEditing: ", isEdit); return isEdit; }, /** * Set whether the property/element corresponding to the jsonData is being * edited using true inplace editing. */ setEditing : function(/*String*/key, /*boolean*/editing) { inplaceMenu._isEditing[key] = editing; }, /** Open the inplace edit popup dialog with the supplied jsonData.actionUrl */ editDialog : function(/*Object*/jsonData) { //console.log("wcmInplaceModule:", jsonData); var wcmMetaData = inplaceMenu._extractWcmMetaData(jsonData); //console.log("wcmInplaceModule: editDialog extracted wcmMetaData: ", wcmMetaData); // No need to look in the createdDrafts map to see if there's a project draft - the remote action will // find it. var contentRegionNode = i$.byId(wcmMetaData.contentRegion); i$.addClass(contentRegionNode.parentNode, "editing"); inplaceMenu._extractedWcmMetaData = wcmMetaData; // Create promise. When promise is resolved, the edit popup dialog will be shown, with the given URL. var promise = new i$.promise.Promise(); require({ packages : [ { name : 'wcm', location : wcmModules.config.inplaceResourceRoot + '/js' } ] }, ['dojo/topic', 'wcm/EventTopic', 'wcm/ItemRepository'], function(topic, EventTopic, ItemRepository) { if (ItemRepository && ItemRepository._saveDeferredCount && ItemRepository._saveDeferredCount > 0) { if (inplaceMenu.updatesCompleteTopic) { inplaceMenu.updatesCompleteTopic.remove(); } // Show 'loading' until all true inplace saves have completed, then allow popup dialog to open. inplaceMenu.showOverlay(); inplaceMenu.updatesCompleteTopic = topic.subscribe(EventTopic.updatesComplete, function() { //console.log("wcmInplaceModule: editDialog: Updates complete callback", jsonData); inplaceMenu.hideOverlay(); promise.resolve(jsonData.actionUrl); }); } else { // Resolve immediately, to allow popup dialog to open promise.resolve(jsonData.actionUrl); } }); return promise; }, /** Called when the inplace edit popup dialog is closed */ closeDialog : function(/*Object*/event) { //console.log("wcmInplaceModule: Entering closeDialog: event", event); var wcmMetaData = inplaceMenu._extractedWcmMetaData; //console.log("wcmInplaceModule: editDialog extracted wcmMetaData: ", wcmMetaData); var contentRegionNode = i$.byId(wcmMetaData.contentRegion); // Empty event indicates that the dialog was cancelled if (event && event.resultInfo && event.resultInfo.itemId) { // Inplace re-render, and publish create-draft event if necessary var outerEvent = event; require(['wcm/InplaceRender', 'wcm/PropertyType', 'wcm/ItemRepository'], function(InplaceRender, PropertyType, ItemRepository) { // If we've just updated the name, we need to refresh the whole page, as all the re-render URLs will be wrong if (wcmMetaData.propertyType === PropertyType.NAME) { ItemRepository.noUnloadPrompt = true; document.location.reload(); } else { inplaceMenu.setSaving(wcmMetaData.editableRegionId, true); i$.removeClass(contentRegionNode.parentNode, "editing"); if (outerEvent.resultInfo.createdDraftId) { //console.log("Draft was auto-created in dialog. Publishing the event"); inplaceMenu.notifyCreatedDraft(outerEvent.resultInfo.itemId, outerEvent.resultInfo.createdDraftId); } var inplaceRender = new InplaceRender({wcmMetaData : wcmMetaData}); //console.log("Re-rendering with this URL: " + wcmMetaData.rerenderURL); inplaceRender.render(wcmMetaData.rerenderURL, function(/*Object*/renderJson) { //console.log("wcmInplaceModule: Entering re-render callback: ", renderJson); // Don't allow the HTML to be empty, as then inplace edit is not possible contentRegionNode.innerHTML = renderJson.contents + " "; inplaceMenu.setSaving(renderJson.editableRegionId, false); }); } }); } else { i$.removeClass(contentRegionNode.parentNode, "editing"); } }, /** * Whether the property/element corresponding to the jsonData is NOT being * saved using true inplace editing. This is used in the Java code as a CAM visibility function. */ isNotSaving : function(/*Object*/jsonData) { var wcmMetaData = inplaceMenu._extractWcmMetaData(jsonData); var isSaving = inplaceMenu._isSaving[wcmMetaData.editableRegionId]; return !isSaving; }, /** * @return true if the field is currently being saved */ isSaving : function(/*String*/editableRegionId) { var isSaving = !!inplaceMenu._isSaving[editableRegionId]; return isSaving; }, /** Set the editableRegion element as saving (disabled), or no longer saving (enabled again) */ setSaving : function(/*String*/editableRegionId, /*boolean*/saving) { var editableRegionNode = i$.byId(editableRegionId); if (saving) { i$.addClass(editableRegionNode, "saving"); } else { i$.removeClass(editableRegionNode, "saving"); } dojo.setAttr(editableRegionNode, "aria-busy", saving); inplaceMenu._isSaving[editableRegionId] = saving; }, /** Set the editableRegionNodeId as in error, or no longer in error */ setError : function(/*String*/editableRegionNodeId, /*boolean*/error) { var editableRegionNode = i$.byId(editableRegionNodeId); if (error) { i$.addClass(editableRegionNode, "error"); } else { i$.removeClass(editableRegionNode, "error"); } dojo.setAttr(editableRegionNode, "aria-invalid", error); }, /** Show an overlay over the entire screen, blocking interaction until the overlay is hidden */ showOverlay : function() { var loading = wcmModules.nls.inplace["loading_msg"]; require(['dojo/_base/window', 'dojo/window', 'dojo/dom-construct', 'dojo/dom-style'], function(baseWin, win, domConstruct, domStyle){ var body = baseWin.body(); var browserHeight = (win.getBox().h/2) + "px"; var bodyHeight = domStyle.get(body, "height") + "px"; var bodyWidth = domStyle.get(body, "width") + "px"; var overlay = domConstruct.place("
" + "
" + "" + loading + "
", body); }); }, /** Hide the previously shown overlay */ hideOverlay : function() { require(['dojo/dom'], function(dom){ document.body.removeChild(dom.byId("wcm-inplace-overlay")); }); } }; i$.toPath("wcmModules.inplaceMenu", inplaceMenu); })(window); /** This Module is part of the Theme. Its packaged into wcmModules.inplace. This is the handler to inplace Creating of new items * It contains JS code for the UI for creating inplace Items and the code to trigger the rest requests*/ (function(window) { "use strict"; var create = { /** The function that returns a promise to create the item */ createPromiseFunction : null, /** * Show the Form to Create a new WCM content item in place, and create the item (via the WCM Rest API) once * the form has been filled out. * * Note that this is a public method, used in CTC, so the signature and promise interface should not be changed. * * @param attachTo domNode that the form will launch around * @param templateId the UUID of the content Template to use to create a new content item * @param siteAreaId the UUID of the site area that the new content should be saved under */ showFormAndCreateContent : function(/*Node*/attachTo, /*String*/templateId, /*String*/siteAreaId) { var createParams = {templateId : templateId, siteAreaId : siteAreaId}; this.showForm(attachTo, this.getCreateItemPromiseFunction(createParams)); }, /** * Show the Form to Create a new WCM item inplace. A promise function must be set that is called once the form has been * complete by the user, by clicking 'Create'. * * This promise can then be resolved or rejected by the calling function. Typically this will mean creating a new item (or items) * of some type. The id of the created item can be returned when the promise is resolved. * * If the promise is resolved, then the form will be dismissed, and a redirect to the created item will occur if the id of the new item * is returned by the promise as the optional single parameter. If the promise is rejected, an error will be shown and the form will not * dismiss. In this case, the promise should be rejected, optionally with an error message as the single parameter. * * Note that this is a public method, used in CTC, so the signature and promise interface should not be changed. * * @param attachTo dom Node that the form will launch around * @param createPromiseFunction The function that returns an i$.Promise to do the create */ showForm : function(/*Node*/attachTo, /*Function*/createPromiseFunction) { //console.log("wcmModuleInplaceCreate: Entering showForm: ", attachTo); wcmModules.inplace.create.createPromiseFunction = createPromiseFunction; require({ packages : [{ name : 'wcm', location : wcmModules.config.inplaceResourceRoot + '/js' }] }, ['wcm/CreateForm', 'wcm/Item', 'dijit/TooltipDialog', 'dijit/popup'], function(CreateForm, Item, TooltipDialog, popup) { // Create the 'new item' form var dialogId = Math.round(Math.random() * 1000000) + "_create_dialog"; var createForm = new CreateForm({ dialogRef : dialogId, consumeForm : wcmModules.inplace.create.consumeForm }); // Put the 'new item' form inside a tooltip dialog var tooltipDialog = new TooltipDialog({ id : dialogId, content : createForm, onBlur : function(){ // 'new item' popup should close on blur popup.close(tooltipDialog); } }); i$.addClass(tooltipDialog.domNode, 'noPadding'); // Show the tooltip dialog popup.open({ popup : tooltipDialog, around : attachTo, orient : [ "below", "below-alt", "above", "above-alt" ], onCancel: function(){ popup.close(tooltipDialog); }, onClose : function(){ attachTo.focus(); } }); // Add a class to the tooltip container, so that we can style it in createForm.css var tooltipContainer = dojo.query("div", tooltipDialog.domNode)[0]; if (tooltipContainer) i$.addClass(tooltipContainer, "wpwcmCreateTooltipContainer"); // Ensure the New dialog appears behind the inline edit popup dialog if (tooltipDialog.domNode.parentNode) dojo.style(tooltipDialog.domNode.parentNode, "zIndex", 500); tooltipDialog.focus(); }); }, /** * This function handles consuming the Create New item form, using the promise returned by * executing the createPromiseFunction that has already been specified. This promise is returned. * @param value the value that form has provided * @return A promise to consume the form */ consumeForm : function(/*String*/value) { //console.log("wcmModuleInplaceCreate: Entering consumeForm: ", value); var promise = new i$.Promise(); // Run the createPromiseFunction with the value to return a promise wcmModules.inplace.create.createPromiseFunction(value).then( function(/*String*/itemId) { //console.log("wcmModuleInplaceCreate: consumeForm promise resolved, ", itemId); promise.resolve(itemId); // Success - redirect to the created item if (itemId) { var pocUrl = '?uri=wcm:oid:' + itemId + "&previewopt=id&previewopt=" + itemId + "&previewopt=isdraft&previewopt=true"; window.location.replace(pocUrl); } }, function(/*String*/errorMessage) { //console.log("wcmModuleInplaceCreate: consumeForm promise rejected, ", errorMessage); // on error we write out the error message in the CreateForm promise.reject(errorMessage); }); return promise; }, /** * Get a promise to call the relevant Rest Requests to create the content item. * @param createParams the create item parameters * createParams.templateId the UUID of the content Template to use to create a new content item * createParams.siteAreaId the UUID of the site area that the new content should be saved under * @return A function */ getCreateItemPromiseFunction : function(/*Object*/createParams) { // Create a closure that when called returns the createItem promise function, with createParams inside the closure. // This is done so that createParams can be fixed and doesn't need to be passed through all the code. /** * Define a function that returns a promise to call the relevant Rest Requests to create the content item. * @param value the value entered in the form * @return A promise to create the item */ var createItemPromiseFunction = function(/*String*/value) { //console.log("wcmModuleInplaceCreate: Entering createItem: ", value); var promise = new i$.Promise(); // Use the value entered in the dialog as the new content name var name = value; // Just use the name for the title var title = value; // Create content via WCM Rest API require({ packages : [{ name : 'wcm', location : wcmModules.config.inplaceResourceRoot + '/js' }] }, ['wcm/ItemRepository', 'wcm/Item'], function(ItemRepository, Item) { var rep = new ItemRepository(); var createPromise = rep.createContentWithTemplate({ templateId : createParams.templateId, name : name, title : title, siteAreaId : createParams.siteAreaId }); // Chain a promise with just the ItemId or the errorMessage in it. That is, we pull out the info // that we need from the ItemRepository objects, to allow for a simple promise interface for createPromiseFunction. createPromise.then( function(/*Item*/item) { // Success promise.resolve(item.getId()); }, function(/*Error*/error) { // Failure var errorMessage; var errorObj = i$.fromJson(error.responseText); if (errorObj.errors && errorObj.errors.message && errorObj.errors.message.length > 0) { errorMessage = errorObj.errors.message[0].text; } promise.reject(errorMessage) }); }); return promise; }; return createItemPromiseFunction; } }; i$.toPath("wcmModules.inplace.create", create); })(window); /** * This Module is part of the Theme. Its packaged into wcmModules.inplace. This * particular code manages the Portlet level Inplace editing toolbar Functions * include all the basic WCM inline editing functionalties such as * edit/publish/approve etc. * * The functions are called by the CAM Framework when building the menu. * In particular the performAction corresponds to the CAM actionFn * and the isActionEnabled corresponds to the CAM visibilityFn */ (function(window) { "use strict"; var portletMenu = { /** * the item cache , is key value pair of UUID to a "wcm/Item" object. The * portlet menu has many actions that refer to the same item. Without a * Page level cache we could perform as many as 12 requests every time the * menu is loaded! The disadvantage is that other inline changes to the * page will not be picked up by the menu as it will continue looking at * the cache item until a page refresh occurs. The solution to this is to * hook on an event producer/listener (e.g. i$.fireEvent) to handle * changes to items * * Important!: * To stop a thundering herds scenario where multiple requests are created for the same item since the * cache was empty there is a possibility the itemCache item may be a dojo.Deferred object that resolves to the "wcm/Item" * As a result it is important to combine this with a "Deferred.when()" when working with item * * For more information about dojo Deferred and When see dojo documentation. * */ _itemCache : {}, /** * the argument object passed into all the action Functions is not * controlled by WCM. CAM in fact passes the entire Menu JSON entry as the * argument. The relevant WCM metadata is encapsulated within at * args.metadata.wcm. This is a convenience method to extract this WCM metadata. */ _extractWcmMetaData : function(/*Object*/jsonData) { return jsonData.metadata.wcm; }, /** * The function is called by the CAM menu. It corresponds to the CAM * "actionFn" {Object} args * * @param [args.title] * The localized title of this action , used for the dialog * title metadata = args.metadata.wcm * @param [metaData.itemId] * the UUID of the item * @param [metaData.action] * the Inline Action to peform , (represented by * wcm/inplace/portlet/InlineAction) */ performAction : function(/*Object*/args) { var title = args.title.value; var metaData = portletMenu._extractWcmMetaData(args); //console.log("wcmModuleInplacePortlet: performAction", metaData); var outer = this; //dojo time require({ packages : [ { name : 'wcm', location : wcmModules.config.inplaceResourceRoot + '/js' } ] }, [ 'dojo/_base/Deferred', 'wcm/RemoteAction', 'wcm/ItemRepository', 'wcm/inplace/portlet/InlineAction' ], function(Deferred, RemoteAction, ItemRepository, InlineAction) { var rep = new ItemRepository({ wcmMetaData : metaData }); //cache the item var item = portletMenu._itemCache[metaData.itemId]; if (!item) { item = rep.getById(metaData.itemId); //console.log("Retrieving item from REST..."); //put the deferred item in the cache , //this will prevent other asynchronous threads from trying to //retrieve the item from the cache and instead will block on the Deferred.when portletMenu._itemCache[metaData.itemId] = item; } else { //console.log("Found item in cache...."); } Deferred.when(item, function(resolvedItem) { var enabled; portletMenu._itemCache[metaData.itemId] = resolvedItem; //console.log("building remote action.."); var inlineAction = new InlineAction({ action : metaData.action }); var remoteAction = new RemoteAction({ id : metaData.itemId, action : inlineAction.getRemoteAction() }); //okay we got the url //now lets get the function //console.log("Calling openInlineEditDialog"); var openDialogFn = window["ns_" + metaData.windowId + "_openInlineEditingDialog"]; if (!openDialogFn) { console.error("Can't find openDialog function"); } openDialogFn(remoteAction.getUrl(), title); }); }); //console.log("wcmModuleInplacePortlet: performAction returning"); }, /** * This method is called by the CAM to check if the menu entry should be * shown. It corresponds to the CAM "visibilityFn" Retrieves the item by * the given UUID and then checks if the passed in action is one of the * actions available in the retrieved item (retrieve through REST). * ${Object} args * * @param args.action * the InlineAction * @param args.itemId * the items UUID * @return A Promise */ isActionEnabled : function(/*Object*/args) { //console.log("isActionEnabled: entering: ", args); var metaData = portletMenu._extractWcmMetaData(args); //console.log("isActionEnabled: itemId: ", metaData.itemId, " action: ", metaData.action); //this promise will return the value of whether the item is visble or not var enabledPromise = new i$.Promise(); //dojo time require({ packages : [ { name : 'wcm', location : wcmModules.config.inplaceResourceRoot + '/js' } ] }, [ 'dojo/_base/Deferred', 'wcm/ItemRepository', 'wcm/inplace/portlet/InlineAction', 'wcm/rest/RelationType'], function(Deferred, ItemRepository, InlineAction, RelationType) { var rep = new ItemRepository({ wcmMetaData : metaData }); //cache the item var item = portletMenu._itemCache[metaData.itemId]; if (!item) { //console.log("Retrieving item from REST..."); item = rep.getById(metaData.itemId); //put the deferred item in the cache , //this will prevent other asynchronous threads from trying to //retrieve the item from the cache and instead will block on the Deferred.when portletMenu._itemCache[metaData.itemId] = item; } else { //console.log("Found item in cache...."); } Deferred.when(item, function(resolvedItem) { var enabled; portletMenu._itemCache[metaData.itemId] = resolvedItem; //console.log("Recieved item, determining if entry should be visible"); var inlineAction = new InlineAction({ action : metaData.action }); var rel = inlineAction.getRelation(); if (resolvedItem.getLinks().hasLink(rel)) { //if this is create draft then don't display if we are in a project. // Edit in project mode is essentially "create-draft" so having both is redundant if (rel === RelationType.CREATE_DRAFT && wcmModules.config.projectId && wcmModules.config.projectId !== "") { enabled = false; //console.log("Create Draft disabled as we are in project context"); } else { enabled = true; //console.log("Item has link for given action , visible"); } } else { enabled = false; } enabledPromise.resolve(enabled); }, function(error){ //something went wrong looking up the item // the error handling should be covered by the ItemRepository //lets just log to the console console.error("Error retrieving item for Portlet level actions", error); enabledPromise.resolve(false); }); }); //console.log("isActionEnabled returning promise"); return enabledPromise; } }; //namespace this object i$.toPath("wcmModules.inplace.portletMenu", portletMenu); })(window); /* Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ /* This is an optimized version of Dojo, built for deployment and not for development. To get sources and documentation, please visit: http://dojotoolkit.org */ //>>built require({cache:{"dojox/fx/easing":function(){define("dojox/fx/easing",["dojo/_base/lang","dojo/_base/kernel","dojo/fx/easing"],function(_1,_2,_3){_2.deprecated("dojox.fx.easing","Upgraded to Core, use dojo.fx.easing instead","2.0");var _4=_1.getObject("dojox.fx",true);_4.easing=_3;return _3;});},"dijit/a11y":function(){define("dijit/a11y",["dojo/_base/array","dojo/_base/config","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-style","dojo/_base/sniff","./_base/manager","."],function(_5,_6,_7,_8,_9,_a,_b,_c,_d){var _e=(_d._isElementShown=function(_f){var s=_a.get(_f);return (s.visibility!="hidden")&&(s.visibility!="collapsed")&&(s.display!="none")&&(_9.get(_f,"type")!="hidden");});_d.hasDefaultTabStop=function(_10){switch(_10.nodeName.toLowerCase()){case "a":return _9.has(_10,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return true;case "iframe":var _11;try{var _12=_10.contentDocument;if("designMode" in _12&&_12.designMode=="on"){return true;}_11=_12.body;}catch(e1){try{_11=_10.contentWindow.document.body;}catch(e2){return false;}}return _11&&(_11.contentEditable=="true"||(_11.firstChild&&_11.firstChild.contentEditable=="true"));default:return _10.contentEditable=="true";}};var _13=(_d.isTabNavigable=function(_14){if(_9.get(_14,"disabled")){return false;}else{if(_9.has(_14,"tabIndex")){return _9.get(_14,"tabIndex")>=0;}else{return _d.hasDefaultTabStop(_14);}}});_d._getTabNavigable=function(_15){var _16,_17,_18,_19,_1a,_1b,_1c={};function _1d(_1e){return _1e&&_1e.tagName.toLowerCase()=="input"&&_1e.type&&_1e.type.toLowerCase()=="radio"&&_1e.name&&_1e.name.toLowerCase();};var _1f=function(_20){for(var _21=_20.firstChild;_21;_21=_21.nextSibling){if(_21.nodeType!=1||(_b("ie")<=9&&_21.scopeName!=="HTML")||!_e(_21)){continue;}if(_13(_21)){var _22=_9.get(_21,"tabIndex");if(!_9.has(_21,"tabIndex")||_22==0){if(!_16){_16=_21;}_17=_21;}else{if(_22>0){if(!_18||_22<_19){_19=_22;_18=_21;}if(!_1a||_22>=_1b){_1b=_22;_1a=_21;}}}var rn=_1d(_21);if(_9.get(_21,"checked")&&rn){_1c[rn]=_21;}}if(_21.nodeName.toUpperCase()!="SELECT"){_1f(_21);}}};if(_e(_15)){_1f(_15);}function rs(_23){return _1c[_1d(_23)]||_23;};return {first:rs(_16),last:rs(_17),lowest:rs(_18),highest:rs(_1a)};};_d.getFirstInTabbingOrder=function(_24){var _25=_d._getTabNavigable(_8.byId(_24));return _25.lowest?_25.lowest:_25.first;};_d.getLastInTabbingOrder=function(_26){var _27=_d._getTabNavigable(_8.byId(_26));return _27.last?_27.last:_27.highest;};return {hasDefaultTabStop:_d.hasDefaultTabStop,isTabNavigable:_d.isTabNavigable,_getTabNavigable:_d._getTabNavigable,getFirstInTabbingOrder:_d.getFirstInTabbingOrder,getLastInTabbingOrder:_d.getLastInTabbingOrder};});},"dojo/NodeList-fx":function(){define("dojo/NodeList-fx",["dojo/_base/NodeList","./_base/lang","./_base/connect","./_base/fx","./fx"],function(_28,_29,_2a,_2b,_2c){_29.extend(_28,{_anim:function(obj,_2d,_2e){_2e=_2e||{};var a=_2c.combine(this.map(function(_2f){var _30={node:_2f};_29.mixin(_30,_2e);return obj[_2d](_30);}));return _2e.auto?a.play()&&this:a;},wipeIn:function(_31){return this._anim(_2c,"wipeIn",_31);},wipeOut:function(_32){return this._anim(_2c,"wipeOut",_32);},slideTo:function(_33){return this._anim(_2c,"slideTo",_33);},fadeIn:function(_34){return this._anim(_2b,"fadeIn",_34);},fadeOut:function(_35){return this._anim(_2b,"fadeOut",_35);},animateProperty:function(_36){return this._anim(_2b,"animateProperty",_36);},anim:function(_37,_38,_39,_3a,_3b){var _3c=_2c.combine(this.map(function(_3d){return _2b.animateProperty({node:_3d,properties:_37,duration:_38||350,easing:_39});}));if(_3a){_2a.connect(_3c,"onEnd",_3a);}return _3c.play(_3b||0);}});return _28;});},"dijit/_WidgetBase":function(){define("dijit/_WidgetBase",["require","dojo/_base/array","dojo/aspect","dojo/_base/config","dojo/_base/connect","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-class","dojo/dom-construct","dojo/dom-geometry","dojo/dom-style","dojo/_base/kernel","dojo/_base/lang","dojo/on","dojo/ready","dojo/Stateful","dojo/topic","dojo/_base/window","./registry"],function(_3e,_3f,_40,_41,_42,_43,dom,_44,_45,_46,_47,_48,_49,_4a,on,_4b,_4c,_4d,win,_4e){if(!_49.isAsync){_4b(0,function(){var _4f=["dijit/_base/manager"];_3e(_4f);});}var _50={};function _51(obj){var ret={};for(var _52 in obj){ret[_52.toLowerCase()]=true;}return ret;};function _53(_54){return function(val){_44[val?"set":"remove"](this.domNode,_54,val);this._set(_54,val);};};function _55(a,b){return a===b||(a!==a&&b!==b);};return _43("dijit._WidgetBase",_4c,{id:"",_setIdAttr:"domNode",lang:"",_setLangAttr:_53("lang"),dir:"",_setDirAttr:_53("dir"),textDir:"","class":"",_setClassAttr:{node:"domNode",type:"class"},style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{},_blankGif:_41.blankGif||_3e.toUrl("dojo/resources/blank.gif"),postscript:function(_56,_57){this.create(_56,_57);},create:function(_58,_59){this.srcNodeRef=dom.byId(_59);this._connects=[];this._supportingWidgets=[];if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_58){this.params=_58;_4a.mixin(this,_58);}this.postMixInProperties();if(!this.id){this.id=_4e.getUniqueId(this.declaredClass.replace(/\./g,"_"));}_4e.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();var _5a=this.srcNodeRef;if(_5a&&_5a.parentNode&&this.domNode!==_5a){_5a.parentNode.replaceChild(this.domNode,_5a);}}if(this.domNode){this.domNode.setAttribute("widgetId",this.id);}this.postCreate();if(this.srcNodeRef&&!this.srcNodeRef.parentNode){delete this.srcNodeRef;}this._created=true;},_applyAttributes:function(){var _5b=this.constructor,_5c=_5b._setterAttrs;if(!_5c){_5c=(_5b._setterAttrs=[]);for(var _5d in this.attributeMap){_5c.push(_5d);}var _5e=_5b.prototype;for(var _5f in _5e){if(_5f in this.attributeMap){continue;}var _60="_set"+_5f.replace(/^[a-z]|-[a-zA-Z]/g,function(c){return c.charAt(c.length-1).toUpperCase();})+"Attr";if(_60 in _5e){_5c.push(_5f);}}}_3f.forEach(_5c,function(_61){if(this.params&&_61 in this.params){}else{if(this[_61]){this.set(_61,this[_61]);}}},this);for(var _62 in this.params){this.set(_62,this[_62]);}},postMixInProperties:function(){},buildRendering:function(){if(!this.domNode){this.domNode=this.srcNodeRef||_46.create("div");}if(this.baseClass){var _63=this.baseClass.split(" ");if(!this.isLeftToRight()){_63=_63.concat(_3f.map(_63,function(_64){return _64+"Rtl";}));}_45.add(this.domNode,_63);}},postCreate:function(){},startup:function(){if(this._started){return;}this._started=true;_3f.forEach(this.getChildren(),function(obj){if(!obj._started&&!obj._destroyed&&_4a.isFunction(obj.startup)){obj.startup();obj._started=true;}});},destroyRecursive:function(_65){this._beingDestroyed=true;this.destroyDescendants(_65);this.destroy(_65);},destroy:function(_66){this._beingDestroyed=true;this.uninitialize();var c;while((c=this._connects.pop())){c.remove();}var w;while((w=this._supportingWidgets.pop())){if(w.destroyRecursive){w.destroyRecursive();}else{if(w.destroy){w.destroy();}}}this.destroyRendering(_66);_4e.remove(this.id);this._destroyed=true;},destroyRendering:function(_67){if(this.bgIframe){this.bgIframe.destroy(_67);delete this.bgIframe;}if(this.domNode){if(_67){_44.remove(this.domNode,"widgetId");}else{_46.destroy(this.domNode);}delete this.domNode;}if(this.srcNodeRef){if(!_67){_46.destroy(this.srcNodeRef);}delete this.srcNodeRef;}},destroyDescendants:function(_68){_3f.forEach(this.getChildren(),function(_69){if(_69.destroyRecursive){_69.destroyRecursive(_68);}});},uninitialize:function(){return false;},_setStyleAttr:function(_6a){var _6b=this.domNode;if(_4a.isObject(_6a)){_48.set(_6b,_6a);}else{if(_6b.style.cssText){_6b.style.cssText+="; "+_6a;}else{_6b.style.cssText=_6a;}}this._set("style",_6a);},_attrToDom:function(_6c,_6d,_6e){_6e=arguments.length>=3?_6e:this.attributeMap[_6c];_3f.forEach(_4a.isArray(_6e)?_6e:[_6e],function(_6f){var _70=this[_6f.node||_6f||"domNode"];var _71=_6f.type||"attribute";switch(_71){case "attribute":if(_4a.isFunction(_6d)){_6d=_4a.hitch(this,_6d);}var _72=_6f.attribute?_6f.attribute:(/^on[A-Z][a-zA-Z]*$/.test(_6c)?_6c.toLowerCase():_6c);_44.set(_70,_72,_6d);break;case "innerText":_70.innerHTML="";_70.appendChild(win.doc.createTextNode(_6d));break;case "innerHTML":_70.innerHTML=_6d;break;case "class":_45.replace(_70,_6d,this[_6c]);break;}},this);},get:function(_73){var _74=this._getAttrNames(_73);return this[_74.g]?this[_74.g]():this[_73];},set:function(_75,_76){if(typeof _75==="object"){for(var x in _75){this.set(x,_75[x]);}return this;}var _77=this._getAttrNames(_75),_78=this[_77.s];if(_4a.isFunction(_78)){var _79=_78.apply(this,Array.prototype.slice.call(arguments,1));}else{var _7a=this.focusNode&&!_4a.isFunction(this.focusNode)?"focusNode":"domNode",tag=this[_7a].tagName,_7b=_50[tag]||(_50[tag]=_51(this[_7a])),map=_75 in this.attributeMap?this.attributeMap[_75]:_77.s in this?this[_77.s]:((_77.l in _7b&&typeof _76!="function")||/^aria-|^data-|^role$/.test(_75))?_7a:null;if(map!=null){this._attrToDom(_75,_76,map);}this._set(_75,_76);}return _79||this;},_attrPairNames:{},_getAttrNames:function(_7c){var apn=this._attrPairNames;if(apn[_7c]){return apn[_7c];}var uc=_7c.replace(/^[a-z]|-[a-zA-Z]/g,function(c){return c.charAt(c.length-1).toUpperCase();});return (apn[_7c]={n:_7c+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr",l:uc.toLowerCase()});},_set:function(_7d,_7e){var _7f=this[_7d];this[_7d]=_7e;if(this._watchCallbacks&&this._created&&!_55(_7e,_7f)){this._watchCallbacks(_7d,_7f,_7e);}},on:function(_80,_81){return _40.after(this,this._onMap(_80),_81,true);},_onMap:function(_82){var _83=this.constructor,map=_83._onMap;if(!map){map=(_83._onMap={});for(var _84 in _83.prototype){if(/^on/.test(_84)){map[_84.replace(/^on/,"").toLowerCase()]=_84;}}}return map[_82.toLowerCase()];},toString:function(){return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";},getChildren:function(){return this.containerNode?_4e.findWidgets(this.containerNode):[];},getParent:function(){return _4e.getEnclosingWidget(this.domNode.parentNode);},connect:function(obj,_85,_86){var _87=_42.connect(obj,_85,this,_86);this._connects.push(_87);return _87;},disconnect:function(_88){var i=_3f.indexOf(this._connects,_88);if(i!=-1){_88.remove();this._connects.splice(i,1);}},subscribe:function(t,_89){var _8a=_4d.subscribe(t,_4a.hitch(this,_89));this._connects.push(_8a);return _8a;},unsubscribe:function(_8b){this.disconnect(_8b);},isLeftToRight:function(){return this.dir?(this.dir=="ltr"):_47.isBodyLtr();},isFocusable:function(){return this.focus&&(_48.get(this.domNode,"display")!="none");},placeAt:function(_8c,_8d){if(_8c.declaredClass&&_8c.addChild){_8c.addChild(this,_8d);}else{_46.place(this.domNode,_8c,_8d);}return this;},getTextDir:function(_8e,_8f){return _8f;},applyTextDir:function(){},defer:function(fcn,_90){var _91=setTimeout(_4a.hitch(this,function(){if(!_91){return;}_91=null;if(!this._destroyed){_4a.hitch(this,fcn)();}}),_90||0);return {remove:function(){if(_91){clearTimeout(_91);_91=null;}return null;}};}});});},"dojox/fx":function(){define("dojox/fx",["./fx/_base"],function(_92){return _92;});},"dojo/Stateful":function(){define("dojo/Stateful",["./_base/declare","./_base/lang","./_base/array"],function(_93,_94,_95){return _93("dojo.Stateful",null,{postscript:function(_96){if(_96){_94.mixin(this,_96);}},get:function(_97){return this[_97];},set:function(_98,_99){if(typeof _98==="object"){for(var x in _98){if(_98.hasOwnProperty(x)&&x!="_watchCallbacks"){this.set(x,_98[x]);}}return this;}var _9a=this[_98];this[_98]=_99;if(this._watchCallbacks){this._watchCallbacks(_98,_9a,_99);}return this;},watch:function(_9b,_9c){var _9d=this._watchCallbacks;if(!_9d){var _9e=this;_9d=this._watchCallbacks=function(_9f,_a0,_a1,_a2){var _a3=function(_a4){if(_a4){_a4=_a4.slice();for(var i=0,l=_a4.length;i=9){_f7.x=0;}if(_f7.y<0||!_ef||_ef>=9){_f7.y=0;}}else{var pb=_e0.getPadBorderExtents(el);_f7.w-=pb.w;_f7.h-=pb.h;_f7.x+=pb.l;_f7.y+=pb.t;var _f9=el.clientWidth,_fa=_f7.w-_f9;if(_f9>0&&_fa>0){if(rtl&&has("rtl-adjust-position-for-verticalScrollBar")){_f7.x+=_fa;}_f7.w=_f9;}_f9=el.clientHeight;_fa=_f7.h-_f9;if(_f9>0&&_fa>0){_f7.h=_f9;}}if(_f8){if(_f7.y<0){_f7.h+=_f7.y;_f7.y=0;}if(_f7.x<0){_f7.w+=_f7.x;_f7.x=0;}if(_f7.y+_f7.h>_f3){_f7.h=_f3-_f7.y;}if(_f7.x+_f7.w>_f2){_f7.w=_f2-_f7.x;}}var l=_f5.x-_f7.x,t=_f5.y-_f7.y,r=l+_f5.w-_f7.w,bot=t+_f5.h-_f7.h;var s,old;if(r*l>0&&(!!el.scrollLeft||el==_f4||el.scrollWidth>el.offsetHeight)){s=Math[l<0?"max":"min"](l,r);if(rtl&&((_ef==8&&!_f1)||_ef>=9)){s=-s;}old=el.scrollLeft;el.scrollLeft+=s;s=el.scrollLeft-old;_f5.x-=s;}if(bot*t>0&&(!!el.scrollTop||el==_f4||el.scrollHeight>el.offsetHeight)){s=Math.ceil(Math[t<0?"max":"min"](t,bot));old=el.scrollTop;el.scrollTop+=s;s=el.scrollTop-old;_f5.y-=s;}el=(el!=_f4)&&!_f8&&el.parentNode;}}catch(error){console.error("scrollIntoView: "+error);_ec.scrollIntoView(false);}};return _e8;});},"dijit/_OnDijitClickMixin":function(){define("dijit/_OnDijitClickMixin",["dojo/on","dojo/_base/array","dojo/keys","dojo/_base/declare","dojo/_base/sniff","dojo/_base/unload","dojo/_base/window"],function(on,_fb,_fc,_fd,has,_fe,win){var _ff=null;if(has("ie")<9){(function(){var _100=function(evt){_ff=evt.srcElement;};win.doc.attachEvent("onkeydown",_100);_fe.addOnWindowUnload(function(){win.doc.detachEvent("onkeydown",_100);});})();}else{win.doc.addEventListener("keydown",function(evt){_ff=evt.target;},true);}var _101=function(node,_102){if(/input|button/i.test(node.nodeName)){return on(node,"click",_102);}else{function _103(e){return (e.keyCode==_fc.ENTER||e.keyCode==_fc.SPACE)&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey;};var _104=[on(node,"keypress",function(e){if(_103(e)){_ff=e.target;e.preventDefault();}}),on(node,"keyup",function(e){if(_103(e)&&e.target==_ff){_ff=null;_102.call(this,e);}}),on(node,"click",function(e){_102.call(this,e);})];return {remove:function(){_fb.forEach(_104,function(h){h.remove();});}};}};return _fd("dijit._OnDijitClickMixin",null,{connect:function(obj,_105,_106){return this.inherited(arguments,[obj,_105=="ondijitclick"?_101:_105,_106]);}});});},"dijit/hccss":function(){define("dijit/hccss",["require","dojo/_base/config","dojo/dom-class","dojo/dom-construct","dojo/dom-style","dojo/ready","dojo/_base/sniff","dojo/_base/window"],function(_107,_108,_109,_10a,_10b,_10c,has,win){if(has("ie")||has("mozilla")){_10c(90,function(){var div=_10a.create("div",{id:"a11yTestNode",style:{cssText:"border: 1px solid;"+"border-color:red green;"+"position: absolute;"+"height: 5px;"+"top: -999px;"+"background-image: url(\""+(_108.blankGif||_107.toUrl("dojo/resources/blank.gif"))+"\");"}},win.body());var cs=_10b.getComputedStyle(div);if(cs){var _10d=cs.backgroundImage;var _10e=(cs.borderTopColor==cs.borderRightColor)||(_10d!=null&&(_10d=="none"||_10d=="url(invalid-url:)"));if(_10e){_109.add(win.body(),"dijit_a11y");}if(has("ie")){div.outerHTML="";}else{win.body().removeChild(div);}}});}});},"dojox/fx/_base":function(){define("dojox/fx/_base",["dojo/_base/array","dojo/_base/lang","dojo/_base/fx","dojo/fx","dojo/dom","dojo/dom-style","dojo/dom-geometry","dojo/_base/connect","dojo/_base/html"],function(_10f,lang,_110,_111,dom,_112,_113,_114,_115){var _116=lang.getObject("dojox.fx",true);_116.sizeTo=function(args){var node=args.node=dom.byId(args.node),abs="absolute";var _117=args.method||"chain";if(!args.duration){args.duration=500;}if(_117=="chain"){args.duration=Math.floor(args.duration/2);}var top,_118,left,_119,_11a,_11b=null;var init=(function(n){return function(){var cs=_112.getComputedStyle(n),pos=cs.position,w=cs.width,h=cs.height;top=(pos==abs?n.offsetTop:parseInt(cs.top)||0);left=(pos==abs?n.offsetLeft:parseInt(cs.left)||0);_11a=(w=="auto"?0:parseInt(w));_11b=(h=="auto"?0:parseInt(h));_119=left-Math.floor((args.width-_11a)/2);_118=top-Math.floor((args.height-_11b)/2);if(pos!=abs&&pos!="relative"){var ret=_112.coords(n,true);top=ret.y;left=ret.x;n.style.position=abs;n.style.top=top+"px";n.style.left=left+"px";}};})(node);var _11c=_110.animateProperty(lang.mixin({properties:{height:function(){init();return {end:args.height||0,start:_11b};},top:function(){return {start:top,end:_118};}}},args));var _11d=_110.animateProperty(lang.mixin({properties:{width:function(){return {start:_11a,end:args.width||0};},left:function(){return {start:left,end:_119};}}},args));var anim=_111[(args.method=="combine"?"combine":"chain")]([_11c,_11d]);return anim;};_116.slideBy=function(args){var node=args.node=dom.byId(args.node),top,left;var init=(function(n){return function(){var cs=_112.getComputedStyle(n);var pos=cs.position;top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);left=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);if(pos!="absolute"&&pos!="relative"){var ret=_113.coords(n,true);top=ret.y;left=ret.x;n.style.position="absolute";n.style.top=top+"px";n.style.left=left+"px";}};})(node);init();var _11e=_110.animateProperty(lang.mixin({properties:{top:top+(args.top||0),left:left+(args.left||0)}},args));_114.connect(_11e,"beforeBegin",_11e,init);return _11e;};_116.crossFade=function(args){var _11f=args.nodes[0]=dom.byId(args.nodes[0]),op1=_115.style(_11f,"opacity"),_120=args.nodes[1]=dom.byId(args.nodes[1]),op2=_115.style(_120,"opacity");var _121=_111.combine([_110[(op1==0?"fadeIn":"fadeOut")](lang.mixin({node:_11f},args)),_110[(op1==0?"fadeOut":"fadeIn")](lang.mixin({node:_120},args))]);return _121;};_116.highlight=function(args){var node=args.node=dom.byId(args.node);args.duration=args.duration||400;var _122=args.color||"#ffff99",_123=_115.style(node,"backgroundColor");if(_123=="rgba(0, 0, 0, 0)"){_123="transparent";}var anim=_110.animateProperty(lang.mixin({properties:{backgroundColor:{start:_122,end:_123}}},args));if(_123=="transparent"){_114.connect(anim,"onEnd",anim,function(){node.style.backgroundColor=_123;});}return anim;};_116.wipeTo=function(args){args.node=dom.byId(args.node);var node=args.node,s=node.style;var dir=(args.width?"width":"height"),_124=args[dir],_125={};_125[dir]={start:function(){s.overflow="hidden";if(s.visibility=="hidden"||s.display=="none"){s[dir]="1px";s.display="";s.visibility="";return 1;}else{var now=_115.style(node,dir);return Math.max(now,1);}},end:_124};var anim=_110.animateProperty(lang.mixin({properties:_125},args));return anim;};return _116;});},"dijit/_Widget":function(){define("dijit/_Widget",["dojo/aspect","dojo/_base/config","dojo/_base/connect","dojo/_base/declare","dojo/_base/kernel","dojo/_base/lang","dojo/query","dojo/ready","./registry","./_WidgetBase","./_OnDijitClickMixin","./_FocusMixin","dojo/uacss","./hccss"],function(_126,_127,_128,_129,_12a,lang,_12b,_12c,_12d,_12e,_12f,_130){function _131(){};function _132(_133){return function(obj,_134,_135,_136){if(obj&&typeof _134=="string"&&obj[_134]==_131){return obj.on(_134.substring(2).toLowerCase(),lang.hitch(_135,_136));}return _133.apply(_128,arguments);};};_126.around(_128,"connect",_132);if(_12a.connect){_126.around(_12a,"connect",_132);}var _137=_129("dijit._Widget",[_12e,_12f,_130],{onClick:_131,onDblClick:_131,onKeyDown:_131,onKeyPress:_131,onKeyUp:_131,onMouseDown:_131,onMouseMove:_131,onMouseOut:_131,onMouseOver:_131,onMouseLeave:_131,onMouseEnter:_131,onMouseUp:_131,constructor:function(_138){this._toConnect={};for(var name in _138){if(this[name]===_131){this._toConnect[name.replace(/^on/,"").toLowerCase()]=_138[name];delete _138[name];}}},postCreate:function(){this.inherited(arguments);for(var name in this._toConnect){this.on(name,this._toConnect[name]);}delete this._toConnect;},on:function(type,func){if(this[this._onMap(type)]===_131){return _128.connect(this.domNode,type.toLowerCase(),this,func);}return this.inherited(arguments);},_setFocusedAttr:function(val){this._focused=val;this._set("focused",val);},setAttribute:function(attr,_139){_12a.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(attr,_139);},attr:function(name,_13a){if(_127.isDebug){var _13b=arguments.callee._ach||(arguments.callee._ach={}),_13c=(arguments.callee.caller||"unknown caller").toString();if(!_13b[_13c]){_12a.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+_13c,"","2.0");_13b[_13c]=true;}}var args=arguments.length;if(args>=2||typeof name==="object"){return this.set.apply(this,arguments);}else{return this.get(name);}},getDescendants:function(){_12a.deprecated(this.declaredClass+"::getDescendants() is deprecated. Use getChildren() instead.","","2.0");return this.containerNode?_12b("[widgetId]",this.containerNode).map(_12d.byNode):[];},_onShow:function(){this.onShow();},onShow:function(){},onHide:function(){},onClose:function(){return true;}});if(!_12a.isAsync){_12c(0,function(){var _13d=["dijit/_base"];require(_13d);});}return _137;});},"dijit/_FocusMixin":function(){define("dijit/_FocusMixin",["./focus","./_WidgetBase","dojo/_base/declare","dojo/_base/lang"],function(_13e,_13f,_140,lang){lang.extend(_13f,{focused:false,onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus();},_onBlur:function(){this.onBlur();}});return _140("dijit._FocusMixin",null,{_focusManager:_13e});});},"dijit/focus":function(){define("dijit/focus",["dojo/aspect","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-construct","dojo/Evented","dojo/_base/lang","dojo/on","dojo/ready","dojo/_base/sniff","dojo/Stateful","dojo/_base/unload","dojo/_base/window","dojo/window","./a11y","./registry","."],function(_141,_142,dom,_143,_144,_145,lang,on,_146,has,_147,_148,win,_149,a11y,_14a,_14b){var _14c=_142([_147,_145],{curNode:null,activeStack:[],constructor:function(){var _14d=lang.hitch(this,function(node){if(dom.isDescendant(this.curNode,node)){this.set("curNode",null);}if(dom.isDescendant(this.prevNode,node)){this.set("prevNode",null);}});_141.before(_144,"empty",_14d);_141.before(_144,"destroy",_14d);},registerIframe:function(_14e){return this.registerWin(_14e.contentWindow,_14e);},registerWin:function(_14f,_150){var _151=this;var _152=function(evt){_151._justMouseDowned=true;setTimeout(function(){_151._justMouseDowned=false;},0);if(has("ie")&&evt&&evt.srcElement&&evt.srcElement.parentNode==null){return;}_151._onTouchNode(_150||evt.target||evt.srcElement,"mouse");};var doc=has("ie")<9?_14f.document.documentElement:_14f.document;if(doc){if(has("ie")<9){_14f.document.body.attachEvent("onmousedown",_152);var _153=function(evt){var tag=evt.srcElement.tagName.toLowerCase();if(tag=="#document"||tag=="body"){return;}if(a11y.isTabNavigable(evt.srcElement)){_151._onFocusNode(_150||evt.srcElement);}else{_151._onTouchNode(_150||evt.srcElement);}};doc.attachEvent("onactivate",_153);var _154=function(evt){_151._onBlurNode(_150||evt.srcElement);};doc.attachEvent("ondeactivate",_154);return {remove:function(){_14f.document.detachEvent("onmousedown",_152);doc.detachEvent("onactivate",_153);doc.detachEvent("ondeactivate",_154);doc=null;}};}else{doc.body.addEventListener("mousedown",_152,true);doc.body.addEventListener("touchstart",_152,true);var _155=function(evt){_151._onFocusNode(_150||evt.target);};doc.addEventListener("focus",_155,true);var _156=function(evt){_151._onBlurNode(_150||evt.target);};doc.addEventListener("blur",_156,true);return {remove:function(){doc.body.removeEventListener("mousedown",_152,true);doc.body.removeEventListener("touchstart",_152,true);doc.removeEventListener("focus",_155,true);doc.removeEventListener("blur",_156,true);doc=null;}};}}},_onBlurNode:function(){this.set("prevNode",this.curNode);this.set("curNode",null);if(this._justMouseDowned){return;}if(this._clearActiveWidgetsTimer){clearTimeout(this._clearActiveWidgetsTimer);}this._clearActiveWidgetsTimer=setTimeout(lang.hitch(this,function(){delete this._clearActiveWidgetsTimer;this._setStack([]);this.prevNode=null;}),100);},_onTouchNode:function(node,by){if(this._clearActiveWidgetsTimer){clearTimeout(this._clearActiveWidgetsTimer);delete this._clearActiveWidgetsTimer;}var _157=[];try{while(node){var _158=_143.get(node,"dijitPopupParent");if(_158){node=_14a.byId(_158).domNode;}else{if(node.tagName&&node.tagName.toLowerCase()=="body"){if(node===win.body()){break;}node=_149.get(node.ownerDocument).frameElement;}else{var id=node.getAttribute&&node.getAttribute("widgetId"),_159=id&&_14a.byId(id);if(_159&&!(by=="mouse"&&_159.get("disabled"))){_157.unshift(id);}node=node.parentNode;}}}}catch(e){}this._setStack(_157,by);},_onFocusNode:function(node){if(!node){return;}if(node.nodeType==9){return;}this._onTouchNode(node);if(node==this.curNode){return;}this.set("curNode",node);},_setStack:function(_15a,by){var _15b=this.activeStack;this.set("activeStack",_15a);for(var _15c=0;_15c=_15c;i--){_15d=_14a.byId(_15b[i]);if(_15d){_15d._hasBeenBlurred=true;_15d.set("focused",false);if(_15d._focusManager==this){_15d._onBlur(by);}this.emit("widget-blur",_15d,by);}}for(i=_15c;i<_15a.length;i++){_15d=_14a.byId(_15a[i]);if(_15d){_15d.set("focused",true);if(_15d._focusManager==this){_15d._onFocus(by);}this.emit("widget-focus",_15d,by);}}},focus:function(node){if(node){try{node.focus();}catch(e){}}}});var _15e=new _14c();_146(function(){var _15f=_15e.registerWin(win.doc.parentWindow||win.doc.defaultView);if(has("ie")){_148.addOnWindowUnload(function(){_15f.remove();_15f=null;});}});_14b.focus=function(node){_15e.focus(node);};for(var attr in _15e){if(!/^_/.test(attr)){_14b.focus[attr]=typeof _15e[attr]=="function"?lang.hitch(_15e,attr):_15e[attr];}}_15e.watch(function(attr,_160,_161){_14b.focus[attr]=_161;});return _15e;});},"dijit/main":function(){define("dijit/main",["dojo/_base/kernel"],function(dojo){return dojo.dijit;});},"dojo/_base/query":function(){define("dojo/_base/query",["./kernel","../query","./NodeList"],function(dojo){return dojo.query;});},"*noref":1}});define("dojox/_dojox_fx",[],1);require(["dojox/fx","dojox/fx/Shadow","dojox/fx/easing"]);/* Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ /* This is an optimized version of Dojo, built for deployment and not for development. To get sources and documentation, please visit: http://dojotoolkit.org */ //>>built require({cache:{"dojox/gfx/arc":function(){define("dojox/gfx/arc",["./_base","dojo/_base/lang","./matrix"],function(g,_1,m){var _2=2*Math.PI,_3=Math.PI/4,_4=Math.PI/8,_5=_3+_4,_6=_7(_4);function _7(_8){var _9=Math.cos(_8),_a=Math.sin(_8),p2={x:_9+(4/3)*(1-_9),y:_a-(4/3)*_9*(1-_9)/_a};return {s:{x:_9,y:-_a},c1:{x:p2.x,y:-p2.y},c2:p2,e:{x:_9,y:_a}};};var _b=g.arc={unitArcAsBezier:_7,curvePI4:_6,arcAsBezier:function(_c,rx,ry,_d,_e,_f,x,y){_e=Boolean(_e);_f=Boolean(_f);var _10=m._degToRad(_d),rx2=rx*rx,ry2=ry*ry,pa=m.multiplyPoint(m.rotate(-_10),{x:(_c.x-x)/2,y:(_c.y-y)/2}),_11=pa.x*pa.x,_12=pa.y*pa.y,c1=Math.sqrt((rx2*ry2-rx2*_12-ry2*_11)/(rx2*_12+ry2*_11));if(isNaN(c1)){c1=0;}var ca={x:c1*rx*pa.y/ry,y:-c1*ry*pa.x/rx};if(_e==_f){ca={x:-ca.x,y:-ca.y};}var c=m.multiplyPoint([m.translate((_c.x+x)/2,(_c.y+y)/2),m.rotate(_10)],ca);var _13=m.normalize([m.translate(c.x,c.y),m.rotate(_10),m.scale(rx,ry)]);var _14=m.invert(_13),sp=m.multiplyPoint(_14,_c),ep=m.multiplyPoint(_14,x,y),_15=Math.atan2(sp.y,sp.x),_16=Math.atan2(ep.y,ep.x),_17=_15-_16;if(_f){_17=-_17;}if(_17<0){_17+=_2;}else{if(_17>_2){_17-=_2;}}var _18=_4,_19=_6,_1a=_f?_18:-_18,_1b=[];for(var _1c=_17;_1c>0;_1c-=_3){if(_1c<_5){_18=_1c/2;_19=_7(_18);_1a=_f?_18:-_18;_1c=0;}var c2,e,M=m.normalize([_13,m.rotate(_15+_1a)]);if(_f){c1=m.multiplyPoint(M,_19.c1);c2=m.multiplyPoint(M,_19.c2);e=m.multiplyPoint(M,_19.e);}else{c1=m.multiplyPoint(M,_19.c2);c2=m.multiplyPoint(M,_19.c1);e=m.multiplyPoint(M,_19.s);}_1b.push([c1.x,c1.y,c2.x,c2.y,e.x,e.y]);_15+=2*_1a;}return _1b;}};return _b;});},"dojox/gfx":function(){define("dojox/gfx",["dojo/_base/lang","./gfx/_base","./gfx/renderer!"],function(_1d,_1e,_1f){_1e.switchTo(_1f);return _1e;});},"dojox/gfx/gradient":function(){define("dojox/gfx/gradient",["dojo/_base/lang","./matrix","dojo/_base/Color"],function(_20,m,_21){var _22=_20.getObject("dojox.gfx.gradient",true);var C=_21;_22.rescale=function(_23,_24,to){var len=_23.length,_25=(to<_24),_26;if(_25){var tmp=_24;_24=to;to=tmp;}if(!len){return [];}if(to<=_23[0].offset){_26=[{offset:0,color:_23[0].color},{offset:1,color:_23[0].color}];}else{if(_24>=_23[len-1].offset){_26=[{offset:0,color:_23[len-1].color},{offset:1,color:_23[len-1].color}];}else{var _27=to-_24,_28,_29,i;_26=[];if(_24<0){_26.push({offset:0,color:new C(_23[0].color)});}for(i=0;i=_24){break;}}if(i){_29=_23[i-1];_26.push({offset:0,color:_21.blendColors(new C(_29.color),new C(_28.color),(_24-_29.offset)/(_28.offset-_29.offset))});}else{_26.push({offset:0,color:new C(_28.color)});}for(;i=to){break;}_26.push({offset:(_28.offset-_24)/_27,color:new C(_28.color)});}if(i=4)?"auto":"optimizeLegibility";function _42(ns,_43){if(win.doc.createElementNS){return win.doc.createElementNS(ns,_43);}else{return win.doc.createElement(_43);}};function _44(_45){if(svg.useSvgWeb){return win.doc.createTextNode(_45,true);}else{return win.doc.createTextNode(_45);}};function _46(){if(svg.useSvgWeb){return win.doc.createDocumentFragment(true);}else{return win.doc.createDocumentFragment();}};svg.xmlns={xlink:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"};svg.getRef=function(_47){if(!_47||_47=="none"){return null;}if(_47.match(/^url\(#.+\)$/)){return dom.byId(_47.slice(5,-1));}if(_47.match(/^#dojoUnique\d+$/)){return dom.byId(_47.slice(1));}return null;};svg.dasharray={solid:"none",shortdash:[4,1],shortdot:[1,1],shortdashdot:[4,1,1,1],shortdashdotdot:[4,1,1,1,1,1],dot:[1,3],dash:[4,3],longdash:[8,3],dashdot:[4,3,1,3],longdashdot:[8,3,1,3],longdashdotdot:[8,3,1,3,1,3]};_3b("dojox.gfx.svg.Shape",gs.Shape,{setFill:function(_48){if(!_48){this.fillStyle=null;this.rawNode.setAttribute("fill","none");this.rawNode.setAttribute("fill-opacity",0);return this;}var f;var _49=function(x){this.setAttribute(x,f[x].toFixed(8));};if(typeof (_48)=="object"&&"type" in _48){switch(_48.type){case "linear":f=g.makeParameters(g.defaultLinearGradient,_48);var _4a=this._setFillObject(f,"linearGradient");arr.forEach(["x1","y1","x2","y2"],_49,_4a);break;case "radial":f=g.makeParameters(g.defaultRadialGradient,_48);var _4b=this._setFillObject(f,"radialGradient");arr.forEach(["cx","cy","r"],_49,_4b);break;case "pattern":f=g.makeParameters(g.defaultPattern,_48);var _4c=this._setFillObject(f,"pattern");arr.forEach(["x","y","width","height"],_49,_4c);break;}this.fillStyle=f;return this;}f=g.normalizeColor(_48);this.fillStyle=f;this.rawNode.setAttribute("fill",f.toCss());this.rawNode.setAttribute("fill-opacity",f.a);this.rawNode.setAttribute("fill-rule","evenodd");return this;},setStroke:function(_4d){var rn=this.rawNode;if(!_4d){this.strokeStyle=null;rn.setAttribute("stroke","none");rn.setAttribute("stroke-opacity",0);return this;}if(typeof _4d=="string"||_3a.isArray(_4d)||_4d instanceof _3d){_4d={color:_4d};}var s=this.strokeStyle=g.makeParameters(g.defaultStroke,_4d);s.color=g.normalizeColor(s.color);if(s){rn.setAttribute("stroke",s.color.toCss());rn.setAttribute("stroke-opacity",s.color.a);rn.setAttribute("stroke-width",s.width);rn.setAttribute("stroke-linecap",s.cap);if(typeof s.join=="number"){rn.setAttribute("stroke-linejoin","miter");rn.setAttribute("stroke-miterlimit",s.join);}else{rn.setAttribute("stroke-linejoin",s.join);}var da=s.style.toLowerCase();if(da in svg.dasharray){da=svg.dasharray[da];}if(da instanceof Array){da=_3a._toArray(da);for(var i=0;ix){this.bbox.l=x;}if(this.bbox.ry){this.bbox.t=y;}if(this.bbox.b=_98){_99={action:_96,args:_97.slice(0,_97.length-_97.length%_98)};this.segments.push(_99);this._updateWithSegment(_99);}}else{_99={action:_96,args:[]};this.segments.push(_99);this._updateWithSegment(_99);}}},_collectArgs:function(_9a,_9b){for(var i=0;i<_9b.length;++i){var t=_9b[i];if(typeof t=="boolean"){_9a.push(t?1:0);}else{if(typeof t=="number"){_9a.push(t);}else{if(t instanceof Array){this._collectArgs(_9a,t);}else{if("x" in t&&"y" in t){_9a.push(t.x,t.y);}}}}}},moveTo:function(){this._confirmSegmented();var _9c=[];this._collectArgs(_9c,arguments);this._pushSegment(this.absolute?"M":"m",_9c);return this;},lineTo:function(){this._confirmSegmented();var _9d=[];this._collectArgs(_9d,arguments);this._pushSegment(this.absolute?"L":"l",_9d);return this;},hLineTo:function(){this._confirmSegmented();var _9e=[];this._collectArgs(_9e,arguments);this._pushSegment(this.absolute?"H":"h",_9e);return this;},vLineTo:function(){this._confirmSegmented();var _9f=[];this._collectArgs(_9f,arguments);this._pushSegment(this.absolute?"V":"v",_9f);return this;},curveTo:function(){this._confirmSegmented();var _a0=[];this._collectArgs(_a0,arguments);this._pushSegment(this.absolute?"C":"c",_a0);return this;},smoothCurveTo:function(){this._confirmSegmented();var _a1=[];this._collectArgs(_a1,arguments);this._pushSegment(this.absolute?"S":"s",_a1);return this;},qCurveTo:function(){this._confirmSegmented();var _a2=[];this._collectArgs(_a2,arguments);this._pushSegment(this.absolute?"Q":"q",_a2);return this;},qSmoothCurveTo:function(){this._confirmSegmented();var _a3=[];this._collectArgs(_a3,arguments);this._pushSegment(this.absolute?"T":"t",_a3);return this;},arcTo:function(){this._confirmSegmented();var _a4=[];this._collectArgs(_a4,arguments);this._pushSegment(this.absolute?"A":"a",_a4);return this;},closePath:function(){this._confirmSegmented();this._pushSegment("Z",[]);return this;},_confirmSegmented:function(){if(!this.segmented){var _a5=this.shape.path;this.shape.path=[];this._setPath(_a5);this.shape.path=this.shape.path.join("");this.segmented=true;}},_setPath:function(_a6){var p=_89.isArray(_a6)?_a6:_a6.match(g.pathSvgRegExp);this.segments=[];this.absolute=true;this.bbox={};this.last={};if(!p){return;}var _a7="",_a8=[],l=p.length;for(var i=0;i0){var _b2=m.normalize(arg[0]);for(var i=1;i1){return new m.Matrix2D({dx:a,dy:b});}return new m.Matrix2D({dx:a.x,dy:a.y});},scale:function(a,b){if(arguments.length>1){return new m.Matrix2D({xx:a,yy:b});}if(typeof a=="number"){return new m.Matrix2D({xx:a,yy:a});}return new m.Matrix2D({xx:a.x,yy:a.y});},rotate:function(_b3){var c=Math.cos(_b3);var s=Math.sin(_b3);return new m.Matrix2D({xx:c,xy:-s,yx:s,yy:c});},rotateg:function(_b4){return m.rotate(m._degToRad(_b4));},skewX:function(_b5){return new m.Matrix2D({xy:Math.tan(_b5)});},skewXg:function(_b6){return m.skewX(m._degToRad(_b6));},skewY:function(_b7){return new m.Matrix2D({yx:Math.tan(_b7)});},skewYg:function(_b8){return m.skewY(m._degToRad(_b8));},reflect:function(a,b){if(arguments.length==1){b=a.y;a=a.x;}var a2=a*a,b2=b*b,n2=a2+b2,xy=2*a*b/n2;return new m.Matrix2D({xx:2*a2/n2-1,xy:xy,yx:xy,yy:2*b2/n2-1});},project:function(a,b){if(arguments.length==1){b=a.y;a=a.x;}var a2=a*a,b2=b*b,n2=a2+b2,xy=a*b/n2;return new m.Matrix2D({xx:a2/n2,xy:xy,yx:xy,yy:b2/n2});},normalize:function(_b9){return (_b9 instanceof m.Matrix2D)?_b9:new m.Matrix2D(_b9);},clone:function(_ba){var obj=new m.Matrix2D();for(var i in _ba){if(typeof (_ba[i])=="number"&&typeof (obj[i])=="number"&&obj[i]!=_ba[i]){obj[i]=_ba[i];}}return obj;},invert:function(_bb){var M=m.normalize(_bb),D=M.xx*M.yy-M.xy*M.yx;M=new m.Matrix2D({xx:M.yy/D,xy:-M.xy/D,yx:-M.yx/D,yy:M.xx/D,dx:(M.xy*M.dy-M.yy*M.dx)/D,dy:(M.yx*M.dx-M.xx*M.dy)/D});return M;},_multiplyPoint:function(_bc,x,y){return {x:_bc.xx*x+_bc.xy*y+_bc.dx,y:_bc.yx*x+_bc.yy*y+_bc.dy};},multiplyPoint:function(_bd,a,b){var M=m.normalize(_bd);if(typeof a=="number"&&typeof b=="number"){return m._multiplyPoint(M,a,b);}return m._multiplyPoint(M,a.x,a.y);},multiply:function(_be){var M=m.normalize(_be);for(var i=1;i2){return m._sandwich(m.rotate(_c0),a,b);}return m._sandwich(m.rotate(_c0),a.x,a.y);},rotategAt:function(_c1,a,b){if(arguments.length>2){return m._sandwich(m.rotateg(_c1),a,b);}return m._sandwich(m.rotateg(_c1),a.x,a.y);},skewXAt:function(_c2,a,b){if(arguments.length>2){return m._sandwich(m.skewX(_c2),a,b);}return m._sandwich(m.skewX(_c2),a.x,a.y);},skewXgAt:function(_c3,a,b){if(arguments.length>2){return m._sandwich(m.skewXg(_c3),a,b);}return m._sandwich(m.skewXg(_c3),a.x,a.y);},skewYAt:function(_c4,a,b){if(arguments.length>2){return m._sandwich(m.skewY(_c4),a,b);}return m._sandwich(m.skewY(_c4),a.x,a.y);},skewYgAt:function(_c5,a,b){if(arguments.length>2){return m._sandwich(m.skewYg(_c5),a,b);}return m._sandwich(m.skewYg(_c5),a.x,a.y);}});g.Matrix2D=m.Matrix2D;return m;});},"dojox/gfx/_base":function(){define("dojox/gfx/_base",["dojo/_base/lang","dojo/_base/html","dojo/_base/Color","dojo/_base/sniff","dojo/_base/window","dojo/_base/array","dojo/dom","dojo/dom-construct","dojo/dom-geometry"],function(_c6,_c7,_c8,has,win,arr,dom,_c9,_ca){var g=_c6.getObject("dojox.gfx",true),b=g._base={};g._hasClass=function(_cb,_cc){var cls=_cb.getAttribute("className");return cls&&(" "+cls+" ").indexOf(" "+_cc+" ")>=0;};g._addClass=function(_cd,_ce){var cls=_cd.getAttribute("className")||"";if(!cls||(" "+cls+" ").indexOf(" "+_ce+" ")<0){_cd.setAttribute("className",cls+(cls?" ":"")+_ce);}};g._removeClass=function(_cf,_d0){var cls=_cf.getAttribute("className");if(cls){_cf.setAttribute("className",cls.replace(new RegExp("(^|\\s+)"+_d0+"(\\s+|$)"),"$1$2"));}};b._getFontMeasurements=function(){var _d1={"1em":0,"1ex":0,"100%":0,"12pt":0,"16px":0,"xx-small":0,"x-small":0,"small":0,"medium":0,"large":0,"x-large":0,"xx-large":0};var p;if(has("ie")){win.doc.documentElement.style.fontSize="100%";}var div=_c9.create("div",{style:{position:"absolute",left:"0",top:"-100px",width:"30px",height:"1000em",borderWidth:"0",margin:"0",padding:"0",outline:"none",lineHeight:"1",overflow:"hidden"}},win.body());for(p in _d1){div.style.fontSize=p;_d1[p]=Math.round(div.offsetHeight*12/16)*16/12/1000;}win.body().removeChild(div);return _d1;};var _d2=null;b._getCachedFontMeasurements=function(_d3){if(_d3||!_d2){_d2=b._getFontMeasurements();}return _d2;};var _d4=null,_d5={};b._getTextBox=function(_d6,_d7,_d8){var m,s,al=arguments.length;var i;if(!_d4){_d4=_c9.create("div",{style:{position:"absolute",top:"-10000px",left:"0"}},win.body());}m=_d4;m.className="";s=m.style;s.borderWidth="0";s.margin="0";s.padding="0";s.outline="0";if(al>1&&_d7){for(i in _d7){if(i in _d5){continue;}s[i]=_d7[i];}}if(al>2&&_d8){m.className=_d8;}m.innerHTML=_d6;if(m["getBoundingClientRect"]){var bcr=m.getBoundingClientRect();return {l:bcr.left,t:bcr.top,w:bcr.width||(bcr.right-bcr.left),h:bcr.height||(bcr.bottom-bcr.top)};}else{return _ca.getMarginBox(m);}};var _d9=0;b._getUniqueId=function(){var id;do{id=dojo._scopeName+"xUnique"+(++_d9);}while(dom.byId(id));return id;};_c6.mixin(g,{defaultPath:{type:"path",path:""},defaultPolyline:{type:"polyline",points:[]},defaultRect:{type:"rect",x:0,y:0,width:100,height:100,r:0},defaultEllipse:{type:"ellipse",cx:0,cy:0,rx:200,ry:100},defaultCircle:{type:"circle",cx:0,cy:0,r:100},defaultLine:{type:"line",x1:0,y1:0,x2:100,y2:100},defaultImage:{type:"image",x:0,y:0,width:0,height:0,src:""},defaultText:{type:"text",x:0,y:0,text:"",align:"start",decoration:"none",rotated:false,kerning:true},defaultTextPath:{type:"textpath",text:"",align:"start",decoration:"none",rotated:false,kerning:true},defaultStroke:{type:"stroke",color:"black",style:"solid",width:1,cap:"butt",join:4},defaultLinearGradient:{type:"linear",x1:0,y1:0,x2:100,y2:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultRadialGradient:{type:"radial",cx:0,cy:0,r:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultPattern:{type:"pattern",x:0,y:0,width:0,height:0,src:""},defaultFont:{type:"font",style:"normal",variant:"normal",weight:"normal",size:"10pt",family:"serif"},getDefault:(function(){var _da={};return function(_db){var t=_da[_db];if(t){return new t();}t=_da[_db]=new Function();t.prototype=g["default"+_db];return new t();};})(),normalizeColor:function(_dc){return (_dc instanceof _c8)?_dc:new _c8(_dc);},normalizeParameters:function(_dd,_de){var x;if(_de){var _df={};for(x in _dd){if(x in _de&&!(x in _df)){_dd[x]=_de[x];}}}return _dd;},makeParameters:function(_e0,_e1){var i=null;if(!_e1){return _c6.delegate(_e0);}var _e2={};for(i in _e0){if(!(i in _e2)){_e2[i]=_c6.clone((i in _e1)?_e1[i]:_e0[i]);}}return _e2;},formatNumber:function(x,_e3){var val=x.toString();if(val.indexOf("e")>=0){val=x.toFixed(4);}else{var _e4=val.indexOf(".");if(_e4>=0&&val.length-_e4>5){val=x.toFixed(4);}}if(x<0){return val;}return _e3?" "+val:val;},makeFontString:function(_e5){return _e5.style+" "+_e5.variant+" "+_e5.weight+" "+_e5.size+" "+_e5.family;},splitFontString:function(str){var _e6=g.getDefault("Font");var t=str.split(/\s+/);do{if(t.length<5){break;}_e6.style=t[0];_e6.variant=t[1];_e6.weight=t[2];var i=t[3].indexOf("/");_e6.size=i<0?t[3]:t[3].substring(0,i);var j=4;if(i<0){if(t[4]=="/"){j=6;}else{if(t[4].charAt(0)=="/"){j=5;}}}if(j2){var _e7=g.px_in_pt();var val=parseFloat(len);switch(len.slice(-2)){case "px":return val;case "pt":return val*_e7;case "in":return val*72*_e7;case "pc":return val*12*_e7;case "mm":return val*g.mm_in_pt*_e7;case "cm":return val*g.cm_in_pt*_e7;}}return parseFloat(len);},pathVmlRegExp:/([A-Za-z]+)|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,pathSvgRegExp:/([A-Za-z])|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,equalSources:function(a,b){return a&&b&&a===b;},switchTo:function(_e8){var ns=typeof _e8=="string"?g[_e8]:_e8;if(ns){arr.forEach(["Group","Rect","Ellipse","Circle","Line","Polyline","Image","Text","Path","TextPath","Surface","createSurface","fixTarget"],function(_e9){g[_e9]=ns[_e9];});}}});return g;});},"dojox/gfx/shape":function(){define("dojox/gfx/shape",["./_base","dojo/_base/lang","dojo/_base/declare","dojo/_base/window","dojo/_base/sniff","dojo/_base/connect","dojo/_base/array","dojo/dom-construct","dojo/_base/Color","./matrix"],function(g,_ea,_eb,win,has,_ec,arr,_ed,_ee,_ef){var _f0=g.shape={};var _f1={};var _f2={};var _f3=0,_f4=has("ie")<9;function _f5(_f6){var _f7={};for(var key in _f6){if(_f6.hasOwnProperty(key)){_f7[key]=_f6[key];}}return _f7;};_f0.register=function(_f8){var t=_f8.declaredClass.split(".").pop();var i=t in _f1?++_f1[t]:((_f1[t]=0));var uid=t+i;_f2[uid]=_f8;return uid;};_f0.byId=function(id){return _f2[id];};_f0.dispose=function(_f9){delete _f2[_f9.getUID()];++_f3;if(_f4&&_f3>10000){_f2=_f5(_f2);_f3=0;}};_eb("dojox.gfx.shape.Shape",null,{constructor:function(){this.rawNode=null;this.shape=null;this.matrix=null;this.fillStyle=null;this.strokeStyle=null;this.bbox=null;this.parent=null;this.parentMatrix=null;var uid=_f0.register(this);this.getUID=function(){return uid;};},getNode:function(){return this.rawNode;},getShape:function(){return this.shape;},getTransform:function(){return this.matrix;},getFill:function(){return this.fillStyle;},getStroke:function(){return this.strokeStyle;},getParent:function(){return this.parent;},getBoundingBox:function(){return this.bbox;},getTransformedBoundingBox:function(){var b=this.getBoundingBox();if(!b){return null;}var m=this._getRealMatrix(),gm=_ef;return [gm.multiplyPoint(m,b.x,b.y),gm.multiplyPoint(m,b.x+b.width,b.y),gm.multiplyPoint(m,b.x+b.width,b.y+b.height),gm.multiplyPoint(m,b.x,b.y+b.height)];},getEventSource:function(){return this.rawNode;},setShape:function(_fa){this.shape=g.makeParameters(this.shape,_fa);this.bbox=null;return this;},setFill:function(_fb){if(!_fb){this.fillStyle=null;return this;}var f=null;if(typeof (_fb)=="object"&&"type" in _fb){switch(_fb.type){case "linear":f=g.makeParameters(g.defaultLinearGradient,_fb);break;case "radial":f=g.makeParameters(g.defaultRadialGradient,_fb);break;case "pattern":f=g.makeParameters(g.defaultPattern,_fb);break;}}else{f=g.normalizeColor(_fb);}this.fillStyle=f;return this;},setStroke:function(_fc){if(!_fc){this.strokeStyle=null;return this;}if(typeof _fc=="string"||_ea.isArray(_fc)||_fc instanceof _ee){_fc={color:_fc};}var s=this.strokeStyle=g.makeParameters(g.defaultStroke,_fc);s.color=g.normalizeColor(s.color);return this;},setTransform:function(_fd){this.matrix=_ef.clone(_fd?_ef.normalize(_fd):_ef.identity);return this._applyTransform();},_applyTransform:function(){return this;},moveToFront:function(){var p=this.getParent();if(p){p._moveChildToFront(this);this._moveToFront();}return this;},moveToBack:function(){var p=this.getParent();if(p){p._moveChildToBack(this);this._moveToBack();}return this;},_moveToFront:function(){},_moveToBack:function(){},applyRightTransform:function(_fe){return _fe?this.setTransform([this.matrix,_fe]):this;},applyLeftTransform:function(_ff){return _ff?this.setTransform([_ff,this.matrix]):this;},applyTransform:function(_100){return _100?this.setTransform([this.matrix,_100]):this;},removeShape:function(_101){if(this.parent){this.parent.remove(this,_101);}return this;},_setParent:function(_102,_103){this.parent=_102;return this._updateParentMatrix(_103);},_updateParentMatrix:function(_104){this.parentMatrix=_104?_ef.clone(_104):null;return this._applyTransform();},_getRealMatrix:function(){var m=this.matrix;var p=this.parent;while(p){if(p.matrix){m=_ef.multiply(p.matrix,m);}p=p.parent;}return m;}});_f0._eventsProcessing={connect:function(name,_105,_106){return _ec.connect(this.getEventSource(),name,_f0.fixCallback(this,g.fixTarget,_105,_106));},disconnect:function(_107){_ec.disconnect(_107);}};_f0.fixCallback=function(_108,_109,_10a,_10b){if(!_10b){_10b=_10a;_10a=null;}if(_ea.isString(_10b)){_10a=_10a||win.global;if(!_10a[_10b]){throw (["dojox.gfx.shape.fixCallback: scope[\"",_10b,"\"] is null (scope=\"",_10a,"\")"].join(""));}return function(e){return _109(e,_108)?_10a[_10b].apply(_10a,arguments||[]):undefined;};}return !_10a?function(e){return _109(e,_108)?_10b.apply(_10a,arguments):undefined;}:function(e){return _109(e,_108)?_10b.apply(_10a,arguments||[]):undefined;};};_ea.extend(_f0.Shape,_f0._eventsProcessing);_f0.Container={_init:function(){this.children=[];},openBatch:function(){},closeBatch:function(){},add:function(_10c){var _10d=_10c.getParent();if(_10d){_10d.remove(_10c,true);}this.children.push(_10c);return _10c._setParent(this,this._getRealMatrix());},remove:function(_10e,_10f){for(var i=0;it.x){bbox.l=t.x;}if(bbox.rt.y){bbox.t=t.y;}if(bbox.b";var _132=("adj" in _131.firstChild);_131.innerHTML="";return _132;});return {load:function(id,_133,load){if(_12e&&id!="force"){load(_12e);return;}var _134=_12d.forceGfxRenderer,_135=!_134&&(lang.isString(_12d.gfxRenderer)?_12d.gfxRenderer:"svg,vml,canvas,silverlight").split(","),_136,_137;while(!_134&&_135.length){switch(_135.shift()){case "svg":if("SVGAngle" in win.global){_134="svg";}break;case "vml":if(has("vml")){_134="vml";}break;case "silverlight":try{if(has("ie")){_136=new ActiveXObject("AgControl.AgControl");if(_136&&_136.IsVersionSupported("1.0")){_137=true;}}else{if(navigator.plugins["Silverlight Plug-In"]){_137=true;}}}catch(e){_137=false;}finally{_136=null;}if(_137){_134="silverlight";}break;case "canvas":if(win.global.CanvasRenderingContext2D){_134="canvas";}break;}}if(_134==="canvas"&&_12d.canvasEvents!==false){_134="canvasWithEvents";}if(_12d.isDebug){}function _138(){_133(["dojox/gfx/"+_134],function(_139){g.renderer=_134;_12e=_139;load(_139);});};if(_134=="svg"&&typeof window.svgweb!="undefined"){window.svgweb.addOnLoad(_138);}else{_138();}}};});},"dojox/gfx/vml":function(){define("dojox/gfx/vml",["dojo/_base/lang","dojo/_base/declare","dojo/_base/array","dojo/_base/Color","dojo/_base/sniff","dojo/_base/config","dojo/dom","dojo/dom-geometry","dojo/_base/window","./_base","./shape","./path","./arc","./gradient","./matrix"],function(lang,_13a,arr,_13b,has,_13c,dom,_13d,win,g,gs,_13e,_13f,_140,m){var vml=g.vml={};vml.xmlns="urn:schemas-microsoft-com:vml";document.namespaces.add("v",vml.xmlns);var _141=["*","group","roundrect","oval","shape","rect","imagedata","path","textpath","text"],i=0,l=1,s=document.createStyleSheet();if(has("ie")>=8){i=1;l=_141.length;}for(;i0){a.push({offset:1,color:g.normalizeColor(f.colors[0].color)});}arr.forEach(f.colors,function(v,i){a.push({offset:1-v.offset*c,color:g.normalizeColor(v.color)});});i=a.length-1;while(i>=0&&a[i].offset<0){--i;}if(i2){a.pop();}}i=a.length-1,s=[];if(a[i].offset>0){s.push("0 "+a[i].color.toHex());}for(;i>=0;--i){s.push(a[i].offset.toFixed(5)+" "+a[i].color.toHex());}fo=this.rawNode.fill;fo.colors.value=s.join(";");fo.method="sigma";fo.type="gradientradial";if(isNaN(w)||isNaN(h)||isNaN(l)||isNaN(t)){fo.focusposition="0.5 0.5";}else{fo.focusposition=((f.cx-l)/w).toFixed(5)+" "+((f.cy-t)/h).toFixed(5);}fo.focussize="0 0";fo.on=true;break;case "pattern":f=g.makeParameters(g.defaultPattern,fill);this.fillStyle=f;fo=this.rawNode.fill;fo.type="tile";fo.src=f.src;if(f.width&&f.height){fo.size.x=g.px2pt(f.width);fo.size.y=g.px2pt(f.height);}fo.alignShape="f";fo.position.x=0;fo.position.y=0;fo.origin.x=f.width?f.x/f.width:0;fo.origin.y=f.height?f.y/f.height:0;fo.on=true;break;}this.rawNode.fill.opacity=1;return this;}this.fillStyle=g.normalizeColor(fill);fo=this.rawNode.fill;if(!fo){fo=this.rawNode.ownerDocument.createElement("v:fill");}fo.method="any";fo.type="solid";fo.opacity=this.fillStyle.a;var _144=this.rawNode.filters["DXImageTransform.Microsoft.Alpha"];if(_144){_144.opacity=Math.round(this.fillStyle.a*100);}this.rawNode.fillcolor=this.fillStyle.toHex();this.rawNode.filled=true;return this;},setStroke:function(_145){if(!_145){this.strokeStyle=null;this.rawNode.stroked="f";return this;}if(typeof _145=="string"||lang.isArray(_145)||_145 instanceof _13b){_145={color:_145};}var s=this.strokeStyle=g.makeParameters(g.defaultStroke,_145);s.color=g.normalizeColor(s.color);var rn=this.rawNode;rn.stroked=true;rn.strokecolor=s.color.toCss();rn.strokeweight=s.width+"px";if(rn.stroke){rn.stroke.opacity=s.color.a;rn.stroke.endcap=this._translate(this._capMap,s.cap);if(typeof s.join=="number"){rn.stroke.joinstyle="miter";rn.stroke.miterlimit=s.join;}else{rn.stroke.joinstyle=s.join;}rn.stroke.dashstyle=s.style=="none"?"Solid":s.style;}return this;},_capMap:{butt:"flat"},_capMapReversed:{flat:"butt"},_translate:function(dict,_146){return (_146 in dict)?dict[_146]:_146;},_applyTransform:function(){var _147=this._getRealMatrix();if(_147){var skew=this.rawNode.skew;if(typeof skew=="undefined"){for(var i=0;i7){var node=this.rawNode.ownerDocument.createElement("v:roundrect");node.arcsize=r;node.style.display="inline-block";this.rawNode=node;this.rawNode.__gfxObject__=this.getUID();}else{this.rawNode.arcsize=r;}if(_152){if(_153){_152.insertBefore(this.rawNode,_153);}else{_152.appendChild(this.rawNode);}}var _154=this.rawNode.style;_154.left=_151.x.toFixed();_154.top=_151.y.toFixed();_154.width=(typeof _151.width=="string"&&_151.width.indexOf("%")>=0)?_151.width:Math.max(_151.width.toFixed(),0);_154.height=(typeof _151.height=="string"&&_151.height.indexOf("%")>=0)?_151.height:Math.max(_151.height.toFixed(),0);return this.setTransform(this.matrix).setFill(this.fillStyle).setStroke(this.strokeStyle);}});vml.Rect.nodeType="roundrect";_13a("dojox.gfx.vml.Ellipse",[vml.Shape,gs.Ellipse],{setShape:function(_155){var _156=this.shape=g.makeParameters(this.shape,_155);this.bbox=null;var _157=this.rawNode.style;_157.left=(_156.cx-_156.rx).toFixed();_157.top=(_156.cy-_156.ry).toFixed();_157.width=(_156.rx*2).toFixed();_157.height=(_156.ry*2).toFixed();return this.setTransform(this.matrix);}});vml.Ellipse.nodeType="oval";_13a("dojox.gfx.vml.Circle",[vml.Shape,gs.Circle],{setShape:function(_158){var _159=this.shape=g.makeParameters(this.shape,_158);this.bbox=null;var _15a=this.rawNode.style;_15a.left=(_159.cx-_159.r).toFixed();_15a.top=(_159.cy-_159.r).toFixed();_15a.width=(_159.r*2).toFixed();_15a.height=(_159.r*2).toFixed();return this;}});vml.Circle.nodeType="oval";_13a("dojox.gfx.vml.Line",[vml.Shape,gs.Line],{constructor:function(_15b){if(_15b){_15b.setAttribute("dojoGfxType","line");}},setShape:function(_15c){var _15d=this.shape=g.makeParameters(this.shape,_15c);this.bbox=null;this.rawNode.path.v="m"+_15d.x1.toFixed()+" "+_15d.y1.toFixed()+"l"+_15d.x2.toFixed()+" "+_15d.y2.toFixed()+"e";return this.setTransform(this.matrix);}});vml.Line.nodeType="shape";_13a("dojox.gfx.vml.Polyline",[vml.Shape,gs.Polyline],{constructor:function(_15e){if(_15e){_15e.setAttribute("dojoGfxType","polyline");}},setShape:function(_15f,_160){if(_15f&&_15f instanceof Array){this.shape=g.makeParameters(this.shape,{points:_15f});if(_160&&this.shape.points.length){this.shape.points.push(this.shape.points[0]);}}else{this.shape=g.makeParameters(this.shape,_15f);}this.bbox=null;this._normalizePoints();var attr=[],p=this.shape.points;if(p.length>0){attr.push("m");attr.push(p[0].x.toFixed(),p[0].y.toFixed());if(p.length>1){attr.push("l");for(var i=1;i0&&_163.yy>0){s.filter="";s.width=Math.floor(_163.xx*_165.width);s.height=Math.floor(_163.yy*_165.height);s.left=Math.floor(_163.dx);s.top=Math.floor(_163.dy);}else{var ps=_164.parentNode.style;s.left="0px";s.top="0px";s.width=ps.width;s.height=ps.height;_163=m.multiply(_163,{xx:_165.width/parseInt(s.width),yy:_165.height/parseInt(s.height)});var f=_164.filters["DXImageTransform.Microsoft.Matrix"];if(f){f.M11=_163.xx;f.M12=_163.xy;f.M21=_163.yx;f.M22=_163.yy;f.Dx=_163.dx;f.Dy=_163.dy;}else{s.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+_163.xx+", M12="+_163.xy+", M21="+_163.yx+", M22="+_163.yy+", Dx="+_163.dx+", Dy="+_163.dy+")";}}return this;},_setDimensions:function(_166,_167){var r=this.rawNode,f=r.filters["DXImageTransform.Microsoft.Matrix"];if(f){var s=r.style;s.width=_166;s.height=_167;return this._applyTransform();}return this;}});vml.Image.nodeType="rect";_13a("dojox.gfx.vml.Text",[vml.Shape,gs.Text],{constructor:function(_168){if(_168){_168.setAttribute("dojoGfxType","text");}this.fontStyle=null;},_alignment:{start:"left",middle:"center",end:"right"},setShape:function(_169){this.shape=g.makeParameters(this.shape,_169);this.bbox=null;var r=this.rawNode,s=this.shape,x=s.x,y=s.y.toFixed(),path;switch(s.align){case "middle":x-=5;break;case "end":x-=10;break;}path="m"+x.toFixed()+","+y+"l"+(x+10).toFixed()+","+y+"e";var p=null,t=null,c=r.childNodes;for(var i=0;i1){return;}var path=this[this.renderers[_16f.action]](_16f,last);if(typeof this.vmlPath=="string"){this.vmlPath+=path.join("");this.rawNode.path.v=this.vmlPath+" r0,0 e";}else{Array.prototype.push.apply(this.vmlPath,path);}},setShape:function(_170){this.vmlPath=[];this.lastControl.type="";this.inherited(arguments);this.vmlPath=this.vmlPath.join("");this.rawNode.path.v=this.vmlPath+" r0,0 e";return this;},_pathVmlToSvgMap:{m:"M",l:"L",t:"m",r:"l",c:"C",v:"c",qb:"Q",x:"z",e:""},renderers:{M:"_moveToA",m:"_moveToR",L:"_lineToA",l:"_lineToR",H:"_hLineToA",h:"_hLineToR",V:"_vLineToA",v:"_vLineToR",C:"_curveToA",c:"_curveToR",S:"_smoothCurveToA",s:"_smoothCurveToR",Q:"_qCurveToA",q:"_qCurveToR",T:"_qSmoothCurveToA",t:"_qSmoothCurveToR",A:"_arcTo",a:"_arcTo",Z:"_closePath",z:"_closePath"},_addArgs:function(path,_171,from,upto){var n=_171 instanceof Array?_171:_171.args;for(var i=from;i2){p.push(" l");this._addArgs(p,n,2,l);}this.lastControl.type="";return p;},_moveToR:function(_177,last){return this._moveToA(this._adjustRelCrd(last,_177));},_lineToA:function(_178){var p=[" l"],n=_178 instanceof Array?_178:_178.args;this._addArgs(p,n,0,n.length);this.lastControl.type="";return p;},_lineToR:function(_179,last){return this._lineToA(this._adjustRelCrd(last,_179));},_hLineToA:function(_17a,last){var p=[" l"],y=" "+last.y.toFixed(),n=_17a instanceof Array?_17a:_17a.args,l=n.length;for(var i=0;i7){rs.display="inline-block";}s._parent=p;s._nodes.push(c);p.style.width=_18f;p.style.height=_190;cs.position="absolute";cs.width=_18f;cs.height=_190;cs.clip="rect(0px "+_18f+" "+_190+" 0px)";rs.position="absolute";rs.width=_18f;rs.height=_190;r.coordsize=(_18f==="100%"?_18f:parseFloat(_18f))+" "+(_190==="100%"?_190:parseFloat(_190));r.coordorigin="0 0";var b=s.bgNode=r.ownerDocument.createElement("v:rect"),bs=b.style;bs.left=bs.top=0;bs.width=rs.width;bs.height=rs.height;b.filled=b.stroked="f";r.appendChild(b);c.appendChild(r);p.appendChild(c);s.width=g.normalizedLength(_18f);s.height=g.normalizedLength(_190);return s;};function _191(_192,f,o){o=o||win.global;f.call(o,_192);if(_192 instanceof g.Surface||_192 instanceof g.Group){arr.forEach(_192.children,function(_193){_191(_193,f,o);});}};var _194=function(_195){if(this!=_195.getParent()){var _196=_195.getParent();if(_196){_196.remove(_195);}this.rawNode.appendChild(_195.rawNode);C.add.apply(this,arguments);_191(this,function(s){if(typeof (s.getFont)=="function"){s.setShape(s.getShape());s.setFont(s.getFont());}if(typeof (s.setFill)=="function"){s.setFill(s.getFill());s.setStroke(s.getStroke());}});}return this;};var _197=function(_198){if(this!=_198.getParent()){this.rawNode.appendChild(_198.rawNode);if(!_198.getParent()){_198.setFill(_198.getFill());_198.setStroke(_198.getStroke());}C.add.apply(this,arguments);}return this;};var C=gs.Container,_199={add:_13c.fixVmlAdd===true?_194:_197,remove:function(_19a,_19b){if(this==_19a.getParent()){if(this.rawNode==_19a.rawNode.parentNode){this.rawNode.removeChild(_19a.rawNode);}C.remove.apply(this,arguments);}return this;},clear:function(){var r=this.rawNode;while(r.firstChild!=r.lastChild){if(r.firstChild!=this.bgNode){r.removeChild(r.firstChild);}if(r.lastChild!=this.bgNode){r.removeChild(r.lastChild);}}return C.clear.apply(this,arguments);},_moveChildToFront:C._moveChildToFront,_moveChildToBack:C._moveChildToBack};var _19c={createGroup:function(){var node=this.createObject(vml.Group,null);var r=node.rawNode.ownerDocument.createElement("v:rect");r.style.left=r.style.top=0;r.style.width=node.rawNode.style.width;r.style.height=node.rawNode.style.height;r.filled=r.stroked="f";node.rawNode.appendChild(r);node.bgNode=r;return node;},createImage:function(_19d){if(!this.rawNode){return null;}var _19e=new vml.Image(),doc=this.rawNode.ownerDocument,node=doc.createElement("v:rect");node.stroked="f";node.style.width=this.rawNode.style.width;node.style.height=this.rawNode.style.height;var img=doc.createElement("v:imagedata");node.appendChild(img);_19e.setRawNode(node);this.rawNode.appendChild(node);_19e.setShape(_19d);this.add(_19e);return _19e;},createRect:function(rect){if(!this.rawNode){return null;}var _19f=new vml.Rect,node=this.rawNode.ownerDocument.createElement("v:roundrect");if(has("ie")>7){node.style.display="inline-block";}_19f.setRawNode(node);this.rawNode.appendChild(node);_19f.setShape(rect);this.add(_19f);return _19f;},createObject:function(_1a0,_1a1){if(!this.rawNode){return null;}var _1a2=new _1a0(),node=this.rawNode.ownerDocument.createElement("v:"+_1a0.nodeType);_1a2.setRawNode(node);this.rawNode.appendChild(node);switch(_1a0){case vml.Group:case vml.Line:case vml.Polyline:case vml.Image:case vml.Text:case vml.Path:case vml.TextPath:this._overrideSize(node);}_1a2.setShape(_1a1);this.add(_1a2);return _1a2;},_overrideSize:function(node){var s=this.rawNode.style,w=s.width,h=s.height;node.style.width=w;node.style.height=h;node.coordsize=parseInt(w)+" "+parseInt(h);}};lang.extend(vml.Group,_199);lang.extend(vml.Group,gs.Creator);lang.extend(vml.Group,_19c);lang.extend(vml.Surface,_199);lang.extend(vml.Surface,gs.Creator);lang.extend(vml.Surface,_19c);vml.fixTarget=function(_1a3,_1a4){if(!_1a3.gfxTarget){_1a3.gfxTarget=gs.byId(_1a3.target.__gfxObject__);}return true;};return vml;});},"*noref":1}});define("dojox/_dojox_gfx",[],1);require(["dojox/gfx"]);/* Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ /* This is an optimized version of Dojo, built for deployment and not for development. To get sources and documentation, please visit: http://dojotoolkit.org */ //>>built require({cache:{"dojox/lang/functional/array":function(){define("dojox/lang/functional/array",["dojo/_base/kernel","dojo/_base/lang","dojo/_base/array","dojo/_base/window","./lambda"],function(_1,_2,_3,_4,df){var _5={};_2.mixin(df,{filter:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||_4.global;f=df.lambda(f);var t=[],v,i,n;if(_2.isArray(a)){for(i=0,n=a.length;i_16){_1d-=1;}return {text:(s.substring(0,_1d)+this.trailingSymbol),truncated:true};}var _1e=_1d+Math.round((end-_1d)*_19),_1f=this.getTextWidth(s.substring(0,_1e),_15);if(_1f<_16){_1d=_1e;end=end;}else{_1d=_1d;end=_1e;}}}},getTextWithLimitCharCount:function(s,_20,_21,_22){if(!s||s.length<=0){return {text:"",truncated:_22||false};}if(!_21||_21<=0||s.length<=_21){return {text:s,truncated:_22||false};}return {text:s.substring(0,_21)+this.trailingSymbol,truncated:true};},_plotFill:function(_23,dim,_24){if(!_23||!_23.type||!_23.space){return _23;}var _25=_23.space;switch(_23.type){case "linear":if(_25==="plot"||_25==="shapeX"||_25==="shapeY"){_23=_a.makeParameters(_a.defaultLinearGradient,_23);_23.space=_25;if(_25==="plot"||_25==="shapeX"){var _26=dim.height-_24.t-_24.b;_23.y1=_24.t+_26*_23.y1/100;_23.y2=_24.t+_26*_23.y2/100;}if(_25==="plot"||_25==="shapeY"){var _26=dim.width-_24.l-_24.r;_23.x1=_24.l+_26*_23.x1/100;_23.x2=_24.l+_26*_23.x2/100;}}break;case "radial":if(_25==="plot"){_23=_a.makeParameters(_a.defaultRadialGradient,_23);_23.space=_25;var _27=dim.width-_24.l-_24.r,_28=dim.height-_24.t-_24.b;_23.cx=_24.l+_27*_23.cx/100;_23.cy=_24.t+_28*_23.cy/100;_23.r=_23.r*Math.sqrt(_27*_27+_28*_28)/200;}break;case "pattern":if(_25==="plot"||_25==="shapeX"||_25==="shapeY"){_23=_a.makeParameters(_a.defaultPattern,_23);_23.space=_25;if(_25==="plot"||_25==="shapeX"){var _26=dim.height-_24.t-_24.b;_23.y=_24.t+_26*_23.y/100;_23.height=_26*_23.height/100;}if(_25==="plot"||_25==="shapeY"){var _26=dim.width-_24.l-_24.r;_23.x=_24.l+_26*_23.x/100;_23.width=_26*_23.width/100;}}break;}return _23;},_shapeFill:function(_29,_2a){if(!_29||!_29.space){return _29;}var _2b=_29.space;switch(_29.type){case "linear":if(_2b==="shape"||_2b==="shapeX"||_2b==="shapeY"){_29=_a.makeParameters(_a.defaultLinearGradient,_29);_29.space=_2b;if(_2b==="shape"||_2b==="shapeX"){var _2c=_2a.width;_29.x1=_2a.x+_2c*_29.x1/100;_29.x2=_2a.x+_2c*_29.x2/100;}if(_2b==="shape"||_2b==="shapeY"){var _2c=_2a.height;_29.y1=_2a.y+_2c*_29.y1/100;_29.y2=_2a.y+_2c*_29.y2/100;}}break;case "radial":if(_2b==="shape"){_29=_a.makeParameters(_a.defaultRadialGradient,_29);_29.space=_2b;_29.cx=_2a.x+_2a.width/2;_29.cy=_2a.y+_2a.height/2;_29.r=_29.r*_2a.width/200;}break;case "pattern":if(_2b==="shape"||_2b==="shapeX"||_2b==="shapeY"){_29=_a.makeParameters(_a.defaultPattern,_29);_29.space=_2b;if(_2b==="shape"||_2b==="shapeX"){var _2c=_2a.width;_29.x=_2a.x+_2c*_29.x/100;_29.width=_2c*_29.width/100;}if(_2b==="shape"||_2b==="shapeY"){var _2c=_2a.height;_29.y=_2a.y+_2c*_29.y/100;_29.height=_2c*_29.height/100;}}break;}return _29;},_pseudoRadialFill:function(_2d,_2e,_2f,_30,end){if(!_2d||_2d.type!=="radial"||_2d.space!=="shape"){return _2d;}var _31=_2d.space;_2d=_a.makeParameters(_a.defaultRadialGradient,_2d);_2d.space=_31;if(arguments.length<4){_2d.cx=_2e.x;_2d.cy=_2e.y;_2d.r=_2d.r*_2f/100;return _2d;}var _32=arguments.length<5?_30:(end+_30)/2;return {type:"linear",x1:_2e.x,y1:_2e.y,x2:_2e.x+_2d.r*_2f*Math.cos(_32)/100,y2:_2e.y+_2d.r*_2f*Math.sin(_32)/100,colors:_2d.colors};return _2d;}});});},"dojox/gfx/utils":function(){define("dojox/gfx/utils",["dojo/_base/kernel","dojo/_base/lang","./_base","dojo/_base/html","dojo/_base/array","dojo/_base/window","dojo/_base/json","dojo/_base/Deferred","dojo/_base/sniff","require","dojo/_base/config"],function(_33,_34,g,_35,arr,win,_36,_37,has,_38,_39){var gu=g.utils={};_34.mixin(gu,{forEach:function(_3a,f,o){o=o||win.global;f.call(o,_3a);if(_3a instanceof g.Surface||_3a instanceof g.Group){arr.forEach(_3a.children,function(_3b){gu.forEach(_3b,f,o);});}},serialize:function(_3c){var t={},v,_3d=_3c instanceof g.Surface;if(_3d||_3c instanceof g.Group){t.children=arr.map(_3c.children,gu.serialize);if(_3d){return t.children;}}else{t.shape=_3c.getShape();}if(_3c.getTransform){v=_3c.getTransform();if(v){t.transform=v;}}if(_3c.getStroke){v=_3c.getStroke();if(v){t.stroke=v;}}if(_3c.getFill){v=_3c.getFill();if(v){t.fill=v;}}if(_3c.getFont){v=_3c.getFont();if(v){t.font=v;}}return t;},toJson:function(_3e,_3f){return _36.toJson(gu.serialize(_3e),_3f);},deserialize:function(_40,_41){if(_41 instanceof Array){return arr.map(_41,_34.hitch(null,gu.deserialize,_40));}var _42=("shape" in _41)?_40.createShape(_41.shape):_40.createGroup();if("transform" in _41){_42.setTransform(_41.transform);}if("stroke" in _41){_42.setStroke(_41.stroke);}if("fill" in _41){_42.setFill(_41.fill);}if("font" in _41){_42.setFont(_41.font);}if("children" in _41){arr.forEach(_41.children,_34.hitch(null,gu.deserialize,_42));}return _42;},fromJson:function(_43,_44){return gu.deserialize(_43,_36.fromJson(_44));},toSvg:function(_45){var _46=new _37();if(g.renderer==="svg"){try{var svg=gu._cleanSvg(gu._innerXML(_45.rawNode));_46.callback(svg);}catch(e){_46.errback(e);}}else{if(!gu._initSvgSerializerDeferred){gu._initSvgSerializer();}var _47=gu.toJson(_45);var _48=function(){try{var _49=_45.getDimensions();var _4a=_49.width;var _4b=_49.height;var _4c=gu._gfxSvgProxy.document.createElement("div");gu._gfxSvgProxy.document.body.appendChild(_4c);win.withDoc(gu._gfxSvgProxy.document,function(){_35.style(_4c,"width",_4a);_35.style(_4c,"height",_4b);},this);var ts=gu._gfxSvgProxy[dojox._scopeName].gfx.createSurface(_4c,_4a,_4b);var _4d=function(_4e){try{gu._gfxSvgProxy[dojox._scopeName].gfx.utils.fromJson(_4e,_47);var svg=gu._cleanSvg(_4c.innerHTML);_4e.clear();_4e.destroy();gu._gfxSvgProxy.document.body.removeChild(_4c);_46.callback(svg);}catch(e){_46.errback(e);}};ts.whenLoaded(null,_4d);}catch(ex){_46.errback(ex);}};if(gu._initSvgSerializerDeferred.fired>0){_48();}else{gu._initSvgSerializerDeferred.addCallback(_48);}}return _46;},_gfxSvgProxy:null,_initSvgSerializerDeferred:null,_svgSerializerInitialized:function(){gu._initSvgSerializerDeferred.callback(true);},_initSvgSerializer:function(){if(!gu._initSvgSerializerDeferred){gu._initSvgSerializerDeferred=new _37();var f=win.doc.createElement("iframe");_35.style(f,{display:"none",position:"absolute",width:"1em",height:"1em",top:"-10000px"});var _4f;if(has("ie")){f.onreadystatechange=function(){if(f.contentWindow.document.readyState=="complete"){f.onreadystatechange=function(){};_4f=setInterval(function(){if(f.contentWindow[_33.scopeMap["dojo"][1]._scopeName]&&f.contentWindow[_33.scopeMap["dojox"][1]._scopeName].gfx&&f.contentWindow[_33.scopeMap["dojox"][1]._scopeName].gfx.utils){clearInterval(_4f);f.contentWindow.parent[_33.scopeMap["dojox"][1]._scopeName].gfx.utils._gfxSvgProxy=f.contentWindow;f.contentWindow.parent[_33.scopeMap["dojox"][1]._scopeName].gfx.utils._svgSerializerInitialized();}},50);}};}else{f.onload=function(){f.onload=function(){};_4f=setInterval(function(){if(f.contentWindow[_33.scopeMap["dojo"][1]._scopeName]&&f.contentWindow[_33.scopeMap["dojox"][1]._scopeName].gfx&&f.contentWindow[_33.scopeMap["dojox"][1]._scopeName].gfx.utils){clearInterval(_4f);f.contentWindow.parent[_33.scopeMap["dojox"][1]._scopeName].gfx.utils._gfxSvgProxy=f.contentWindow;f.contentWindow.parent[_33.scopeMap["dojox"][1]._scopeName].gfx.utils._svgSerializerInitialized();}},50);};}var uri=(_39["dojoxGfxSvgProxyFrameUrl"]||_38.toUrl("dojox/gfx/resources/gfxSvgProxyFrame.html"));f.setAttribute("src",uri.toString());win.body().appendChild(f);}},_innerXML:function(_50){if(_50.innerXML){return _50.innerXML;}else{if(_50.xml){return _50.xml;}else{if(typeof XMLSerializer!="undefined"){return (new XMLSerializer()).serializeToString(_50);}}}return null;},_cleanSvg:function(svg){if(svg){if(svg.indexOf("xmlns=\"http://www.w3.org/2000/svg\"")==-1){svg=svg.substring(4,svg.length);svg=")/g,"=\"$1\"$2");}return svg;}});return gu;});},"dojox/main":function(){define("dojox/main",["dojo/_base/kernel"],function(_51){return _51.dojox;});},"dojox/lang/functional/reversed":function(){define("dojox/lang/functional/reversed",["dojo/_base/lang","dojo/_base/window","./lambda"],function(_52,win,df){_52.mixin(df,{filterRev:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||win.global;f=df.lambda(f);var t=[],v,i=a.length-1;for(;i>=0;--i){v=a[i];if(f.call(o,v,i,a)){t.push(v);}}return t;},forEachRev:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||win.global;f=df.lambda(f);for(var i=a.length-1;i>=0;f.call(o,a[i],i,a),--i){}},mapRev:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||win.global;f=df.lambda(f);var n=a.length,t=new Array(n),i=n-1,j=0;for(;i>=0;t[j++]=f.call(o,a[i],i,a),--i){}return t;},everyRev:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||win.global;f=df.lambda(f);for(var i=a.length-1;i>=0;--i){if(!f.call(o,a[i],i,a)){return false;}}return true;},someRev:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||win.global;f=df.lambda(f);for(var i=a.length-1;i>=0;--i){if(f.call(o,a[i],i,a)){return true;}}return false;}});return df;});},"dojox/charting/Chart":function(){define("dojox/charting/Chart",["dojo/_base/lang","dojo/_base/array","dojo/_base/declare","dojo/_base/html","dojo/dom","dojo/dom-geometry","dojo/dom-construct","dojo/_base/Color","dojo/_base/sniff","./Element","./Theme","./Series","./axis2d/common","dojox/gfx/shape","dojox/gfx","dojox/lang/functional","dojox/lang/functional/fold","dojox/lang/functional/reversed"],function(_53,arr,_54,_55,dom,_56,_57,_58,has,_59,_5a,_5b,_5c,_5d,g,_5e,_5f,_60){var dc=dojox.charting,_61=_5e.lambda("item.clear()"),_62=_5e.lambda("item.purgeGroup()"),_63=_5e.lambda("item.destroy()"),_64=_5e.lambda("item.dirty = false"),_65=_5e.lambda("item.dirty = true"),_66=_5e.lambda("item.name");_54("dojox.charting.Chart",null,{constructor:function(_67,_68){if(!_68){_68={};}this.margins=_68.margins?_68.margins:{l:10,t:10,r:10,b:10};this.stroke=_68.stroke;this.fill=_68.fill;this.delayInMs=_68.delayInMs||200;this.title=_68.title;this.titleGap=_68.titleGap;this.titlePos=_68.titlePos;this.titleFont=_68.titleFont;this.titleFontColor=_68.titleFontColor;this.chartTitle=null;this.theme=null;this.axes={};this.stack=[];this.plots={};this.series=[];this.runs={};this.dirty=true;this.coords=null;this._clearRects=[];this.node=dom.byId(_67);var box=_56.getMarginBox(_67);this.surface=g.createSurface(this.node,box.w||400,box.h||300);},destroy:function(){arr.forEach(this.series,_63);arr.forEach(this.stack,_63);_5e.forIn(this.axes,_63);if(this.chartTitle&&this.chartTitle.tagName){_57.destroy(this.chartTitle);}arr.forEach(this._clearRects,function(_69){_5d.dispose(_69);});this.surface.destroy();},getCoords:function(){return _55.coords(this.node,true);},setTheme:function(_6a){this.theme=_6a.clone();this.dirty=true;return this;},addAxis:function(_6b,_6c){var _6d,_6e=_6c&&_6c.type||"Default";if(typeof _6e=="string"){if(!dc.axis2d||!dc.axis2d[_6e]){throw Error("Can't find axis: "+_6e+" - Check "+"require() dependencies.");}_6d=new dc.axis2d[_6e](this,_6c);}else{_6d=new _6e(this,_6c);}_6d.name=_6b;_6d.dirty=true;if(_6b in this.axes){this.axes[_6b].destroy();}this.axes[_6b]=_6d;this.dirty=true;return this;},getAxis:function(_6f){return this.axes[_6f];},removeAxis:function(_70){if(_70 in this.axes){this.axes[_70].destroy();delete this.axes[_70];this.dirty=true;}return this;},addPlot:function(_71,_72){var _73,_74=_72&&_72.type||"Default";if(typeof _74=="string"){if(!dc.plot2d||!dc.plot2d[_74]){throw Error("Can't find plot: "+_74+" - didn't you forget to dojo"+".require() it?");}_73=new dc.plot2d[_74](this,_72);}else{_73=new _74(this,_72);}_73.name=_71;_73.dirty=true;if(_71 in this.plots){this.stack[this.plots[_71]].destroy();this.stack[this.plots[_71]]=_73;}else{this.plots[_71]=this.stack.length;this.stack.push(_73);}this.dirty=true;return this;},getPlot:function(_75){return this.stack[this.plots[_75]];},removePlot:function(_76){if(_76 in this.plots){var _77=this.plots[_76];delete this.plots[_76];this.stack[_77].destroy();this.stack.splice(_77,1);_5e.forIn(this.plots,function(idx,_78,_79){if(idx>_77){_79[_78]=idx-1;}});var ns=arr.filter(this.series,function(run){return run.plot!=_76;});if(ns.length_8f){_91[_90]=idx-1;}});this.dirty=true;}return this;},updateSeries:function(_92,_93){if(_92 in this.runs){var run=this.series[this.runs[_92]];run.update(_93);this._invalidateDependentPlots(run.plot,false);this._invalidateDependentPlots(run.plot,true);}return this;},getSeriesOrder:function(_94){return _5e.map(_5e.filter(this.series,function(run){return run.plot==_94;}),_66);},setSeriesOrder:function(_95){var _96,_97={},_98=_5e.filter(_95,function(_99){if(!(_99 in this.runs)||(_99 in _97)){return false;}var run=this.series[this.runs[_99]];if(_96){if(run.plot!=_96){return false;}}else{_96=run.plot;}_97[_99]=1;return true;},this);_5e.forEach(this.series,function(run){var _9a=run.name;if(!(_9a in _97)&&run.plot==_96){_98.push(_9a);}});var _9b=_5e.map(_98,function(_9c){return this.series[this.runs[_9c]];},this);this.series=_9b.concat(_5e.filter(this.series,function(run){return run.plot!=_96;}));_5e.forEach(this.series,function(run,i){this.runs[run.name]=i;},this);this.dirty=true;return this;},moveSeriesToFront:function(_9d){if(_9d in this.runs){var _9e=this.runs[_9d],_9f=this.getSeriesOrder(this.series[_9e].plot);if(_9d!=_9f[0]){_9f.splice(_9e,1);_9f.unshift(_9d);return this.setSeriesOrder(_9f);}}return this;},moveSeriesToBack:function(_a0){if(_a0 in this.runs){var _a1=this.runs[_a0],_a2=this.getSeriesOrder(this.series[_a1].plot);if(_a0!=_a2[_a2.length-1]){_a2.splice(_a1,1);_a2.push(_a0);return this.setSeriesOrder(_a2);}}return this;},resize:function(_a3,_a4){var box;switch(arguments.length){case 1:box=_53.mixin({},_a3);_56.setMarginBox(this.node,box);break;case 2:box={w:_a3,h:_a4};_56.setMarginBox(this.node,box);break;}box=_56.getMarginBox(this.node);var d=this.surface.getDimensions();if(d.width!=box.w||d.height!=box.h){this.surface.setDimensions(box.w,box.h);this.dirty=true;return this.render();}else{return this;}},getGeometry:function(){var ret={};_5e.forIn(this.axes,function(_a5){if(_a5.initialized()){ret[_a5.name]={name:_a5.name,vertical:_a5.vertical,scaler:_a5.scaler,ticks:_a5.ticks};}});return ret;},setAxisWindow:function(_a6,_a7,_a8,_a9){var _aa=this.axes[_a6];if(_aa){_aa.setWindow(_a7,_a8);arr.forEach(this.stack,function(_ab){if(_ab.hAxis==_a6||_ab.vAxis==_a6){_ab.zoom=_a9;}});}return this;},setWindow:function(sx,sy,dx,dy,_ac){if(!("plotArea" in this)){this.calculateGeometry();}_5e.forIn(this.axes,function(_ad){var _ae,_af,_b0=_ad.getScaler().bounds,s=_b0.span/(_b0.upper-_b0.lower);if(_ad.vertical){_ae=sy;_af=dy/s/_ae;}else{_ae=sx;_af=dx/s/_ae;}_ad.setWindow(_ae,_af);});arr.forEach(this.stack,function(_b1){_b1.zoom=_ac;});return this;},zoomIn:function(_b2,_b3){var _b4=this.axes[_b2];if(_b4){var _b5,_b6,_b7=_b4.getScaler().bounds;var _b8=Math.min(_b3[0],_b3[1]);var _b9=Math.max(_b3[0],_b3[1]);_b8=_b3[0]<_b7.lower?_b7.lower:_b8;_b9=_b3[1]>_b7.upper?_b7.upper:_b9;_b5=(_b7.upper-_b7.lower)/(_b9-_b8);_b6=_b8-_b7.lower;this.setAxisWindow(_b2,_b5,_b6);this.render();}},calculateGeometry:function(){if(this.dirty){return this.fullGeometry();}var _ba=arr.filter(this.stack,function(_bb){return _bb.dirty||(_bb.hAxis&&this.axes[_bb.hAxis].dirty)||(_bb.vAxis&&this.axes[_bb.vAxis].dirty);},this);_bc(_ba,this.plotArea);return this;},fullGeometry:function(){this._makeDirty();arr.forEach(this.stack,_61);if(!this.theme){this.setTheme(new _5a(dojox.charting._def));}arr.forEach(this.series,function(run){if(!(run.plot in this.plots)){if(!dc.plot2d||!dc.plot2d.Default){throw Error("Can't find plot: Default - didn't you forget to dojo"+".require() it?");}var _bd=new dc.plot2d.Default(this,{});_bd.name=run.plot;this.plots[run.plot]=this.stack.length;this.stack.push(_bd);}this.stack[this.plots[run.plot]].addSeries(run);},this);arr.forEach(this.stack,function(_be){if(_be.hAxis){_be.setAxis(this.axes[_be.hAxis]);}if(_be.vAxis){_be.setAxis(this.axes[_be.vAxis]);}},this);var dim=this.dim=this.surface.getDimensions();dim.width=g.normalizedLength(dim.width);dim.height=g.normalizedLength(dim.height);_5e.forIn(this.axes,_61);_bc(this.stack,dim);var _bf=this.offsets={l:0,r:0,t:0,b:0};_5e.forIn(this.axes,function(_c0){_5e.forIn(_c0.getOffsets(),function(o,i){_bf[i]+=o;});});if(this.title){this.titleGap=(this.titleGap==0)?0:this.titleGap||this.theme.chart.titleGap||20;this.titlePos=this.titlePos||this.theme.chart.titlePos||"top";this.titleFont=this.titleFont||this.theme.chart.titleFont;this.titleFontColor=this.titleFontColor||this.theme.chart.titleFontColor||"black";var _c1=g.normalizedLength(g.splitFontString(this.titleFont).size);_bf[this.titlePos=="top"?"t":"b"]+=(_c1+this.titleGap);}_5e.forIn(this.margins,function(o,i){_bf[i]+=o;});this.plotArea={width:dim.width-_bf.l-_bf.r,height:dim.height-_bf.t-_bf.b};_5e.forIn(this.axes,_61);_bc(this.stack,this.plotArea);return this;},render:function(){if(this.theme){this.theme.clear();}if(this.dirty){return this.fullRender();}this.calculateGeometry();_5e.forEachRev(this.stack,function(_c2){_c2.render(this.dim,this.offsets);},this);_5e.forIn(this.axes,function(_c3){_c3.render(this.dim,this.offsets);},this);this._makeClean();if(this.surface.render){this.surface.render();}return this;},fullRender:function(){this.fullGeometry();var _c4=this.offsets,dim=this.dim,_c5;arr.forEach(this.series,_62);_5e.forIn(this.axes,_62);arr.forEach(this.stack,_62);arr.forEach(this._clearRects,function(_c6){_5d.dispose(_c6);});this._clearRects=[];if(this.chartTitle&&this.chartTitle.tagName){_57.destroy(this.chartTitle);}this.surface.clear();this.chartTitle=null;var t=this.theme,_c7=t.plotarea&&t.plotarea.fill,_c8=t.plotarea&&t.plotarea.stroke,w=Math.max(0,dim.width-_c4.l-_c4.r),h=Math.max(0,dim.height-_c4.t-_c4.b),_c5={x:_c4.l-1,y:_c4.t-1,width:w+2,height:h+2};if(_c7){_c7=_59.prototype._shapeFill(_59.prototype._plotFill(_c7,dim,_c4),_c5);this._clearRects.push(this.surface.createRect(_c5).setFill(_c7));}if(_c8){this._clearRects.push(this.surface.createRect({x:_c4.l,y:_c4.t,width:w+1,height:h+1}).setStroke(_c8));}_5e.foldr(this.stack,function(z,_c9){return _c9.render(dim,_c4),0;},0);_c7=this.fill!==undefined?this.fill:(t.chart&&t.chart.fill);_c8=this.stroke!==undefined?this.stroke:(t.chart&&t.chart.stroke);if(_c7=="inherit"){var _ca=this.node,_c7=new _58(_55.style(_ca,"backgroundColor"));while(_c7.a==0&&_ca!=document.documentElement){_c7=new _58(_55.style(_ca,"backgroundColor"));_ca=_ca.parentNode;}}if(_c7){_c7=_59.prototype._plotFill(_c7,dim,_c4);if(_c4.l){_c5={width:_c4.l,height:dim.height+1};this._clearRects.push(this.surface.createRect(_c5).setFill(_59.prototype._shapeFill(_c7,_c5)));}if(_c4.r){_c5={x:dim.width-_c4.r,width:_c4.r+1,height:dim.height+2};this._clearRects.push(this.surface.createRect(_c5).setFill(_59.prototype._shapeFill(_c7,_c5)));}if(_c4.t){_c5={width:dim.width+1,height:_c4.t};this._clearRects.push(this.surface.createRect(_c5).setFill(_59.prototype._shapeFill(_c7,_c5)));}if(_c4.b){_c5={y:dim.height-_c4.b,width:dim.width+1,height:_c4.b+2};this._clearRects.push(this.surface.createRect(_c5).setFill(_59.prototype._shapeFill(_c7,_c5)));}}if(_c8){this._clearRects.push(this.surface.createRect({width:dim.width-1,height:dim.height-1}).setStroke(_c8));}if(this.title){var _cb=(g.renderer=="canvas"),_cc=_cb||!has("ie")&&!has("opera")?"html":"gfx",_cd=g.normalizedLength(g.splitFontString(this.titleFont).size);this.chartTitle=_5c.createText[_cc](this,this.surface,dim.width/2,this.titlePos=="top"?_cd+this.margins.t:dim.height-this.margins.b,"middle",this.title,this.titleFont,this.titleFontColor);}_5e.forIn(this.axes,function(_ce){_ce.render(dim,_c4);});this._makeClean();if(this.surface.render){this.surface.render();}return this;},delayedRender:function(){if(!this._delayedRenderHandle){this._delayedRenderHandle=setTimeout(_53.hitch(this,function(){clearTimeout(this._delayedRenderHandle);this._delayedRenderHandle=null;this.render();}),this.delayInMs);}return this;},connectToPlot:function(_cf,_d0,_d1){return _cf in this.plots?this.stack[this.plots[_cf]].connect(_d0,_d1):null;},fireEvent:function(_d2,_d3,_d4){if(_d2 in this.runs){var _d5=this.series[this.runs[_d2]].plot;if(_d5 in this.plots){var _d6=this.stack[this.plots[_d5]];if(_d6){_d6.fireEvent(_d2,_d3,_d4);}}}return this;},_makeClean:function(){arr.forEach(this.axes,_64);arr.forEach(this.stack,_64);arr.forEach(this.series,_64);this.dirty=false;},_makeDirty:function(){arr.forEach(this.axes,_65);arr.forEach(this.stack,_65);arr.forEach(this.series,_65);this.dirty=true;},_invalidateDependentPlots:function(_d7,_d8){if(_d7 in this.plots){var _d9=this.stack[this.plots[_d7]],_da,_db=_d8?"vAxis":"hAxis";if(_d9[_db]){_da=this.axes[_d9[_db]];if(_da&&_da.dependOnData()){_da.dirty=true;arr.forEach(this.stack,function(p){if(p[_db]&&p[_db]==_d9[_db]){p.dirty=true;}});}}else{_d9.dirty=true;}}}});function _dc(_dd){return {min:_dd.hmin,max:_dd.hmax};};function _de(_df){return {min:_df.vmin,max:_df.vmax};};function _e0(_e1,h){_e1.hmin=h.min;_e1.hmax=h.max;};function _e2(_e3,v){_e3.vmin=v.min;_e3.vmax=v.max;};function _e4(_e5,_e6){if(_e5&&_e6){_e5.min=Math.min(_e5.min,_e6.min);_e5.max=Math.max(_e5.max,_e6.max);}return _e5||_e6;};function _bc(_e7,_e8){var _e9={},_ea={};arr.forEach(_e7,function(_eb){var _ec=_e9[_eb.name]=_eb.getSeriesStats();if(_eb.hAxis){_ea[_eb.hAxis]=_e4(_ea[_eb.hAxis],_dc(_ec));}if(_eb.vAxis){_ea[_eb.vAxis]=_e4(_ea[_eb.vAxis],_de(_ec));}});arr.forEach(_e7,function(_ed){var _ee=_e9[_ed.name];if(_ed.hAxis){_e0(_ee,_ea[_ed.hAxis]);}if(_ed.vAxis){_e2(_ee,_ea[_ed.vAxis]);}_ed.initializeScalers(_e8,_ee);});};return dojox.charting.Chart;});},"dojox/color/Palette":function(){define("dojox/color/Palette",["dojo/_base/kernel","../main","dojo/_base/lang","dojo/_base/array","./_base"],function(_ef,_f0,_f1,arr,dxc){dxc.Palette=function(_f2){this.colors=[];if(_f2 instanceof dxc.Palette){this.colors=_f2.colors.slice(0);}else{if(_f2 instanceof dxc.Color){this.colors=[null,null,_f2,null,null];}else{if(_f1.isArray(_f2)){this.colors=arr.map(_f2.slice(0),function(_f3){if(_f1.isString(_f3)){return new dxc.Color(_f3);}return _f3;});}else{if(_f1.isString(_f2)){this.colors=[null,null,new dxc.Color(_f2),null,null];}}}}};function _f4(p,_f5,val){var ret=new dxc.Palette();ret.colors=[];arr.forEach(p.colors,function(_f6){var r=(_f5=="dr")?_f6.r+val:_f6.r,g=(_f5=="dg")?_f6.g+val:_f6.g,b=(_f5=="db")?_f6.b+val:_f6.b,a=(_f5=="da")?_f6.a+val:_f6.a;ret.colors.push(new dxc.Color({r:Math.min(255,Math.max(0,r)),g:Math.min(255,Math.max(0,g)),b:Math.min(255,Math.max(0,b)),a:Math.min(1,Math.max(0,a))}));});return ret;};function _f7(p,_f8,val){var ret=new dxc.Palette();ret.colors=[];arr.forEach(p.colors,function(_f9){var o=_f9.toCmy(),c=(_f8=="dc")?o.c+val:o.c,m=(_f8=="dm")?o.m+val:o.m,y=(_f8=="dy")?o.y+val:o.y;ret.colors.push(dxc.fromCmy(Math.min(100,Math.max(0,c)),Math.min(100,Math.max(0,m)),Math.min(100,Math.max(0,y))));});return ret;};function _fa(p,_fb,val){var ret=new dxc.Palette();ret.colors=[];arr.forEach(p.colors,function(_fc){var o=_fc.toCmyk(),c=(_fb=="dc")?o.c+val:o.c,m=(_fb=="dm")?o.m+val:o.m,y=(_fb=="dy")?o.y+val:o.y,k=(_fb=="dk")?o.b+val:o.b;ret.colors.push(dxc.fromCmyk(Math.min(100,Math.max(0,c)),Math.min(100,Math.max(0,m)),Math.min(100,Math.max(0,y)),Math.min(100,Math.max(0,k))));});return ret;};function _fd(p,_fe,val){var ret=new dxc.Palette();ret.colors=[];arr.forEach(p.colors,function(_ff){var o=_ff.toHsl(),h=(_fe=="dh")?o.h+val:o.h,s=(_fe=="ds")?o.s+val:o.s,l=(_fe=="dl")?o.l+val:o.l;ret.colors.push(dxc.fromHsl(h%360,Math.min(100,Math.max(0,s)),Math.min(100,Math.max(0,l))));});return ret;};function tHSV(p,_100,val){var ret=new dxc.Palette();ret.colors=[];arr.forEach(p.colors,function(item){var o=item.toHsv(),h=(_100=="dh")?o.h+val:o.h,s=(_100=="ds")?o.s+val:o.s,v=(_100=="dv")?o.v+val:o.v;ret.colors.push(dxc.fromHsv(h%360,Math.min(100,Math.max(0,s)),Math.min(100,Math.max(0,v))));});return ret;};function _101(val,low,high){return high-((high-val)*((high-low)/high));};_f1.extend(dxc.Palette,{transform:function(_102){var fn=_f4;if(_102.use){var use=_102.use.toLowerCase();if(use.indexOf("hs")==0){if(use.charAt(2)=="l"){fn=_fd;}else{fn=tHSV;}}else{if(use.indexOf("cmy")==0){if(use.charAt(3)=="k"){fn=_fa;}else{fn=_f7;}}}}else{if("dc" in _102||"dm" in _102||"dy" in _102){if("dk" in _102){fn=_fa;}else{fn=_f7;}}else{if("dh" in _102||"ds" in _102){if("dv" in _102){fn=tHSV;}else{fn=_fd;}}}}var _103=this;for(var p in _102){if(p=="use"){continue;}_103=fn(_103,p,_102[p]);}return _103;},clone:function(){return new dxc.Palette(this);}});_f1.mixin(dxc.Palette,{generators:{analogous:function(args){var high=args.high||60,low=args.low||18,base=_f1.isString(args.base)?new dxc.Color(args.base):args.base,hsv=base.toHsv();var h=[(hsv.h+low+360)%360,(hsv.h+Math.round(low/2)+360)%360,hsv.h,(hsv.h-Math.round(high/2)+360)%360,(hsv.h-high+360)%360];var s1=Math.max(10,(hsv.s<=95)?hsv.s+5:(100-(hsv.s-95))),s2=(hsv.s>1)?hsv.s-1:21-hsv.s,v1=(hsv.v>=92)?hsv.v-9:Math.max(hsv.v+9,20),v2=(hsv.v<=90)?Math.max(hsv.v+5,20):(95+Math.ceil((hsv.v-90)/2)),s=[s1,s2,hsv.s,s1,s1],v=[v1,v2,hsv.v,v1,v2];return new dxc.Palette(arr.map(h,function(hue,i){return dxc.fromHsv(hue,s[i],v[i]);}));},monochromatic:function(args){var base=_f1.isString(args.base)?new dxc.Color(args.base):args.base,hsv=base.toHsv();var s1=(hsv.s-30>9)?hsv.s-30:hsv.s+30,s2=hsv.s,v1=_101(hsv.v,20,100),v2=(hsv.v-20>20)?hsv.v-20:hsv.v+60,v3=(hsv.v-50>20)?hsv.v-50:hsv.v+30;return new dxc.Palette([dxc.fromHsv(hsv.h,s1,v1),dxc.fromHsv(hsv.h,s2,v3),base,dxc.fromHsv(hsv.h,s1,v3),dxc.fromHsv(hsv.h,s2,v2)]);},triadic:function(args){var base=_f1.isString(args.base)?new dxc.Color(args.base):args.base,hsv=base.toHsv();var h1=(hsv.h+57+360)%360,h2=(hsv.h-157+360)%360,s1=(hsv.s>20)?hsv.s-10:hsv.s+10,s2=(hsv.s>90)?hsv.s-10:hsv.s+10,s3=(hsv.s>95)?hsv.s-5:hsv.s+5,v1=(hsv.v-20>20)?hsv.v-20:hsv.v+20,v2=(hsv.v-30>20)?hsv.v-30:hsv.v+30,v3=(hsv.v-30>70)?hsv.v-30:hsv.v+30;return new dxc.Palette([dxc.fromHsv(h1,s1,hsv.v),dxc.fromHsv(hsv.h,s2,v2),base,dxc.fromHsv(h2,s2,v1),dxc.fromHsv(h2,s3,v3)]);},complementary:function(args){var base=_f1.isString(args.base)?new dxc.Color(args.base):args.base,hsv=base.toHsv();var h1=((hsv.h*2)+137<360)?(hsv.h*2)+137:Math.floor(hsv.h/2)-137,s1=Math.max(hsv.s-10,0),s2=_101(hsv.s,10,100),s3=Math.min(100,hsv.s+20),v1=Math.min(100,hsv.v+30),v2=(hsv.v>20)?hsv.v-30:hsv.v+30;return new dxc.Palette([dxc.fromHsv(hsv.h,s1,v1),dxc.fromHsv(hsv.h,s2,v2),base,dxc.fromHsv(h1,s3,v2),dxc.fromHsv(h1,hsv.s,hsv.v)]);},splitComplementary:function(args){var base=_f1.isString(args.base)?new dxc.Color(args.base):args.base,_104=args.da||30,hsv=base.toHsv();var _105=((hsv.h*2)+137<360)?(hsv.h*2)+137:Math.floor(hsv.h/2)-137,h1=(_105-_104+360)%360,h2=(_105+_104)%360,s1=Math.max(hsv.s-10,0),s2=_101(hsv.s,10,100),s3=Math.min(100,hsv.s+20),v1=Math.min(100,hsv.v+30),v2=(hsv.v>20)?hsv.v-30:hsv.v+30;return new dxc.Palette([dxc.fromHsv(h1,s1,v1),dxc.fromHsv(h1,s2,v2),base,dxc.fromHsv(h2,s3,v2),dxc.fromHsv(h2,hsv.s,hsv.v)]);},compound:function(args){var base=_f1.isString(args.base)?new dxc.Color(args.base):args.base,hsv=base.toHsv();var h1=((hsv.h*2)+18<360)?(hsv.h*2)+18:Math.floor(hsv.h/2)-18,h2=((hsv.h*2)+120<360)?(hsv.h*2)+120:Math.floor(hsv.h/2)-120,h3=((hsv.h*2)+99<360)?(hsv.h*2)+99:Math.floor(hsv.h/2)-99,s1=(hsv.s-40>10)?hsv.s-40:hsv.s+40,s2=(hsv.s-10>80)?hsv.s-10:hsv.s+10,s3=(hsv.s-25>10)?hsv.s-25:hsv.s+25,v1=(hsv.v-40>10)?hsv.v-40:hsv.v+40,v2=(hsv.v-20>80)?hsv.v-20:hsv.v+20,v3=Math.max(hsv.v,20);return new dxc.Palette([dxc.fromHsv(h1,s1,v1),dxc.fromHsv(h1,s2,v2),base,dxc.fromHsv(h2,s3,v3),dxc.fromHsv(h3,s2,v2)]);},shades:function(args){var base=_f1.isString(args.base)?new dxc.Color(args.base):args.base,hsv=base.toHsv();var s=(hsv.s==100&&hsv.v==0)?0:hsv.s,v1=(hsv.v-50>20)?hsv.v-50:hsv.v+30,v2=(hsv.v-25>=20)?hsv.v-25:hsv.v+55,v3=(hsv.v-75>=20)?hsv.v-75:hsv.v+5,v4=Math.max(hsv.v-10,20);return new dxc.Palette([new dxc.fromHsv(hsv.h,s,v1),new dxc.fromHsv(hsv.h,s,v2),base,new dxc.fromHsv(hsv.h,s,v3),new dxc.fromHsv(hsv.h,s,v4)]);}},generate:function(base,type){if(_f1.isFunction(type)){return type({base:base});}else{if(dxc.Palette.generators[type]){return dxc.Palette.generators[type]({base:base});}}throw new Error("dojox.color.Palette.generate: the specified generator ('"+type+"') does not exist.");}});return dxc.Palette;});},"dojox/color/_base":function(){define("dojox/color/_base",["dojo/_base/kernel","../main","dojo/_base/lang","dojo/_base/Color","dojo/colors"],function(dojo,_106,lang,_107,_108){var cx=lang.getObject("dojox.color",true);cx.Color=_107;cx.blend=_107.blendColors;cx.fromRgb=_107.fromRgb;cx.fromHex=_107.fromHex;cx.fromArray=_107.fromArray;cx.fromString=_107.fromString;cx.greyscale=_108.makeGrey;lang.mixin(cx,{fromCmy:function(cyan,_109,_10a){if(lang.isArray(cyan)){_109=cyan[1],_10a=cyan[2],cyan=cyan[0];}else{if(lang.isObject(cyan)){_109=cyan.m,_10a=cyan.y,cyan=cyan.c;}}cyan/=100,_109/=100,_10a/=100;var r=1-cyan,g=1-_109,b=1-_10a;return new _107({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});},fromCmyk:function(cyan,_10b,_10c,_10d){if(lang.isArray(cyan)){_10b=cyan[1],_10c=cyan[2],_10d=cyan[3],cyan=cyan[0];}else{if(lang.isObject(cyan)){_10b=cyan.m,_10c=cyan.y,_10d=cyan.b,cyan=cyan.c;}}cyan/=100,_10b/=100,_10c/=100,_10d/=100;var r,g,b;r=1-Math.min(1,cyan*(1-_10d)+_10d);g=1-Math.min(1,_10b*(1-_10d)+_10d);b=1-Math.min(1,_10c*(1-_10d)+_10d);return new _107({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});},fromHsl:function(hue,_10e,_10f){if(lang.isArray(hue)){_10e=hue[1],_10f=hue[2],hue=hue[0];}else{if(lang.isObject(hue)){_10e=hue.s,_10f=hue.l,hue=hue.h;}}_10e/=100;_10f/=100;while(hue<0){hue+=360;}while(hue>=360){hue-=360;}var r,g,b;if(hue<120){r=(120-hue)/60,g=hue/60,b=0;}else{if(hue<240){r=0,g=(240-hue)/60,b=(hue-120)/60;}else{r=(hue-240)/60,g=0,b=(360-hue)/60;}}r=2*_10e*Math.min(r,1)+(1-_10e);g=2*_10e*Math.min(g,1)+(1-_10e);b=2*_10e*Math.min(b,1)+(1-_10e);if(_10f<0.5){r*=_10f,g*=_10f,b*=_10f;}else{r=(1-_10f)*r+2*_10f-1;g=(1-_10f)*g+2*_10f-1;b=(1-_10f)*b+2*_10f-1;}return new _107({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});}});cx.fromHsv=function(hue,_110,_111){if(lang.isArray(hue)){_110=hue[1],_111=hue[2],hue=hue[0];}else{if(lang.isObject(hue)){_110=hue.s,_111=hue.v,hue=hue.h;}}if(hue==360){hue=0;}_110/=100;_111/=100;var r,g,b;if(_110==0){r=_111,b=_111,g=_111;}else{var _112=hue/60,i=Math.floor(_112),f=_112-i;var p=_111*(1-_110);var q=_111*(1-(_110*f));var t=_111*(1-(_110*(1-f)));switch(i){case 0:r=_111,g=t,b=p;break;case 1:r=q,g=_111,b=p;break;case 2:r=p,g=_111,b=t;break;case 3:r=p,g=q,b=_111;break;case 4:r=t,g=p,b=_111;break;case 5:r=_111,g=p,b=q;break;}}return new _107({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});};lang.extend(_107,{toCmy:function(){var cyan=1-(this.r/255),_113=1-(this.g/255),_114=1-(this.b/255);return {c:Math.round(cyan*100),m:Math.round(_113*100),y:Math.round(_114*100)};},toCmyk:function(){var cyan,_115,_116,_117;var r=this.r/255,g=this.g/255,b=this.b/255;_117=Math.min(1-r,1-g,1-b);cyan=(1-r-_117)/(1-_117);_115=(1-g-_117)/(1-_117);_116=(1-b-_117)/(1-_117);return {c:Math.round(cyan*100),m:Math.round(_115*100),y:Math.round(_116*100),b:Math.round(_117*100)};},toHsl:function(){var r=this.r/255,g=this.g/255,b=this.b/255;var min=Math.min(r,b,g),max=Math.max(r,g,b);var _118=max-min;var h=0,s=0,l=(min+max)/2;if(l>0&&l<1){s=_118/((l<0.5)?(2*l):(2-2*l));}if(_118>0){if(max==r&&max!=g){h+=(g-b)/_118;}if(max==g&&max!=b){h+=(2+(b-r)/_118);}if(max==b&&max!=r){h+=(4+(r-g)/_118);}h*=60;}return {h:h,s:Math.round(s*100),l:Math.round(l*100)};},toHsv:function(){var r=this.r/255,g=this.g/255,b=this.b/255;var min=Math.min(r,b,g),max=Math.max(r,g,b);var _119=max-min;var h=null,s=(max==0)?0:(_119/max);if(s==0){h=0;}else{if(r==max){h=60*(g-b)/_119;}else{if(g==max){h=120+60*(b-r)/_119;}else{h=240+60*(r-g)/_119;}}if(h<0){h+=360;}}return {h:h,s:Math.round(s*100),v:Math.round(max*100)};}});return cx;});},"dojo/colors":function(){define("dojo/colors",["./_base/kernel","./_base/lang","./_base/Color","./_base/array"],function(dojo,lang,_11a,_11b){var _11c=lang.getObject("dojo.colors",true);var _11d=function(m1,m2,h){if(h<0){++h;}if(h>1){--h;}var h6=6*h;if(h6<1){return m1+(m2-m1)*h6;}if(2*h<1){return m2;}if(3*h<2){return m1+(m2-m1)*(2/3-h)*6;}return m1;};dojo.colorFromRgb=_11a.fromRgb=function(_11e,obj){var m=_11e.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(m){var c=m[2].split(/\s*,\s*/),l=c.length,t=m[1],a;if((t=="rgb"&&l==3)||(t=="rgba"&&l==4)){var r=c[0];if(r.charAt(r.length-1)=="%"){a=_11b.map(c,function(x){return parseFloat(x)*2.56;});if(l==4){a[3]=c[3];}return _11a.fromArray(a,obj);}return _11a.fromArray(c,obj);}if((t=="hsl"&&l==3)||(t=="hsla"&&l==4)){var H=((parseFloat(c[0])%360)+360)%360/360,S=parseFloat(c[1])/100,L=parseFloat(c[2])/100,m2=L<=0.5?L*(S+1):L+S-L*S,m1=2*L-m2;a=[_11d(m1,m2,H+1/3)*256,_11d(m1,m2,H)*256,_11d(m1,m2,H-1/3)*256,1];if(l==4){a[3]=c[3];}return _11a.fromArray(a,obj);}}return null;};var _11f=function(c,low,high){c=Number(c);return isNaN(c)?high:chigh?high:c;};_11a.prototype.sanitize=function(){var t=this;t.r=Math.round(_11f(t.r,0,255));t.g=Math.round(_11f(t.g,0,255));t.b=Math.round(_11f(t.b,0,255));t.a=_11f(t.a,0,1);return this;};_11c.makeGrey=_11a.makeGrey=function(g,a){return _11a.fromArray([g,g,g,a]);};lang.mixin(_11a.named,{"aliceblue":[240,248,255],"antiquewhite":[250,235,215],"aquamarine":[127,255,212],"azure":[240,255,255],"beige":[245,245,220],"bisque":[255,228,196],"blanchedalmond":[255,235,205],"blueviolet":[138,43,226],"brown":[165,42,42],"burlywood":[222,184,135],"cadetblue":[95,158,160],"chartreuse":[127,255,0],"chocolate":[210,105,30],"coral":[255,127,80],"cornflowerblue":[100,149,237],"cornsilk":[255,248,220],"crimson":[220,20,60],"cyan":[0,255,255],"darkblue":[0,0,139],"darkcyan":[0,139,139],"darkgoldenrod":[184,134,11],"darkgray":[169,169,169],"darkgreen":[0,100,0],"darkgrey":[169,169,169],"darkkhaki":[189,183,107],"darkmagenta":[139,0,139],"darkolivegreen":[85,107,47],"darkorange":[255,140,0],"darkorchid":[153,50,204],"darkred":[139,0,0],"darksalmon":[233,150,122],"darkseagreen":[143,188,143],"darkslateblue":[72,61,139],"darkslategray":[47,79,79],"darkslategrey":[47,79,79],"darkturquoise":[0,206,209],"darkviolet":[148,0,211],"deeppink":[255,20,147],"deepskyblue":[0,191,255],"dimgray":[105,105,105],"dimgrey":[105,105,105],"dodgerblue":[30,144,255],"firebrick":[178,34,34],"floralwhite":[255,250,240],"forestgreen":[34,139,34],"gainsboro":[220,220,220],"ghostwhite":[248,248,255],"gold":[255,215,0],"goldenrod":[218,165,32],"greenyellow":[173,255,47],"grey":[128,128,128],"honeydew":[240,255,240],"hotpink":[255,105,180],"indianred":[205,92,92],"indigo":[75,0,130],"ivory":[255,255,240],"khaki":[240,230,140],"lavender":[230,230,250],"lavenderblush":[255,240,245],"lawngreen":[124,252,0],"lemonchiffon":[255,250,205],"lightblue":[173,216,230],"lightcoral":[240,128,128],"lightcyan":[224,255,255],"lightgoldenrodyellow":[250,250,210],"lightgray":[211,211,211],"lightgreen":[144,238,144],"lightgrey":[211,211,211],"lightpink":[255,182,193],"lightsalmon":[255,160,122],"lightseagreen":[32,178,170],"lightskyblue":[135,206,250],"lightslategray":[119,136,153],"lightslategrey":[119,136,153],"lightsteelblue":[176,196,222],"lightyellow":[255,255,224],"limegreen":[50,205,50],"linen":[250,240,230],"magenta":[255,0,255],"mediumaquamarine":[102,205,170],"mediumblue":[0,0,205],"mediumorchid":[186,85,211],"mediumpurple":[147,112,219],"mediumseagreen":[60,179,113],"mediumslateblue":[123,104,238],"mediumspringgreen":[0,250,154],"mediumturquoise":[72,209,204],"mediumvioletred":[199,21,133],"midnightblue":[25,25,112],"mintcream":[245,255,250],"mistyrose":[255,228,225],"moccasin":[255,228,181],"navajowhite":[255,222,173],"oldlace":[253,245,230],"olivedrab":[107,142,35],"orange":[255,165,0],"orangered":[255,69,0],"orchid":[218,112,214],"palegoldenrod":[238,232,170],"palegreen":[152,251,152],"paleturquoise":[175,238,238],"palevioletred":[219,112,147],"papayawhip":[255,239,213],"peachpuff":[255,218,185],"peru":[205,133,63],"pink":[255,192,203],"plum":[221,160,221],"powderblue":[176,224,230],"rosybrown":[188,143,143],"royalblue":[65,105,225],"saddlebrown":[139,69,19],"salmon":[250,128,114],"sandybrown":[244,164,96],"seagreen":[46,139,87],"seashell":[255,245,238],"sienna":[160,82,45],"skyblue":[135,206,235],"slateblue":[106,90,205],"slategray":[112,128,144],"slategrey":[112,128,144],"snow":[255,250,250],"springgreen":[0,255,127],"steelblue":[70,130,180],"tan":[210,180,140],"thistle":[216,191,216],"tomato":[255,99,71],"turquoise":[64,224,208],"violet":[238,130,238],"wheat":[245,222,179],"whitesmoke":[245,245,245],"yellowgreen":[154,205,50]});return _11a;});},"dojox/charting/Theme":function(){define("dojox/charting/Theme",["dojo/_base/lang","dojo/_base/array","dojo/_base/declare","dojo/_base/Color","dojox/color/_base","dojox/color/Palette","dojox/lang/utils","dojox/gfx/gradutils"],function(lang,arr,_120,_121,_122,_123,dlu,dgg){var _124=_120("dojox.charting.Theme",null,{shapeSpaces:{shape:1,shapeX:1,shapeY:1},constructor:function(_125){_125=_125||{};var def=_124.defaultTheme;arr.forEach(["chart","plotarea","axis","series","marker","indicator"],function(name){this[name]=lang.delegate(def[name],_125[name]);},this);if(_125.seriesThemes&&_125.seriesThemes.length){this.colors=null;this.seriesThemes=_125.seriesThemes.slice(0);}else{this.seriesThemes=null;this.colors=(_125.colors||_124.defaultColors).slice(0);}this.markerThemes=null;if(_125.markerThemes&&_125.markerThemes.length){this.markerThemes=_125.markerThemes.slice(0);}this.markers=_125.markers?lang.clone(_125.markers):lang.delegate(_124.defaultMarkers);this.noGradConv=_125.noGradConv;this.noRadialConv=_125.noRadialConv;if(_125.reverseFills){this.reverseFills();}this._current=0;this._buildMarkerArray();},clone:function(){var _126=new _124({chart:this.chart,plotarea:this.plotarea,axis:this.axis,series:this.series,marker:this.marker,colors:this.colors,markers:this.markers,indicator:this.indicator,seriesThemes:this.seriesThemes,markerThemes:this.markerThemes,noGradConv:this.noGradConv,noRadialConv:this.noRadialConv});arr.forEach(["clone","clear","next","skip","addMixin","post","getTick"],function(name){if(this.hasOwnProperty(name)){_126[name]=this[name];}},this);return _126;},clear:function(){this._current=0;},next:function(_127,_128,_129){var _12a=dlu.merge,_12b,_12c;if(this.colors){_12b=lang.delegate(this.series);_12c=lang.delegate(this.marker);var _12d=new _121(this.colors[this._current%this.colors.length]),old;if(_12b.stroke&&_12b.stroke.color){_12b.stroke=lang.delegate(_12b.stroke);old=new _121(_12b.stroke.color);_12b.stroke.color=new _121(_12d);_12b.stroke.color.a=old.a;}else{_12b.stroke={color:_12d};}if(_12c.stroke&&_12c.stroke.color){_12c.stroke=lang.delegate(_12c.stroke);old=new _121(_12c.stroke.color);_12c.stroke.color=new _121(_12d);_12c.stroke.color.a=old.a;}else{_12c.stroke={color:_12d};}if(!_12b.fill||_12b.fill.type){_12b.fill=_12d;}else{old=new _121(_12b.fill);_12b.fill=new _121(_12d);_12b.fill.a=old.a;}if(!_12c.fill||_12c.fill.type){_12c.fill=_12d;}else{old=new _121(_12c.fill);_12c.fill=new _121(_12d);_12c.fill.a=old.a;}}else{_12b=this.seriesThemes?_12a(this.series,this.seriesThemes[this._current%this.seriesThemes.length]):this.series;_12c=this.markerThemes?_12a(this.marker,this.markerThemes[this._current%this.markerThemes.length]):_12b;}var _12e=_12c&&_12c.symbol||this._markers[this._current%this._markers.length];var _12f={series:_12b,marker:_12c,symbol:_12e};++this._current;if(_128){_12f=this.addMixin(_12f,_127,_128);}if(_129){_12f=this.post(_12f,_127);}return _12f;},skip:function(){++this._current;},addMixin:function(_130,_131,_132,_133){if(lang.isArray(_132)){arr.forEach(_132,function(m){_130=this.addMixin(_130,_131,m);},this);}else{var t={};if("color" in _132){if(_131=="line"||_131=="area"){lang.setObject("series.stroke.color",_132.color,t);lang.setObject("marker.stroke.color",_132.color,t);}else{lang.setObject("series.fill",_132.color,t);}}arr.forEach(["stroke","outline","shadow","fill","font","fontColor","labelWiring"],function(name){var _134="marker"+name.charAt(0).toUpperCase()+name.substr(1),b=_134 in _132;if(name in _132){lang.setObject("series."+name,_132[name],t);if(!b){lang.setObject("marker."+name,_132[name],t);}}if(b){lang.setObject("marker."+name,_132[_134],t);}});if("marker" in _132){t.symbol=_132.marker;}_130=dlu.merge(_130,t);}if(_133){_130=this.post(_130,_131);}return _130;},post:function(_135,_136){var fill=_135.series.fill,t;if(!this.noGradConv&&this.shapeSpaces[fill.space]&&fill.type=="linear"){if(_136=="bar"){t={x1:fill.y1,y1:fill.x1,x2:fill.y2,y2:fill.x2};}else{if(!this.noRadialConv&&fill.space=="shape"&&(_136=="slice"||_136=="circle")){t={type:"radial",cx:0,cy:0,r:100};}}if(t){return dlu.merge(_135,{series:{fill:t}});}}return _135;},getTick:function(name,_137){var tick=this.axis.tick,_138=name+"Tick",_139=dlu.merge;if(tick){if(this.axis[_138]){tick=_139(tick,this.axis[_138]);}}else{tick=this.axis[_138];}if(_137){if(tick){if(_137[_138]){tick=_139(tick,_137[_138]);}}else{tick=_137[_138];}}return tick;},inspectObjects:function(f){arr.forEach(["chart","plotarea","axis","series","marker","indicator"],function(name){f(this[name]);},this);if(this.seriesThemes){arr.forEach(this.seriesThemes,f);}if(this.markerThemes){arr.forEach(this.markerThemes,f);}},reverseFills:function(){this.inspectObjects(function(o){if(o&&o.fill){o.fill=dgg.reverse(o.fill);}});},addMarker:function(name,_13a){this.markers[name]=_13a;this._buildMarkerArray();},setMarkers:function(obj){this.markers=obj;this._buildMarkerArray();},_buildMarkerArray:function(){this._markers=[];for(var p in this.markers){this._markers.push(this.markers[p]);}}});lang.mixin(_124,{defaultMarkers:{CIRCLE:"m-3,0 c0,-4 6,-4 6,0 m-6,0 c0,4 6,4 6,0",SQUARE:"m-3,-3 l0,6 6,0 0,-6 z",DIAMOND:"m0,-3 l3,3 -3,3 -3,-3 z",CROSS:"m0,-3 l0,6 m-3,-3 l6,0",X:"m-3,-3 l6,6 m0,-6 l-6,6",TRIANGLE:"m-3,3 l3,-6 3,6 z",TRIANGLE_INVERTED:"m-3,-3 l3,6 3,-6 z"},defaultColors:["#54544c","#858e94","#6e767a","#948585","#474747"],defaultTheme:{chart:{stroke:null,fill:"white",pageStyle:null,titleGap:20,titlePos:"top",titleFont:"normal normal bold 14pt Tahoma",titleFontColor:"#333"},plotarea:{stroke:null,fill:"white"},axis:{stroke:{color:"#333",width:1},tick:{color:"#666",position:"center",font:"normal normal normal 7pt Tahoma",fontColor:"#333",titleGap:15,titleFont:"normal normal normal 11pt Tahoma",titleFontColor:"#333",titleOrientation:"axis"},majorTick:{width:1,length:6},minorTick:{width:0.8,length:3},microTick:{width:0.5,length:1}},series:{stroke:{width:1.5,color:"#333"},outline:{width:0.1,color:"#ccc"},shadow:null,fill:"#ccc",font:"normal normal normal 8pt Tahoma",fontColor:"#000",labelWiring:{width:1,color:"#ccc"}},marker:{stroke:{width:1.5,color:"#333"},outline:{width:0.1,color:"#ccc"},shadow:null,fill:"#ccc",font:"normal normal normal 8pt Tahoma",fontColor:"#000"},indicator:{lineStroke:{width:1.5,color:"#333"},lineOutline:{width:0.1,color:"#ccc"},lineShadow:null,stroke:{width:1.5,color:"#333"},outline:{width:0.1,color:"#ccc"},shadow:null,fill:"#ccc",radius:3,font:"normal normal normal 10pt Tahoma",fontColor:"#000",markerFill:"#ccc",markerSymbol:"m-3,0 c0,-4 6,-4 6,0 m-6,0 c0,4 6,4 6,0",markerStroke:{width:1.5,color:"#333"},markerOutline:{width:0.1,color:"#ccc"},markerShadow:null}},defineColors:function(_13b){_13b=_13b||{};var l,c=[],n=_13b.num||5;if(_13b.colors){l=_13b.colors.length;for(var i=0;i1?String.prototype.split:function(sep){var r=this.split.call(this,sep),m=sep.exec(this);if(m&&m.index==0){r.unshift("");}return r;};var _14b=function(s){var args=[],_14c=_14a.call(s,/\s*->\s*/m);if(_14c.length>1){while(_14c.length){s=_14c.pop();args=_14c.pop().split(/\s*,\s*|\s+/m);if(_14c.length){_14c.push("(function("+args+"){return ("+s+")})");}}}else{if(s.match(/\b_\b/)){args=["_"];}else{var l=s.match(/^\s*(?:[+*\/%&|\^\.=<>]|!=)/m),r=s.match(/[+\-*\/%&|\^\.=<>!]\s*$/m);if(l||r){if(l){args.push("$1");s="$1"+s;}if(r){args.push("$2");s=s+"$2";}}else{var vars=s.replace(/(?:\b[A-Z]|\.[a-zA-Z_$])[a-zA-Z_$\d]*|[a-zA-Z_$][a-zA-Z_$\d]*:|this|true|false|null|undefined|typeof|instanceof|in|delete|new|void|arguments|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|isFinite|isNaN|parseFloat|parseInt|unescape|dojo|dijit|dojox|window|document|'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"/g,"").match(/([a-z_$][a-z_$\d]*)/gi)||[],t={};arr.forEach(vars,function(v){if(!(v in t)){args.push(v);t[v]=1;}});}}}return {args:args,body:s};};var _14d=function(a){return a.length?function(){var i=a.length-1,x=df.lambda(a[i]).apply(this,arguments);for(--i;i>=0;--i){x=df.lambda(a[i]).call(this,x);}return x;}:function(x){return x;};};lang.mixin(df,{rawLambda:function(s){return _14b(s);},buildLambda:function(s){s=_14b(s);return "function("+s.args.join(",")+"){return ("+s.body+");}";},lambda:function(s){if(typeof s=="function"){return s;}if(s instanceof Array){return _14d(s);}if(s in _149){return _149[s];}s=_14b(s);return _149[s]=new Function(s.args,"return ("+s.body+");");},clearLambdaCache:function(){_149={};}});return df;});},"dojox/lang/functional/fold":function(){define("dojox/lang/functional/fold",["dojo/_base/lang","dojo/_base/array","dojo/_base/window","./lambda"],function(lang,arr,win,df){var _14e={};lang.mixin(df,{foldl:function(a,f,z,o){if(typeof a=="string"){a=a.split("");}o=o||win.global;f=df.lambda(f);var i,n;if(lang.isArray(a)){for(i=0,n=a.length;i0;--i,z=f.call(o,z,a[i],i,a)){}return z;},foldr1:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||win.global;f=df.lambda(f);var n=a.length,z=a[n-1],i=n-1;for(;i>0;--i,z=f.call(o,z,a[i],i,a)){}return z;},reduce:function(a,f,z){return arguments.length<3?df.foldl1(a,f):df.foldl(a,f,z);},reduceRight:function(a,f,z){return arguments.length<3?df.foldr1(a,f):df.foldr(a,f,z);},unfold:function(pr,f,g,z,o){o=o||win.global;f=df.lambda(f);g=df.lambda(g);pr=df.lambda(pr);var t=[];for(;!pr.call(o,z);t.push(f.call(o,z)),z=g.call(o,z)){}return t;}});});},"dojox/charting/Series":function(){define("dojox/charting/Series",["dojo/_base/lang","dojo/_base/declare","./Element"],function(lang,_150,_151){return _150("dojox.charting.Series",_151,{constructor:function(_152,data,_153){lang.mixin(this,_153);if(typeof this.plot!="string"){this.plot="default";}this.update(data);},clear:function(){this.dyn={};},update:function(data){if(lang.isArray(data)){this.data=data;}else{this.source=data;this.data=this.source.data;if(this.source.setSeriesObject){this.source.setSeriesObject(this);}}this.dirty=true;this.clear();}});});},"dojox/lang/functional":function(){define("dojox/lang/functional",["./functional/lambda","./functional/array","./functional/object"],function(df){return df;});},"dojox/gfx/gradutils":function(){define("dojox/gfx/gradutils",["./_base","dojo/_base/lang","./matrix","dojo/_base/Color"],function(g,lang,m,_154){var _155=g.gradutils={};function _156(o,c){if(o<=0){return c[0].color;}var len=c.length;if(o>=1){return c[len-1].color;}for(var i=0;i=o){if(i){var prev=c[i-1];return _154.blendColors(new _154(prev.color),new _154(stop.color),(o-prev.offset)/(stop.offset-prev.offset));}return stop.color;}}return c[len-1].color;};_155.getColor=function(fill,pt){var o;if(fill){switch(fill.type){case "linear":var _157=Math.atan2(fill.y2-fill.y1,fill.x2-fill.x1),_158=m.rotate(-_157),_159=m.project(fill.x2-fill.x1,fill.y2-fill.y1),p=m.multiplyPoint(_159,pt),pf1=m.multiplyPoint(_159,fill.x1,fill.y1),pf2=m.multiplyPoint(_159,fill.x2,fill.y2),_15a=m.multiplyPoint(_158,pf2.x-pf1.x,pf2.y-pf1.y).x;o=m.multiplyPoint(_158,p.x-pf1.x,p.y-pf1.y).x/_15a;break;case "radial":var dx=pt.x-fill.cx,dy=pt.y-fill.cy;o=Math.sqrt(dx*dx+dy*dy)/fill.r;break;}return _156(o,fill.colors);}return new _154(fill||[0,0,0,0]);};_155.reverse=function(fill){if(fill){switch(fill.type){case "linear":case "radial":fill=lang.delegate(fill);if(fill.colors){var c=fill.colors,l=c.length,i=0,stop,n=fill.colors=new Array(c.length);for(;i= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ /* This is an optimized version of Dojo, built for deployment and not for development. To get sources and documentation, please visit: http://dojotoolkit.org */ //>>built require({cache:{"dijit/a11y":function(){define("dijit/a11y",["dojo/_base/array","dojo/_base/config","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-style","dojo/_base/sniff","./_base/manager","."],function(_1,_2,_3,_4,_5,_6,_7,_8,_9){var _a=(_9._isElementShown=function(_b){var s=_6.get(_b);return (s.visibility!="hidden")&&(s.visibility!="collapsed")&&(s.display!="none")&&(_5.get(_b,"type")!="hidden");});_9.hasDefaultTabStop=function(_c){switch(_c.nodeName.toLowerCase()){case "a":return _5.has(_c,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return true;case "iframe":var _d;try{var _e=_c.contentDocument;if("designMode" in _e&&_e.designMode=="on"){return true;}_d=_e.body;}catch(e1){try{_d=_c.contentWindow.document.body;}catch(e2){return false;}}return _d&&(_d.contentEditable=="true"||(_d.firstChild&&_d.firstChild.contentEditable=="true"));default:return _c.contentEditable=="true";}};var _f=(_9.isTabNavigable=function(_10){if(_5.get(_10,"disabled")){return false;}else{if(_5.has(_10,"tabIndex")){return _5.get(_10,"tabIndex")>=0;}else{return _9.hasDefaultTabStop(_10);}}});_9._getTabNavigable=function(_11){var _12,_13,_14,_15,_16,_17,_18={};function _19(_1a){return _1a&&_1a.tagName.toLowerCase()=="input"&&_1a.type&&_1a.type.toLowerCase()=="radio"&&_1a.name&&_1a.name.toLowerCase();};var _1b=function(_1c){for(var _1d=_1c.firstChild;_1d;_1d=_1d.nextSibling){if(_1d.nodeType!=1||(_7("ie")<=9&&_1d.scopeName!=="HTML")||!_a(_1d)){continue;}if(_f(_1d)){var _1e=_5.get(_1d,"tabIndex");if(!_5.has(_1d,"tabIndex")||_1e==0){if(!_12){_12=_1d;}_13=_1d;}else{if(_1e>0){if(!_14||_1e<_15){_15=_1e;_14=_1d;}if(!_16||_1e>=_17){_17=_1e;_16=_1d;}}}var rn=_19(_1d);if(_5.get(_1d,"checked")&&rn){_18[rn]=_1d;}}if(_1d.nodeName.toUpperCase()!="SELECT"){_1b(_1d);}}};if(_a(_11)){_1b(_11);}function rs(_1f){return _18[_19(_1f)]||_1f;};return {first:rs(_12),last:rs(_13),lowest:rs(_14),highest:rs(_16)};};_9.getFirstInTabbingOrder=function(_20){var _21=_9._getTabNavigable(_4.byId(_20));return _21.lowest?_21.lowest:_21.first;};_9.getLastInTabbingOrder=function(_22){var _23=_9._getTabNavigable(_4.byId(_22));return _23.last?_23.last:_23.highest;};return {hasDefaultTabStop:_9.hasDefaultTabStop,isTabNavigable:_9.isTabNavigable,_getTabNavigable:_9._getTabNavigable,getFirstInTabbingOrder:_9.getFirstInTabbingOrder,getLastInTabbingOrder:_9.getLastInTabbingOrder};});},"dijit/_WidgetBase":function(){define("dijit/_WidgetBase",["require","dojo/_base/array","dojo/aspect","dojo/_base/config","dojo/_base/connect","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-class","dojo/dom-construct","dojo/dom-geometry","dojo/dom-style","dojo/_base/kernel","dojo/_base/lang","dojo/on","dojo/ready","dojo/Stateful","dojo/topic","dojo/_base/window","./registry"],function(_24,_25,_26,_27,_28,_29,dom,_2a,_2b,_2c,_2d,_2e,_2f,_30,on,_31,_32,_33,win,_34){if(!_2f.isAsync){_31(0,function(){var _35=["dijit/_base/manager"];_24(_35);});}var _36={};function _37(obj){var ret={};for(var _38 in obj){ret[_38.toLowerCase()]=true;}return ret;};function _39(_3a){return function(val){_2a[val?"set":"remove"](this.domNode,_3a,val);this._set(_3a,val);};};function _3b(a,b){return a===b||(a!==a&&b!==b);};return _29("dijit._WidgetBase",_32,{id:"",_setIdAttr:"domNode",lang:"",_setLangAttr:_39("lang"),dir:"",_setDirAttr:_39("dir"),textDir:"","class":"",_setClassAttr:{node:"domNode",type:"class"},style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{},_blankGif:_27.blankGif||_24.toUrl("dojo/resources/blank.gif"),postscript:function(_3c,_3d){this.create(_3c,_3d);},create:function(_3e,_3f){this.srcNodeRef=dom.byId(_3f);this._connects=[];this._supportingWidgets=[];if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_3e){this.params=_3e;_30.mixin(this,_3e);}this.postMixInProperties();if(!this.id){this.id=_34.getUniqueId(this.declaredClass.replace(/\./g,"_"));}_34.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();var _40=this.srcNodeRef;if(_40&&_40.parentNode&&this.domNode!==_40){_40.parentNode.replaceChild(this.domNode,_40);}}if(this.domNode){this.domNode.setAttribute("widgetId",this.id);}this.postCreate();if(this.srcNodeRef&&!this.srcNodeRef.parentNode){delete this.srcNodeRef;}this._created=true;},_applyAttributes:function(){var _41=this.constructor,_42=_41._setterAttrs;if(!_42){_42=(_41._setterAttrs=[]);for(var _43 in this.attributeMap){_42.push(_43);}var _44=_41.prototype;for(var _45 in _44){if(_45 in this.attributeMap){continue;}var _46="_set"+_45.replace(/^[a-z]|-[a-zA-Z]/g,function(c){return c.charAt(c.length-1).toUpperCase();})+"Attr";if(_46 in _44){_42.push(_45);}}}_25.forEach(_42,function(_47){if(this.params&&_47 in this.params){}else{if(this[_47]){this.set(_47,this[_47]);}}},this);for(var _48 in this.params){this.set(_48,this[_48]);}},postMixInProperties:function(){},buildRendering:function(){if(!this.domNode){this.domNode=this.srcNodeRef||_2c.create("div");}if(this.baseClass){var _49=this.baseClass.split(" ");if(!this.isLeftToRight()){_49=_49.concat(_25.map(_49,function(_4a){return _4a+"Rtl";}));}_2b.add(this.domNode,_49);}},postCreate:function(){},startup:function(){if(this._started){return;}this._started=true;_25.forEach(this.getChildren(),function(obj){if(!obj._started&&!obj._destroyed&&_30.isFunction(obj.startup)){obj.startup();obj._started=true;}});},destroyRecursive:function(_4b){this._beingDestroyed=true;this.destroyDescendants(_4b);this.destroy(_4b);},destroy:function(_4c){this._beingDestroyed=true;this.uninitialize();var c;while((c=this._connects.pop())){c.remove();}var w;while((w=this._supportingWidgets.pop())){if(w.destroyRecursive){w.destroyRecursive();}else{if(w.destroy){w.destroy();}}}this.destroyRendering(_4c);_34.remove(this.id);this._destroyed=true;},destroyRendering:function(_4d){if(this.bgIframe){this.bgIframe.destroy(_4d);delete this.bgIframe;}if(this.domNode){if(_4d){_2a.remove(this.domNode,"widgetId");}else{_2c.destroy(this.domNode);}delete this.domNode;}if(this.srcNodeRef){if(!_4d){_2c.destroy(this.srcNodeRef);}delete this.srcNodeRef;}},destroyDescendants:function(_4e){_25.forEach(this.getChildren(),function(_4f){if(_4f.destroyRecursive){_4f.destroyRecursive(_4e);}});},uninitialize:function(){return false;},_setStyleAttr:function(_50){var _51=this.domNode;if(_30.isObject(_50)){_2e.set(_51,_50);}else{if(_51.style.cssText){_51.style.cssText+="; "+_50;}else{_51.style.cssText=_50;}}this._set("style",_50);},_attrToDom:function(_52,_53,_54){_54=arguments.length>=3?_54:this.attributeMap[_52];_25.forEach(_30.isArray(_54)?_54:[_54],function(_55){var _56=this[_55.node||_55||"domNode"];var _57=_55.type||"attribute";switch(_57){case "attribute":if(_30.isFunction(_53)){_53=_30.hitch(this,_53);}var _58=_55.attribute?_55.attribute:(/^on[A-Z][a-zA-Z]*$/.test(_52)?_52.toLowerCase():_52);_2a.set(_56,_58,_53);break;case "innerText":_56.innerHTML="";_56.appendChild(win.doc.createTextNode(_53));break;case "innerHTML":_56.innerHTML=_53;break;case "class":_2b.replace(_56,_53,this[_52]);break;}},this);},get:function(_59){var _5a=this._getAttrNames(_59);return this[_5a.g]?this[_5a.g]():this[_59];},set:function(_5b,_5c){if(typeof _5b==="object"){for(var x in _5b){this.set(x,_5b[x]);}return this;}var _5d=this._getAttrNames(_5b),_5e=this[_5d.s];if(_30.isFunction(_5e)){var _5f=_5e.apply(this,Array.prototype.slice.call(arguments,1));}else{var _60=this.focusNode&&!_30.isFunction(this.focusNode)?"focusNode":"domNode",tag=this[_60].tagName,_61=_36[tag]||(_36[tag]=_37(this[_60])),map=_5b in this.attributeMap?this.attributeMap[_5b]:_5d.s in this?this[_5d.s]:((_5d.l in _61&&typeof _5c!="function")||/^aria-|^data-|^role$/.test(_5b))?_60:null;if(map!=null){this._attrToDom(_5b,_5c,map);}this._set(_5b,_5c);}return _5f||this;},_attrPairNames:{},_getAttrNames:function(_62){var apn=this._attrPairNames;if(apn[_62]){return apn[_62];}var uc=_62.replace(/^[a-z]|-[a-zA-Z]/g,function(c){return c.charAt(c.length-1).toUpperCase();});return (apn[_62]={n:_62+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr",l:uc.toLowerCase()});},_set:function(_63,_64){var _65=this[_63];this[_63]=_64;if(this._watchCallbacks&&this._created&&!_3b(_64,_65)){this._watchCallbacks(_63,_65,_64);}},on:function(_66,_67){return _26.after(this,this._onMap(_66),_67,true);},_onMap:function(_68){var _69=this.constructor,map=_69._onMap;if(!map){map=(_69._onMap={});for(var _6a in _69.prototype){if(/^on/.test(_6a)){map[_6a.replace(/^on/,"").toLowerCase()]=_6a;}}}return map[_68.toLowerCase()];},toString:function(){return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";},getChildren:function(){return this.containerNode?_34.findWidgets(this.containerNode):[];},getParent:function(){return _34.getEnclosingWidget(this.domNode.parentNode);},connect:function(obj,_6b,_6c){var _6d=_28.connect(obj,_6b,this,_6c);this._connects.push(_6d);return _6d;},disconnect:function(_6e){var i=_25.indexOf(this._connects,_6e);if(i!=-1){_6e.remove();this._connects.splice(i,1);}},subscribe:function(t,_6f){var _70=_33.subscribe(t,_30.hitch(this,_6f));this._connects.push(_70);return _70;},unsubscribe:function(_71){this.disconnect(_71);},isLeftToRight:function(){return this.dir?(this.dir=="ltr"):_2d.isBodyLtr();},isFocusable:function(){return this.focus&&(_2e.get(this.domNode,"display")!="none");},placeAt:function(_72,_73){if(_72.declaredClass&&_72.addChild){_72.addChild(this,_73);}else{_2c.place(this.domNode,_72,_73);}return this;},getTextDir:function(_74,_75){return _75;},applyTextDir:function(){},defer:function(fcn,_76){var _77=setTimeout(_30.hitch(this,function(){if(!_77){return;}_77=null;if(!this._destroyed){_30.hitch(this,fcn)();}}),_76||0);return {remove:function(){if(_77){clearTimeout(_77);_77=null;}return null;}};}});});},"dojox/layout/ContentPane":function(){define("dojox/layout/ContentPane",["dojo/_base/lang","dojo/_base/xhr","dijit/layout/ContentPane","dojox/html/_base","dojo/_base/declare"],function(_78,_79,_7a,_7b,_7c){return _7c("dojox.layout.ContentPane",_7a,{adjustPaths:false,cleanContent:false,renderStyles:false,executeScripts:true,scriptHasHooks:false,constructor:function(){this.ioArgs={};this.ioMethod=_79.get;},onExecError:function(e){},_setContent:function(_7d){var _7e=this._contentSetter;if(!(_7e&&_7e instanceof _7b._ContentSetter)){_7e=this._contentSetter=new _7b._ContentSetter({node:this.containerNode,_onError:_78.hitch(this,this._onError),onContentError:_78.hitch(this,function(e){var _7f=this.onContentError(e);try{this.containerNode.innerHTML=_7f;}catch(e){console.error("Fatal "+this.id+" could not change content due to "+e.message,e);}})});}this._contentSetterParams={adjustPaths:Boolean(this.adjustPaths&&(this.href||this.referencePath)),referencePath:this.href||this.referencePath,renderStyles:this.renderStyles,executeScripts:this.executeScripts,scriptHasHooks:this.scriptHasHooks,scriptHookReplacement:"dijit.byId('"+this.id+"')"};this.inherited("_setContent",arguments);}});});},"dojox/html/_base":function(){define("dojox/html/_base",["dojo/_base/kernel","dojo/_base/lang","dojo/_base/xhr","dojo/_base/window","dojo/_base/sniff","dojo/_base/url","dojo/dom-construct","dojo/html","dojo/_base/declare"],function(_80,_81,_82,_83,has,_84,_85,_86){var _87=_80.getObject("dojox.html",true);if(has("ie")){var _88=/(AlphaImageLoader\([^)]*?src=(['"]))(?![a-z]+:|\/)([^\r\n;}]+?)(\2[^)]*\)\s*[;}]?)/g;}var _89=/(?:(?:@import\s*(['"])(?![a-z]+:|\/)([^\r\n;{]+?)\1)|url\(\s*(['"]?)(?![a-z]+:|\/)([^\r\n;]+?)\3\s*\))([a-z, \s]*[;}]?)/g;var _8a=_87._adjustCssPaths=function(_8b,_8c){if(!_8c||!_8b){return;}if(_88){_8c=_8c.replace(_88,function(_8d,pre,_8e,url,_8f){return pre+(new _84(_8b,"./"+url).toString())+_8f;});}return _8c.replace(_89,function(_90,_91,_92,_93,_94,_95){if(_92){return "@import \""+(new _84(_8b,"./"+_92).toString())+"\""+_95;}else{return "url("+(new _84(_8b,"./"+_94).toString())+")"+_95;}});};var _96=/(<[a-z][a-z0-9]*\s[^>]*)(?:(href|src)=(['"]?)([^>]*?)\3|style=(['"]?)([^>]*?)\5)([^>]*>)/gi;var _97=_87._adjustHtmlPaths=function(_98,_99){var url=_98||"./";return _99.replace(_96,function(tag,_9a,_9b,_9c,_9d,_9e,_9f,end){return _9a+(_9b?(_9b+"="+_9c+(new _84(url,_9d).toString())+_9c):("style="+_9e+_8a(url,_9f)+_9e))+end;});};var _a0=_87._snarfStyles=function(_a1,_a2,_a3){_a3.attributes=[];return _a2.replace(/(?:]*)>([\s\S]*?)<\/style>|]*rel=['"]?stylesheet)([^>]*?href=(['"])([^>]*?)\4[^>\/]*)\/?>)/gi,function(_a4,_a5,_a6,_a7,_a8,_a9){var i,_aa=(_a5||_a7||"").replace(/^\s*([\s\S]*?)\s*$/i,"$1");if(_a6){i=_a3.push(_a1?_8a(_a1,_a6):_a6);}else{i=_a3.push("@import \""+_a9+"\";");_aa=_aa.replace(/\s*(?:rel|href)=(['"])?[^\s]*\1\s*/gi,"");}if(_aa){_aa=_aa.split(/\s+/);var _ab={},tmp;for(var j=0,e=_aa.length;j/g,function(_af){return _af.replace(/<(\/?)script\b/ig,"<$1Script");});function _b0(src){if(_ae.downloadRemote){src=src.replace(/&([a-z0-9#]+);/g,function(m,_b1){switch(_b1){case "amp":return "&";case "gt":return ">";case "lt":return "<";default:return _b1.charAt(0)=="#"?String.fromCharCode(_b1.substring(1)):"&"+_b1+";";}});_82.get({url:src,sync:true,load:function(_b2){_ae.code+=_b2+";";},error:_ae.errBack});}};return _ad.replace(/]*type=['"]?(?:dojo\/|text\/html\b))(?:[^>]*?(?:src=(['"]?)([^>]*?)\1[^>]*)?)*>([\s\S]*?)<\/script>/gi,function(_b3,_b4,src,_b5){if(src){_b0(src);}else{_ae.code+=_b5;}return "";});};var _b6=_87.evalInGlobal=function(_b7,_b8){_b8=_b8||_83.doc.body;var n=_b8.ownerDocument.createElement("script");n.type="text/javascript";_b8.appendChild(n);n.text=_b7;};_87._ContentSetter=_80.declare(_86._ContentSetter,{adjustPaths:false,referencePath:".",renderStyles:false,executeScripts:false,scriptHasHooks:false,scriptHookReplacement:null,_renderStyles:function(_b9){this._styleNodes=[];var st,att,_ba,doc=this.node.ownerDocument;var _bb=doc.getElementsByTagName("head")[0];for(var i=0,e=_b9.length;i|)/g,"");}if(this.scriptHasHooks){_c1=_c1.replace(/_container_(?!\s*=[^=])/g,this.scriptHookReplacement);}try{_b6(_c1,this.node);}catch(e){this._onError("Exec","Error eval script in "+this.id+", "+e.message,e);}}this.inherited("onEnd",arguments);},tearDown:function(){this.inherited(arguments);delete this._styles;if(this._styleNodes&&this._styleNodes.length){while(this._styleNodes.length){_85.destroy(this._styleNodes.pop());}}delete this._styleNodes;_80.mixin(this,_87._ContentSetter.prototype);}});_87.set=function(_c3,_c4,_c5){if(!_c5){return _86._setNodeContent(_c3,_c4,true);}else{var op=new _87._ContentSetter(_80.mixin(_c5,{content:_c4,node:_c3}));return op.set();}};return _87;});},"dijit/_base/manager":function(){define("dijit/_base/manager",["dojo/_base/array","dojo/_base/config","../registry",".."],function(_c6,_c7,_c8,_c9){_c6.forEach(["byId","getUniqueId","findWidgets","_destroyAll","byNode","getEnclosingWidget"],function(_ca){_c9[_ca]=_c8[_ca];});_c9.defaultDuration=_c7["defaultDuration"]||200;return _c9;});},"dojox/layout/ResizeHandle":function(){define("dojox/layout/ResizeHandle",["dojo/_base/kernel","dojo/_base/lang","dojo/_base/connect","dojo/_base/array","dojo/_base/event","dojo/_base/fx","dojo/_base/window","dojo/fx","dojo/window","dojo/dom","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dijit/_base/manager","dijit/_Widget","dijit/_TemplatedMixin","dojo/_base/declare"],function(_cb,_cc,_cd,_ce,_cf,_d0,_d1,_d2,_d3,_d4,_d5,_d6,_d7,_d8,_d9,_da,_db){_cb.experimental("dojox.layout.ResizeHandle");var _dc=_db("dojox.layout.ResizeHandle",[_d9,_da],{targetId:"",targetContainer:null,resizeAxis:"xy",activeResize:false,activeResizeClass:"dojoxResizeHandleClone",animateSizing:true,animateMethod:"chain",animateDuration:225,minHeight:100,minWidth:100,constrainMax:false,maxHeight:0,maxWidth:0,fixedAspect:false,intermediateChanges:false,startTopic:"/dojo/resize/start",endTopic:"/dojo/resize/stop",templateString:"
",postCreate:function(){this.connect(this.resizeHandle,"onmousedown","_beginSizing");if(!this.activeResize){this._resizeHelper=_d8.byId("dojoxGlobalResizeHelper");if(!this._resizeHelper){this._resizeHelper=new _dd({id:"dojoxGlobalResizeHelper"}).placeAt(_d1.body());_d5.add(this._resizeHelper.domNode,this.activeResizeClass);}}else{this.animateSizing=false;}if(!this.minSize){this.minSize={w:this.minWidth,h:this.minHeight};}if(this.constrainMax){this.maxSize={w:this.maxWidth,h:this.maxHeight};}this._resizeX=this._resizeY=false;var _de=_cc.partial(_d5.add,this.resizeHandle);switch(this.resizeAxis.toLowerCase()){case "xy":this._resizeX=this._resizeY=true;_de("dojoxResizeNW");break;case "x":this._resizeX=true;_de("dojoxResizeW");break;case "y":this._resizeY=true;_de("dojoxResizeN");break;}},_beginSizing:function(e){if(this._isSizing){return;}_cd.publish(this.startTopic,[this]);this.targetWidget=_d8.byId(this.targetId);this.targetDomNode=this.targetWidget?this.targetWidget.domNode:_d4.byId(this.targetId);if(this.targetContainer){this.targetDomNode=this.targetContainer;}if(!this.targetDomNode){return;}if(!this.activeResize){var c=_d6.position(this.targetDomNode,true);this._resizeHelper.resize({l:c.x,t:c.y,w:c.w,h:c.h});this._resizeHelper.show();if(!this.isLeftToRight()){this._resizeHelper.startPosition={l:c.x,t:c.y};}}this._isSizing=true;this.startPoint={x:e.clientX,y:e.clientY};var _df=_d7.getComputedStyle(this.targetDomNode),_e0=_d6.boxModel==="border-model",_e1=_e0?{w:0,h:0}:_d6.getPadBorderExtents(this.targetDomNode,_df),_e2=_d6.getMarginExtents(this.targetDomNode,_df),mb;mb=this.startSize={w:_d7.get(this.targetDomNode,"width",_df),h:_d7.get(this.targetDomNode,"height",_df),pbw:_e1.w,pbh:_e1.h,mw:_e2.w,mh:_e2.h};if(!this.isLeftToRight()&&dojo.style(this.targetDomNode,"position")=="absolute"){var p=_d6.position(this.targetDomNode,true);this.startPosition={l:p.x,t:p.y};}this._pconnects=[_cd.connect(_d1.doc,"onmousemove",this,"_updateSizing"),_cd.connect(_d1.doc,"onmouseup",this,"_endSizing")];_cf.stop(e);},_updateSizing:function(e){if(this.activeResize){this._changeSizing(e);}else{var tmp=this._getNewCoords(e,"border",this._resizeHelper.startPosition);if(tmp===false){return;}this._resizeHelper.resize(tmp);}e.preventDefault();},_getNewCoords:function(e,box,_e3){try{if(!e.clientX||!e.clientY){return false;}}catch(e){return false;}this._activeResizeLastEvent=e;var dx=(this.isLeftToRight()?1:-1)*(this.startPoint.x-e.clientX),dy=this.startPoint.y-e.clientY,_e4=this.startSize.w-(this._resizeX?dx:0),_e5=this.startSize.h-(this._resizeY?dy:0),r=this._checkConstraints(_e4,_e5);_e3=(_e3||this.startPosition);if(_e3&&this._resizeX){r.l=_e3.l+dx;if(r.w!=_e4){r.l+=(_e4-r.w);}r.t=_e3.t;}switch(box){case "margin":r.w+=this.startSize.mw;r.h+=this.startSize.mh;case "border":r.w+=this.startSize.pbw;r.h+=this.startSize.pbh;break;}return r;},_checkConstraints:function(_e6,_e7){if(this.minSize){var tm=this.minSize;if(_e6ms.w){_e6=ms.w;}if(_e7>ms.h){_e7=ms.h;}}if(this.fixedAspect){var w=this.startSize.w,h=this.startSize.h,_e8=w*_e7-h*_e6;if(_e8<0){_e6=_e7*w/h;}else{if(_e8>0){_e7=_e6*h/w;}}}return {w:_e6,h:_e7};},_changeSizing:function(e){var _e9=this.targetWidget&&_cc.isFunction(this.targetWidget.resize),tmp=this._getNewCoords(e,_e9&&"margin");if(tmp===false){return;}if(_e9){this.targetWidget.resize(tmp);}else{if(this.animateSizing){var _ea=_d2[this.animateMethod]([_d0.animateProperty({node:this.targetDomNode,properties:{width:{start:this.startSize.w,end:tmp.w}},duration:this.animateDuration}),_d0.animateProperty({node:this.targetDomNode,properties:{height:{start:this.startSize.h,end:tmp.h}},duration:this.animateDuration})]);_ea.play();}else{_d7.set(this.targetDomNode,{width:tmp.w+"px",height:tmp.h+"px"});}}if(this.intermediateChanges){this.onResize(e);}},_endSizing:function(e){_ce.forEach(this._pconnects,_cd.disconnect);var pub=_cc.partial(_cd.publish,this.endTopic,[this]);if(!this.activeResize){this._resizeHelper.hide();this._changeSizing(e);setTimeout(pub,this.animateDuration+15);}else{pub();}this._isSizing=false;this.onResize(e);},onResize:function(e){}});var _dd=dojo.declare("dojox.layout._ResizeHelper",_d9,{show:function(){_d7.set(this.domNode,"display","");},hide:function(){_d7.set(this.domNode,"display","none");},resize:function(dim){_d6.setMarginBox(this.domNode,dim);}});return _dc;});},"dijit/registry":function(){define("dijit/registry",["dojo/_base/array","dojo/_base/sniff","dojo/_base/unload","dojo/_base/window","."],function(_eb,has,_ec,win,_ed){var _ee={},_ef={};var _f0={length:0,add:function(_f1){if(_ef[_f1.id]){throw new Error("Tried to register widget with id=="+_f1.id+" but that id is already registered");}_ef[_f1.id]=_f1;this.length++;},remove:function(id){if(_ef[id]){delete _ef[id];this.length--;}},byId:function(id){return typeof id=="string"?_ef[id]:id;},byNode:function(_f2){return _ef[_f2.getAttribute("widgetId")];},toArray:function(){var ar=[];for(var id in _ef){ar.push(_ef[id]);}return ar;},getUniqueId:function(_f3){var id;do{id=_f3+"_"+(_f3 in _ee?++_ee[_f3]:_ee[_f3]=0);}while(_ef[id]);return _ed._scopeName=="dijit"?id:_ed._scopeName+"_"+id;},findWidgets:function(_f4){var _f5=[];function _f6(_f7){for(var _f8=_f7.firstChild;_f8;_f8=_f8.nextSibling){if(_f8.nodeType==1){var _f9=_f8.getAttribute("widgetId");if(_f9){var _fa=_ef[_f9];if(_fa){_f5.push(_fa);}}else{_f6(_f8);}}}};_f6(_f4);return _f5;},_destroyAll:function(){_ed._curFocus=null;_ed._prevFocus=null;_ed._activeStack=[];_eb.forEach(_f0.findWidgets(win.body()),function(_fb){if(!_fb._destroyed){if(_fb.destroyRecursive){_fb.destroyRecursive();}else{if(_fb.destroy){_fb.destroy();}}}});},getEnclosingWidget:function(_fc){while(_fc){var id=_fc.getAttribute&&_fc.getAttribute("widgetId");if(id){return _ef[id];}_fc=_fc.parentNode;}return null;},_hash:_ef};_ed.registry=_f0;return _f0;});},"dijit/_OnDijitClickMixin":function(){define("dijit/_OnDijitClickMixin",["dojo/on","dojo/_base/array","dojo/keys","dojo/_base/declare","dojo/_base/sniff","dojo/_base/unload","dojo/_base/window"],function(on,_fd,_fe,_ff,has,_100,win){var _101=null;if(has("ie")<9){(function(){var _102=function(evt){_101=evt.srcElement;};win.doc.attachEvent("onkeydown",_102);_100.addOnWindowUnload(function(){win.doc.detachEvent("onkeydown",_102);});})();}else{win.doc.addEventListener("keydown",function(evt){_101=evt.target;},true);}var _103=function(node,_104){if(/input|button/i.test(node.nodeName)){return on(node,"click",_104);}else{function _105(e){return (e.keyCode==_fe.ENTER||e.keyCode==_fe.SPACE)&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey;};var _106=[on(node,"keypress",function(e){if(_105(e)){_101=e.target;e.preventDefault();}}),on(node,"keyup",function(e){if(_105(e)&&e.target==_101){_101=null;_104.call(this,e);}}),on(node,"click",function(e){_104.call(this,e);})];return {remove:function(){_fd.forEach(_106,function(h){h.remove();});}};}};return _ff("dijit._OnDijitClickMixin",null,{connect:function(obj,_107,_108){return this.inherited(arguments,[obj,_107=="ondijitclick"?_103:_107,_108]);}});});},"dijit/hccss":function(){define("dijit/hccss",["require","dojo/_base/config","dojo/dom-class","dojo/dom-construct","dojo/dom-style","dojo/ready","dojo/_base/sniff","dojo/_base/window"],function(_109,_10a,_10b,_10c,_10d,_10e,has,win){if(has("ie")||has("mozilla")){_10e(90,function(){var div=_10c.create("div",{id:"a11yTestNode",style:{cssText:"border: 1px solid;"+"border-color:red green;"+"position: absolute;"+"height: 5px;"+"top: -999px;"+"background-image: url(\""+(_10a.blankGif||_109.toUrl("dojo/resources/blank.gif"))+"\");"}},win.body());var cs=_10d.getComputedStyle(div);if(cs){var _10f=cs.backgroundImage;var _110=(cs.borderTopColor==cs.borderRightColor)||(_10f!=null&&(_10f=="none"||_10f=="url(invalid-url:)"));if(_110){_10b.add(win.body(),"dijit_a11y");}if(has("ie")){div.outerHTML="";}else{win.body().removeChild(div);}}});}});},"dijit/_TemplatedMixin":function(){define("dijit/_TemplatedMixin",["dojo/_base/lang","dojo/touch","./_WidgetBase","dojo/string","dojo/cache","dojo/_base/array","dojo/_base/declare","dojo/dom-construct","dojo/_base/sniff","dojo/_base/unload","dojo/_base/window"],function(lang,_111,_112,_113,_114,_115,_116,_117,has,_118,win){var _119=_116("dijit._TemplatedMixin",null,{templateString:null,templatePath:null,_skipNodeCache:false,_earlyTemplatedStartup:false,constructor:function(){this._attachPoints=[];this._attachEvents=[];},_stringRepl:function(tmpl){var _11a=this.declaredClass,_11b=this;return _113.substitute(tmpl,this,function(_11c,key){if(key.charAt(0)=="!"){_11c=lang.getObject(key.substr(1),false,_11b);}if(typeof _11c=="undefined"){throw new Error(_11a+" template:"+key);}if(_11c==null){return "";}return key.charAt(0)=="!"?_11c:_11c.toString().replace(/"/g,""");},this);},buildRendering:function(){if(!this.templateString){this.templateString=_114(this.templatePath,{sanitize:true});}var _11d=_119.getCachedTemplate(this.templateString,this._skipNodeCache);var node;if(lang.isString(_11d)){node=_117.toDom(this._stringRepl(_11d));if(node.nodeType!=1){throw new Error("Invalid template: "+_11d);}}else{node=_11d.cloneNode(true);}this.domNode=node;this.inherited(arguments);this._attachTemplateNodes(node,function(n,p){return n.getAttribute(p);});this._beforeFillContent();this._fillContent(this.srcNodeRef);},_beforeFillContent:function(){},_fillContent:function(_11e){var dest=this.containerNode;if(_11e&&dest){while(_11e.hasChildNodes()){dest.appendChild(_11e.firstChild);}}},_attachTemplateNodes:function(_11f,_120){var _121=lang.isArray(_11f)?_11f:(_11f.all||_11f.getElementsByTagName("*"));var x=lang.isArray(_11f)?0:-1;for(;x<_121.length;x++){var _122=(x==-1)?_11f:_121[x];if(this.widgetsInTemplate&&(_120(_122,"dojoType")||_120(_122,"data-dojo-type"))){continue;}var _123=_120(_122,"dojoAttachPoint")||_120(_122,"data-dojo-attach-point");if(_123){var _124,_125=_123.split(/\s*,\s*/);while((_124=_125.shift())){if(lang.isArray(this[_124])){this[_124].push(_122);}else{this[_124]=_122;}this._attachPoints.push(_124);}}var _126=_120(_122,"dojoAttachEvent")||_120(_122,"data-dojo-attach-event");if(_126){var _127,_128=_126.split(/\s*,\s*/);var trim=lang.trim;while((_127=_128.shift())){if(_127){var _129=null;if(_127.indexOf(":")!=-1){var _12a=_127.split(":");_127=trim(_12a[0]);_129=trim(_12a[1]);}else{_127=trim(_127);}if(!_129){_129=_127;}this._attachEvents.push(this.connect(_122,_111[_127]||_127,_129));}}}}},destroyRendering:function(){_115.forEach(this._attachPoints,function(_12b){delete this[_12b];},this);this._attachPoints=[];_115.forEach(this._attachEvents,this.disconnect,this);this._attachEvents=[];this.inherited(arguments);}});_119._templateCache={};_119.getCachedTemplate=function(_12c,_12d){var _12e=_119._templateCache;var key=_12c;var _12f=_12e[key];if(_12f){try{if(!_12f.ownerDocument||_12f.ownerDocument==win.doc){return _12f;}}catch(e){}_117.destroy(_12f);}_12c=_113.trim(_12c);if(_12d||_12c.match(/\$\{([^\}]+)\}/g)){return (_12e[key]=_12c);}else{var node=_117.toDom(_12c);if(node.nodeType!=1){throw new Error("Invalid template: "+_12c);}return (_12e[key]=node);}};if(has("ie")){_118.addOnWindowUnload(function(){var _130=_119._templateCache;for(var key in _130){var _131=_130[key];if(typeof _131=="object"){_117.destroy(_131);}delete _130[key];}});}lang.extend(_112,{dojoAttachEvent:"",dojoAttachPoint:""});return _119;});},"dijit/_Widget":function(){define("dijit/_Widget",["dojo/aspect","dojo/_base/config","dojo/_base/connect","dojo/_base/declare","dojo/_base/kernel","dojo/_base/lang","dojo/query","dojo/ready","./registry","./_WidgetBase","./_OnDijitClickMixin","./_FocusMixin","dojo/uacss","./hccss"],function(_132,_133,_134,_135,_136,lang,_137,_138,_139,_13a,_13b,_13c){function _13d(){};function _13e(_13f){return function(obj,_140,_141,_142){if(obj&&typeof _140=="string"&&obj[_140]==_13d){return obj.on(_140.substring(2).toLowerCase(),lang.hitch(_141,_142));}return _13f.apply(_134,arguments);};};_132.around(_134,"connect",_13e);if(_136.connect){_132.around(_136,"connect",_13e);}var _143=_135("dijit._Widget",[_13a,_13b,_13c],{onClick:_13d,onDblClick:_13d,onKeyDown:_13d,onKeyPress:_13d,onKeyUp:_13d,onMouseDown:_13d,onMouseMove:_13d,onMouseOut:_13d,onMouseOver:_13d,onMouseLeave:_13d,onMouseEnter:_13d,onMouseUp:_13d,constructor:function(_144){this._toConnect={};for(var name in _144){if(this[name]===_13d){this._toConnect[name.replace(/^on/,"").toLowerCase()]=_144[name];delete _144[name];}}},postCreate:function(){this.inherited(arguments);for(var name in this._toConnect){this.on(name,this._toConnect[name]);}delete this._toConnect;},on:function(type,func){if(this[this._onMap(type)]===_13d){return _134.connect(this.domNode,type.toLowerCase(),this,func);}return this.inherited(arguments);},_setFocusedAttr:function(val){this._focused=val;this._set("focused",val);},setAttribute:function(attr,_145){_136.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(attr,_145);},attr:function(name,_146){if(_133.isDebug){var _147=arguments.callee._ach||(arguments.callee._ach={}),_148=(arguments.callee.caller||"unknown caller").toString();if(!_147[_148]){_136.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+_148,"","2.0");_147[_148]=true;}}var args=arguments.length;if(args>=2||typeof name==="object"){return this.set.apply(this,arguments);}else{return this.get(name);}},getDescendants:function(){_136.deprecated(this.declaredClass+"::getDescendants() is deprecated. Use getChildren() instead.","","2.0");return this.containerNode?_137("[widgetId]",this.containerNode).map(_139.byNode):[];},_onShow:function(){this.onShow();},onShow:function(){},onHide:function(){},onClose:function(){return true;}});if(!_136.isAsync){_138(0,function(){var _149=["dijit/_base"];require(_149);});}return _143;});},"dijit/_FocusMixin":function(){define("dijit/_FocusMixin",["./focus","./_WidgetBase","dojo/_base/declare","dojo/_base/lang"],function(_14a,_14b,_14c,lang){lang.extend(_14b,{focused:false,onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus();},_onBlur:function(){this.onBlur();}});return _14c("dijit._FocusMixin",null,{_focusManager:_14a});});},"dijit/focus":function(){define("dijit/focus",["dojo/aspect","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-construct","dojo/Evented","dojo/_base/lang","dojo/on","dojo/ready","dojo/_base/sniff","dojo/Stateful","dojo/_base/unload","dojo/_base/window","dojo/window","./a11y","./registry","."],function(_14d,_14e,dom,_14f,_150,_151,lang,on,_152,has,_153,_154,win,_155,a11y,_156,_157){var _158=_14e([_153,_151],{curNode:null,activeStack:[],constructor:function(){var _159=lang.hitch(this,function(node){if(dom.isDescendant(this.curNode,node)){this.set("curNode",null);}if(dom.isDescendant(this.prevNode,node)){this.set("prevNode",null);}});_14d.before(_150,"empty",_159);_14d.before(_150,"destroy",_159);},registerIframe:function(_15a){return this.registerWin(_15a.contentWindow,_15a);},registerWin:function(_15b,_15c){var _15d=this;var _15e=function(evt){_15d._justMouseDowned=true;setTimeout(function(){_15d._justMouseDowned=false;},0);if(has("ie")&&evt&&evt.srcElement&&evt.srcElement.parentNode==null){return;}_15d._onTouchNode(_15c||evt.target||evt.srcElement,"mouse");};var doc=has("ie")<9?_15b.document.documentElement:_15b.document;if(doc){if(has("ie")<9){_15b.document.body.attachEvent("onmousedown",_15e);var _15f=function(evt){var tag=evt.srcElement.tagName.toLowerCase();if(tag=="#document"||tag=="body"){return;}if(a11y.isTabNavigable(evt.srcElement)){_15d._onFocusNode(_15c||evt.srcElement);}else{_15d._onTouchNode(_15c||evt.srcElement);}};doc.attachEvent("onactivate",_15f);var _160=function(evt){_15d._onBlurNode(_15c||evt.srcElement);};doc.attachEvent("ondeactivate",_160);return {remove:function(){_15b.document.detachEvent("onmousedown",_15e);doc.detachEvent("onactivate",_15f);doc.detachEvent("ondeactivate",_160);doc=null;}};}else{doc.body.addEventListener("mousedown",_15e,true);doc.body.addEventListener("touchstart",_15e,true);var _161=function(evt){_15d._onFocusNode(_15c||evt.target);};doc.addEventListener("focus",_161,true);var _162=function(evt){_15d._onBlurNode(_15c||evt.target);};doc.addEventListener("blur",_162,true);return {remove:function(){doc.body.removeEventListener("mousedown",_15e,true);doc.body.removeEventListener("touchstart",_15e,true);doc.removeEventListener("focus",_161,true);doc.removeEventListener("blur",_162,true);doc=null;}};}}},_onBlurNode:function(){this.set("prevNode",this.curNode);this.set("curNode",null);if(this._justMouseDowned){return;}if(this._clearActiveWidgetsTimer){clearTimeout(this._clearActiveWidgetsTimer);}this._clearActiveWidgetsTimer=setTimeout(lang.hitch(this,function(){delete this._clearActiveWidgetsTimer;this._setStack([]);this.prevNode=null;}),100);},_onTouchNode:function(node,by){if(this._clearActiveWidgetsTimer){clearTimeout(this._clearActiveWidgetsTimer);delete this._clearActiveWidgetsTimer;}var _163=[];try{while(node){var _164=_14f.get(node,"dijitPopupParent");if(_164){node=_156.byId(_164).domNode;}else{if(node.tagName&&node.tagName.toLowerCase()=="body"){if(node===win.body()){break;}node=_155.get(node.ownerDocument).frameElement;}else{var id=node.getAttribute&&node.getAttribute("widgetId"),_165=id&&_156.byId(id);if(_165&&!(by=="mouse"&&_165.get("disabled"))){_163.unshift(id);}node=node.parentNode;}}}}catch(e){}this._setStack(_163,by);},_onFocusNode:function(node){if(!node){return;}if(node.nodeType==9){return;}this._onTouchNode(node);if(node==this.curNode){return;}this.set("curNode",node);},_setStack:function(_166,by){var _167=this.activeStack;this.set("activeStack",_166);for(var _168=0;_168=_168;i--){_169=_156.byId(_167[i]);if(_169){_169._hasBeenBlurred=true;_169.set("focused",false);if(_169._focusManager==this){_169._onBlur(by);}this.emit("widget-blur",_169,by);}}for(i=_168;i<_166.length;i++){_169=_156.byId(_166[i]);if(_169){_169.set("focused",true);if(_169._focusManager==this){_169._onFocus(by);}this.emit("widget-focus",_169,by);}}},focus:function(node){if(node){try{node.focus();}catch(e){}}}});var _16a=new _158();_152(function(){var _16b=_16a.registerWin(win.doc.parentWindow||win.doc.defaultView);if(has("ie")){_154.addOnWindowUnload(function(){_16b.remove();_16b=null;});}});_157.focus=function(node){_16a.focus(node);};for(var attr in _16a){if(!/^_/.test(attr)){_157.focus[attr]=typeof _16a[attr]=="function"?lang.hitch(_16a,attr):_16a[attr];}}_16a.watch(function(attr,_16c,_16d){_157.focus[attr]=_16d;});return _16a;});},"dijit/_Contained":function(){define("dijit/_Contained",["dojo/_base/declare","./registry"],function(_16e,_16f){return _16e("dijit._Contained",null,{_getSibling:function(_170){var node=this.domNode;do{node=node[_170+"Sibling"];}while(node&&node.nodeType!=1);return node&&_16f.byNode(node);},getPreviousSibling:function(){return this._getSibling("previous");},getNextSibling:function(){return this._getSibling("next");},getIndexInParent:function(){var p=this.getParent();if(!p||!p.getIndexOfChild){return -1;}return p.getIndexOfChild(this);}});});},"dijit/main":function(){define("dijit/main",["dojo/_base/kernel"],function(dojo){return dojo.dijit;});},"*noref":1}});define("dojox/_dojox_layout_basic",[],1);require(["dojox/layout/ResizeHandle","dojox/layout/ContentPane"]);/* Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ /* This is an optimized version of Dojo, built for deployment and not for development. To get sources and documentation, please visit: http://dojotoolkit.org */ //>>built require({cache:{"dojox/collections":function(){define("dojox/collections",["./collections/_base"],function(_1){return _1;});},"dojox/collections/Queue":function(){define("dojox/collections/Queue",["dojo/_base/kernel","dojo/_base/array","./_base"],function(_2,_3,_4){_4.Queue=function(_5){var q=[];if(_5){q=q.concat(_5);}this.count=q.length;this.clear=function(){q=[];this.count=q.length;};this.clone=function(){return new _4.Queue(q);};this.contains=function(o){for(var i=0;ib.key){return 1;}if(a.key=0){_29.splice(i,1);}this.count=_29.length;};this.removeAt=function(i){_29.splice(i,1);this.count=_29.length;};this.reverse=function(){_29.reverse();};this.sort=function(fn){if(fn){_29.sort(fn);}else{_29.sort();}};this.setByIndex=function(i,obj){_29[i]=obj;this.count=_29.length;};this.toArray=function(){return [].concat(_29);};this.toString=function(_2b){return _29.join((_2b||","));};};return dxc.ArrayList;});},"dojox/collections/_base":function(){define("dojox/collections/_base",["dojo/_base/kernel","dojo/_base/lang","dojo/_base/array"],function(_2c,_2d,arr){var _2e=_2d.getObject("dojox.collections",true);_2e.DictionaryEntry=function(k,v){this.key=k;this.value=v;this.valueOf=function(){return this.value;};this.toString=function(){return String(this.value);};};_2e.Iterator=function(a){var _2f=0;this.element=a[_2f]||null;this.atEnd=function(){return (_2f>=a.length);};this.get=function(){if(this.atEnd()){return null;}this.element=a[_2f++];return this.element;};this.map=function(fn,_30){return arr.map(a,fn,_30);};this.reset=function(){_2f=0;this.element=a[_2f];};};_2e.DictionaryIterator=function(obj){var a=[];var _31={};for(var p in obj){if(!_31[p]){a.push(obj[p]);}}var _32=0;this.element=a[_32]||null;this.atEnd=function(){return (_32>=a.length);};this.get=function(){if(this.atEnd()){return null;}this.element=a[_32++];return this.element;};this.map=function(fn,_33){return arr.map(a,fn,_33);};this.reset=function(){_32=0;this.element=a[_32];};};return _2e;});},"dojox/collections/Dictionary":function(){define("dojox/collections/Dictionary",["dojo/_base/kernel","dojo/_base/array","./_base"],function(_34,_35,dxc){dxc.Dictionary=function(_36){var _37={};this.count=0;var _38={};this.add=function(k,v){var b=(k in _37);_37[k]=new dxc.DictionaryEntry(k,v);if(!b){this.count++;}};this.clear=function(){_37={};this.count=0;};this.clone=function(){return new dxc.Dictionary(this);};this.contains=this.containsKey=function(k){if(_38[k]){return false;}return (_37[k]!=null);};this.containsValue=function(v){var e=this.getIterator();while(e.get()){if(e.element.value==v){return true;}}return false;};this.entry=function(k){return _37[k];};this.forEach=function(fn,_39){var a=[];for(var p in _37){if(!_38[p]){a.push(_37[p]);}}_34.forEach(a,fn,_39);};this.getKeyList=function(){return (this.getIterator()).map(function(_3a){return _3a.key;});};this.getValueList=function(){return (this.getIterator()).map(function(_3b){return _3b.value;});};this.item=function(k){if(k in _37){return _37[k].valueOf();}return undefined;};this.getIterator=function(){return new dxc.DictionaryIterator(_37);};this.remove=function(k){if(k in _37&&!_38[k]){delete _37[k];this.count--;return true;}return false;};if(_36){var e=_36.getIterator();while(e.get()){this.add(e.element.key,e.element.value);}}};return dxc.Dictionary;});},"dojox/collections/BinaryTree":function(){define("dojox/collections/BinaryTree",["dojo/_base/kernel","dojo/_base/array","./_base"],function(_3c,_3d,dxc){dxc.BinaryTree=function(_3e){function _3f(_40,_41,_42){this.value=_40||null;this.right=_41||null;this.left=_42||null;this.clone=function(){var c=new _3f();if(this.value.value){c.value=this.value.clone();}else{c.value=this.value;}if(this.left!=null){c.left=this.left.clone();}if(this.right!=null){c.right=this.right.clone();}return c;};this.compare=function(n){if(this.value>n.value){return 1;}if(this.valued){return 1;}if(this.value0){return _4b(_4c.left,_4d);}else{return _4b(_4c.right,_4d);}};this.add=function(_4e){var n=new _3f(_4e);var i;var _4f=_50;var _51=null;while(_4f){i=_4f.compare(n);if(i==0){return;}_51=_4f;if(i>0){_4f=_4f.left;}else{_4f=_4f.right;}}this.count++;if(!_51){_50=n;}else{i=_51.compare(n);if(i>0){_51.left=n;}else{_51.right=n;}}};this.clear=function(){_50=null;this.count=0;};this.clone=function(){var c=new dxc.BinaryTree();var itr=this.getIterator();while(!itr.atEnd()){c.add(itr.get());}return c;};this.contains=function(_52){return this.search(_52)!=null;};this.deleteData=function(_53){var _54=_50;var _55=null;var i=_54.compareData(_53);while(i!=0&&_54!=null){if(i>0){_55=_54;_54=_54.left;}else{if(i<0){_55=_54;_54=_54.right;}}i=_54.compareData(_53);}if(!_54){return;}this.count--;if(!_54.right){if(!_55){_50=_54.left;}else{i=_55.compare(_54);if(i>0){_55.left=_54.left;}else{if(i<0){_55.right=_54.left;}}}}else{if(!_54.right.left){if(!_55){_50=_54.right;}else{i=_55.compare(_54);if(i>0){_55.left=_54.right;}else{if(i<0){_55.right=_54.right;}}}}else{var _56=_54.right.left;var _57=_54.right;while(_56.left!=null){_57=_56;_56=_56.left;}_57.left=_56.right;_56.left=_54.left;_56.right=_54.right;if(!_55){_50=_56;}else{i=_55.compare(_54);if(i>0){_55.left=_56;}else{if(i<0){_55.right=_56;}}}}}};this.getIterator=function(){var a=[];_43(_50,a);return new dxc.Iterator(a);};this.search=function(_58){return _4b(_50,_58);};this.toString=function(_59,sep){if(!_59){_59=dxc.BinaryTree.TraversalMethods.Inorder;}if(!sep){sep=",";}var s="";switch(_59){case dxc.BinaryTree.TraversalMethods.Preorder:s=_45(_50,sep);break;case dxc.BinaryTree.TraversalMethods.Inorder:s=_47(_50,sep);break;case dxc.BinaryTree.TraversalMethods.Postorder:s=_49(_50,sep);break;}if(s.length==0){return "";}else{return s.substring(0,s.length-sep.length);}};this.count=0;var _50=this.root=null;if(_3e){this.add(_3e);}};dxc.BinaryTree.TraversalMethods={Preorder:1,Inorder:2,Postorder:3};return dxc.BinaryTree;});},"dojox/collections/Stack":function(){define("dojox/collections/Stack",["dojo/_base/kernel","dojo/_base/array","./_base"],function(_5a,_5b,dxc){dxc.Stack=function(arr){var q=[];if(arr){q=q.concat(arr);}this.count=q.length;this.clear=function(){q=[];this.count=q.length;};this.clone=function(){return new dxc.Stack(q);};this.contains=function(o){for(var i=0;i= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ /* This is an optimized version of Dojo, built for deployment and not for development. To get sources and documentation, please visit: http://dojotoolkit.org */ //>>built require({cache:{"dojox/uuid":function(){define("dojox/uuid",["dojox/uuid/_base"],function(_1){return _1;});},"dojox/uuid/Uuid":function(){define("dojox/uuid/Uuid",["dojo/_base/lang","./_base"],function(_2,_3){dojox.uuid.Uuid=function(_4){this._uuidString=dojox.uuid.NIL_UUID;if(_4){dojox.uuid.assert(_2.isString(_4));this._uuidString=_4.toLowerCase();dojox.uuid.assert(this.isValid());}else{var _5=dojox.uuid.Uuid.getGenerator();if(_5){this._uuidString=_5();dojox.uuid.assert(this.isValid());}}};dojox.uuid.Uuid.compare=function(_6,_7){var _8=_6.toString();var _9=_7.toString();if(_8>_9){return 1;}if(_8<_9){return -1;}return 0;};dojox.uuid.Uuid.setGenerator=function(_a){dojox.uuid.assert(!_a||_2.isFunction(_a));dojox.uuid.Uuid._ourGenerator=_a;};dojox.uuid.Uuid.getGenerator=function(){return dojox.uuid.Uuid._ourGenerator;};dojox.uuid.Uuid.prototype.toString=function(){return this._uuidString;};dojox.uuid.Uuid.prototype.compare=function(_b){return dojox.uuid.Uuid.compare(this,_b);};dojox.uuid.Uuid.prototype.isEqual=function(_c){return (this.compare(_c)==0);};dojox.uuid.Uuid.prototype.isValid=function(){return dojox.uuid.isValid(this);};dojox.uuid.Uuid.prototype.getVariant=function(){return dojox.uuid.getVariant(this);};dojox.uuid.Uuid.prototype.getVersion=function(){if(!this._versionNumber){this._versionNumber=dojox.uuid.getVersion(this);}return this._versionNumber;};dojox.uuid.Uuid.prototype.getNode=function(){if(!this._nodeString){this._nodeString=dojox.uuid.getNode(this);}return this._nodeString;};dojox.uuid.Uuid.prototype.getTimestamp=function(_d){if(!_d){_d=null;}switch(_d){case "string":case String:return this.getTimestamp(Date).toUTCString();break;case "hex":if(!this._timestampAsHexString){this._timestampAsHexString=dojox.uuid.getTimestamp(this,"hex");}return this._timestampAsHexString;break;case null:case "date":case Date:if(!this._timestampAsDate){this._timestampAsDate=dojox.uuid.getTimestamp(this,Date);}return this._timestampAsDate;break;default:dojox.uuid.assert(false,"The getTimestamp() method dojox.uuid.Uuid was passed a bogus returnType: "+_d);break;}};return dojox.uuid.Uuid;});},"dojox/uuid/_base":function(){define("dojox/uuid/_base",["dojo/_base/kernel","dojo/_base/lang"],function(_e){_e.getObject("uuid",true,dojox);dojox.uuid.NIL_UUID="00000000-0000-0000-0000-000000000000";dojox.uuid.version={UNKNOWN:0,TIME_BASED:1,DCE_SECURITY:2,NAME_BASED_MD5:3,RANDOM:4,NAME_BASED_SHA1:5};dojox.uuid.variant={NCS:"0",DCE:"10",MICROSOFT:"110",UNKNOWN:"111"};dojox.uuid.assert=function(_f,_10){if(!_f){if(!_10){_10="An assert statement failed.\n"+"The method dojox.uuid.assert() was called with a 'false' value.\n";}throw new Error(_10);}};dojox.uuid.generateNilUuid=function(){return dojox.uuid.NIL_UUID;};dojox.uuid.isValid=function(_11){_11=_11.toString();var _12=(_e.isString(_11)&&(_11.length==36)&&(_11==_11.toLowerCase()));if(_12){var _13=_11.split("-");_12=((_13.length==5)&&(_13[0].length==8)&&(_13[1].length==4)&&(_13[2].length==4)&&(_13[3].length==4)&&(_13[4].length==12));var _14=16;for(var i in _13){var _15=_13[i];var _16=parseInt(_15,_14);_12=_12&&isFinite(_16);}}return _12;};dojox.uuid.getVariant=function(_17){if(!dojox.uuid._ourVariantLookupTable){var _18=dojox.uuid.variant;var _19=[];_19[0]=_18.NCS;_19[1]=_18.NCS;_19[2]=_18.NCS;_19[3]=_18.NCS;_19[4]=_18.NCS;_19[5]=_18.NCS;_19[6]=_18.NCS;_19[7]=_18.NCS;_19[8]=_18.DCE;_19[9]=_18.DCE;_19[10]=_18.DCE;_19[11]=_18.DCE;_19[12]=_18.MICROSOFT;_19[13]=_18.MICROSOFT;_19[14]=_18.UNKNOWN;_19[15]=_18.UNKNOWN;dojox.uuid._ourVariantLookupTable=_19;}_17=_17.toString();var _1a=_17.charAt(19);var _1b=16;var _1c=parseInt(_1a,_1b);dojox.uuid.assert((_1c>=0)&&(_1c<=16));return dojox.uuid._ourVariantLookupTable[_1c];};dojox.uuid.getVersion=function(_1d){var _1e="dojox.uuid.getVersion() was not passed a DCE Variant UUID.";dojox.uuid.assert(dojox.uuid.getVariant(_1d)==dojox.uuid.variant.DCE,_1e);_1d=_1d.toString();var _1f=_1d.charAt(14);var _20=16;var _21=parseInt(_1f,_20);return _21;};dojox.uuid.getNode=function(_22){var _23="dojox.uuid.getNode() was not passed a TIME_BASED UUID.";dojox.uuid.assert(dojox.uuid.getVersion(_22)==dojox.uuid.version.TIME_BASED,_23);_22=_22.toString();var _24=_22.split("-");var _25=_24[4];return _25;};dojox.uuid.getTimestamp=function(_26,_27){var _28="dojox.uuid.getTimestamp() was not passed a TIME_BASED UUID.";dojox.uuid.assert(dojox.uuid.getVersion(_26)==dojox.uuid.version.TIME_BASED,_28);_26=_26.toString();if(!_27){_27=null;}switch(_27){case "string":case String:return dojox.uuid.getTimestamp(_26,Date).toUTCString();break;case "hex":var _29=_26.split("-");var _2a=_29[0];var _2b=_29[1];var _2c=_29[2];_2c=_2c.slice(1);var _2d=_2c+_2b+_2a;dojox.uuid.assert(_2d.length==15);return _2d;break;case null:case "date":case Date:var _2e=3394248;var _2f=16;var _30=_26.split("-");var _31=parseInt(_30[0],_2f);var _32=parseInt(_30[1],_2f);var _33=parseInt(_30[2],_2f);var _34=_33&4095;_34<<=16;_34+=_32;_34*=4294967296;_34+=_31;var _35=_34/10000;var _36=60*60;var _37=_2e;var _38=_37*_36;var _39=_38*1000;var _3a=_35-_39;var _3b=new Date(_3a);return _3b;break;default:dojox.uuid.assert(false,"dojox.uuid.getTimestamp was not passed a valid returnType: "+_27);break;}};return dojox.uuid;});},"dojox/uuid/generateTimeBasedUuid":function(){define("dojox/uuid/generateTimeBasedUuid",["dojo/_base/lang","./_base"],function(_3c){dojox.uuid.generateTimeBasedUuid=function(_3d){var _3e=dojox.uuid.generateTimeBasedUuid._generator.generateUuidString(_3d);return _3e;};dojox.uuid.generateTimeBasedUuid.isValidNode=function(_3f){var _40=16;var _41=parseInt(_3f,_40);var _42=_3c.isString(_3f)&&_3f.length==12&&isFinite(_41);return _42;};dojox.uuid.generateTimeBasedUuid.setNode=function(_43){dojox.uuid.assert((_43===null)||this.isValidNode(_43));this._uniformNode=_43;};dojox.uuid.generateTimeBasedUuid.getNode=function(){return this._uniformNode;};dojox.uuid.generateTimeBasedUuid._generator=new function(){this.GREGORIAN_CHANGE_OFFSET_IN_HOURS=3394248;var _44=null;var _45=null;var _46=null;var _47=0;var _48=null;var _49=null;var _4a=16;function _4b(_4c){_4c[2]+=_4c[3]>>>16;_4c[3]&=65535;_4c[1]+=_4c[2]>>>16;_4c[2]&=65535;_4c[0]+=_4c[1]>>>16;_4c[1]&=65535;dojox.uuid.assert((_4c[0]>>>16)===0);};function _4d(x){var _4e=new Array(0,0,0,0);_4e[3]=x%65536;x-=_4e[3];x/=65536;_4e[2]=x%65536;x-=_4e[2];x/=65536;_4e[1]=x%65536;x-=_4e[1];x/=65536;_4e[0]=x;return _4e;};function _4f(_50,_51){dojox.uuid.assert(_3c.isArray(_50));dojox.uuid.assert(_3c.isArray(_51));dojox.uuid.assert(_50.length==4);dojox.uuid.assert(_51.length==4);var _52=new Array(0,0,0,0);_52[3]=_50[3]+_51[3];_52[2]=_50[2]+_51[2];_52[1]=_50[1]+_51[1];_52[0]=_50[0]+_51[0];_4b(_52);return _52;};function _53(_54,_55){dojox.uuid.assert(_3c.isArray(_54));dojox.uuid.assert(_3c.isArray(_55));dojox.uuid.assert(_54.length==4);dojox.uuid.assert(_55.length==4);var _56=false;if(_54[0]*_55[0]!==0){_56=true;}if(_54[0]*_55[1]!==0){_56=true;}if(_54[0]*_55[2]!==0){_56=true;}if(_54[1]*_55[0]!==0){_56=true;}if(_54[1]*_55[1]!==0){_56=true;}if(_54[2]*_55[0]!==0){_56=true;}dojox.uuid.assert(!_56);var _57=new Array(0,0,0,0);_57[0]+=_54[0]*_55[3];_4b(_57);_57[0]+=_54[1]*_55[2];_4b(_57);_57[0]+=_54[2]*_55[1];_4b(_57);_57[0]+=_54[3]*_55[0];_4b(_57);_57[1]+=_54[1]*_55[3];_4b(_57);_57[1]+=_54[2]*_55[2];_4b(_57);_57[1]+=_54[3]*_55[1];_4b(_57);_57[2]+=_54[2]*_55[3];_4b(_57);_57[2]+=_54[3]*_55[2];_4b(_57);_57[3]+=_54[3]*_55[3];_4b(_57);return _57;};function _58(_59,_5a){while(_59.length<_5a){_59="0"+_59;}return _59;};function _5b(){var _5c=Math.floor((Math.random()%1)*Math.pow(2,32));var _5d=_5c.toString(_4a);while(_5d.length<8){_5d="0"+_5d;}return _5d;};this.generateUuidString=function(_5e){if(_5e){dojox.uuid.assert(dojox.uuid.generateTimeBasedUuid.isValidNode(_5e));}else{if(dojox.uuid.generateTimeBasedUuid._uniformNode){_5e=dojox.uuid.generateTimeBasedUuid._uniformNode;}else{if(!_44){var _5f=32768;var _60=Math.floor((Math.random()%1)*Math.pow(2,15));var _61=(_5f|_60).toString(_4a);_44=_61+_5b();}_5e=_44;}}if(!_45){var _62=32768;var _63=Math.floor((Math.random()%1)*Math.pow(2,14));_45=(_62|_63).toString(_4a);}var now=new Date();var _64=now.valueOf();var _65=_4d(_64);if(!_48){var _66=_4d(60*60);var _67=_4d(dojox.uuid.generateTimeBasedUuid._generator.GREGORIAN_CHANGE_OFFSET_IN_HOURS);var _68=_53(_67,_66);var _69=_4d(1000);_48=_53(_68,_69);_49=_4d(10000);}var _6a=_65;var _6b=_4f(_48,_6a);var _6c=_53(_6b,_49);if(now.valueOf()==_46){_6c[3]+=_47;_4b(_6c);_47+=1;if(_47==10000){while(now.valueOf()==_46){now=new Date();}}}else{_46=now.valueOf();_47=1;}var _6d=_6c[2].toString(_4a);var _6e=_6c[3].toString(_4a);var _6f=_58(_6d,4)+_58(_6e,4);var _70=_6c[1].toString(_4a);_70=_58(_70,4);var _71=_6c[0].toString(_4a);_71=_58(_71,3);var _72="-";var _73="1";var _74=_6f+_72+_70+_72+_73+_71+_72+_45+_72+_5e;_74=_74.toLowerCase();return _74;};}();return dojox.uuid.generateTimeBasedUuid;});},"dojox/uuid/generateRandomUuid":function(){define("dojox/uuid/generateRandomUuid",["./_base"],function(){dojox.uuid.generateRandomUuid=function(){var _75=16;function _76(){var _77=Math.floor((Math.random()%1)*Math.pow(2,32));var _78=_77.toString(_75);while(_78.length<8){_78="0"+_78;}return _78;};var _79="-";var _7a="4";var _7b="8";var a=_76();var b=_76();b=b.substring(0,4)+_79+_7a+b.substring(5,8);var c=_76();c=_7b+c.substring(1,4)+_79+c.substring(4,8);var d=_76();var _7c=a+_79+b+_79+c+d;_7c=_7c.toLowerCase();return _7c;};return dojox.uuid.generateRandomUuid;});},"*noref":1}});define("dojox/_dojox_uuid",[],1);require(["dojox/uuid","dojox/uuid/Uuid","dojox/uuid/generateRandomUuid","dojox/uuid/generateTimeBasedUuid"]);/* Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ /* This is an optimized version of Dojo, built for deployment and not for development. To get sources and documentation, please visit: http://dojotoolkit.org */ //>>built require({cache:{"dojox/xml/parser":function(){define("dojox/xml/parser",["dojo/_base/kernel","dojo/_base/lang","dojo/_base/array","dojo/_base/window","dojo/_base/sniff"],function(_1){_1.getObject("xml.parser",true,dojox);dojox.xml.parser.parse=function(_2,_3){var _4=_1.doc;var _5;_3=_3||"text/xml";if(_2&&_1.trim(_2)&&"DOMParser" in _1.global){var _6=new DOMParser();_5=_6.parseFromString(_2,_3);var de=_5.documentElement;var _7="http://www.mozilla.org/newlayout/xml/parsererror.xml";if(de.nodeName=="parsererror"&&de.namespaceURI==_7){var _8=de.getElementsByTagNameNS(_7,"sourcetext")[0];if(_8){_8=_8.firstChild.data;}throw new Error("Error parsing text "+de.firstChild.data+" \n"+_8);}return _5;}else{if("ActiveXObject" in _1.global){var ms=function(n){return "MSXML"+n+".DOMDocument";};var dp=["Microsoft.XMLDOM",ms(6),ms(4),ms(3),ms(2)];_1.some(dp,function(p){try{_5=new ActiveXObject(p);}catch(e){return false;}return true;});if(_2&&_5){_5.async=false;_5.loadXML(_2);var pe=_5.parseError;if(pe.errorCode!==0){throw new Error("Line: "+pe.line+"\n"+"Col: "+pe.linepos+"\n"+"Reason: "+pe.reason+"\n"+"Error Code: "+pe.errorCode+"\n"+"Source: "+pe.srcText);}}if(_5){return _5;}}else{if(_4.implementation&&_4.implementation.createDocument){if(_2&&_1.trim(_2)&&_4.createElement){var _9=_4.createElement("xml");_9.innerHTML=_2;var _a=_4.implementation.createDocument("foo","",null);_1.forEach(_9.childNodes,function(_b){_a.importNode(_b,true);});return _a;}else{return _4.implementation.createDocument("","",null);}}}}return null;};dojox.xml.parser.textContent=function(_c,_d){if(arguments.length>1){var _e=_c.ownerDocument||_1.doc;dojox.xml.parser.replaceChildren(_c,_e.createTextNode(_d));return _d;}else{if(_c.textContent!==undefined){return _c.textContent;}var _f="";if(_c){_1.forEach(_c.childNodes,function(_10){switch(_10.nodeType){case 1:case 5:_f+=dojox.xml.parser.textContent(_10);break;case 3:case 2:case 4:_f+=_10.nodeValue;}});}return _f;}};dojox.xml.parser.replaceChildren=function(_11,_12){var _13=[];if(_1.isIE){_1.forEach(_11.childNodes,function(_14){_13.push(_14);});}dojox.xml.parser.removeChildren(_11);_1.forEach(_13,_1.destroy);if(!_1.isArray(_12)){_11.appendChild(_12);}else{_1.forEach(_12,function(_15){_11.appendChild(_15);});}};dojox.xml.parser.removeChildren=function(_16){var _17=_16.childNodes.length;while(_16.hasChildNodes()){_16.removeChild(_16.firstChild);}return _17;};dojox.xml.parser.innerXML=function(_18){if(_18.innerXML){return _18.innerXML;}else{if(_18.xml){return _18.xml;}else{if(typeof XMLSerializer!="undefined"){return (new XMLSerializer()).serializeToString(_18);}}}return null;};return dojox.xml.parser;});},"dojox/data/CsvStore":function(){define("dojox/data/CsvStore",["dojo/_base/lang","dojo/_base/declare","dojo/_base/xhr","dojo/_base/window","dojo/data/util/filter","dojo/data/util/simpleFetch"],function(_19,_1a,xhr,_1b,_1c,_1d){var _1e=_1a("dojox.data.CsvStore",null,{constructor:function(_1f){this._attributes=[];this._attributeIndexes={};this._dataArray=[];this._arrayOfAllItems=[];this._loadFinished=false;if(_1f.url){this.url=_1f.url;}this._csvData=_1f.data;if(_1f.label){this.label=_1f.label;}else{if(this.label===""){this.label=undefined;}}this._storeProp="_csvStore";this._idProp="_csvId";this._features={"dojo.data.api.Read":true,"dojo.data.api.Identity":true};this._loadInProgress=false;this._queuedFetches=[];this.identifier=_1f.identifier;if(this.identifier===""){delete this.identifier;}else{this._idMap={};}if("separator" in _1f){this.separator=_1f.separator;}if("urlPreventCache" in _1f){this.urlPreventCache=_1f.urlPreventCache?true:false;}},url:"",label:"",identifier:"",separator:",",urlPreventCache:false,_assertIsItem:function(_20){if(!this.isItem(_20)){throw new Error(this.declaredClass+": a function was passed an item argument that was not an item");}},_getIndex:function(_21){var idx=this.getIdentity(_21);if(this.identifier){idx=this._idMap[idx];}return idx;},getValue:function(_22,_23,_24){this._assertIsItem(_22);var _25=_24;if(typeof _23==="string"){var ai=this._attributeIndexes[_23];if(ai!=null){var _26=this._dataArray[this._getIndex(_22)];_25=_26[ai]||_24;}}else{throw new Error(this.declaredClass+": a function was passed an attribute argument that was not a string");}return _25;},getValues:function(_27,_28){var _29=this.getValue(_27,_28);return (_29?[_29]:[]);},getAttributes:function(_2a){this._assertIsItem(_2a);var _2b=[];var _2c=this._dataArray[this._getIndex(_2a)];for(var i=0;i<_2c.length;i++){if(_2c[i]!==""){_2b.push(this._attributes[i]);}}return _2b;},hasAttribute:function(_2d,_2e){this._assertIsItem(_2d);if(typeof _2e==="string"){var _2f=this._attributeIndexes[_2e];var _30=this._dataArray[this._getIndex(_2d)];return (typeof _2f!=="undefined"&&_2f<_30.length&&_30[_2f]!=="");}else{throw new Error(this.declaredClass+": a function was passed an attribute argument that was not a string");}},containsValue:function(_31,_32,_33){var _34=undefined;if(typeof _33==="string"){_34=_1c.patternToRegExp(_33,false);}return this._containsValue(_31,_32,_33,_34);},_containsValue:function(_35,_36,_37,_38){var _39=this.getValues(_35,_36);for(var i=0;i<_39.length;++i){var _3a=_39[i];if(typeof _3a==="string"&&_38){return (_3a.match(_38)!==null);}else{if(_37===_3a){return true;}}}return false;},isItem:function(_3b){if(_3b&&_3b[this._storeProp]===this){var _3c=_3b[this._idProp];if(this.identifier){var _3d=this._dataArray[this._idMap[_3c]];if(_3d){return true;}}else{if(_3c>=0&&_3c0){var _5d=_5c.split(this.separator);var j=0;while(j<_5d.length){var _5e=_5d[j];var _5f=_5e.replace(_57,"");var _60=_5f.replace(_58,"");var _61=_60.charAt(0);var _62=_60.charAt(_60.length-1);var _63=_60.charAt(_60.length-2);var _64=_60.charAt(_60.length-3);if(_60.length===2&&_60=="\"\""){_5d[j]="";}else{if((_61=="\"")&&((_62!="\"")||((_62=="\"")&&(_63=="\"")&&(_64!="\"")))){if(j+1===_5d.length){return;}var _65=_5d[j+1];_5d[j]=_5f+this.separator+_65;_5d.splice(j+1,1);}else{if((_61=="\"")&&(_62=="\"")){_60=_60.slice(1,(_60.length-1));_60=_60.replace(_59,"\"");}_5d[j]=_60;j+=1;}}}_5a.push(_5d);}}this._attributes=_5a.shift();for(i=0;i0){for(var i=0;i0){var _9d={};var _9e=true;var _9f=false;for(i=0;i<_9b.childNodes.length;i++){var _a0=_9b.childNodes[i];if(_a0.nodeType===1){var _a1=_a0.nodeName;if(!_9d[_a1]){_9c.push(_a1);_9d[_a1]=_a1;}_9e=true;}else{if(_a0.nodeType===3){_9f=true;}}}if(_9e){_9c.push("childNodes");}if(_9f){_9c.push("text()");}}for(i=0;i<_9b.attributes.length;i++){_9c.push("@"+_9b.attributes[i].nodeName);}if(this._attributeMap){for(var key in this._attributeMap){i=key.indexOf(".");if(i>0){var _a2=key.substring(0,i);if(_a2===_9b.nodeName){_9c.push(key.substring(i+1));}}else{_9c.push(key);}}}return _9c;},hasAttribute:function(_a3,_a4){return (this.getValue(_a3,_a4)!==undefined);},containsValue:function(_a5,_a6,_a7){var _a8=this.getValues(_a5,_a6);for(var i=0;i<_a8.length;i++){if((typeof _a7==="string")){if(_a8[i].toString&&_a8[i].toString()===_a7){return true;}}else{if(_a8[i]===_a7){return true;}}}return false;},isItem:function(_a9){if(_a9&&_a9.element&&_a9.store&&_a9.store===this){return true;}return false;},isItemLoaded:function(_aa){return this.isItem(_aa);},loadItem:function(_ab){},getFeatures:function(){var _ac={"dojo.data.api.Read":true,"dojo.data.api.Write":true};if(!this.sendQuery||this.keyAttribute!==""){_ac["dojo.data.api.Identity"]=true;}return _ac;},getLabel:function(_ad){if((this.label!=="")&&this.isItem(_ad)){var _ae=this.getValue(_ad,this.label);if(_ae){return _ae.toString();}}return undefined;},getLabelAttributes:function(_af){if(this.label!==""){return [this.label];}return null;},_fetchItems:function(_b0,_b1,_b2){var url=this._getFetchUrl(_b0);if(!url){_b2(new Error("No URL specified."),_b0);return;}var _b3=(!this.sendQuery?_b0:{});var _b4=this;var _b5={url:url,handleAs:"xml",preventCache:_b4.urlPreventCache};var _b6=xhr.get(_b5);_b6.addCallback(function(_b7){var _b8=_b4._getItems(_b7,_b3);if(_b8&&_b8.length>0){_b1(_b8,_b0);}else{_b1([],_b0);}});_b6.addErrback(function(_b9){_b2(_b9,_b0);});},_getFetchUrl:function(_ba){if(!this.sendQuery){return this.url;}var _bb=_ba.query;if(!_bb){return this.url;}if(_81.isString(_bb)){return this.url+_bb;}var _bc="";for(var _bd in _bb){var _be=_bb[_bd];if(_be){if(_bc){_bc+="&";}_bc+=(_bd+"="+_be);}}if(!_bc){return this.url;}var _bf=this.url;if(_bf.indexOf("?")<0){_bf+="?";}else{_bf+="&";}return _bf+_bc;},_getItems:function(_c0,_c1){var _c2=null;if(_c1){_c2=_c1.query;}var _c3=[];var _c4=null;if(this.rootItem!==""){_c4=_84(this.rootItem,_c0);}else{_c4=_c0.documentElement.childNodes;}var _c5=_c1.queryOptions?_c1.queryOptions.deep:false;if(_c5){_c4=this._flattenNodes(_c4);}for(var i=0;i<_c4.length;i++){var _c6=_c4[i];if(_c6.nodeType!=1){continue;}var _c7=this._getItem(_c6);if(_c2){var _c8=_c1.queryOptions?_c1.queryOptions.ignoreCase:false;var _c9;var _ca=false;var j;var _cb=true;var _cc={};for(var key in _c2){_c9=_c2[key];if(typeof _c9==="string"){_cc[key]=_87.patternToRegExp(_c9,_c8);}else{if(_c9){_cc[key]=_c9;}}}for(var _cd in _c2){_cb=false;var _ce=this.getValues(_c7,_cd);for(j=0;j<_ce.length;j++){_c9=_ce[j];if(_c9){var _cf=_c2[_cd];if((typeof _c9)==="string"&&(_cc[_cd])){if((_c9.match(_cc[_cd]))!==null){_ca=true;}else{_ca=false;}}else{if((typeof _c9)==="object"){if(_c9.toString&&(_cc[_cd])){var _d0=_c9.toString();if((_d0.match(_cc[_cd]))!==null){_ca=true;}else{_ca=false;}}else{if(_cf==="*"||_cf===_c9){_ca=true;}else{_ca=false;}}}}}if(_ca){break;}}if(!_ca){break;}}if(_cb||_ca){_c3.push(_c7);}}else{_c3.push(_c7);}}_85.forEach(_c3,function(_d1){if(_d1.element.parentNode){_d1.element.parentNode.removeChild(_d1.element);}},this);return _c3;},_flattenNodes:function(_d2){var _d3=[];if(_d2){var i;for(i=0;i<_d2.length;i++){var _d4=_d2[i];_d3.push(_d4);if(_d4.childNodes&&_d4.childNodes.length>0){_d3=_d3.concat(this._flattenNodes(_d4.childNodes));}}}return _d3;},close:function(_d5){},newItem:function(_d6,_d7){_d6=(_d6||{});var _d8=_d6.tagName;if(!_d8){_d8=this.rootItem;if(_d8===""){return null;}}var _d9=this._getDocument();var _da=_d9.createElement(_d8);for(var _db in _d6){var _dc;if(_db==="tagName"){continue;}else{if(_db==="text()"){_dc=_d9.createTextNode(_d6[_db]);_da.appendChild(_dc);}else{_db=this._getAttribute(_d8,_db);if(_db.charAt(0)==="@"){var _dd=_db.substring(1);_da.setAttribute(_dd,_d6[_db]);}else{var _de=_d9.createElement(_db);_dc=_d9.createTextNode(_d6[_db]);_de.appendChild(_dc);_da.appendChild(_de);}}}}var _df=this._getItem(_da);this._newItems.push(_df);var _e0=null;if(_d7&&_d7.parent&&_d7.attribute){_e0={item:_d7.parent,attribute:_d7.attribute,oldValue:undefined};var _e1=this.getValues(_d7.parent,_d7.attribute);if(_e1&&_e1.length>0){var _e2=_e1.slice(0,_e1.length);if(_e1.length===1){_e0.oldValue=_e1[0];}else{_e0.oldValue=_e1.slice(0,_e1.length);}_e2.push(_df);this.setValues(_d7.parent,_d7.attribute,_e2);_e0.newValue=this.getValues(_d7.parent,_d7.attribute);}else{this.setValue(_d7.parent,_d7.attribute,_df);_e0.newValue=_df;}}return _df;},deleteItem:function(_e3){var _e4=_e3.element;if(_e4.parentNode){this._backupItem(_e3);_e4.parentNode.removeChild(_e4);return true;}this._forgetItem(_e3);this._deletedItems.push(_e3);return true;},setValue:function(_e5,_e6,_e7){if(_e6==="tagName"){return false;}this._backupItem(_e5);var _e8=_e5.element;var _e9;var _ea;if(_e6==="childNodes"){_e9=_e7.element;_e8.appendChild(_e9);}else{if(_e6==="text()"){while(_e8.firstChild){_e8.removeChild(_e8.firstChild);}_ea=this._getDocument(_e8).createTextNode(_e7);_e8.appendChild(_ea);}else{_e6=this._getAttribute(_e8.nodeName,_e6);if(_e6.charAt(0)==="@"){var _eb=_e6.substring(1);_e8.setAttribute(_eb,_e7);}else{for(var i=0;i<_e8.childNodes.length;i++){var _ec=_e8.childNodes[i];if(_ec.nodeType===1&&_ec.nodeName===_e6){_e9=_ec;break;}}var _ed=this._getDocument(_e8);if(_e9){while(_e9.firstChild){_e9.removeChild(_e9.firstChild);}}else{_e9=_ed.createElement(_e6);_e8.appendChild(_e9);}_ea=_ed.createTextNode(_e7);_e9.appendChild(_ea);}}}return true;},setValues:function(_ee,_ef,_f0){if(_ef==="tagName"){return false;}this._backupItem(_ee);var _f1=_ee.element;var i;var _f2;var _f3;if(_ef==="childNodes"){while(_f1.firstChild){_f1.removeChild(_f1.firstChild);}for(i=0;i<_f0.length;i++){_f2=_f0[i].element;_f1.appendChild(_f2);}}else{if(_ef==="text()"){while(_f1.firstChild){_f1.removeChild(_f1.firstChild);}var _f4="";for(i=0;i<_f0.length;i++){_f4+=_f0[i];}_f3=this._getDocument(_f1).createTextNode(_f4);_f1.appendChild(_f3);}else{_ef=this._getAttribute(_f1.nodeName,_ef);if(_ef.charAt(0)==="@"){var _f5=_ef.substring(1);_f1.setAttribute(_f5,_f0[0]);}else{for(i=_f1.childNodes.length-1;i>=0;i--){var _f6=_f1.childNodes[i];if(_f6.nodeType===1&&_f6.nodeName===_ef){_f1.removeChild(_f6);}}var _f7=this._getDocument(_f1);for(i=0;i<_f0.length;i++){_f2=_f7.createElement(_ef);_f3=_f7.createTextNode(_f0[i]);_f2.appendChild(_f3);_f1.appendChild(_f2);}}}}return true;},unsetAttribute:function(_f8,_f9){if(_f9==="tagName"){return false;}this._backupItem(_f8);var _fa=_f8.element;if(_f9==="childNodes"||_f9==="text()"){while(_fa.firstChild){_fa.removeChild(_fa.firstChild);}}else{_f9=this._getAttribute(_fa.nodeName,_f9);if(_f9.charAt(0)==="@"){var _fb=_f9.substring(1);_fa.removeAttribute(_fb);}else{for(var i=_fa.childNodes.length-1;i>=0;i--){var _fc=_fa.childNodes[i];if(_fc.nodeType===1&&_fc.nodeName===_f9){_fa.removeChild(_fc);}}}}return true;},save:function(_fd){if(!_fd){_fd={};}var i;for(i=0;i=0||this._getItemIndex(this._deletedItems,_100)>=0||this._getItemIndex(this._modifiedItems,_100)>=0);}else{return (this._newItems.length>0||this._deletedItems.length>0||this._modifiedItems.length>0);}},_saveItem:function(item,_101,_102){var url;var _103;if(_102==="PUT"){url=this._getPutUrl(item);}else{if(_102==="DELETE"){url=this._getDeleteUrl(item);}else{url=this._getPostUrl(item);}}if(!url){if(_101.onError){_103=_101.scope||_86.global;_101.onError.call(_103,new Error("No URL for saving content: "+this._getPostContent(item)));}return;}var _104={url:url,method:(_102||"POST"),contentType:"text/xml",handleAs:"xml"};var _105;if(_102==="PUT"){_104.putData=this._getPutContent(item);_105=xhr.put(_104);}else{if(_102==="DELETE"){_105=xhr.del(_104);}else{_104.postData=this._getPostContent(item);_105=xhr.post(_104);}}_103=(_101.scope||_86.global);var self=this;_105.addCallback(function(data){self._forgetItem(item);if(_101.onComplete){_101.onComplete.call(_103);}});_105.addErrback(function(_106){if(_101.onError){_101.onError.call(_103,_106);}});},_getPostUrl:function(item){return this.url;},_getPutUrl:function(item){return this.url;},_getDeleteUrl:function(item){var url=this.url;if(item&&this.keyAttribute!==""){var _107=this.getValue(item,this.keyAttribute);if(_107){var key=this.keyAttribute.charAt(0)==="@"?this.keyAttribute.substring(1):this.keyAttribute;url+=url.indexOf("?")<0?"?":"&";url+=key+"="+_107;}}return url;},_getPostContent:function(item){return ""+_88.innerXML(item.element);},_getPutContent:function(item){return ""+_88.innerXML(item.element);},_getAttribute:function(_108,_109){if(this._attributeMap){var key=_108+"."+_109;var _10a=this._attributeMap[key];if(_10a){_109=_10a;}else{_10a=this._attributeMap[_109];if(_10a){_109=_10a;}}}return _109;},_getItem:function(_10b){try{var q=null;if(this.keyAttribute===""){q=this._getXPath(_10b);}return new _89(_10b,this,q);}catch(e){}return null;},_getItemIndex:function(_10c,_10d){for(var i=0;i<_10c.length;i++){if(_10c[i].element===_10d){return i;}}return -1;},_backupItem:function(item){var _10e=this._getRootElement(item.element);if(this._getItemIndex(this._newItems,_10e)>=0||this._getItemIndex(this._modifiedItems,_10e)>=0){return;}if(_10e!=item.element){item=this._getItem(_10e);}item._backup=_10e.cloneNode(true);this._modifiedItems.push(item);},_restoreItems:function(_10f){_85.forEach(_10f,function(item){if(item._backup){item.element=item._backup;item._backup=null;}},this);},_forgetItem:function(item){var _110=item.element;var _111=this._getItemIndex(this._newItems,_110);if(_111>=0){this._newItems.splice(_111,1);}_111=this._getItemIndex(this._deletedItems,_110);if(_111>=0){this._deletedItems.splice(_111,1);}_111=this._getItemIndex(this._modifiedItems,_110);if(_111>=0){this._modifiedItems.splice(_111,1);}},_getDocument:function(_112){if(_112){return _112.ownerDocument;}else{if(!this._document){return _88.parse();}}return null;},_getRootElement:function(_113){while(_113.parentNode){_113=_113.parentNode;}return _113;},_getXPath:function(_114){var _115=null;if(!this.sendQuery){var node=_114;_115="";while(node&&node!=_114.ownerDocument){var pos=0;var _116=node;var name=node.nodeName;while(_116){_116=_116.previousSibling;if(_116&&_116.nodeName===name){pos++;}}var temp="/"+name+"["+pos+"]";if(_115){_115=temp+_115;}else{_115=temp;}node=node.parentNode;}}return _115;},getIdentity:function(item){if(!this.isItem(item)){throw new Error("dojox.data.XmlStore: Object supplied to getIdentity is not an item");}else{var id=null;if(this.sendQuery&&this.keyAttribute!==""){id=this.getValue(item,this.keyAttribute).toString();}else{if(!this.serverQuery){if(this.keyAttribute!==""){id=this.getValue(item,this.keyAttribute).toString();}else{id=item.q;}}}return id;}},getIdentityAttributes:function(item){if(!this.isItem(item)){throw new Error("dojox.data.XmlStore: Object supplied to getIdentity is not an item");}else{if(this.keyAttribute!==""){return [this.keyAttribute];}else{return null;}}},fetchItemByIdentity:function(_117){var _118=null;var _119=null;var self=this;var url=null;var _11a=null;var _11b=null;if(!self.sendQuery){_118=function(data){if(data){if(self.keyAttribute!==""){var _11c={};_11c.query={};_11c.query[self.keyAttribute]=_117.identity;_11c.queryOptions={deep:true};var _11d=self._getItems(data,_11c);_119=_117.scope||_86.global;if(_11d.length===1){if(_117.onItem){_117.onItem.call(_119,_11d[0]);}}else{if(_11d.length===0){if(_117.onItem){_117.onItem.call(_119,null);}}else{if(_117.onError){_117.onError.call(_119,new Error("Items array size for identity lookup greater than 1, invalid keyAttribute."));}}}}else{var _11e=_117.identity.split("/");var i;var node=data;for(i=0;i<_11e.length;i++){if(_11e[i]&&_11e[i]!==""){var _11f=_11e[i];_11f=_11f.substring(0,_11f.length-1);var vals=_11f.split("[");var tag=vals[0];var _120=parseInt(vals[1],10);var pos=0;if(node){var _121=node.childNodes;if(_121){var j;var _122=null;for(j=0;j<_121.length;j++){var _123=_121[j];if(_123.nodeName===tag){if(pos<_120){pos++;}else{_122=_123;break;}}}if(_122){node=_122;}else{node=null;}}else{node=null;}}else{break;}}}var item=null;if(node){item=self._getItem(node);if(item.element.parentNode){item.element.parentNode.removeChild(item.element);}}if(_117.onItem){_119=_117.scope||_86.global;_117.onItem.call(_119,item);}}}};url=this._getFetchUrl(null);_11a={url:url,handleAs:"xml",preventCache:self.urlPreventCache};_11b=xhr.get(_11a);_11b.addCallback(_118);if(_117.onError){_11b.addErrback(function(_124){var s=_117.scope||_86.global;_117.onError.call(s,_124);});}}else{if(self.keyAttribute!==""){var _125={query:{}};_125.query[self.keyAttribute]=_117.identity;url=this._getFetchUrl(_125);_118=function(data){var item=null;if(data){var _126=self._getItems(data,{});if(_126.length===1){item=_126[0];}else{if(_117.onError){var _127=_117.scope||_86.global;_117.onError.call(_127,new Error("More than one item was returned from the server for the denoted identity"));}}}if(_117.onItem){_127=_117.scope||_86.global;_117.onItem.call(_127,item);}};_11a={url:url,handleAs:"xml",preventCache:self.urlPreventCache};_11b=xhr.get(_11a);_11b.addCallback(_118);if(_117.onError){_11b.addErrback(function(_128){var s=_117.scope||_86.global;_117.onError.call(s,_128);});}}else{if(_117.onError){var s=_117.scope||_86.global;_117.onError.call(s,new Error("XmlStore is not told that the server to provides identity support. No keyAttribute specified."));}}}}});_81.extend(_8a,_83);return _8a;});},"dojo/_base/query":function(){define("dojo/_base/query",["./kernel","../query","./NodeList"],function(dojo){return dojo.query;});},"*noref":1}});define("dojox/_dojox_data_basic",[],1);require(["dojox/data/XmlStore","dojox/data/CsvStore"]);/* Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ /* This is an optimized version of Dojo, built for deployment and not for development. To get sources and documentation, please visit: http://dojotoolkit.org */ //>>built require({cache:{"dojox/main":function(){define("dojox/main",["dojo/_base/kernel"],function(_1){return _1.dojox;});},"dojox/lang/aspect":function(){define("dojox/lang/aspect",["dijit","dojo","dojox"],function(_2,_3,_4){_3.provide("dojox.lang.aspect");(function(){var d=_3,_5=_4.lang.aspect,ap=Array.prototype,_6=[],_7;var _8=function(){this.next_before=this.prev_before=this.next_around=this.prev_around=this.next_afterReturning=this.prev_afterReturning=this.next_afterThrowing=this.prev_afterThrowing=this;this.counter=0;};d.extend(_8,{add:function(_9){var _a=d.isFunction(_9),_b={advice:_9,dynamic:_a};this._add(_b,"before","",_a,_9);this._add(_b,"around","",_a,_9);this._add(_b,"after","Returning",_a,_9);this._add(_b,"after","Throwing",_a,_9);++this.counter;return _b;},_add:function(_c,_d,_e,_f,_10){var _11=_d+_e;if(_f||_10[_d]||(_e&&_10[_11])){var _12="next_"+_11,_13="prev_"+_11;(_c[_13]=this[_13])[_12]=_c;(_c[_12]=this)[_13]=_c;}},remove:function(_14){this._remove(_14,"before");this._remove(_14,"around");this._remove(_14,"afterReturning");this._remove(_14,"afterThrowing");--this.counter;},_remove:function(_15,_16){var _17="next_"+_16,_18="prev_"+_16;if(_15[_17]){_15[_17][_18]=_15[_18];_15[_18][_17]=_15[_17];}},isEmpty:function(){return !this.counter;}});var _19=function(){return function(){var _1a=arguments.callee,_1b=_1a.advices,ret,i,a,e,t;if(_7){_6.push(_7);}_7={instance:this,joinPoint:_1a,depth:_6.length,around:_1b.prev_around,dynAdvices:[],dynIndex:0};try{for(i=_1b.prev_before;i!=_1b;i=i.prev_before){if(i.dynamic){_7.dynAdvices.push(a=new i.advice(_7));if(t=a.before){t.apply(a,arguments);}}else{t=i.advice;t.before.apply(t,arguments);}}try{ret=(_1b.prev_around==_1b?_1a.target:_5.proceed).apply(this,arguments);}catch(e){_7.dynIndex=_7.dynAdvices.length;for(i=_1b.next_afterThrowing;i!=_1b;i=i.next_afterThrowing){a=i.dynamic?_7.dynAdvices[--_7.dynIndex]:i.advice;if(t=a.afterThrowing){t.call(a,e);}if(t=a.after){t.call(a);}}throw e;}_7.dynIndex=_7.dynAdvices.length;for(i=_1b.next_afterReturning;i!=_1b;i=i.next_afterReturning){a=i.dynamic?_7.dynAdvices[--_7.dynIndex]:i.advice;if(t=a.afterReturning){t.call(a,ret);}if(t=a.after){t.call(a);}}var ls=_1a._listeners;for(i in ls){if(!(i in ap)){ls[i].apply(this,arguments);}}}finally{for(i=0;i<_7.dynAdvices.length;++i){a=_7.dynAdvices[i];if(a.destroy){a.destroy();}}_7=_6.length?_6.pop():null;}return ret;};};_5.advise=function(obj,_1c,_1d){if(typeof obj!="object"){obj=obj.prototype;}var _1e=[];if(!(_1c instanceof Array)){_1c=[_1c];}for(var j=0;j<_1c.length;++j){var t=_1c[j];if(t instanceof RegExp){for(var i in obj){if(d.isFunction(obj[i])&&t.test(i)){_1e.push(i);}}}else{if(d.isFunction(obj[t])){_1e.push(t);}}}if(!d.isArray(_1d)){_1d=[_1d];}return _5.adviseRaw(obj,_1e,_1d);};_5.adviseRaw=function(obj,_1f,_20){if(!_1f.length||!_20.length){return null;}var m={},al=_20.length;for(var i=_1f.length-1;i>=0;--i){var _21=_1f[i],o=obj[_21],ao=new Array(al),t=o.advices;if(!t){var x=obj[_21]=_19();x.target=o.target||o;x.targetName=_21;x._listeners=o._listeners||[];x.advices=new _8;t=x.advices;}for(var j=0;j=0;--i){t.remove(ao[i]);}if(t.isEmpty()){var _25=true,ls=o._listeners;if(ls.length){for(i in ls){if(!(i in ap)){_25=false;break;}}}if(_25){obj[_24]=o.target;}else{var x=obj[_24]=d._listener.getDispatcher();x.target=o.target;x._listeners=ls;}}}};_5.getContext=function(){return _7;};_5.getContextStack=function(){return _6;};_5.proceed=function(){var _26=_7.joinPoint,_27=_26.advices;for(var c=_7.around;c!=_27;c=_7.around){_7.around=c.prev_around;if(c.dynamic){var a=_7.dynAdvices[_7.dynIndex++],t=a.around;if(t){return t.apply(a,arguments);}}else{return c.advice.around.apply(c.advice,arguments);}}return _26.target.apply(_7.instance,arguments);};})();});},"dijit/main":function(){define("dijit/main",["dojo/_base/kernel"],function(_28){return _28.dijit;});},"*noref":1}});define("dojox/_dojox_aspect",[],1);require(["dojox/lang/aspect"]);/** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2009, 2010, 2011 - All Rights reserved. **/ (function(){var _1={};var _2=[];var _3=1;var _4={};_4.register=function(_5){var id=_6();_1[id]=_5;_2.push(_5);return id;};_4.deregister=function(_7){_1[_7]=null;_2=[];};_4.notify=function(_8,_9,_a){var _b=_c();var i=0;var _d=_b.length;if(!_a){_a={type:"AJAX"};}var _e=function(){if(i<_d){var _f=_b[i];i++;if(_f){_f(_8,_e,_a);}else{_e();}}};_e();if(_9){_9();}};_4.isActive=function(){return _2.length>0;};var _6=function(){return _3++;};var _c=function(){if(!_2||_2.length<=0){for(var _10 in _1){if(_1.hasOwnProperty(_10)){_2.push(_10);}}}return _2;};if(typeof (com)=="undefined"){com={};}if(typeof (com.ibm)=="undefined"){com.ibm={};}if(typeof (com.ibm.portal)=="undefined"){com.ibm.portal={};}if(typeof (com.ibm.portal.analytics)=="undefined"){com.ibm.portal.analytics={};}com.ibm.portal.analytics.SiteAnalyticsMediator=_4;com.ibm.portal.analytics.getSiteAnalyticsMediator=function(){return _4;};})();(function(){var _11=function(e){if(_12()){var _13=ibmCfg.portalConfig.currentPageOID;_14(null,null,{type:"PAGE",id:_13});var _15=_16();if(_15&&_15.length>0){for(var i=0;i<_15.length;++i){var _17=_15[i];var _18={};_18.type="PORTLET";_18.id=_19(_17);_1a(_17,_18.id);_14([_17],null,_18);}}}};var _14=function(_1b,_1c,_1d){com.ibm.portal.analytics.SiteAnalyticsMediator.notify(_1b,_1c,_1d);};var _12=function(){return com.ibm.portal.analytics.SiteAnalyticsMediator.isActive();};var _16=function(){var _1e=document.getElementById("layoutContainers");return _1f("div","component-control",_1e);};var _19=function(_20){var _21=_20.className,id=null;if(_21){var _22=_21.split(" ");for(var i=0,l=_22.length;i=0){id=cls.substring(_23+3);break;}}}return id;};var _1a=function(_24,_25){var _26=_24.className&&_24.className.indexOf("asa.portlet.selected")>=0;if(_26){var _27=document.getElementById("asa.portlet."+_25);if(_27){var _28=document.createElement("span");_28.className="asa.portlet.selected";_28.innerHTML="true";_27.appendChild(_28);}}};var _1f=function(_29,_2a,_2b){if(!_2b){_2b=document;}if(document.getElementsByClassName){return _2b.getElementsByClassName(_2a);}else{var _2c=[];_2a=_2a.toLowerCase();var _2d=_2b.getElementsByTagName(_29);if(_2d&&_2d.length>0){for(var i=0,l=_2d.length;i=0){_2c.push(e);}}}return _2c;}};i$.addOnLoad(_11);})(); /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2009, 2010, 2011 - All Rights reserved. **/ if(!dojo._hasResource["com.ibm.portal.xslt"]){dojo._hasResource["com.ibm.portal.xslt"]=true;dojo.provide("com.ibm.portal.xslt");dojo.require("dojox.data.dom");dojo.declare("com.ibm.portal.xslt.TransformerFactory",null,{constructor:function(){this._xsltMap=new Array();},newTransformer:function(_1){ibm.portal.debug.entry("newTransformer",[_1]);var _2=this._getCached(_1);if(_2==null){_2=new com.ibm.portal.xslt.Transformer(_1);this._xsltMap.push({url:_1,transformer:_2});}return _2;},_getCached:function(_3){var _4=null;for(i=0;i0){try{var _1e=new ActiveXObject(_1d[0]);if(_1e){return _1e;}}catch(err){}_1d.splice(0,1);}throw new Error("No MSXML implementation exists");};com.ibm.portal.xslt.ie.loadXml=function(_1f){var _20=this._getMSXMLImpl(this.DOM_PROG_IDS);_20.async=0;_20.resolveExternals=0;if(!_20.load(_1f)){throw new Error("Error loading xml file "+_1f);}return _20;};com.ibm.portal.xslt.ie.loadXmlString=function(_21){var _22=this._getMSXMLImpl(this.DOM_PROG_IDS);_22.async=0;_22.resolveExternals=0;if(_21){if(!_22.loadXML(_21)){throw new Error("Error loading xml string "+_21);}}return _22;};com.ibm.portal.xslt.ie.loadXsl=function(_23){var _24=this._getMSXMLImpl(this.FTDOM_PROG_IDS);_24.async=0;_24.resolveExternals=0;_24.setProperty("ForcedResync",false);if(!_24.load(_23)){throw new Error("Error loading xsl file "+_23);}return _24;};com.ibm.portal.xslt.ie.transform=function(_25,xsl,_26,_27,_28){var _29=_25;var _2a=xsl;try{if(!_2a.documentElement){_2a=this.loadXsl(xsl);}}catch(e){var _2b=e.message;throw new Error(""+_2b,""+_2b);}var _2c=this._getMSXMLImpl(this.XSLT_PROG_IDS);_2c.stylesheet=_2a;var _2d=_2c.createProcessor();_2d.input=_29;if(_27){for(var p in _27){_2d.addParameter(p,_27[p]);}}if(_26){_2d.addParameter("mode",_26);}if(_28){if(!_2d.transform()){throw new Error("Error transforming xml doc "+_29);}return _2d.output;}else{var _2e=this._getMSXMLImpl(this.DOM_PROG_IDS);_2e.async=false;_2e.validateOnParse=false;_29.transformNodeToObject(_2a,_2e);return _2e;}};com.ibm.portal.xslt.gecko.loadXml=function(_2f){var _30=null;if(dojo.isSafari){var xhr=new XMLHttpRequest();xhr.open("GET",_2f,false);xhr.send(null);if(xhr.status==200){_30=xhr.responseXML;}}else{_30=document.implementation.createDocument("","",null);_30.async=0;_30.load(_2f);}return _30;};com.ibm.portal.xslt.gecko.loadXmlString=function(_31){var _32=new DOMParser();var _33=null;if(_31){try{_33=_32.parseFromString(_31,"text/xml");}catch(exc){throw new Error("Error loading xml string "+_31);}}else{return document.implementation.createDocument("","",null);}return _33;};com.ibm.portal.xslt.gecko.loadXsl=function(_34){var _35=null;if(dojo.isWebKit){var xhr=new XMLHttpRequest();xhr.open("GET",_34,false);xhr.send(null);if(xhr.status==200){_35=xhr.responseXML;}}else{_35=document.implementation.createDocument("","",null);_35.async=0;_35.load(_34);}return _35;};com.ibm.portal.xslt.gecko._getXSLTProc=function(_36,xsl,_37,_38){var _39=xsl;if(!_39.documentElement){_39=this.loadXsl(xsl);}var _3a=new XSLTProcessor();_3a.importStylesheet(_39);if(_38){for(var p in _38){_3a.setParameter(null,p,_38[p]);}}if(_37){_3a.setParameter(null,"mode",_37);}return _3a;};com.ibm.portal.xslt.gecko._transformToFragment=function(_3b,xsl,_3c,_3d,doc){var _3e=com.ibm.portal.xslt.gecko._getXSLTProc(_3b,xsl,_3c,_3d);var _3f=null;_3f=_3e.transformToFragment(_3b,doc);_3e.clearParameters();return _3f;};com.ibm.portal.xslt.gecko.transform=function(_40,xsl,_41,_42,_43){try{var _44=null;if(!_43){var _45=com.ibm.portal.xslt.gecko._getXSLTProc(_40,xsl,_41,_42);_44=_45.transformToDocument(_40);return _44;}else{_44=com.ibm.portal.xslt.gecko._transformToFragment(_40,xsl,_41,_42,document);}var _46=new XMLSerializer();var _47=dojo.string.trim(_46.serializeToString(_44));if(dojo.isOpera&&_44.firstChild&&_44.firstChild.nodeName=="result"){var _48=_47.indexOf("")+8;var end=_47.lastIndexOf("");_47=dojo.string.trim(_47.substring(_48,end));}return _47;}catch(exc){throw new Error("Error transforming xml doc "+exc);}};com.ibm.portal.xslt.setLayerContentByXml=function(_49,xml,xsl,_4a,_4b){var _4c=com.ibm.portal.xslt.transform(xml,xsl,null,_4a,_4b);if(_49.innerHTML){_49.innerHTML=_4c;}else{var obj=document.getElementById(_49);obj.innerHTML=_4c;}};}if(!dojo._hasResource["com.ibm.domUtilities"]){dojo._hasResource["com.ibm.domUtilities"]=true;dojo.provide("com.ibm.domUtilities");dojo.require("dojox.xml.parser");dojo.require("com.ibm.portal.xslt");(function(){var _4d=com.ibm.domUtilities={constants:{NodeTypes:{element:1,attribute:2,text:3,cdata:4,entity_reference:5,entity:6,processing_instruction:7,comment:8,document:9,document_type:10,document_fragment:11,notation:12}},nsInfo:function(str,_4e){var _4f=str.split(":");var _50,_51;if(_4f.length>1){_50=_4f[0];_51=_4f[1];return {namespaceURI:_4e[_50],prefix:_50,localName:_51};}else{return {namespaceURI:null,prefix:null,localName:str};}},getAttribute:function(_52,_53,_54){var ret=null;var _55=_4d.nsInfo(_53,_54);if(_55.namespaceURI){if(_52.getAttributeNS){ret=_52.getAttributeNS(_55.namespaceURI,_55.localName);}else{if(dojo.isIE||window.ActiveXObject!==undefined){ret=_52.attributes.getQualifiedItem(_55.localName,_55.namespaceURI);if(ret){ret=ret.value;}}else{ret=_52.getAttribute(_53);}}}else{ret=_52.getAttribute(_53);}return ret;},setAttribute:function(_56,_57,_58,_59){if(_58===true){_58="true";}else{if(_58===false){_58="false";}else{if(_58===null){_58="";}}}var _5a=_4d.nsInfo(_57,_59);if(_5a.namespaceURI){if(_56.setAttributeNS){_56.setAttributeNS(_5a.namespaceURI,_57,_58);}else{if((dojo.isIE||window.ActiveXObject!==undefined)&&_56.ownerDocument){var _5b=_56.ownerDocument.createNode(_4d.constants.NodeTypes.attribute,_57,_5a.namespaceURI);_5b.value=_58;_56.setAttributeNode(_5b);}else{_56.setAttribute(_57,_58);}}}else{_56.setAttribute(_57,_58);}},removeAttribute:function(_5c,_5d,_5e){var _5f=_4d.nsInfo(_5d,_5e);if(_5f.namespaceURI){if(_5c.removeAttributeNS){_5c.removeAttributeNS(_5f.namespaceURI,_5d);}else{if(dojo.isIE||window.ActiveXObject!==undefined){_5c.attributes.removeQualifiedItem(_5f.localName,_5f.namespaceURI);}else{_5c.removeAttribute(_5d);}}}else{_5c.removeAttribute(_5d);}},hasAttribute:function(_60,_61,_62){var ret=null;var _63=_4d.nsInfo(_61,_62);if(_63.namespaceURI){if(_60.hasAttributeNS){ret=_60.hasAttributeNS(_63.namespaceURI,_63.localName);}else{if(dojo.isIE||window.ActiveXObject!==undefined){ret=_60.attributes.getQualifiedItem(_63.localName,_63.namespaceURI)!==null;}else{ret=_60.hasAttribute(_61);}}}else{if(!(dojo.isIE||window.ActiveXObject!==undefined)){ret=_60.hasAttribute(_61);}else{ret=_60.getAttributeNode(_61)!==null;}}return ret;},createDocument:function(_64,_65){if(typeof ActiveXObject!="undefined"||window.ActiveXObject!==undefined){var _66=["MSXML2.FreeThreadedDOMDocument.6.0","Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.3.0"];for(var i=0;i<_66.length;i++){try{oXml=new ActiveXObject(_66[i]);if(oXml){break;}}catch(e){if(i==_66.length){console.warn("Error creating Msxml.DOMDocument; reason: ",e);}}}oXml.async=false;if(_64){oXml.loadXML(_64);if(oXml.parseError.errorCode!=0){var _67=oXml.parseError;console.warn("Error parsing XML data. Reason: '"+_67.reason+"'; data: '"+_64+"'.");}}return oXml;}else{return dojox.xml.parser.parse(_64,_65);}},createElement:function(doc,_68,_69,_6a){var _6b=null;var _6c=_4d.nsInfo(_68,_69);if(_6c.namespaceURI){if(doc.createElementNS){_6b=doc.createElementNS(_6c.namespaceURI,_68);}else{if(dojo.isIE||window.ActiveXObject!==undefined){_6b=doc.createNode("element",_68,_6c.namespaceURI);}}}if(!_6b){_6b=doc.createElement(_68);}for(var _6d in _6a){_4d.setAttribute(_6b,_6d,_6a[_6d],_69);}return _6b;},createFromJson:function(doc,def,_6e,_6f){var obj=null;if(!dojo.isObject(def)){obj=doc.createTextNode(def);if(_6f){_6f.appendChild(obj);}}else{obj=_4d.createElement(doc,def.name,_6e,def.attributes);if(_6f){_6f.appendChild(obj);}dojo.forEach(def.children,function(_70){_4d.createFromJson(doc,_70,_6e,obj);});}return obj;},removeChildren:function(_71){var arr=[];while(_71.hasChildNodes()){arr.push(_71.removeChild(_71.firstChild));}return dojo.NodeList.apply(null,arr);},textContent:function(_72,_73){return dojox.xml.parser.textContent.apply(null,arguments);},innerXML:function(_74){return dojox.xml.parser.innerXML(_74);},stringFromDoc:function(_75){return _4d.innerXML(_75);},docFromString:function(str){return _4d.createDocument(str&&str.length>0?str:null);},encodeXML:function(_76,_77){if(dojo.isString(_76)){_76=_76.replace(/&/gm,"&").replace(//gm,">");if(_77){_76=_76.replace(/'/gm,"'").replace(/"/gm,""");}return _76;}else{if(_76!==null){return _76;}else{return "";}}},decodeXML:function(_78,_79){if(dojo.isString(_78)){_78=_78.replace(/</gm,"<").replace(/>/gm,">").replace(/&/gm,"&");if(_79){_78=_78.replace(/'/gm,"'").replace(/"/gm,"\"");}return _78;}else{if(_78!=null){return _78;}else{return "";}}}};_4d.constants.MSXML_NodeTypes=_4d.constants.NodeTypes;})();}if(!dojo._hasResource["com.ibm.utilities"]){dojo._hasResource["com.ibm.utilities"]=true;dojo.provide("com.ibm.utilities");dojo.require("dojo.string");com.ibm.utilities={urlToProxyUrl:function(url,_7a){var ret=_7a?_7a:"/proxy";var _7b="http";var _7c=url.indexOf("://");if(_7c>-1){_7b=url.substring(0,_7c);url=url.substring(_7c+3);}url=url.replace(/:/g,"%3A");return ret+"/"+_7b+"/"+url;},withBaseUrl:function(_7d){if(_7d.charAt(0)=="/"){return _7d;}return com.ibm.utilities.baseUrl()+_7d;},baseUrl:function(){if(!this._baseUrl){var _7e=dojo.doc.getElementsByTagName("base")[0];if(_7e){this._baseUrl=_7e.getAttribute("href");}if(!this._baseUrl){this._baseUrl="";}}return this._baseUrl;},stripUrlFragment:function(url){var h=url.indexOf("#");if(h>-1){url=url.substr(0,h);}return url;},stripTrailingSlash:function(url){if(!url){return "";}else{return url.replace(/\/+$/g,"");}},actionIO:function(url,_7f){if(url){var _80=dojo.doc.createElement("form");_80.setAttribute("action",url);if(_7f){_7f=_7f.toLowerCase();}switch(_7f){case "get":_80.setAttribute("method","GET");break;case "post":case "delete":case "put":_80.setAttribute("method","POST");break;default:}dojo.body().appendChild(_80);_80.submit();}},refreshPage:function(){var url,_81=-1,_82=document.getElementsByTagName("base");if(_82.length>0){url=_82[0].href;}else{url=top.location.href;_81=url.indexOf("#");if(dojo.isSafari<4&&_81>-1){window.location.reload();}if(_81>-1){url=url.substring(0,_81);}}window.location.assign(url);}};(function(){var _83="{EB2F8DA2-5B2C-F66A-CDD0-A2D42143F5AC}";var _84="\r\n";var sep="--";var _85=_84+sep+_83+_84;var _86=sep+_83+sep+_84;var _87=new RegExp(_84+_84);var _88=new RegExp(_84+"s*([^\r]*)s*","mg");var _89=/\s*([^:]*):\s*(.+)/;var _8a=/boundary\s*=\s*\"?([^\"]*)\"?/;var _8b=function(_8c,_8d,_8e){try{if(_8d instanceof Error){if(_8c.error){_8c.error(_8d,_8e);}}else{try{if(_8c.load){_8c.load(_8d,_8e);}}catch(err){if(_8c.error){_8c.error(err,_8e);}}}if(_8c.handle){_8c.handle(_8d,_8e);}}catch(err2){}};function _8f(){this.respHeaders=[];this.responseText="";this.responseXML=null;this.status=0;this.statusText="";this.readyState=0;this.onreadystatechange=function(){};};dojo.extend(_8f,{getResponseHeader:function(key){key=key.toLowerCase();for(var i=0,_90,l=this.respHeaders.length;i0)){var _a6=_a2[1].match(_89);if(_a6){_a0.respHeaders.push([_a6[1],_a6[2]]);}}_a1=dojo.string.trim(_a5);_a0.responseText=_a1;if(_9b.args.partContentHandler){_a1=_9b.args.partContentHandler(_99[j],_a0,_94);}else{_a1=_94(_99[j],_a0);}_8b(_99[j],_a1,dojo.mixin({},_9b,{xhr:_a0}));}},multiPartXhr:function(_a7,_a8,_a9){var _aa="",_ab=null;dojo.forEach(_a9,function(_ac){_ac.handleAs=_ac.handleAs?_ac.handleAs.toLowerCase():"text";_ab="";for(var x in _ac.headers){_ab+=x+": "+_ac.headers[x]+_84;}_aa+=_85+_ab+_84;if(_ac.data&&_ac.data.length>0){_aa+=_ac.data+_84;}});_aa+=_86;if(_a7.toUpperCase()!="PUT"){_a7="POST";}_a8.headers=dojo.mixin({},_a8.headers,{"Content-type":"multipart/mixed; boundary=\""+_83+"\""});var _ad=dojo.mixin({},_a8,{load:function(_ae,_af){if(_a8.preHandle){_a8.preHandle(_ae,_af);}com.ibm.utilities.handleMultiPartResponse(_a9,_ae,_af);if(_a8.postHandle){_a8.postHandle(_ae,_af);}},error:function(_b0,_b1){if(_a8.preHandle){_a8.preHandle(_b0,_b1);}dojo.forEach(_a9,function(_b2){_8b(_b2,_b0,_b1,null);});if(_a8.error){_a8.error(_b0,_b1);}if(_a8.postHandle){_a8.postHandle(_b0,_b1);}},handleAs:"text",form:null,content:null,postData:null,putData:null});_ad[_a7.toLowerCase()+"Data"]=_aa;return dojo.xhr(_a7,_ad,true);}});})();}if(!dojo._hasResource["com.ibm.portal.xpath"]){dojo._hasResource["com.ibm.portal.xpath"]=true;dojo.provide("com.ibm.portal.xpath");com.ibm.portal.xpath.evaluateXPath=function(_b3,doc,_b4){if(typeof ActiveXObject!="undefined"||window.ActiveXObject!==undefined){return com.ibm.portal.xpath.ie.evaluateXPath(_b3,doc,_b4);}else{return com.ibm.portal.xpath.gecko.evaluateXPath(_b3,doc,_b4);}};dojo.provide("com.ibm.portal.xpath.ie");com.ibm.portal.xpath.ie.evaluateXPath=function(_b5,doc,_b6){if(_b6){var ns="";for(var _b7 in _b6){ns+="xmlns:"+_b7+"='"+_b6[_b7]+"' ";}if(doc.ownerDocument){doc.ownerDocument.setProperty("SelectionNamespaces",ns);}else{doc.setProperty("SelectionNamespaces",ns);}}var _b8=doc.selectNodes(_b5);var _b9;var _ba=new Array();var len=0;for(var i=0;i<_b8.length;i++){_b9=_b8[i];if(_b9){_ba[len]=_b9;len++;}}return _ba;};dojo.provide("com.ibm.portal.xpath.gecko");com.ibm.portal.xpath.gecko.evaluateXPath=function(_bb,doc,_bc){var _bd;try{var _be=doc;if(!_be.evaluate){_be=doc.ownerDocument;}if(!_be){return new Array();}_bd=_be.evaluate(_bb,doc,function(_bf){return _bc[_bf]||null;},XPathResult.ANY_TYPE,null);}catch(exc){throw new Error("Error with xpath expression"+exc);}var _c0;var _c1=new Array();var len=0;do{_c0=_bd.iterateNext();if(_c0){_c1[len]=_c0;len++;}}while(_c0);return _c1;};}if(!dojo._hasResource["ibm.portal.xml.xslt"]){dojo._hasResource["ibm.portal.xml.xslt"]=true;dojo.provide("ibm.portal.xml.xslt");dojo.require("com.ibm.portal.xslt");ibm.portal.xml.xslt.ie={};ibm.portal.xml.xslt.gecko={};ibm.portal.xml.xslt.getXmlHttpRequest=function(){return com.ibm.portal.xslt.getXmlHttpRequest();};ibm.portal.xml.xslt.loadXml=function(_c2){return com.ibm.portal.xslt.loadXml(_c2);};ibm.portal.xml.xslt.loadXmlString=function(_c3){return com.ibm.portal.xslt.loadXmlString(_c3);};ibm.portal.xml.xslt.loadXsl=function(_c4){return com.ibm.portal.xslt.loadXsl(_c4);};ibm.portal.xml.xslt.transform=function(xml,xsl,_c5,_c6,_c7){ibm.portal.debug.entry("transform",[xml,xsl,_c5,_c6,_c7]);return com.ibm.portal.xslt.transform(xml,xsl,_c5,_c6,_c7);};ibm.portal.xml.xslt.transformAndUpdate=function(_c8,xml,xsl,_c9,_ca){ibm.portal.debug.entry("transformAndUpdate",[_c8,xml,xsl,_c9,_ca]);com.ibm.portal.xslt.transformAndUpdate(_c8,xml,xsl,_c9,_ca);ibm.portal.debug.exit("transformAndUpdate");};ibm.portal.xml.xslt.ie.loadXml=function(_cb){return com.ibm.portal.xslt.ie.loadXml(_cb);};ibm.portal.xml.xslt.ie.loadXmlString=function(_cc){return com.ibm.portal.xslt.ie.loadXmlString(_cc);};ibm.portal.xml.xslt.ie.loadXsl=function(_cd){return com.ibm.portal.xslt.ie.loadXsl(_cd);};ibm.portal.xml.xslt.ie.transform=function(_ce,xsl,_cf,_d0,_d1){return com.ibm.portal.xslt.ie.transform(_ce,xsl,_cf,_d0,_d1);};ibm.portal.xml.xslt.gecko.loadXml=function(_d2){return com.ibm.portal.xslt.gecko.loadXml(_d2);};ibm.portal.xml.xslt.gecko.loadXmlString=function(_d3){return com.ibm.portal.xslt.gecko.loadXmlString(_d3);};ibm.portal.xml.xslt.gecko.loadXsl=function(_d4){return com.ibm.portal.xslt.gecko.loadXsl(_d4);};ibm.portal.xml.xslt.gecko.transform=function(_d5,xsl,_d6,_d7,_d8){return com.ibm.portal.xslt.gecko.transform(_d5,xsl,_d6,_d7,_d8);};ibm.portal.xml.xslt.setLayerContentByXml=function(_d9,xml,xsl,_da,_db){com.ibm.portal.xslt.setLayerContentByXml(_d9,xml,xsl,_da,_db);};}if(!dojo._hasResource["ibm.portal.xml.xpath"]){dojo._hasResource["ibm.portal.xml.xpath"]=true;dojo.provide("ibm.portal.xml.xpath");dojo.require("com.ibm.portal.xpath");ibm.portal.xml.xpath.evaluateXPath=function(_dc,doc,_dd){return com.ibm.portal.xpath.evaluateXPath(_dc,doc,_dd);};dojo.provide("ibm.portal.xml.xpath.ie");ibm.portal.xml.xpath.ie.evaluateXPath=function(_de,doc,_df){return com.ibm.portal.xpath.ie.evaluateXPath(_de,doc,_df);};dojo.provide("ibm.portal.xml.xpath.gecko");ibm.portal.xml.xpath.gecko.evaluateXPath=function(_e0,doc,_e1){return com.ibm.portal.xpath.gecko.evaluateXPath(_e0,doc,_e1);};}if(!dojo._hasResource["com.ibm.portal.utilities"]){dojo._hasResource["com.ibm.portal.utilities"]=true;dojo.provide("com.ibm.portal.utilities");com.ibm.portal.utilities={findPortletIdByElement:function(_e2){ibm.portal.debug.entry("findPortletID",[_e2]);var id="";var _e3=_e2.parentNode;while(_e3&&id.length==0){ibm.portal.debug.text("examining element "+_e3.tagName+"; class="+_e3.className,"findPortletID");if(typeof (_e3.className)=="string"){if(_e3.className&&(_e3.className.match(/\bwpsPortletBody\b/)||_e3.className.match(/\bwpsPortletBodyInlineMode\b/))){id=_e3.id;var _e4=id.indexOf("_mode");if(_e4>=0){id=id.substring(0,_e4);}}}_e3=_e3.parentNode;}if(id.indexOf("portletActions_")>=0){id=id.substring("portletActions_".length);}ibm.portal.debug.exit("findPortletID",[id]);return id;},findFormByElement:function(_e5){var _e6=_e5;while(_e6){if(_e6.tagName&&_e6.tagName.toLowerCase()=="form"){break;}_e6=_e6.parentNode;}return _e6;},encodeURI:function(uri){ibm.portal.debug.entry("encodeURI",[uri]);var _e7=uri;var _e8=uri.lastIndexOf(":");while(_e8>=0){var _e9=_e7.substring(0,_e8);var _ea=_e7.substring(_e8+1);_e7=_e9+":"+encodeURIComponent(_ea);_e8=_e9.lastIndexOf(":");}_e7=encodeURIComponent(_e7);ibm.portal.debug.exit("encodeURI",[_e7]);return _e7;},decodeURI:function(uri){ibm.portal.debug.entry("decodeURI",[uri]);var _eb=decodeURIComponent(uri);var _ec=_eb.indexOf(":");while(_ec>=0){var _ed=_eb.substring(0,_ec);var _ee=_eb.substring(_ec+1);_eb=_ed+":"+decodeURIComponent(_ee);_ec=_eb.indexOf(":",_ec+1);}ibm.portal.debug.exit("decodeURI",[_eb]);return _eb;},getSelectionNodeId:function(_ef){ibm.portal.debug.entry("getSelectionNodeId",[_ef]);var _f0=_ef.split("@oid:");ibm.portal.debug.exit("getSelectionNodeId",[_f0[1]]);return _f0[1];},getControlId:function(_f1){ibm.portal.debug.entry("_getControlId",[_f1]);var _f2=_f1.split("@oid:");var _f3=_f2[0].split("oid:");ibm.portal.debug.exit("getControlId",[_f3[1]]);return _f3[1];},getOverwriteMap:function(obj,_f4){var _f5=null;var _f6=com.ibm.portal.utilities.domData.getManager(obj);if(_f6){_f5=_f6.data(obj,"_overwritten_");if(!_f5&&_f4){_f5={};_f6.data(obj,"_overwritten_",_f5);}}else{_f5=obj["_overwritten_"];if(!_f5&&_f4){obj["_overwritten_"]=_f5={};}}return _f5;},overwriteProperty:function(obj,_f7,_f8,_f9){ibm.portal.debug.entry("overwriteProperty",[obj,_f7,_f8,_f9]);var _fa=com.ibm.portal.utilities.getOverwriteMap(obj,true);if(!_f9){_f9=false;}var _fb=(_f9&&(_fa[_f7]!=null));if(!_fb){if(_fa[_f7]==null){_fa[_f7]=obj[_f7];}else{_fa[_f7]=null;}var _fc=com.ibm.portal.utilities.domData.getManager(obj);if(_fc){_fc.trackProperty(obj,_f7);}obj[_f7]=_f8;ibm.portal.debug.text("Property overwrite successful!");}ibm.portal.debug.exit("overwriteProperty");},restoreProperty:function(obj,_fd){ibm.portal.debug.entry("utilities.restoreProperty",[obj,_fd]);var _fe=obj[_fd];var _ff=com.ibm.portal.utilities.getOverwriteMap(obj);if(_ff!=null){ibm.portal.debug.text("overwritten property value: "+_ff);obj[_fd]=_ff[_fd];_ff[_fd]=null;}else{obj[_fd]=null;}ibm.portal.debug.exit("utilities.restoreProperty",_fe);return _fe;},getOverwrittenProperty:function(obj,_100){var _101=com.ibm.portal.utilities.getOverwriteMap(obj);if(_101){return _101[_100];}else{return null;}},setOverwrittenProperty:function(obj,_102,_103){ibm.portal.debug.entry("utilities.setOverwrittenProperty",[obj,_102,_103]);var _104=com.ibm.portal.utilities.getOverwriteMap(obj,true);_104[_102]=_103;ibm.portal.debug.exit("utilities.setOverwrittenProperty");},callOverwrittenFunction:function(_105,_106,args){ibm.portal.debug.entry("utilities.callOverwrittenFunction",[_105,_106,args]);var _107=null;var _108=this.getOverwrittenProperty(_105,_106);ibm.portal.debug.text("Overwritten property: "+_108);if(_108){ibm.portal.debug.text("old property's apply function: "+_108.apply);if(args){_107=_108.apply(_105,args);}else{_107=_108.apply(_105);}}ibm.portal.debug.exit("utilities.callOverwrittenFunction",_107);return _107;},clearOverwrittenProperties:function(obj){ibm.portal.debug.entry("utilities.clearOverwrittenProperties",[obj]);if(obj){com.ibm.portal.utilities.domData(obj,"_overwritten_",null);if(obj["_overwritten_"]){delete obj["_overwritten_"];}}ibm.portal.debug.exit("utilities.clearOverwrittenProperties");},isExternalUrl:function(_109){ibm.portal.debug.entry("isExternalUrl",[_109]);var host=window.location.host;var _10a=window.location.protocol;var _10b=_109.split("?")[0];var _10c=!(_10b.indexOf("://")<0||(_10b.indexOf(_10a)==0&&_10b.indexOf(host)==_10a.length+2));ibm.portal.debug.text("urlStringNoQuery.indexOf(\"://\") = "+_10b.indexOf("://"));ibm.portal.debug.text("urlStringNoQuery.indexOf(protocol) = "+_10b.indexOf(_10a));ibm.portal.debug.exit("isExternalUrl",_10c);return _10c;},isJavascriptUrl:function(_10d){ibm.portal.debug.entry("isJavascriptUrl",[_10d]);var url=com.ibm.portal.utilities.string.trim(_10d.toLowerCase());var _10e=(url.indexOf("javascript:")==0);ibm.portal.debug.exit("isJavascriptUrl",_10e);return _10e;},isPortalUrl:function(_10f){ibm.portal.debug.entry("utilities.isPortalUrl",[_10f]);var _110=(_10f.indexOf(ibmPortalConfig["portalURI"])>=0);ibm.portal.debug.exit("utilities.isPortalUrl",_110);return _110;},addExternalNode:function(doc,node){var _111=false;try{_111=doc.importNode;}catch(e){}var _112=null;if(_111!=false){_112=doc.importNode(node,true);}else{_112=node;}try{doc.appendChild(_112);}catch(e){}},decodeXML:function(_113){ibm.portal.debug.entry("decodeXML",[_113]);var _114=_113.replace(/&/g,"&");var _115=_114.replace(/&/g,"&");_114=_115.replace(/'/g,"'");_115=_114.replace(/"/g,"\"");_115=_115.replace(/</g,"<");_115=_115.replace(/>/g,">");ibm.portal.debug.exit("decodeXML",[_115]);return _115;},eventHandlerToString:function(_116){var _117=_116.toString();var _118=_117.indexOf("{");var _119=_117.lastIndexOf("}");onclickStr=_117.substring(_118+1,_119);return onclickStr;},_waitingForScript:false,_isWaitingForScript:function(){return com.ibm.portal.utilities._waitingForScript;},stopWaitingForScript:function(){com.ibm.portal.utilities._waitingForScript=false;},waitFor:function(_11a,_11b,_11c,args){var _11d=setInterval(function(){if(_11a()){clearInterval(_11d);if(!args){_11c();}else{_11c(args);}}},_11b);},waitForScript:function(_11e,args){com.ibm.portal.utilities._waitingForScript=true;com.ibm.portal.utilities.waitFor(function(){return (!com.ibm.portal.utilities._isWaitingForScript());},500,_11e,args);}};(function(){var _11f=0,_120=0,mgrs=[],_121={};com.ibm.portal.utilities.DomDataManager=function(_122){this.trackAll=_122;this.dataSet={};this.tracked={};this.trackedProps={};this.trackedConnections={};this.id="DomDataManager"+_120++;mgrs.push(this);_121[this.id]=this;};var _123=["onclick","click","submit","onsubmit"];dojo.extend(com.ibm.portal.utilities.DomDataManager,{getDuid:function(node,set){var d;if(node.nodeType==1){d=node.getAttribute("duid");if(!d){d="duid"+_11f++;node.setAttribute("duid",d);}}else{d=node.duid;if(!d){d=node.duid="duid"+_11f++;}}if(_11f==Number.MAX_VALUE){_11f=0;}return d;},data:function(node,key,_124){if(node){var d,duid;if(arguments.length>2){duid=this.getDuid(node,true);if(this.trackAll){this.track(node);}d=this.dataSet[duid];if(!d){d=this.dataSet[duid]={};}d[key]=_124;node._domMgrId=this.id;return _124;}else{duid=this.getDuid(node);if(duid){d=this.dataSet[duid];if(d){return d[key];}}return null;}}},track:function(node){if(node&&node.nodeType==1){var d=this.getDuid(node,true);this.tracked[d]=node;return d;}return null;},trackProperty:function(node,prop){var duid=this.track(node);if(duid){if(!this.trackedProps[duid]){this.trackedProps[duid]={};}this.trackedProps[duid][prop]=true;}},trackConnection:function(node,conn){var duid=this.track(node);if(duid&&!this.trackedConnections[duid]){this.trackedConnections[duid]=[];}this.trackedConnections[duid].push(conn);},toString:function(){return this.id;},_nodeExists:function(n){while(n){if(n.parentNode==dojo.body()){return true;}n=n.parentNode;}return false;},cleanNode:function(node){if(node&&this.tracked){var i=this.track(node);if(i){for(var p in this.trackedProps[i]){this.tracked[i][p]=null;}for(var x=0;x<_123.length;x++){try{this.tracked[i][_123[x]]=null;}catch(err){}}if(this.trackedConnections[i]){while(this.trackedConnections[i].length>0){dojo.disconnect(this.trackedConnections[i].pop());}}delete this.trackedConnections[i];delete this.trackedProps[i];delete this.dataSet[i];delete this.tracked[i];}}},clean:function(_125){for(var i in this.tracked){if(_125||!this._nodeExists(this.tracked[i])){this.cleanNode(this.tracked[i]);}}},destroy:function(){this.clean(true);delete this.dataSet;delete this.tracked;delete this.trackedProps;delete this.trackedConnections;for(var i=0;i0){mgrs.pop().destroy();}});com.ibm.portal.utilities.domData=function(){var mgr=com.ibm.portal.utilities.domData.getManager(arguments[0]);if(mgr){return mgr.data.apply(mgr,arguments);}};dojo.mixin(com.ibm.portal.utilities.domData,{setCurrent:function(mgr){if(mgr!=null){_128=mgr;}},resetCurrent:function(){_128=_127;},getCurrent:function(){return _128;},getManager:function(node){if(node==document||node==dojo.body()){return _127;}else{if(node==window||typeof node.nodeName!="string"||typeof node.nodeType!="number"){return null;}else{if(node._domMgrId){return _121[node._domMgrId]||_128;}else{return _128;}}}},register:function(mgr,id){_126[id]=mgr;},get:function(id){return _126[id];}});dojo.subscribe("/portal/DOM/StartUpdate",function(id){var mgr=com.ibm.portal.utilities.domData.get(id);if(mgr){com.ibm.portal.utilities.domData.setCurrent(mgr);}});dojo.subscribe("/portal/DOM/StopUpdate",function(id){var mgr=com.ibm.portal.utilities.domData.get(id);if(mgr==com.ibm.portal.utilities.domData.getCurrent()){com.ibm.portal.utilities.domData.resetCurrent();}});})();com.ibm.portal.utilities.string={findNext:function(_129,_12a,from){ibm.portal.debug.entry("string.findNext",[_129,_12a]);var _12b=-1;for(var i=0;i<_12a.length;i++){var _12c=null;if(from){_12c=from+_12a[i].length;}var _12d=_129.indexOf(_12a[i],_12c);if(_12d>-1&&(_12d<_12b||_12b==-1)){_12b=_12d;}}ibm.portal.debug.exit("string.findNext",[_12b]);return _12b;},contains:function(_12e,_12f){ibm.portal.debug.entry("string.contains",[_12e,_12f]);var _130=false;if(_12e!=null&&_12f!=null){_130=(_12e.indexOf(_12f)!=-1);}ibm.portal.debug.exit("string.contains",[_130]);return _130;},strip:function(_131,_132){ibm.portal.debug.entry("string.strip",[_131,_132]);var _133=_131.replace(new RegExp(_132,"g"),"");ibm.portal.debug.exit("string.strip",[_133]);return _133;},properCase:function(_134){if(_134==null||_134.length<1){return "";}ibm.portal.debug.entry("string.properCase",[_134]);var _135=_134.charAt(0).toUpperCase();if(_134.length>1){_135+=_134.substring(1).toLowerCase();}ibm.portal.debug.exit("string.properCase",[_135]);return _135;},trim:function(_136){ibm.portal.debug.entry("string.trim",[_136]);var _137=_136;_137=_137.replace(/^\s+/,"");_137=_137.replace(/\s+$/,"");ibm.portal.debug.exit("string.trim",_137);return _137;}};dojo.declare("com.ibm.portal.utilities.HttpUrl",null,{constructor:function(_138){this.scheme=window.location.protocol+"//";this.server=this._extractServer(_138);this.port=this._extractPort(_138);this.path=this._extractPath(_138);this.query=this._extractQuery(_138);this.anchor="";},addParameter:function(name,_139){this.query+="&"+name+"="+_139;},toString:function(){var str="";if(this.server!=""){str+=this.scheme+this.server;}if(this.port!=""){str+=":"+this.port;}str+="/"+this.path;if(this.query!=""){str+="?"+this.query;}if(this.anchor!=""){str+="#"+this.anchor;}return str;},_extractServer:function(_13a){var _13b=_13a.indexOf(this.scheme);var _13c="";if(_13b==0){var _13d=_13a.indexOf("/",_13b+this.scheme.length);var _13e=_13a.substring(_13b+this.scheme.length,_13d);_13c=_13e.split(":")[0];}return _13c;},_extractPort:function(_13f){var _140=_13f.indexOf(this.server);var _141="";if(_140>=0){var _142=_13f.indexOf("/",_140);var _143=_13f.substring(_140,_142);var _144=_143.split(":");if(_144.length>1){_141=_144[1];}}return _141;},_extractPath:function(_145){var _146=_145.indexOf(this.server);var _147="";if(_146>=0){var _148=_145.indexOf("/",_146);var _149=_145.indexOf("?");var _14a=_145.lastIndexOf("#");if(_149>=0){_147=_145.substring(_148+1,_149);}else{if(_14a>=0){_147=_145.substring(_148+1,_14a);}else{_147=_145.substring(_148+1);}}}return _147;},_extractQuery:function(_14b){var _14c="";var _14d=_14b.split("?");if(_14d.length>1){_14c=_14d[1].split("#")[0];}return _14c;},_extractAnchor:function(_14e){var _14f="";var _150=_14e.split("#");if(_150.length>1){_14f=_150[_150.length-1];}return _14f;}});}if(!dojo._hasResource["com.ibm.portal.debug"]){dojo._hasResource["com.ibm.portal.debug"]=true;dojo.provide("com.ibm.portal.debug");dojo.provide("ibm.portal.debug");ibm.portal.debug.setTrace=function(_151){ibm.portal.debug._traceString=_151;};ibm.portal.debug._isDebugEnabled=function(){var _152=false;if(typeof (ibmPortalConfig)!="undefined"){if(ibmPortalConfig&&ibmPortalConfig.isDebug){_152=true;}}return _152;};ibm.portal.debug.text=function(str,_153){if(typeof (ibmPortalConfig)!="undefined"){if(ibmPortalConfig&&ibmPortalConfig.isDebug){var _154=ibm.portal.debug._traceString;if(_154){if(_153){if(_153.indexOf(_154)>=0){window.console.log(str);}}}else{window.console.log(str);}}}};ibm.portal.debug.entry=function(_155,args){if(ibm.portal.debug._isDebugEnabled()){var _156=_155+" --> entry; { ";if(args&&args.length>0){for(arg in args){_156=_156+args[arg]+" ";}}_156=_156+" } ";ibm.portal.debug.text(_156,_155);}};ibm.portal.debug.exit=function(_157,_158){if(ibm.portal.debug._isDebugEnabled()){var _159=_157+" --> exit;";if(typeof (_158)!="undefined"){_159=_159+" { "+_158+" } ";}ibm.portal.debug.text(_159,_157);}};ibm.portal.debug.escapeXmlForHTMLDisplay=function(_15a){_15a=_15a.replace(//g,">");return _15a;};}if(!dojo._hasResource["com.ibm.ajax.auth"]){dojo._hasResource["com.ibm.ajax.auth"]=true;dojo.provide("com.ibm.ajax.auth");com.ibm.ajax.auth={prepareSecure:function(args,_15b,_15c){args._handle=args.handle;args.handle=dojo.partial(this.testAuthenticationHandler,this,_15b,_15c);return args;},setAuthenticationHandler:function(_15d){this.authenticationHandler=_15d;},setTestAuthenticationHandler:function(_15e){this.testAuthenticationHandler=_15e;},setDefaultAuthenticationTests:function(_15f,_160,_161){this.checkFromCaller=_15f;this.checkByContentType=_160;this.checkByStatusCode=_161;},addAuthenticationCheck:function(_162){if(_162){this.authenticationChecks.push(_162);}},isAuthenticationRequired:function(_163,_164){var _165=_164.args.handleAs;var _166=false;if(!_163||dojo.indexOf(["cancel","timeout"],_163.dojoType)==-1){if(this.checkByContentType&&dojo.indexOf(["xml","json","json-comment-optional","text"],_165)!=-1&&_164.xhr&&/^text\/html/.exec(_164.xhr.getResponseHeader("Content-Type"))&&_164.xhr.status>=200&&_164.xhr.status<300){ibm.portal.debug.text("auth::isAuthenticationRequired DEBUG content type does not match request, assume logged out");return true;}else{if(this.checkByStatusCode&&dojo.indexOf(["xml","json","json-comment-optional","text"],_165)!=-1&&_164.xhr&&_164.xhr.status==302){ibm.portal.debug.text("auth::isAuthenticationRequired DEBUG redirect received, assume login request");return true;}else{if(this.checkByStatusCode&&_164.xhr&&(_164.xhr.status==401||_164.xhr.status==0)&&_164.xhr.getResponseHeader("WWW-Authenticate")&&_164.xhr.getResponseHeader("WWW-Authenticate").indexOf("IBMXHR")!=-1){ibm.portal.debug.text("auth::isAuthenticationRequired DEBUG Portal 401 received, assume login required");return true;}}}}if(!_166){for(var i=0;i0){var _16f=args[i].indexOf("=");if(_16f==-1){var key=decodeURIComponent(args[i]);var _170=_16e[key];if(dojo.isArray(_170)){_170.push("");}else{if(_170){_16e[key]=[_170,""];}else{_16e[key]="";}}}else{if(_16f>0){var key=decodeURIComponent(args[i].substring(0,_16f));var _171=decodeURIComponent(args[i].substring(_16f+1));var _170=_16e[key];if(dojo.isArray(_170)){_170.push(_171);}else{if(_170){_16e[key]=[_170,_171];}else{_16e[key]=_171;}}}}}}return _16e;},checkFromCaller:true,checkByContentType:true,checkByStatusCode:true,authenticationChecks:[],authenticationHandler:function(){ibm.portal.debug.text("auth::authenticationHandler DEBUG authentication was required");}};} /* Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ /* This is an optimized version of Dojo, built for deployment and not for development. To get sources and documentation, please visit: http://dojotoolkit.org */ //>>built require({cache:{"dijit/tree/_dndSelector":function(){define("dijit/tree/_dndSelector",["dojo/_base/array","dojo/_base/connect","dojo/_base/declare","dojo/_base/lang","dojo/mouse","dojo/on","dojo/touch","dojo/_base/window","./_dndContainer"],function(_1,_2,_3,_4,_5,on,_6,_7,_8){return _3("dijit.tree._dndSelector",_8,{constructor:function(){this.selection={};this.anchor=null;this.events.push(on(this.tree.domNode,_6.press,_4.hitch(this,"onMouseDown")),on(this.tree.domNode,_6.release,_4.hitch(this,"onMouseUp")),on(this.tree.domNode,_6.move,_4.hitch(this,"onMouseMove")));},singular:false,getSelectedTreeNodes:function(){var _9=[],_a=this.selection;for(var i in _a){_9.push(_a[i]);}return _9;},selectNone:function(){this.setSelection([]);return this;},destroy:function(){this.inherited(arguments);this.selection=this.anchor=null;},addTreeNode:function(_b,_c){this.setSelection(this.getSelectedTreeNodes().concat([_b]));if(_c){this.anchor=_b;}return _b;},removeTreeNode:function(_d){this.setSelection(this._setDifference(this.getSelectedTreeNodes(),[_d]));return _d;},isTreeNodeSelected:function(_e){return _e.id&&!!this.selection[_e.id];},setSelection:function(_f){var _10=this.getSelectedTreeNodes();_1.forEach(this._setDifference(_10,_f),_4.hitch(this,function(_11){_11.setSelected(false);if(this.anchor==_11){delete this.anchor;}delete this.selection[_11.id];}));_1.forEach(this._setDifference(_f,_10),_4.hitch(this,function(_12){_12.setSelected(true);this.selection[_12.id]=_12;}));this._updateSelectionProperties();},_setDifference:function(xs,ys){_1.forEach(ys,function(y){y.__exclude__=true;});var ret=_1.filter(xs,function(x){return !x.__exclude__;});_1.forEach(ys,function(y){delete y["__exclude__"];});return ret;},_updateSelectionProperties:function(){var _13=this.getSelectedTreeNodes();var _14=[],_15=[];_1.forEach(_13,function(_16){_15.push(_16);_14.push(_16.getTreePath());});var _17=_1.map(_15,function(_18){return _18.item;});this.tree._set("paths",_14);this.tree._set("path",_14[0]||[]);this.tree._set("selectedNodes",_15);this.tree._set("selectedNode",_15[0]||null);this.tree._set("selectedItems",_17);this.tree._set("selectedItem",_17[0]||null);},onMouseDown:function(e){if(!this.current||this.tree.isExpandoNode(e.target,this.current)){return;}if(!_5.isLeft(e)){return;}e.preventDefault();var _19=this.current,_1a=_2.isCopyKey(e),id=_19.id;if(!this.singular&&!e.shiftKey&&this.selection[id]){this._doDeselect=true;return;}else{this._doDeselect=false;}this.userSelect(_19,_1a,e.shiftKey);},onMouseUp:function(e){if(!this._doDeselect){return;}this._doDeselect=false;this.userSelect(this.current,_2.isCopyKey(e),e.shiftKey);},onMouseMove:function(){this._doDeselect=false;},_compareNodes:function(n1,n2){if(n1===n2){return 0;}if("sourceIndex" in document.documentElement){return n1.sourceIndex-n2.sourceIndex;}else{if("compareDocumentPosition" in document.documentElement){return n1.compareDocumentPosition(n2)&2?1:-1;}else{if(document.createRange){var r1=doc.createRange();r1.setStartBefore(n1);var r2=doc.createRange();r2.setStartBefore(n2);return r1.compareBoundaryPoints(r1.END_TO_END,r2);}else{throw Error("dijit.tree._compareNodes don't know how to compare two different nodes in this browser");}}}},userSelect:function(_1b,_1c,_1d){if(this.singular){if(this.anchor==_1b&&_1c){this.selectNone();}else{this.setSelection([_1b]);this.anchor=_1b;}}else{if(_1d&&this.anchor){var cr=this._compareNodes(this.anchor.rowNode,_1b.rowNode),_1e,end,_1f=this.anchor;if(cr<0){_1e=_1f;end=_1b;}else{_1e=_1b;end=_1f;}var _20=[];while(_1e!=end){_20.push(_1e);_1e=this.tree._getNextNode(_1e);}_20.push(end);this.setSelection(_20);}else{if(this.selection[_1b.id]&&_1c){this.removeTreeNode(_1b);}else{if(_1c){this.addTreeNode(_1b,true);}else{this.setSelection([_1b]);this.anchor=_1b;}}}}},getItem:function(key){var _21=this.selection[key];return {data:_21,type:["treeNode"]};},forInSelectedItems:function(f,o){o=o||_7.global;for(var id in this.selection){f.call(o,this.getItem(id),id,this);}}});});},"dijit/tree/TreeStoreModel":function(){define("dijit/tree/TreeStoreModel",["dojo/_base/array","dojo/aspect","dojo/_base/declare","dojo/_base/json","dojo/_base/lang"],function(_22,_23,_24,_25,_26){return _24("dijit.tree.TreeStoreModel",null,{store:null,childrenAttrs:["children"],newItemIdAttr:"id",labelAttr:"",root:null,query:null,deferItemLoadingUntilExpand:false,constructor:function(_27){_26.mixin(this,_27);this.connects=[];var _28=this.store;if(!_28.getFeatures()["dojo.data.api.Identity"]){throw new Error("dijit.Tree: store must support dojo.data.Identity");}if(_28.getFeatures()["dojo.data.api.Notification"]){this.connects=this.connects.concat([_23.after(_28,"onNew",_26.hitch(this,"onNewItem"),true),_23.after(_28,"onDelete",_26.hitch(this,"onDeleteItem"),true),_23.after(_28,"onSet",_26.hitch(this,"onSetItem"),true)]);}},destroy:function(){var h;while(h=this.connects.pop()){h.remove();}},getRoot:function(_29,_2a){if(this.root){_29(this.root);}else{this.store.fetch({query:this.query,onComplete:_26.hitch(this,function(_2b){if(_2b.length!=1){throw new Error(this.declaredClass+": query "+_25.stringify(this.query)+" returned "+_2b.length+" items, but must return exactly one item");}this.root=_2b[0];_29(this.root);}),onError:_2a});}},mayHaveChildren:function(_2c){return _22.some(this.childrenAttrs,function(_2d){return this.store.hasAttribute(_2c,_2d);},this);},getChildren:function(_2e,_2f,_30){var _31=this.store;if(!_31.isItemLoaded(_2e)){var _32=_26.hitch(this,arguments.callee);_31.loadItem({item:_2e,onItem:function(_33){_32(_33,_2f,_30);},onError:_30});return;}var _34=[];for(var i=0;i
\"\"\n\t\t\t\"\"\n\t\t
\n\t
\n\n","url:dijit/templates/Tree.html":"
\n\t
\n
\n"}});define("dijit/Tree",["dojo/_base/array","dojo/_base/connect","dojo/cookie","dojo/_base/declare","dojo/_base/Deferred","dojo/DeferredList","dojo/dom","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dojo/_base/event","dojo/fx","dojo/_base/kernel","dojo/keys","dojo/_base/lang","dojo/topic","./focus","./registry","./_base/manager","./_Widget","./_TemplatedMixin","./_Container","./_Contained","./_CssStateMixin","dojo/text!./templates/TreeNode.html","dojo/text!./templates/Tree.html","./tree/TreeStoreModel","./tree/ForestStoreModel","./tree/_dndSelector"],function(_5f,_60,_61,_62,_63,_64,dom,_65,_66,_67,_68,_69,_6a,_6b,_6c,_6d,_6e,_6f,_70,_71,_72,_73,_74,_75,_76,_77,_78,_79,_7a){var _7b=_62("dijit._TreeNode",[_71,_72,_73,_74,_75],{item:null,isTreeNode:true,label:"",_setLabelAttr:{node:"labelNode",type:"innerText"},isExpandable:null,isExpanded:false,state:"UNCHECKED",templateString:_76,baseClass:"dijitTreeNode",cssStateNodes:{rowNode:"dijitTreeRow",labelNode:"dijitTreeLabel"},_setTooltipAttr:{node:"rowNode",type:"attribute",attribute:"title"},buildRendering:function(){this.inherited(arguments);this._setExpando();this._updateItemClasses(this.item);if(this.isExpandable){this.labelNode.setAttribute("aria-expanded",this.isExpanded);}this.setSelected(false);},_setIndentAttr:function(_7c){var _7d=(Math.max(_7c,0)*this.tree._nodePixelIndent)+"px";_67.set(this.domNode,"backgroundPosition",_7d+" 0px");_67.set(this.rowNode,this.isLeftToRight()?"paddingLeft":"paddingRight",_7d);_5f.forEach(this.getChildren(),function(_7e){_7e.set("indent",_7c+1);});this._set("indent",_7c);},markProcessing:function(){this.state="LOADING";this._setExpando(true);},unmarkProcessing:function(){this._setExpando(false);},_updateItemClasses:function(_7f){var _80=this.tree,_81=_80.model;if(_80._v10Compat&&_7f===_81.root){_7f=null;}this._applyClassAndStyle(_7f,"icon","Icon");this._applyClassAndStyle(_7f,"label","Label");this._applyClassAndStyle(_7f,"row","Row");},_applyClassAndStyle:function(_82,_83,_84){var _85="_"+_83+"Class";var _86=_83+"Node";var _87=this[_85];this[_85]=this.tree["get"+_84+"Class"](_82,this.isExpanded);_65.replace(this[_86],this[_85]||"",_87||"");_67.set(this[_86],this.tree["get"+_84+"Style"](_82,this.isExpanded)||{});},_updateLayout:function(){var _88=this.getParent();if(!_88||!_88.rowNode||_88.rowNode.style.display=="none"){_65.add(this.domNode,"dijitTreeIsRoot");}else{_65.toggle(this.domNode,"dijitTreeIsLast",!this.getNextSibling());}},_setExpando:function(_89){var _8a=["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"],_8b=["*","-","+","*"],idx=_89?0:(this.isExpandable?(this.isExpanded?1:2):3);_65.replace(this.expandoNode,_8a[idx],_8a);this.expandoNodeText.innerHTML=_8b[idx];},expand:function(){if(this._expandDeferred){return this._expandDeferred;}this._wipeOut&&this._wipeOut.stop();this.isExpanded=true;this.labelNode.setAttribute("aria-expanded","true");if(this.tree.showRoot||this!==this.tree.rootNode){this.containerNode.setAttribute("role","group");}_65.add(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);if(this==this.tree.rootNode&&this.tree.showRoot){this.tree.domNode.setAttribute("aria-expanded","true");}var def,_8c=_69.wipeIn({node:this.containerNode,duration:_70.defaultDuration,onEnd:function(){def.callback(true);}});def=(this._expandDeferred=new _63(function(){_8c.stop();}));_8c.play();return def;},collapse:function(){if(!this.isExpanded){return;}if(this._expandDeferred){this._expandDeferred.cancel();delete this._expandDeferred;}this.isExpanded=false;this.labelNode.setAttribute("aria-expanded","false");if(this==this.tree.rootNode&&this.tree.showRoot){this.tree.domNode.setAttribute("aria-expanded","false");}_65.remove(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);if(!this._wipeOut){this._wipeOut=_69.wipeOut({node:this.containerNode,duration:_70.defaultDuration});}this._wipeOut.play();},indent:0,setChildItems:function(_8d){var _8e=this.tree,_8f=_8e.model,_90=[];_5f.forEach(this.getChildren(),function(_91){_73.prototype.removeChild.call(this,_91);},this);this.state="LOADED";if(_8d&&_8d.length>0){this.isExpandable=true;_5f.forEach(_8d,function(_92){var id=_8f.getIdentity(_92),_93=_8e._itemNodesMap[id],_94;if(_93){for(var i=0;i<_93.length;i++){if(_93[i]&&!_93[i].getParent()){_94=_93[i];_94.set("indent",this.indent+1);break;}}}if(!_94){_94=this.tree._createTreeNode({item:_92,tree:_8e,isExpandable:_8f.mayHaveChildren(_92),label:_8e.getLabel(_92),tooltip:_8e.getTooltip(_92),dir:_8e.dir,lang:_8e.lang,textDir:_8e.textDir,indent:this.indent+1});if(_93){_93.push(_94);}else{_8e._itemNodesMap[id]=[_94];}}this.addChild(_94);if(this.tree.autoExpand||this.tree._state(_94)){_90.push(_8e._expandNode(_94));}},this);_5f.forEach(this.getChildren(),function(_95){_95._updateLayout();});}else{this.isExpandable=false;}if(this._setExpando){this._setExpando(false);}this._updateItemClasses(this.item);if(this==_8e.rootNode){var fc=this.tree.showRoot?this:this.getChildren()[0];if(fc){fc.setFocusable(true);_8e.lastFocused=fc;}else{_8e.domNode.setAttribute("tabIndex","0");}}return new _64(_90);},getTreePath:function(){var _96=this;var _97=[];while(_96&&_96!==this.tree.rootNode){_97.unshift(_96.item);_96=_96.getParent();}_97.unshift(this.tree.rootNode.item);return _97;},getIdentity:function(){return this.tree.model.getIdentity(this.item);},removeChild:function(_98){this.inherited(arguments);var _99=this.getChildren();if(_99.length==0){this.isExpandable=false;this.collapse();}_5f.forEach(_99,function(_9a){_9a._updateLayout();});},makeExpandable:function(){this.isExpandable=true;this._setExpando(false);},_onLabelFocus:function(){this.tree._onNodeFocus(this);},setSelected:function(_9b){this.labelNode.setAttribute("aria-selected",_9b);_65.toggle(this.rowNode,"dijitTreeRowSelected",_9b);},setFocusable:function(_9c){this.labelNode.setAttribute("tabIndex",_9c?"0":"-1");},_onClick:function(evt){this.tree._onClick(this,evt);},_onDblClick:function(evt){this.tree._onDblClick(this,evt);},_onMouseEnter:function(evt){this.tree._onNodeMouseEnter(this,evt);},_onMouseLeave:function(evt){this.tree._onNodeMouseLeave(this,evt);},_setTextDirAttr:function(_9d){if(_9d&&((this.textDir!=_9d)||!this._created)){this._set("textDir",_9d);this.applyTextDir(this.labelNode,this.labelNode.innerText||this.labelNode.textContent||"");_5f.forEach(this.getChildren(),function(_9e){_9e.set("textDir",_9d);},this);}}});var _9f=_62("dijit.Tree",[_71,_72],{store:null,model:null,query:null,label:"",showRoot:true,childrenAttr:["children"],paths:[],path:[],selectedItems:null,selectedItem:null,openOnClick:false,openOnDblClick:false,templateString:_77,persist:true,autoExpand:false,dndController:_7a,dndParams:["onDndDrop","itemCreator","onDndCancel","checkAcceptance","checkItemAcceptance","dragThreshold","betweenThreshold"],onDndDrop:null,itemCreator:null,onDndCancel:null,checkAcceptance:null,checkItemAcceptance:null,dragThreshold:5,betweenThreshold:0,_nodePixelIndent:19,_publish:function(_a0,_a1){_6d.publish(this.id,_6c.mixin({tree:this,event:_a0},_a1||{}));},postMixInProperties:function(){this.tree=this;if(this.autoExpand){this.persist=false;}this._itemNodesMap={};if(!this.cookieName&&this.id){this.cookieName=this.id+"SaveStateCookie";}this._loadDeferred=new _63();this.inherited(arguments);},postCreate:function(){this._initState();if(!this.model){this._store2model();}this.connect(this.model,"onChange","_onItemChange");this.connect(this.model,"onChildrenChange","_onItemChildrenChange");this.connect(this.model,"onDelete","_onItemDelete");this.inherited(arguments);if(this.dndController){if(_6c.isString(this.dndController)){this.dndController=_6c.getObject(this.dndController);}var _a2={};for(var i=0;i\n\t
\n\n","url:dijit/templates/TreeNode.html":"
\"\"\n\t\t\t\"\"\n\t\t
\n\t
\n
\n","dijit/tree/_dndContainer":function(){define("dijit/tree/_dndContainer",["dojo/aspect","dojo/_base/declare","dojo/dom-class","dojo/_base/event","dojo/_base/lang","dojo/mouse","dojo/on"],function(_107,_108,_109,_10a,lang,_10b,on){return _108("dijit.tree._dndContainer",null,{constructor:function(tree,_10c){this.tree=tree;this.node=tree.domNode;lang.mixin(this,_10c);this.current=null;this.containerState="";_109.add(this.node,"dojoDndContainer");this.events=[on(this.node,_10b.enter,lang.hitch(this,"onOverEvent")),on(this.node,_10b.leave,lang.hitch(this,"onOutEvent")),_107.after(this.tree,"_onNodeMouseEnter",lang.hitch(this,"onMouseOver"),true),_107.after(this.tree,"_onNodeMouseLeave",lang.hitch(this,"onMouseOut"),true),on(this.node,"dragstart",lang.hitch(_10a,"stop")),on(this.node,"selectstart",lang.hitch(_10a,"stop"))];},destroy:function(){var h;while(h=this.events.pop()){h.remove();}this.node=this.parent=null;},onMouseOver:function(_10d){this.current=_10d;},onMouseOut:function(){this.current=null;},_changeState:function(type,_10e){var _10f="dojoDnd"+type;var _110=type.toLowerCase()+"State";_109.replace(this.node,_10f+_10e,_10f+this[_110]);this[_110]=_10e;},_addItemClass:function(node,type){_109.add(node,"dojoDndItem"+type);},_removeItemClass:function(node,type){_109.remove(node,"dojoDndItem"+type);},onOverEvent:function(){this._changeState("Container","Over");},onOutEvent:function(){this._changeState("Container","");}});});},"dijit/tree/dndSource":function(){define("dijit/tree/dndSource",["dojo/_base/array","dojo/_base/connect","dojo/_base/declare","dojo/dom-class","dojo/dom-geometry","dojo/_base/lang","dojo/on","dojo/touch","dojo/topic","dojo/dnd/Manager","./_dndSelector"],function(_111,_112,_113,_114,_115,lang,on,_116,_117,_118,_119){return _113("dijit.tree.dndSource",_119,{isSource:true,accept:["text","treeNode"],copyOnly:false,dragThreshold:5,betweenThreshold:0,constructor:function(tree,_11a){if(!_11a){_11a={};}lang.mixin(this,_11a);this.isSource=typeof _11a.isSource=="undefined"?true:_11a.isSource;var type=_11a.accept instanceof Array?_11a.accept:["text","treeNode"];this.accept=null;if(type.length){this.accept={};for(var i=0;i0){if(!this.targetBox||_11c!=_11d){this.targetBox=_115.position(_11d.rowNode,true);}if((e.pageY-this.targetBox.y)<=this.betweenThreshold){_11f="Before";}else{if((e.pageY-this.targetBox.y)>=(this.targetBox.h-this.betweenThreshold)){_11f="After";}}}if(_11d!=_11c||_11f!=_11e){if(_11c){this._removeItemClass(_11c.rowNode,_11e);}if(_11d){this._addItemClass(_11d.rowNode,_11f);}if(!_11d){m.canDrop(false);}else{if(_11d==this.tree.rootNode&&_11f!="Over"){m.canDrop(false);}else{var _120=this.tree.model,_121=false;if(m.source==this){for(var _122 in this.selection){var _123=this.selection[_122];if(_123.item===_11d.item){_121=true;break;}}}if(_121){m.canDrop(false);}else{if(this.checkItemAcceptance(_11d.rowNode,m.source,_11f.toLowerCase())&&!this._isParentChildDrop(m.source,_11d.rowNode)){m.canDrop(true);}else{m.canDrop(false);}}}}this.targetAnchor=_11d;this.dropPosition=_11f;}},onMouseMove:function(e){if(this.isDragging&&this.targetState=="Disabled"){return;}this.inherited(arguments);var m=_118.manager();if(this.isDragging){this._onDragMouse(e);}else{if(this.mouseDown&&this.isSource&&(Math.abs(e.pageX-this._lastX)>=this.dragThreshold||Math.abs(e.pageY-this._lastY)>=this.dragThreshold)){var _124=this.getSelectedTreeNodes();if(_124.length){if(_124.length>1){var seen=this.selection,i=0,r=[],n,p;nextitem:while((n=_124[i++])){for(p=n.getParent();p&&p!==this.tree;p=p.getParent()){if(seen[p.id]){continue nextitem;}}r.push(n);}_124=r;}_124=_111.map(_124,function(n){return n.domNode;});m.startDrag(this,_124,this.copyState(_112.isCopyKey(e)));}}}},onMouseDown:function(e){this.mouseDown=true;this.mouseButton=e.button;this._lastX=e.pageX;this._lastY=e.pageY;this.inherited(arguments);},onMouseUp:function(e){if(this.mouseDown){this.mouseDown=false;this.inherited(arguments);}},onMouseOut:function(){this.inherited(arguments);this._unmarkTargetAnchor();},checkItemAcceptance:function(){return true;},onDndSourceOver:function(_125){if(this!=_125){this.mouseDown=false;this._unmarkTargetAnchor();}else{if(this.isDragging){var m=_118.manager();m.canDrop(false);}}},onDndStart:function(_126,_127,copy){if(this.isSource){this._changeState("Source",this==_126?(copy?"Copied":"Moved"):"");}var _128=this.checkAcceptance(_126,_127);this._changeState("Target",_128?"":"Disabled");if(this==_126){_118.manager().overSource(this);}this.isDragging=true;},itemCreator:function(_129){return _111.map(_129,function(node){return {"id":node.id,"name":node.textContent||node.innerText||""};});},onDndDrop:function(_12a,_12b,copy){if(this.containerState=="Over"){var tree=this.tree,_12c=tree.model,_12d=this.targetAnchor;this.isDragging=false;var _12e;var _12f;_12e=(_12d&&_12d.item)||tree.item;if(this.dropPosition=="Before"||this.dropPosition=="After"){_12e=(_12d.getParent()&&_12d.getParent().item)||tree.item;_12f=_12d.getIndexInParent();if(this.dropPosition=="After"){_12f=_12d.getIndexInParent()+1;}}else{_12e=(_12d&&_12d.item)||tree.item;}var _130;_111.forEach(_12b,function(node,idx){var _131=_12a.getItem(node.id);if(_111.indexOf(_131.type,"treeNode")!=-1){var _132=_131.data,_133=_132.item,_134=_132.getParent().item;}if(_12a==this){if(typeof _12f=="number"){if(_12e==_134&&_132.getIndexInParent()<_12f){_12f-=1;}}_12c.pasteItem(_133,_134,_12e,copy,_12f);}else{if(_12c.isItem(_133)){_12c.pasteItem(_133,_134,_12e,copy,_12f);}else{if(!_130){_130=this.itemCreator(_12b,_12d.rowNode,_12a);}_12c.newItem(_130[idx],_12e,_12f);}}},this);this.tree._expandNode(_12d);}this.onDndCancel();},onDndCancel:function(){this._unmarkTargetAnchor();this.isDragging=false;this.mouseDown=false;delete this.mouseButton;this._changeState("Source","");this._changeState("Target","");},onOverEvent:function(){this.inherited(arguments);_118.manager().overSource(this);},onOutEvent:function(){this._unmarkTargetAnchor();var m=_118.manager();if(this.isDragging){m.canDrop(false);}m.outSource(this);this.inherited(arguments);},_isParentChildDrop:function(_135,_136){if(!_135.tree||_135.tree!=this.tree){return false;}var root=_135.tree.domNode;var ids=_135.selection;var node=_136.parentNode;while(node!=root&&!ids[node.id]){node=node.parentNode;}return node.id&&ids[node.id];},_unmarkTargetAnchor:function(){if(!this.targetAnchor){return;}this._removeItemClass(this.targetAnchor.rowNode,this.dropPosition);this.targetAnchor=null;this.targetBox=null;this.dropPosition=null;},_markDndStatus:function(copy){this._changeState("Source",copy?"Copied":"Moved");}});});},"dijit/tree/ForestStoreModel":function(){define("dijit/tree/ForestStoreModel",["dojo/_base/array","dojo/_base/declare","dojo/_base/lang","dojo/_base/window","./TreeStoreModel"],function(_137,_138,lang,win,_139){return _138("dijit.tree.ForestStoreModel",_139,{rootId:"$root$",rootLabel:"ROOT",query:null,constructor:function(_13a){this.root={store:this,root:true,id:_13a.rootId,label:_13a.rootLabel,children:_13a.rootChildren};},mayHaveChildren:function(item){return item===this.root||this.inherited(arguments);},getChildren:function(_13b,_13c,_13d){if(_13b===this.root){if(this.root.children){_13c(this.root.children);}else{this.store.fetch({query:this.query,onComplete:lang.hitch(this,function(_13e){this.root.children=_13e;_13c(_13e);}),onError:_13d});}}else{this.inherited(arguments);}},isItem:function(_13f){return (_13f===this.root)?true:this.inherited(arguments);},fetchItemByIdentity:function(_140){if(_140.identity==this.root.id){var _141=_140.scope?_140.scope:win.global;if(_140.onItem){_140.onItem.call(_141,this.root);}}else{this.inherited(arguments);}},getIdentity:function(item){return (item===this.root)?this.root.id:this.inherited(arguments);},getLabel:function(item){return (item===this.root)?this.root.label:this.inherited(arguments);},newItem:function(args,_142,_143){if(_142===this.root){this.onNewRootItem(args);return this.store.newItem(args);}else{return this.inherited(arguments);}},onNewRootItem:function(){},pasteItem:function(_144,_145,_146,_147,_148){if(_145===this.root){if(!_147){this.onLeaveRoot(_144);}}this.inherited(arguments,[_144,_145===this.root?null:_145,_146===this.root?null:_146,_147,_148]);if(_146===this.root){this.onAddToRoot(_144);}},onAddToRoot:function(item){},onLeaveRoot:function(item){},_requeryTop:function(){var _149=this.root.children||[];this.store.fetch({query:this.query,onComplete:lang.hitch(this,function(_14a){this.root.children=_14a;if(_149.length!=_14a.length||_137.some(_149,function(item,idx){return _14a[idx]!=item;})){this.onChildrenChange(this.root,_14a);}})});},onNewItem:function(item,_14b){this._requeryTop();this.inherited(arguments);},onDeleteItem:function(item){if(_137.indexOf(this.root.children,item)!=-1){this._requeryTop();}this.inherited(arguments);},onSetItem:function(item,_14c,_14d,_14e){this._requeryTop();this.inherited(arguments);}});});},"dojo/window":function(){define("dojo/window",["./_base/lang","./_base/sniff","./_base/window","./dom","./dom-geometry","./dom-style","./dom-construct"],function(lang,has,_14f,dom,geom,_150,_151){has.add("rtl-adjust-position-for-verticalScrollBar",function(win,doc){var body=_14f.body(doc),_152=_151.create("div",{style:{overflow:"scroll",overflowX:"visible",direction:"rtl",visibility:"hidden",position:"absolute",left:"0",top:"0",width:"64px",height:"64px"}},body,"last"),div=_151.create("div",{style:{overflow:"hidden",direction:"ltr"}},_152,"last"),ret=geom.position(div).x!=0;_152.removeChild(div);body.removeChild(_152);return ret;});has.add("position-fixed-support",function(win,doc){var body=_14f.body(doc),_153=_151.create("span",{style:{visibility:"hidden",position:"fixed",left:"1px",top:"1px"}},body,"last"),_154=_151.create("span",{style:{position:"fixed",left:"0",top:"0"}},_153,"last"),ret=geom.position(_154).x!=geom.position(_153).x;_153.removeChild(_154);body.removeChild(_153);return ret;});var _155=lang.getObject("dojo.window",true);_155.getBox=function(){var _156=(_14f.doc.compatMode=="BackCompat")?_14f.body():_14f.doc.documentElement,_157=geom.docScroll(),w,h;if(has("touch")){var _158=_14f.doc.parentWindow||_14f.doc.defaultView;w=_158.innerWidth||_156.clientWidth;h=_158.innerHeight||_156.clientHeight;}else{w=_156.clientWidth;h=_156.clientHeight;}return {l:_157.x,t:_157.y,w:w,h:h};};_155.get=function(doc){if(has("ie")<9&&_155!==document.parentWindow){doc.parentWindow.execScript("document._parentWindow = window;","Javascript");var win=doc._parentWindow;doc._parentWindow=null;return win;}return doc.parentWindow||doc.defaultView;};_155.scrollIntoView=function(node,pos){try{node=dom.byId(node);var doc=node.ownerDocument||_14f.doc,body=_14f.body(doc),html=doc.documentElement||body.parentNode,isIE=has("ie"),isWK=has("webkit");if(node==body||node==html){return;}if(!(has("mozilla")||isIE||isWK||has("opera"))&&("scrollIntoView" in node)){node.scrollIntoView(false);return;}var _159=doc.compatMode=="BackCompat",_15a=Math.min(body.clientWidth||html.clientWidth,html.clientWidth||body.clientWidth),_15b=Math.min(body.clientHeight||html.clientHeight,html.clientHeight||body.clientHeight),_15c=(isWK||_159)?body:html,_15d=pos||geom.position(node),el=node.parentNode,_15e=function(el){return (isIE<=6||(isIE==7&&_159))?false:(has("position-fixed-support")&&(_150.get(el,"position").toLowerCase()=="fixed"));};if(_15e(node)){return;}while(el){if(el==body){el=_15c;}var _15f=geom.position(el),_160=_15e(el),rtl=_150.getComputedStyle(el).direction.toLowerCase()=="rtl";if(el==_15c){_15f.w=_15a;_15f.h=_15b;if(_15c==html&&isIE&&rtl){_15f.x+=_15c.offsetWidth-_15f.w;}if(_15f.x<0||!isIE||isIE>=9){_15f.x=0;}if(_15f.y<0||!isIE||isIE>=9){_15f.y=0;}}else{var pb=geom.getPadBorderExtents(el);_15f.w-=pb.w;_15f.h-=pb.h;_15f.x+=pb.l;_15f.y+=pb.t;var _161=el.clientWidth,_162=_15f.w-_161;if(_161>0&&_162>0){if(rtl&&has("rtl-adjust-position-for-verticalScrollBar")){_15f.x+=_162;}_15f.w=_161;}_161=el.clientHeight;_162=_15f.h-_161;if(_161>0&&_162>0){_15f.h=_161;}}if(_160){if(_15f.y<0){_15f.h+=_15f.y;_15f.y=0;}if(_15f.x<0){_15f.w+=_15f.x;_15f.x=0;}if(_15f.y+_15f.h>_15b){_15f.h=_15b-_15f.y;}if(_15f.x+_15f.w>_15a){_15f.w=_15a-_15f.x;}}var l=_15d.x-_15f.x,t=_15d.y-_15f.y,r=l+_15d.w-_15f.w,bot=t+_15d.h-_15f.h;var s,old;if(r*l>0&&(!!el.scrollLeft||el==_15c||el.scrollWidth>el.offsetHeight)){s=Math[l<0?"max":"min"](l,r);if(rtl&&((isIE==8&&!_159)||isIE>=9)){s=-s;}old=el.scrollLeft;el.scrollLeft+=s;s=el.scrollLeft-old;_15d.x-=s;}if(bot*t>0&&(!!el.scrollTop||el==_15c||el.scrollHeight>el.offsetHeight)){s=Math.ceil(Math[t<0?"max":"min"](t,bot));old=el.scrollTop;el.scrollTop+=s;s=el.scrollTop-old;_15d.y-=s;}el=(el!=_15c)&&!_160&&el.parentNode;}}catch(error){console.error("scrollIntoView: "+error);node.scrollIntoView(false);}};return _155;});},"*noref":1}});define("dijit/_dijit_tree",[],1);require(["dijit/Tree","dijit/tree/dndSource","dijit/tree/TreeStoreModel","dijit/tree/ForestStoreModel"]);(function(){ if(i$.isIE){ document.createElement('article'); document.createElement('aside'); document.createElement('footer'); document.createElement('header'); document.createElement('hgroup'); document.createElement('nav'); document.createElement('section'); } if(i$.isIE == 7){ document.getElementsByTagName("html")[0].className+=" wptheme_ie7"; } if(i$.isIE == 8){ document.getElementsByTagName("html")[0].className+=" wptheme_ie8"; } })(); /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2009, 2010, 2011 - All Rights reserved. **/ if(!dojo._hasResource["com.ibm.portal.EventBroker"]){dojo._hasResource["com.ibm.portal.EventBroker"]=true;dojo.provide("com.ibm.portal.EventBroker");dojo.require("com.ibm.portal.debug");dojo.declare("com.ibm.portal.Event",null,{constructor:function(_1){this.eventName=_1;this._listeners=new Array();},fire:function(_2){ibm.portal.debug.text("Firing event: "+this.eventName+" with parameters: ");dojo.publish(this.eventName,[_2]);},register:function(_3,_4){if(!_4){return dojo.subscribe(this.eventName,null,_3);}else{return dojo.subscribe(this.eventName,_3,_4);}},unregister:function(_5){dojo.unsubscribe(_5);},cancel:function(_6){dojo.publish(this.id+"/cancel");}});dojo.declare("com.ibm.portal.EventBroker",null,{startPage:new com.ibm.portal.Event("portal/StartPage"),endPage:new com.ibm.portal.Event("portal/EndPage"),startFragment:new com.ibm.portal.Event("portal/StartFragment"),endFragment:new com.ibm.portal.Event("portal/EndFragment"),fragmentUpdated:new com.ibm.portal.Event("portal/FragmentUpdated"),startRequest:new com.ibm.portal.Event("portal/StartRequest"),endRequest:new com.ibm.portal.Event("portal/EndRequest"),cancelAll:new com.ibm.portal.Event("portal/CancelAll"),cancelFragmentUpdate:new com.ibm.portal.Event("portal/CancelFragmentUpdate"),stateChanged:new com.ibm.portal.Event("portal/StateChanged"),startScriptHandling:new com.ibm.portal.Event("portal/StartScriptHandling"),endScriptHandling:new com.ibm.portal.Event("portal/EndScriptHandling"),startScriptExecution:new com.ibm.portal.Event("portal/StartScriptExecution"),endScriptExecution:new com.ibm.portal.Event("portal/EndScriptExecution"),javascriptCleanup:new com.ibm.portal.Event("portal/JavascriptCleanup"),beforeSnapShot:new com.ibm.portal.Event("portal/BeforeSnapShot"),afterSnapShot:new com.ibm.portal.Event("portal/AfterSnapShot"),restorePointUpdated:new com.ibm.portal.Event("portal/RestorePointUpdated"),clearRestorePoint:new com.ibm.portal.Event("portal/ClearRestorePoint"),stopEvent:new com.ibm.portal.Event("portal/StopEvent"),redirect:new com.ibm.portal.Event("portal/Redirect")});com.ibm.portal.EVENT_BROKER=new com.ibm.portal.EventBroker();}if(!dojo._hasResource["com.ibm.portal.services.PortalRestServiceRequestQueue"]){dojo._hasResource["com.ibm.portal.services.PortalRestServiceRequestQueue"]=true;dojo.provide("com.ibm.portal.services.PortalRestServiceRequestQueue");dojo.declare("com.ibm.portal.services.PortalRestServiceRequestQueue",null,{maxNumberOfActiveRequests:4,constructor:function(){var _7="PortalRestServiceRequestQueue.constructor";ibm.portal.debug.entry(_7);this._activeRequests=0;this._requestQueue=[];ibm.portal.debug.exit(_7);},add:function(_8){var _9="PortalRestServiceRequestQueue.add";ibm.portal.debug.entry(_9,[_8]);this._requestQueue.push(_8);var me=this;setTimeout(function(){me._executeNextRequest();},5);ibm.portal.debug.exit(_9);},_executeNextRequest:function(){var _a="PortalRestServiceRequestQueue._executeNextRequest";ibm.portal.debug.entry(_a);ibm.portal.debug.text(this._requestQueue.length+" request(s) in the queue. "+this._activeRequests+" active request(s) currently.",_a);if(this._requestQueue.length>0&&this._activeRequests 

"+_1f.markup;ibm.portal.debug.exit("html.createTemporaryMarkupDiv",[div]);return {node:div,objects:_1f.objects};},replaceTemporaryMarkup:function(_20,_21){var c=_20.node.childNodes;if(c&&_20.node!=_21){while(c.length>0){_21.appendChild(c[0]);}}if(dojo.isIE||window.ActiveXObject!==undefined){com.ibm.portal.utilities.html.replaceObjectElementsInMarkup(_20.objects);com.ibm.portal.utilities.html.replaceFormMarkers(_21);}},extractObjectElementsFromString:function(_22){var _23={};var _24=//gi;var _26=_22;var _27=null;try{_27=_24.exec(_26);if(_27&&_27.index>-1){var _28=_27.index;var buf;var end;var _29;var id;while(_28>-1){buf=_26.substring(0,_28);end=_26.indexOf(">",_28);if(_26.charAt(end-1)=="/"){_24.lastIndex=end;_27=_24.exec(_26);if(_27){_28=_27.index;continue;}else{break;}}_25.lastIndex=_28;_27=_25.exec(_26);if(_27){end=_27.index;}else{break;}_29=_26.substring(_28,end+9);id=dojo.dnd.getUniqueId();_26=buf+"
"+_26.substring(end+9);_23[id]=_29;_24.lastIndex=0;_27=_24.exec(_26);if(_27){_28=_27.index;}else{break;}}}_22=_26;}catch(e){_23={};}return {markup:_22,objects:_23};},replaceObjectElementsInMarkup:function(_2a){for(var id in _2a){var _2b=dojo.byId(id);if(_2b){_2b.outerHTML=_2a[id];}}},removeNodesOnCondition:function(_2c,_2d){if(!_2d){_2d=function(){return false;};}if(_2c&&_2c.childNodes){for(var i=0;i<_2c.childNodes.length;i++){if(_2d(_2c.childNodes[i])){var _2e=_2c.childNodes[i];_2c.removeChild(_2e);delete _2e;i--;}else{this.removeNodesOnCondition(_2c.childNodes[i],_2d);}}}},getElementsByTagNames:function(_2f){ibm.portal.debug.entry("html.getElementsByTagNames",[_2f]);var _30=new Array();for(var i=1;i]*)>/i,_50=/([\w-]+)=/i;var _51={formNodes:[],getAttributeNames:function(_52){var ret=[];if(_52){var o=_52.outerHTML;var m=_4f.exec(o);if(m&&m.length>1){var _53=m[1];m=_50.exec(_53);while(m&&m.index>-1){ret.push(m[1]);_53=_53.substr(m.index+m[0].length);m=_50.exec(_53);}}}return ret;},replaceForms:function(_54){return _54.replace(/
/ig,"");},replaceFormMarkers:function(_55){dojo.query("[data-csa-xform]",_55).forEach(function(_56){var _57=_51.getNode(_56.getAttribute("name"));_56.parentNode.insertBefore(_57,_56);_51.moveContents(_56,_57);_56.innerHTML="";_51.copyAttributes(_56,_57);dojo.destroy(_56);_56=null;});},getNode:function(_58){var _59;if(_51.formNodes.length>0){if(_58){_59=_51.checkFormBank(_58);if(_59){ibm.portal.debug.text("getNode: returning form with name from bank: "+_59.outerHTML);return _59;}else{ibm.portal.debug.text("getNode: bank did not have a form with name");return _51.createForm(_58);}}else{_59=_51.checkFormBank(null);if(_59){ibm.portal.debug.text("getNode: no name specified, returning form from bank: "+_59.outerHTML);return _59;}else{ibm.portal.debug.text("getNode: no name specified, no blank form in bank");return _51.createForm(null);}}}else{ibm.portal.debug.text("getNode: no forms in bank");return _51.createForm(_58);}},checkFormBank:function(_5a){var i;var _5b;var j=_51.formNodes.length;if(j>0){for(i=0;i");}else{ibm.portal.debug.text("createForm: creating blank form");_5d=document.createElement("form");}_5d._attachEvent=_5d.attachEvent;_5d._listeners=[];_5d.attachEvent=function(nom,fn){this._listeners.push(fn);return this._attachEvent(nom,fn);};return _5d;},returnNode:function(_5e){if(_5e){if(_5e._listeners){while(_5e._listeners.length>0){_5e.detachEvent(_5e._listeners.shift());}}var _5f=com.ibm.portal.utilities.domData.getManager(_5e);if(_5f){_5f.cleanNode(_5e);}com.ibm.portal.utilities.html.safeClean(_5e);_51.clearAttributes(_5e);if(_5e.parentNode){_5e.parentNode.removeChild(_5e);}_51.formNodes.push(_5e);}},clearAttributes:function(_60){if(_60){var _61=_51.getAttributeNames(_60),n;if(_61){for(var j=0;j<_61.length;j++){n=_61[j];if(n!="duid"&&n.toLowerCase()!="name"){_60.removeAttribute(n);}}}}},copyAttributes:function(_62,_63){if(_62){var _64=_51.getAttributeNames(_62),n,_65;if(_64){for(var j=0;j<_64.length;j++){n=_64[j];if(n=="data-csa-xform"){continue;}_65=_62.getAttributeNode(n);if(_65){ibm.portal.debug.text("copyAttributes is setting both enctype and encoding to: "+_65.value);if(n=="enctype"||n=="encoding"){_63.setAttribute("enctype",_65.value);_63.setAttribute("encoding",_65.value);}else{ibm.portal.debug.text("copyAttributes is setting: "+n+" to: "+_65.value);_63.setAttribute(n.toLowerCase(),_65.value);}}}}_63.style.cssText=_62.style.cssText;}},moveContents:function(_66,_67){var c=_66.childNodes;if(c&&_66!=_67){while(c.length>0){_67.appendChild(c[0]);}}},cleanForms:function(_68){if(_68){var _69=dojo.query("form",_68).forEach(function(_6a){_51.returnNode(_6a);});}}};dojo.mixin(com.ibm.portal.utilities.html,{replaceForms:_51.replaceForms,replaceFormMarkers:_51.replaceFormMarkers,cleanForms:_51.cleanForms});dojo.addOnWindowUnload(function(){var _6b;while(_51.formNodes.length>0){_6b=_51.formNodes.shift();if(_6b){var _6c=com.ibm.portal.utilities.domData.getManager(_6b);if(_6c){_6c.cleanNode(_6b);}_6b._attachEvent=null;_6b.attachEvent=null;_6b._listeners=null;}}});})();}if(!dojo._hasResource["com.ibm.portal.services.PortalRestServiceRequest"]){dojo._hasResource["com.ibm.portal.services.PortalRestServiceRequest"]=true;dojo.provide("com.ibm.portal.services.PortalRestServiceRequest");dojo.require("com.ibm.ajax.auth");dojo.require("com.ibm.portal.EventBroker");dojo.require("dojo.dnd.common");dojo.require("com.ibm.portal.services.PortalRestServiceRequestQueue");dojo.declare("com.ibm.portal.services.ContentHandlerURL",null,{constructor:function(uri,_6d,_6e,_6f){ibm.portal.debug.entry("ContentHandlerURL.constructor",[uri,_6d,_6e,_6f]);if(uri==null){return null;}if(!_6d){_6d=2;}var _70=com.ibm.portal.navigation.controller.NAVIGATION_CONTROLLER.getState();var _71=_70.getLocale();if(_71){if(_6f){_6f+="&locale="+_71;}else{_6f="&locale="+_71;}}this.url="";if(uri.charAt(0)=="?"){this.url=this._fromQueryString(uri,_6f);}else{if(uri.charAt(0)=="/"){this.url=uri;if(this.url.indexOf("rep=compact")<0&&this.url.indexOf("rep=full")<0){if(uri.indexOf("?")!=-1){this.url=this.url+"&rep=compact";}else{this.url=this.url+"?rep=compact";}}if(_6f){this.url=this.url+_6f;}}else{this.url=this._fromURI(uri,_6d,"download",_6f);}}ibm.portal.debug.exit("ContentHandlerURL.constructor");},_fromQueryString:function(_72,_73){ibm.portal.debug.entry("fromQueryString",[_72]);var str=ibmPortalConfig["contentHandlerURI"]+_72;str=str.replace(/&/g,"&");if(_73){str=str+_73;}if(str.indexOf("rep=compact")<0&&str.indexOf("rep=full")<0){str=str+"&rep=compact";}ibm.portal.debug.exit("fromQueryString",[str]);return str;},_fromURI:function(uri,_74,_75,_76){ibm.portal.debug.entry("ContentHandlerURL._fromURI",[uri,_74,_75,_76]);uri=com.ibm.portal.utilities.encodeURI(uri);var _77="?uri="+uri;if(_74){_77=_77+"&levels="+encodeURIComponent(_74);}if(_75){_77=_77+"&mode="+encodeURIComponent(_75);}if(_76){_77=_77+_76;}if(_77.indexOf("rep=compact")<0&&_77.indexOf("rep=full")<0){_77=_77+"&rep=compact";}return this._fromQueryString(_77);},getURI:function(){ibm.portal.debug.entry("ContentHandlerURL.getURI");return com.ibm.portal.utilities.decodeURI(this._extractParamValue("uri"));},getLevels:function(){return this._extractParamValue("levels");},getVerb:function(){return this._extractParamValue("verb");},_extractParamValue:function(_78){ibm.portal.debug.entry("ContentHandlerURL._extractParamValue",[_78]);var _79=this.url.indexOf(_78);var _7a=this.url.indexOf("&",_79);var _7b=this.url.slice(_79+_78.length+1,_7a);ibm.portal.debug.exit("ContentHandlerURL._extractParamValue",[_7b]);return _7b;}});dojo.require("com.ibm.portal.utilities.html");dojo.declare("com.ibm.portal.services.PortalRestServiceForm",null,{method:"GET",isMultipart:false,encoding:"application/x-www-form-urlencoded",DomId:null,constructor:function(_7c){if(_7c.getAttributeNode("method")){this.method=_7c.getAttributeNode("method").value;}if(_7c.getAttributeNode("encType")){this.encoding=_7c.getAttributeNode("encType").value;}if(_7c.getAttributeNode("id")){this.DomId=_7c.getAttributeNode("id").value;}else{DomId=_7c;}this.isMultipart=(this.encoding=="multipart/form-data");},getDOMElement:function(){return dojo.byId(this.DomId);},submit:function(){this.getDOMElement().submit();},toQuery:function(){return com.ibm.portal.utilities.html.convertFormToQuery(this.getDOMElement());}});com.ibm.portal.services.REQUEST_QUEUE=new com.ibm.portal.services.PortalRestServiceRequestQueue();dojo.declare("com.ibm.portal.services.PortalRestServiceRequest",null,{constructor:function(_7d,_7e,_7f,_80){ibm.portal.debug.entry("PortalRestServiceRequest.constructor",[_7d,_7e,_7f,_80]);this._feedURI=_7d.url;this._textOnly=_7f;this._sync=_80;this._form=_7e;this._customResponseValidator=null;this._onauthenticated=null;if(!this._sync){this._sync=false;}ibm.portal.debug.exit("PortalRestServiceRequest.constructor");},cancelled:false,_deferred:undefined,setAuthenticationValidator:function(_81){this._customResponseValidator=_81;},setOnAuthenticatedHandler:function(_82){this._onauthenticated=_82;},create:function(_83,_84,_85){if(!this.cancelled){this._doXmlHttpRequest("POST",_83,_84,_85);}},read:function(_86,_87){ibm.portal.debug.entry("PortalRestServiceRequest.read",[_86,_87]);if(!this.cancelled){if(!this._sync){ibm.portal.debug.text("Queueing request!");var q=com.ibm.portal.services.REQUEST_QUEUE;var me=this;q.add({execute:function(_88){if(!me.cancelled){com.ibm.portal.EVENT_BROKER.startRequest.fire({uri:me._feedURI});var _89=function(_8a,_8b,_8c,_8d){_86(_8a,_8b,_8c,_8d);if(_88){_88();}};if(me._textOnly){me._retrieveRawFeed(_89,_87);}else{me._retrieve(_89,_87);}}else{if(_88){_88();}}}});}else{com.ibm.portal.EVENT_BROKER.startRequest.fire({uri:this._feedURI});if(this._textOnly){this._retrieveRawFeed(_86,_87);}else{this._retrieve(_86,_87);}}}ibm.portal.debug.exit("PortalRestServiceRequest.read");},update:function(_8e,_8f,_90){if(!this.cancelled){this._doXmlHttpRequest("Put",_8e,_8f,_90);}},remove:function(_91,_92){if(!this.cancelled){this._doXmlHttpRequest("Delete",null,_91,_92);}},cancel:function(){this.cancelled=true;if(this._deferred!==undefined){this._deferred.cancel();}},_retrieveRawFeed:function(_93,_94){ibm.portal.debug.entry("_retrieveRawFeed",[_93,_94]);var me=this;dojo.xhrGet({url:this._feedURI,load:function(_95,_96,evt){_93(_96,_94);com.ibm.portal.EVENT_BROKER.endRequest.fire({uri:me._feedURI});},sync:this._sync});ibm.portal.debug.exit("_retrieveRawFeed");},_retrieve:function(_97,_98,_99,_9a){ibm.portal.debug.entry("_retrieve",[_97]);if(this._form&&this._form.isMultipart){this._doIframeRequest(_97,_98);}else{this._doXmlHttpRequest("Get",null,_97,_98);}ibm.portal.debug.exit("PortalRestServiceRequest._retrieve");},_doIframeRequest:function(_9b,_9c){ibm.portal.debug.entry("PortalRestServiceRequest._doIframeRequest",[_9b]);var _9d=null;var _9e=dojo.dnd.getUniqueId();if(dojo.isIE||window.ActiveXObject!==undefined){_9d=document.createElement("");com.ibm.portal.aggregation.forms.PORTLET_FORM_HANDLER._callbackfns[_9e]={fn:_9b,args:_9c};var url=new com.ibm.portal.utilities.HttpUrl(this._feedURI);url.addParameter("ibm.web2.contentType","text/plain");this._form.getDOMElement().setAttribute("action",url.toString());}else{ibm.portal.debug.text("Creating the iframe... name is: "+_9e+"; url is: "+this._feedURI);_9d=document.createElement("IFRAME");_9d.setAttribute("name",_9e);_9d.setAttribute("id",_9e);var me=this;_9d.onload=function(){var xml=window.frames[_9e].document;_9b("load",xml,null,_9c);com.ibm.portal.EVENT_BROKER.endRequest.fire({uri:me._feedURI});};this._form.getDOMElement().setAttribute("action",this._feedURI);}_9d.style.visibility="hidden";_9d.style.height="1px";_9d.style.width="1px";document.body.appendChild(_9d);if(window.frames[_9e].name!=_9e){window.frames[_9e].name=_9e;}ibm.portal.debug.text("Setting the iframe target attribute to: "+_9e);this._form.getDOMElement().setAttribute("target",_9e);this._form.submit();ibm.portal.debug.exit("PortalRestServiceRequest._doIframeRequest");},isValidRedirect:function(_9f,_a0){ibm.portal.debug.text("URLS request: "+_9f+" redirect: "+_a0);var _a1=_9f.indexOf("http");var _a2=_a0.indexOf("http");var _a3=false;if(_a2==0){var _a4=_9f.indexOf("//");var _a5=_a0.indexOf("//");if((_a4>0)&&(_a5>0)){var _a6=_9f.indexOf(":",_a4);var _a7=_a0.indexOf(":",_a5);if(_a6<0){_a6=_9f.indexOf("/",_a4+2);}if(_a7<0){_a7=_a0.indexOf("/",_a5+2);}var _a8=_9f.substring(_a4+2,_a6);ibm.portal.debug.text("request Host is: "+_a8);var _a9=_a0.substring(_a5+2,_a7);ibm.portal.debug.text("redirect Host is: "+_a9);if(_a8.toLowerCase()==_a9.toLowerCase()){_a3=true;}}}else{_a3=true;ibm.portal.debug.text("PortalRestServiceRequest.isValid returning true - relative url");}ibm.portal.debug.text("PortalRestServiceRequest._isValidRedirect returning:"+_a3);return _a3;},_doXmlHttpRequest:function(_aa,_ab,_ac,_ad){ibm.portal.debug.entry("PortalRestServiceRequest._doXmlHttpRequest",[_aa,_ab,_ac,_ad]);ibm.portal.debug.text("Attempting to retrieve: "+this._feedURI+" using method: "+_aa+"; synchronously? "+this._sync);var me=this;var _ae={url:this._feedURI,content:{},headers:{"X-IBM-XHR":"true"},handle:function(_af,_b0){ibm.portal.debug.entry("PortalRestServiceRequest.handle",[_af,_b0]);if(_af instanceof Error&&_af.dojoType==="cancel"){_ac("cancel",_af,null,_ad);return;}var xhr=_b0.xhr;ibm.portal.debug.text("XHR object: "+xhr);var _b1=com.ibm.portal.services.PortalRestServiceConfig;var _b2=xhr.getResponseHeader("X-Request-Digest");if(_b2){_b1.digest=_b2;}if(xhr.status==200){var _b3=_af;var loc=xhr.getResponseHeader("IBM-Web2-Location");if((loc)&&me.isValidRedirect(top.location.href,loc)){if(loc.indexOf(ibmPortalConfig["portalProtectedURI"])>=0&&me._feedURI.indexOf(ibmPortalConfig["portalPublicURI"])>=0){top.location.href=loc;return;}}var _b4=xhr.getResponseHeader("Content-Type");ibm.portal.debug.text("content-type is: "+_b4);if(/^text\/html/.exec(_b4)&&loc&&(loc.indexOf(ibmPortalConfig["portalProtectedURI"])>-1||loc.indexOf(ibmPortalConfig["portalPublicURI"])>-1)&&me.isValidRedirect(top.location.href,loc)){ibm.portal.debug.text("content-type is text .. follow IBM-Web2-Location");top.location.href=loc;return;}var _b5=com.ibm.ajax.auth;var _b6=false;if(me._customResponseValidator){_b6=me._customResponseValidator(_af,_b0);}if(!_b6){_b6=_b5.isAuthenticationRequired(_af,_b0);}if(_b6){_b5.authenticationHandler(_af,_b0,me._onauthenticated);return;}ibm.portal.debug.text("Read feed: "+me._feedURI);if(dojo.isIE||window.ActiveXObject!==undefined){var doc=com.ibm.portal.xslt.loadXmlString(_b3);_ac("load",doc,xhr,_ad);}else{_ac("load",_b3,xhr,_ad);}}else{if(dojo.isFF&&_b0.xhr.status==0){return;}else{if(xhr.status==401||xhr.status==0){ibm.portal.debug.text("Basic auth 401 found, trigger reload");com.ibm.ajax.auth.authenticationHandler();return;}else{_ac("error",_af,xhr,_ad);}}}com.ibm.portal.EVENT_BROKER.endRequest.fire({uri:me._feedURI});ibm.portal.debug.exit("PortalRestServiceRequest.handle");},sync:this._sync,handleAs:"xml"};if(this._form){_ae.content=dojo.queryToObject(this._form.toQuery());_aa=this._form.method;}_aa=_aa.toUpperCase();if(_aa!="GET"&&_aa!="POST"){if(ibmPortalConfig&&ibmPortalConfig.xMethodOverride){_ae.headers["X-Method-Override"]=_aa.toUpperCase();_aa="Post";}}if(_aa=="PUT"&&_ab){_ae.putData=_ab;}else{if(_aa=="POST"&&_ab){_ae.postData=_ab;}}if(dojo.isIE||window.ActiveXObject!==undefined){_ae.content["ibm.web2.contentType"]="text/xml";_ae.handleAs="text";}var _b7=com.ibm.portal.services.PortalRestServiceConfig;if(_b7.timeout){_ae.timeout=_b7.timeout;}if(_b7.digest){_ae.content["digest"]=_b7.digest;}_aa=com.ibm.portal.utilities.string.properCase(_aa);var _b8=dojo["xhr"+_aa];if(_b8){this._deferred=_b8(_ae);}else{throw new Error("Invalid request method attempted: "+_aa);}ibm.portal.debug.exit("PortalRestServiceRequest._doXmlHttpRequest");},toString:function(){return this._feedURI;}});com.ibm.portal.services.PortalRestServiceConfig={timeout:null,digest:null};(function(){var _b9=false;com.ibm.ajax.auth.setAuthenticationHandler(function(){if(_b9){return;}if(typeof (document.isCSA)=="undefined"){top.location.reload();}else{_b9=true;ibm.portal.debug.entry("DefaultAuthenticationHandler");ibm.portal.debug.text("Illegal response content-type detected!");ibm.portal.debug.text("Parameterized redirect URL is: "+ibmPortalConfig["contentModelBlankURL"]);var _ba=com.ibm.portal.navigation.controller.NAVIGATION_CONTROLLER.getState();var _bb=ibmPortalConfig["contentModelBlankURL"].replace("-----oid-----",_ba.getPageSelection());ibm.portal.debug.text("fullPageRefreshURL is currently: "+_bb);if(dojo.cookie("WASReqURL")!=null){var _bc=_ba.createLinkToCurrentState();var _bd="WASReqURL="+_bc+"; path=/";document.cookie=_bd;}ibm.portal.debug.text("Redirecting to: "+_bb);com.ibm.portal.EVENT_BROKER.redirect.fire({url:_bb});_b9=false;top.location.href=_bb;ibm.portal.debug.exit("DefaultAuthenticationHandler");}});})();}if(!dojo._hasResource["com.ibm.portal.services.PortletFragmentService"]){dojo._hasResource["com.ibm.portal.services.PortletFragmentService"]=true;dojo.provide("com.ibm.portal.services.PortletFragmentService");dojo.require("dojox.data.dom");dojo.require("com.ibm.portal.services.PortalRestServiceRequest");dojo.require("com.ibm.portal.utilities");dojo.require("com.ibm.portal.debug");dojo.require("com.ibm.portal.EventBroker");dojo.declare("com.ibm.portal.services.PortletFragmentURL",null,{constructor:function(uri){if(uri.indexOf("?uri=")==0){this.url=ibmPortalConfig["portalURI"]+uri;this.url=this.url.replace(/&/g,"&");this.url=this.url.replace(/lm:/,"pm:");}else{if(uri.indexOf("lm:")==0){this.url=ibmPortalConfig["portalURI"]+"?uri=fragment:"+uri;this.url=this.url.replace(/lm:/,"pm:");}else{this.url=uri;}}}});dojo.declare("com.ibm.portal.services.PortletInfo",null,{constructor:function(wId,pId,_be,_bf,_c0,_c1,_c2,_c3,_c4,_c5,_c6,_c7){ibm.portal.debug.entry("PortletInfo.constructor",[wId,pId,_be,_bf,_c0,_c1,_c3,_c7]);this.windowId=wId;this.portletId=pId;this.uri="fragment:pm:oid:"+wId+"@oid:"+pId;this.markup=_be;this.portletModes=_bf;this.windowStates=_c0;this.dependentPortlets=_c1;this.otherPortlets=_c2;this.stateVaryExpressions=_c4;this.updatedState=_c3;this.currentMode=_c5;this.currentWindowState=_c6;this.portletTitle=_c7;ibm.portal.debug.exit("PortletInfo.constructor");}});dojo.declare("com.ibm.portal.services.PortletFragmentService",null,{namespaces:{"xsl":"http://www.w3.org/1999/XSL/Transform","thr":"http://purl.org/syndication/thread/1.0","atom":"http://www.w3.org/2005/Atom","xhtml":"http://www.w3.org/1999/xhtml","model":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model-elements","base":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/ibm-portal-composite-base","portal":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model","xsi":"http://www.w3.org/2001/XMLSchema-instance","state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state","state-vary":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state-vary"},activeRequests:{},constructor:function(){this.staticContext=com.ibm.portal.services.PortletFragmentService.prototype;},_flagPortletUrl:function(url,_c8){ibm.portal.debug.entry("PortletFragmentService._flagPortletUrl",[url]);var _c9=url.indexOf("uri=fragment:pm:oid:");var _ca=new com.ibm.portal.utilities.HttpUrl(url);_ca.addParameter("ibm.web2.keepRenderMode","false");if(_c9<0){_c8=_c8.replace(/lm:/g,"fragment:pm:");_ca.addParameter("uri",_c8);}ibm.portal.debug.exit("PortletFragmentService._flagPortletUrl",[_ca.toString()]);return _ca.toString();},getPortletInfo:function(_cb,_cc,_cd,_ce,_cf){ibm.portal.debug.entry("PortletFragmentService.getPortletInfo",[_cb,_cc,_cd,_ce,_cf]);if(_cc=="#"||_cc==window.location.href+"#"){ibm.portal.debug.text("Illegal portlet url provided: "+_cc);ibm.portal.debug.text("Aborting request.");return false;}if(com.ibm.portal.utilities.isJavascriptUrl(_cc)){return eval(_cc);}var _d0=_cc;if(_d0.indexOf(top.location.href)==0){_d0=_d0.substring(top.location.href.length);while(_d0.length>0&&_d0.charAt(0)=="/"){_d0=_d0.substring(1);}}if(_d0.indexOf("?")==0){var _d1=com.ibm.portal.navigation.controller.NAVIGATION_CONTROLLER.getState();_cc=_d1.resolveRelativePortletURL(_d0);}if(com.ibm.portal.utilities.isExternalUrl(_cc)){self.location.href=_cc;}else{var url={url:this._flagPortletUrl(_cc,_cb)};var _d2=ibmPortalConfig.enforceOneActivePortletRequest;if(_d2){var _d3=this.staticContext.activeRequests;if(_d3[_cb]!==undefined&&_d3[_cb]!==null){_d3[_cb].cancel();com.ibm.portal.EVENT_BROKER.cancelFragmentUpdate.fire({id:_cb});_d3[_cb]=null;}}var _d4=new com.ibm.portal.services.PortalRestServiceRequest(url,_ce);if(!_cf){com.ibm.portal.EVENT_BROKER.startFragment.fire({id:_cb});}if(_d2){_d3[_cb]=_d4;}var me=this;_d4.read(function(_d5,_d6,xhr){if(_d2){_d3[_cb]=null;}if(xhr.status==404){var _d7=false;for(var i=0;i0){for(var i=0;i0){_e4=dojox.data.dom.textContent(_e3[0]);}ibm.portal.debug.exit("PortletFragmentService.readMarkup",[_e4]);return _e4;},readPortletModes:function(_e5){ibm.portal.debug.entry("PortletFragmentService.readPortletModes",[_e5]);var _e6="/atom:feed/atom:entry/atom:link[@portal:rel='portlet-mode']";var _e7=com.ibm.portal.xpath.evaluateXPath(_e6,_e5,this.namespaces);var _e8=new Array();if(_e7!=null&&_e7.length>0){var _e9=_e7.length;for(var i=0;i<_e9;i++){_e8.push({"link":_e7[i].getAttribute("href"),"mode":_e7[i].getAttribute("title")});}}ibm.portal.debug.exit("PortletFragmentService.readPortletModes",[_e8]);return _e8;},readWindowStates:function(_ea){ibm.portal.debug.entry("PortletFragmentService.readWindowStates",[_ea]);var _eb="/atom:feed/atom:entry/atom:link[@portal:rel='window-state']";var _ec=com.ibm.portal.xpath.evaluateXPath(_eb,_ea,this.namespaces);var _ed=new Array();if(_ec!=null&&_ec.length>0){var _ee=_ec.length;for(var i=0;i<_ee;i++){_ed.push({"link":_ec[i].getAttribute("href"),"mode":_ec[i].getAttribute("title")});}}ibm.portal.debug.exit("PortletFragmentService.readWindowStates",[_ed]);return _ed;},readDependentPortlets:function(_ef){ibm.portal.debug.entry("PortletFragmentService.readDependentPortlets",[_ef]);var _f0="/atom:feed/atom:link[@portal:rel='dependent']";var _f1=com.ibm.portal.xpath.evaluateXPath(_f0,_ef,this.namespaces);var _f2=new Array();if(_f1!=null&&_f1.length>0){var _f3=_f1.length;for(var i=0;i<_f3;i++){_f2.push({"link":_f1[i].getAttribute("href"),"portlet":_f1[i].getAttribute("title"),"uri":_f1[i].getAttribute("portal:uri")?_f1[i].getAttribute("portal:uri"):_f1[i].getAttribute("uri")});}}ibm.portal.debug.exit("PortletFragmentService.readDependentPortlets",[_f2]);return _f2;},readOtherPortlets:function(_f4){ibm.portal.debug.entry("PortletFragmentService.readOtherPortlets",[_f4]);var _f5="/atom:feed/atom:link[@portal:rel='other']";var _f6=com.ibm.portal.xpath.evaluateXPath(_f5,_f4,this.namespaces);var _f7=new Array();if(_f6!=null&&_f6.length>0){var _f8=_f6.length;for(var i=0;i<_f8;i++){_f7.push({"link":_f6[i].getAttribute("href"),"portlet":_f6[i].getAttribute("title"),"uri":_f6[i].getAttribute("portal:uri")});}}ibm.portal.debug.exit("PortletFragmentService.readOtherPortlets",[_f7]);return _f7;},readStateVaryExpressions:function(_f9){ibm.portal.debug.entry("PortletFragmentService.readStateVaryExpressions",[_f9]);var _fa="/atom:feed/atom:entry/state-vary:state-vary/state-vary:expr";var _fb=com.ibm.portal.xpath.evaluateXPath(_fa,_f9,this.namespaces);var _fc=new Array();if(_fb!=null&&_fb.length>0){var _fd=_fb.length;for(var i=0;i<_fd;i++){var _fe=_fb[i].firstChild;if(_fe!=null){_fc.push(_fe.nodeValue);}}}ibm.portal.debug.exit("PortletFragmentService.readStateVaryExpressions",[_fc]);return _fc;},readPortletState:function(_ff){return this._readPortletState(_ff);},_readPortletState:function(_100){ibm.portal.debug.entry("PortletFragmentService.readPortletState",[_100]);var _101="/atom:feed/atom:entry/state:root";var _102=com.ibm.portal.xpath.evaluateXPath(_101,_100,this.namespaces);var _103=null;if(_102!=null&&_102.length>0){var doc=com.ibm.portal.xslt.loadXmlString();com.ibm.portal.utilities.addExternalNode(doc,_102[0]);_103=doc;}else{_101="/atom:feed/state:root";_102=com.ibm.portal.xpath.evaluateXPath(_101,_100,this.namespaces);if(_102!=null&&_102.length>0){var doc=com.ibm.portal.xslt.loadXmlString();com.ibm.portal.utilities.addExternalNode(doc,_102[0]);_103=doc;}}ibm.portal.debug.exit("PortletFragmentService.readPortletState",[_103]);return _103;},readPortletTitle:function(_104){return this._readPortletTitle(_104);},_readPortletTitle:function(_105){ibm.portal.debug.entry("PortletFragmentService.readPortletTitle",[_105]);var _106="/atom:feed/atom:entry/atom:title";var _107=com.ibm.portal.xpath.evaluateXPath(_106,_105,this.namespaces);var _108=dojox.data.dom.textContent(_107[0]);ibm.portal.debug.exit("PortletFragmentService.readPortletTitle",_108);return _108;},_fireEvents:function(_109,_10a,xhr){this._fireGlobalPortletStateChange(_109,_10a,xhr);},_fireGlobalPortletStateChange:function(_10b,_10c,xhr){com.ibm.portal.EVENT_BROKER.endFragment.fire({portletInfo:_10b,id:_10c,xhr:xhr});},_fireIndividualPortletStateChange:function(_10d){},createPortletInfo:function(_10e){var _10f=this.readWindowID(_10e);var _110=this.readPortletID(_10e);var _111=this.readMarkup(_10e);var _112=this.readPortletModes(_10e);var _113=this.readWindowStates(_10e);var _114=this.readDependentPortlets(_10e);var _115=this.readOtherPortlets(_10e);var _116=this.readPortletState(_10e);var _117=this.readStateVaryExpressions(_10e);var _118=this.readPortletTitle(_10e);var _119=_116;if(_119==null){_119=this._readPortletState(_10e);}var _11a=new com.ibm.portal.state.StateManager();var _11b=_11a.newPortletAccessor(_10f,_119);var mode=_11b.getPortletMode();var _11c=_11b.getWindowState();return new com.ibm.portal.services.PortletInfo(_10f,_110,_111,_112,_113,_114,_115,_116,_117,mode,_11c,_118);}});dojo.declare("com.ibm.portal.services.IndependentPortletFragmentService",com.ibm.portal.services.PortletFragmentService,{readDependentPortlets:function(_11d){ibm.portal.debug.entry("DependentPortletFragmentService.readDependentPortlets",[_11d]);var _11e=new Array();ibm.portal.debug.exit("DependentPortletFragmentService.readDependentPortlets",[_11e]);return _11e;},readOtherPortlets:function(_11f){ibm.portal.debug.entry("DependentPortletFragmentService.readOtherPortlets",[_11f]);var _120=new Array();ibm.portal.debug.exit("DependentPortletFragmentService.readOtherPortlets",[_120]);return _120;},readPortletState:function(_121){return null;}});}if(!dojo._hasResource["com.ibm.portal.state"]){dojo._hasResource["com.ibm.portal.state"]=true;dojo.provide("com.ibm.portal.state");dojo.require("dojo.string");dojo.require("dojox.data.dom");dojo.declare("com.ibm.portal.state.StateManager",null,{constructor:function(_122){this.stateDOM=null;this.stateNode=null;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};this.serializationManager=new com.ibm.portal.state.SerializationManager(_122);},getState:function(){return this.stateDOM;},newState:function(_123,_124,_125){var _126=null;if(_123==null){_126=com.ibm.portal.xslt.loadXmlString();}else{if(_124==null){_126=com.ibm.portal.xslt.loadXmlString(dojox.data.dom.innerXML(_123));}else{var xslt=com.ibm.portal.xslt;var _127=xslt.transform(_123,_124,null,_125,true);_126=com.ibm.portal.xslt.loadXmlString(_127);}}return _126;},reset:function(_128){this.stateDOM=_128;this.stateNode=this._getStateNode(_128);},getSerializationManager:function(){return this.serializationManager;},newExpansionsListAccessor:function(_129){var _12a;var _12b;if(_129==null||this.stateDOM==_129){_12a=this.stateNode;_12b=this.stateDOM;}else{_12a=this._getStateNode(_129);_12b=_129;}return new com.ibm.portal.state.ExpansionsListAccessor(_12a,_12b);},newPortletAccessor:function(_12c,_12d){var _12e;var _12f;if(_12d==null||this.stateDOM==_12d){_12e=this.stateNode;_12f=this.stateDOM;}else{_12e=this._getStateNode(_12d);_12f=_12d;}var expr="state:portlet[@id='"+_12c+"']";var _130=this._getSpecificStateNode("portlet",expr,_12e,_12f);_130.setAttribute("id",_12c);return new com.ibm.portal.state.PortletAccessor(_130,_12f);},newPortletListAccessor:function(_131){var _132;var _133;if(_131==null||this.stateDOM==_131){_132=this.stateNode;_133=this.stateDOM;}else{_132=this._getStateNode(_131);_133=_131;}return new com.ibm.portal.state.PortletListAccessor(_132,_133);},newSelectionAccessor:function(_134){var _135;var _136;if(_134==null||this.stateDOM==_134){_135=this.stateNode;_136=this.stateDOM;}else{_135=this._getStateNode(_134);_136=_134;}var _137=this._getSpecificStateNode("selection","state:selection",_135,_136);return new com.ibm.portal.state.SelectionAccessor(_137,_136);},newSoloStateAccessor:function(_138){var _139;var _13a;if(_138==null||this.stateDOM==_138){_139=this.stateNode;_13a=this.stateDOM;}else{_139=this._getStateNode(_138);_13a=_138;}var _13b=this._getSpecificStateNode("solo","state:solo",_139,_13a);return new com.ibm.portal.state.SoloStateAccessor(_13b,_13a);},newThemeTemplateAccessor:function(_13c){var _13d;var _13e;if(_13c==null||this.stateDOM==_13c){_13d=this.stateNode;_13e=this.stateDOM;}else{_13d=this._getStateNode(_13c);_13e=_13c;}var _13f=this._getSpecificStateNode("theme-template","state:theme-template",_13d,_13e);return new com.ibm.portal.state.ThemeTemplateAccessor(_13f,_13e);},newThemePolicyAccessor:function(_140){var _141;var _142;if(_140==null||this.stateDOM==_140){_141=this.stateNode;_142=this.stateDOM;}else{_141=this._getStateNode(_140);_142=_140;}var _143=this._getSpecificStateNode("theme-policy","state:theme-policy",_141,_142);return new com.ibm.portal.state.ThemePolicyAccessor(_143,_142);},newScreenTemplateAccessor:function(_144){var _145;var _146;if(_144==null||this.stateDOM==_144){_145=this.stateNode;_146=this.stateDOM;}else{_145=this._getStateNode(_144);_146=_144;}var _147=this._getSpecificStateNode("screen-template","state:screen-template",_145,_146);return new com.ibm.portal.state.ScreenTemplateAccessor(_147,_146);},newLocaleAccessor:function(_148){var _149;var _14a;if(_148==null||this.stateDOM==_148){_149=this.stateNode;_14a=this.stateDOM;}else{_149=this._getStateNode(_148);_14a=_148;}var _14b=this._getSpecificStateNode("locale","state:locale",_149,_14a);return new com.ibm.portal.state.LocaleAccessor(_14b,_14a);},newStatePartitionAccessor:function(_14c){var _14d;var _14e;if(_14c==null||this.stateDOM==_14c){_14d=this.stateNode;_14e=this.stateDOM;}else{_14d=this._getStateNode(_14c);_14e=_14c;}var _14f=this._getSpecificStateNode("statepartition","state:statepartition",_14d,_14e);return new com.ibm.portal.state.StatePartitionAccessor(_14f,_14e);},newSharedStateListAccessor:function(_150){var _151;var _152;if(_150==null||this.stateDOM==_150){_151=this.stateNode;_152=this.stateDOM;}else{_151=this._getStateNode(_150);_152=_150;}return new com.ibm.portal.state.SharedStateListAccessor(_151,_152);},newSharedStateAccessor:function(_153,_154){var _155;var _156;if(_154==null||this.stateDOM==_154){_155=this.stateNode;_156=this.stateDOM;}else{_155=this._getStateNode(_154);_156=_154;}var expr="state:shared-parameters[@id='"+_153+"']";var _157=this._getSpecificStateNode("shared-parameters",expr,_155,_156);_157.setAttribute("id",_153);return new com.ibm.portal.state.SharedStateAccessor(_153,_157,_156);},_getStateNode:function(_158){var expr="state:root/state:state";var _159=com.ibm.portal.xpath.evaluateXPath(expr,_158,this.ns);var _15a=null;if(_159&&_159.length>0){_15a=_159[0];}else{var root=null;var _15b="state:root";var _15c=com.ibm.portal.xpath.evaluateXPath(_15b,_158,this.ns);if(_15c&&_15c.length>0){root=_15c[0];}else{root=this._createElement(_158,"root");this._prependChild(root,_158);}_15a=this._createElement(_158,"state");this._prependChild(_15a,root);_15a.setAttribute("type","navigational");}return _15a;},_getSpecificStateNode:function(_15d,_15e,_15f,_160){var _161=com.ibm.portal.xpath.evaluateXPath(_15e,_15f,this.ns);var node;if(_161==null||_161.length<=0){node=this._createElement(_160,_15d);this._prependChild(node,_15f);}else{node=_161[0];}return node;},_prependChild:function(node,_162){try{_162.firstChild?_162.insertBefore(node,_162.firstChild):_162.appendChild(node);}catch(e){console.log("Error happend while prepending child node: "+e);}},_createElement:function(dom,name){var _163;if(dojo.isIE||window.ActiveXObject!==undefined){_163=dom.createNode(1,name,this.ns.state);}else{_163=dom.createElementNS(this.ns.state,name);}return _163;}});dojo.declare("com.ibm.portal.state.PortletAccessor",null,{constructor:function(_164,_165){this.portletNode=_164;this.stateDOM=_165;this.parameters=new com.ibm.portal.state.Parameters(_164,_165);this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};this.xsltURL=dojo.moduleUrl("com","ibm/portal/state/");},getPortletMode:function(){var expr="state:portlet-mode";var _166=com.ibm.portal.xpath.evaluateXPath(expr,this.portletNode,this.ns);var _167=ibm.portal.portlet.PortletMode.VIEW;if(_166!=null&&_166.length>0){var _168=_166[0].firstChild;if(_168!=null){_167=_168.nodeValue;}}return _167;},getWindowState:function(){var expr="state:window-state";var _169=com.ibm.portal.xpath.evaluateXPath(expr,this.portletNode,this.ns);var _16a=ibm.portal.portlet.WindowState.NORMAL;if(_169!=null&&_169.length>0){var _16b=_169[0].firstChild;if(_16b!=null){_16a=_16b.nodeValue;}}return _16a;},getRenderParameters:function(){return this.parameters;},setPortletMode:function(_16c){var expr="state:portlet-mode";var _16d=com.ibm.portal.xpath.evaluateXPath(expr,this.portletNode,this.ns);if(_16d==null||_16d.length<=0){var _16e=this._createElement(this.stateDOM,"portlet-mode");this._prependChild(_16e,this.portletNode);var _16f=this.stateDOM.createTextNode(_16c);this._prependChild(_16f,_16e);}else{_16d[0].firstChild.nodeValue=_16c;}},setWindowState:function(_170){var expr="state:window-state";var _171=com.ibm.portal.xpath.evaluateXPath(expr,this.portletNode,this.ns);if(_171==null||_171.length<=0){var _172=this._createElement(this.stateDOM,"window-state");this._prependChild(_172,this.portletNode);var _173=this.stateDOM.createTextNode(_170);this._prependChild(_173,_172);}else{_171[0].firstChild.nodeValue=_170;}},getPortletState:function(){var _174=com.ibm.portal.xslt.loadXmlString();var _175=com.ibm.portal.state.STATE_MANAGER.newPortletAccessor(this.portletNode.getAttribute("id"),_174);_175.setPortletMode(this.getPortletMode());_175.setWindowState(this.getWindowState());var _176=this.getRenderParameters().getMap();if(_176.length>0){_175.getRenderParameters().putAll(_176);}return _174;},setPortletState:function(_177,_178){var _179=com.ibm.portal.state.STATE_MANAGER.newPortletAccessor(this.portletNode.getAttribute("id"),_177);this.setPortletMode(_179.getPortletMode());this.setWindowState(_179.getWindowState());var _17a=_179.getRenderParameters().getMap();if(_178==null||_178==false){this.getRenderParameters().clear();}if(_17a.length>0){this.getRenderParameters().putAll(_17a);}},_prependChild:function(node,_17b){_17b.firstChild?_17b.insertBefore(node,_17b.firstChild):_17b.appendChild(node);},_createElement:function(dom,name){var _17c;if(dojo.isIE||window.ActiveXObject!==undefined){_17c=dom.createNode(1,name,this.ns.state);}else{_17c=dom.createElementNS(this.ns.state,name);}return _17c;}});dojo.declare("com.ibm.portal.state.Parameters",null,{constructor:function(_17d,_17e){this.baseNode=_17d;this.stateDOM=_17e;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};},getMap:function(){var _17f=this.getNames();var map=new Array(_17f.length);for(var i=0;i<_17f.length;i++){var name=_17f[i];map[i]={name:name,values:this.getValues(name)};}return map;},getNames:function(){var expr="state:parameters/state:param";var _180=com.ibm.portal.xpath.evaluateXPath(expr,this.baseNode,this.ns);var _181=new Array();if(_180!=null&&_180.length>0){var _182=_180.length;for(var i=0;i<_182;i++){_181[i]=_180[i].getAttribute("name");}}return _181;},getValue:function(name){var _183=this.getValues(name);var _184=null;if(_183!=null&&_183.length>0){_184=_183[0];}return _184;},getValues:function(name){var expr="state:parameters/state:param[@name='"+name+"']/state:value";var _185=com.ibm.portal.xpath.evaluateXPath(expr,this.baseNode,this.ns);var _186=null;if(_185!=null&&_185.length>0){_186=[];dojo.forEach(_185,function(node){var _187=dojox.xml.parser.textContent(node);_186.push(_187);});}return _186;},remove:function(name){var expr="state:parameters/state:param[@name='"+name+"']";var _188=com.ibm.portal.xpath.evaluateXPath(expr,this.baseNode,this.ns);if(_188!=null){var _189=_188[0];if(_189&&_189.parentNode){_189.parentNode.removeChild(_189);}}},putAll:function(map){if(map!=null&&map.length>0){for(var i=map.length-1;i>=0;i--){var _18a=map[i].name;var _18b=map[i].values;this.setValues(_18a,_18b);}}},setValue:function(name,_18c){this.setValues(name,new Array(_18c));},setValues:function(name,_18d){var _18e=this._getParamsRoot();var expr="state:param[@name='"+name+"']";var _18f=com.ibm.portal.xpath.evaluateXPath(expr,_18e,this.ns);var _190;if(_18f&&_18f.length>0){_190=_18f[0];dojox.data.dom.removeChildren(_190);}else{_190=this._createElement(this.stateDOM,"param");_190.setAttribute("name",name);this._prependChild(_190,_18e);}if(_18d){for(var i=_18d.length-1;i>=0;i--){var _191=this._createElement(this.stateDOM,"value");this._prependChild(_191,_190);var _192=_18d[i];if(dojo.isString(_192)){var _193=this.stateDOM.createTextNode(_192);this._prependChild(_193,_191);}}}},clear:function(){var expr="state:parameters";var _194=com.ibm.portal.xpath.evaluateXPath(expr,this.baseNode,this.ns);if(_194!=null){var _195=_194[0];if(_195&&_195.parentNode){_195.parentNode.removeChild(_195);}}},_getParamsRoot:function(){if(!this.params){var expr="state:parameters";var _196=com.ibm.portal.xpath.evaluateXPath(expr,this.baseNode,this.ns);if(_196&&_196.length>0){this.params=_196[0];}else{var _197=this._createElement(this.stateDOM,"parameters");this._prependChild(_197,this.baseNode);this.params=_197;}}return this.params;},_prependChild:function(node,_198){_198.firstChild?_198.insertBefore(node,_198.firstChild):_198.appendChild(node);},_createElement:function(dom,name){var _199;if(dojo.isIE||window.ActiveXObject!==undefined){_199=dom.createNode(1,name,this.ns.state);}else{_199=dom.createElementNS(this.ns.state,name);}return _199;}});dojo.declare("com.ibm.portal.state.ExpansionsListAccessor",null,{constructor:function(_19a,_19b){this.stateNode=_19a;this.stateDOM=_19b;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};},getExpansions:function(){var expr="state:expansions/state:node";var _19c=com.ibm.portal.xpath.evaluateXPath(expr,this.stateNode,this.ns);var _19d=null;if(_19c!=null&&_19c.length>0){_19d=new Array(_19c.length);for(var i=0;i<_19c.length;i++){var node=_19c[i];_19d[i]=node.getAttribute("id");}}return _19d;},setExpansions:function(ids){var expr="state:expansions";var _19e=com.ibm.portal.xpath.evaluateXPath(expr,this.stateNode,this.ns);if(_19e!=null){var _19f=_19e[0],node;if(!_19f){_19f=this._createElement(this.stateDOM,"expansions");this.stateNode.appendChild(_19f);}while(_19f.childNodes.length>0){_19f.removeChild(_19f.childNodes[0]);}for(var i=0;i0){_1a4=new Array(_1a3.length);for(var i=0;i<_1a3.length;i++){var node=_1a3[i];_1a4[i]=node.getAttribute("id");}}return _1a4;}});dojo.declare("com.ibm.portal.state.SharedStateListAccessor",null,{constructor:function(_1a5,_1a6){this.stateNode=_1a5;this.stateDOM=_1a6;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};},getScopeIDs:function(){var expr="state:shared-parameters";var _1a7=com.ibm.portal.xpath.evaluateXPath(expr,this.stateNode,this.ns);var _1a8=[];if(_1a7&&_1a7.length>0){dojo.forEach(_1a7,function(node){var id=node.getAttribute("id");if(id){_1a8.push(id);}});}return _1a8;}});dojo.declare("com.ibm.portal.state.SharedStateAccessor",null,{constructor:function(_1a9,_1aa,_1ab){this.scopeID=_1a9;this.sharedStateNode=_1aa;this.stateDOM=_1ab;this.xpath=com.ibm.portal.xpath;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};this.xsltURL=dojo.moduleUrl("com","ibm/portal/state/");},getScopeID:function(){return this.scopeID;},getQNames:function(){var expr="state:shared-parameter";var _1ac=this.xpath.evaluateXPath(expr,this.sharedStateNode,this.ns);var _1ad=[];if(_1ac&&_1ac.length>0){var acc=this;dojo.forEach(_1ac,function(node){var uri=node.getAttribute("nsuri");var _1ae=node.getAttribute("localpart");_1ad.push(acc._serializeQName(uri,_1ae));});}return _1ad;},_serializeQName:function(uri,_1af){return "{"+uri+"}"+_1af;},_deserializeQName:function(_1b0){var _1b1=_1b0.split("}");var _1b2={};if(_1b1&&_1b1.length==2){_1b2.nsuri=_1b1[0].substring(1);_1b2.localpart=_1b1[1];}return _1b2;},getValues:function(_1b3){var _1b4=this._deserializeQName(_1b3);var uri=_1b4.nsuri;var _1b5=_1b4.localpart;if(dojo.isString(uri)&&_1b5){var expr="state:shared-parameter[@nsuri='"+uri+"'][@localpart='"+_1b5+"']/state:value";var _1b6=this.xpath.evaluateXPath(expr,this.sharedStateNode,this.ns);if(_1b6&&_1b6.length>0){var _1b7=[];dojo.forEach(_1b6,function(node){var _1b8=dojox.xml.parser.textContent(node);if(_1b8){_1b7.push(_1b8);}});return _1b7;}else{return null;}}},getValue:function(_1b9){var _1ba=this.getValues(_1b9);if(_1ba&&_1ba.length>0){return _1ba[0];}else{return null;}},setValues:function(_1bb,_1bc){var _1bd=this._deserializeQName(_1bb);var uri=_1bd.nsuri;var _1be=_1bd.localpart;var expr="state:shared-parameter[@nsuri='"+uri+"'][@localpart='"+_1be+"']";var _1bf=this.xpath.evaluateXPath(expr,this.sharedStateNode,this.ns);var _1c0=null;if(_1bf&&_1bf.length>0){_1c0=_1bf[0];dojox.xml.parser.removeChildren(_1c0);}else{_1c0=this._createElement(this.stateDOM,"shared-parameter");_1c0.setAttribute("nsuri",uri);_1c0.setAttribute("localpart",_1be);this._prependChild(_1c0,this.sharedStateNode);}if(_1c0&&_1bc){for(var i=_1bc.length-1;i>=0;i--){var _1c1=this._createElement(this.stateDOM,"value");this._prependChild(_1c1,_1c0);var _1c2=_1bc[i];if(dojo.isString(_1c2)){var _1c3=this.stateDOM.createTextNode(_1c2);this._prependChild(_1c3,_1c1);}}}},setValue:function(_1c4,_1c5){if(_1c5){this.setValues(_1c4,[_1c5]);}},_prependChild:function(node,_1c6){_1c6.firstChild?_1c6.insertBefore(node,_1c6.firstChild):_1c6.appendChild(node);},_createElement:function(dom,name){var _1c7;if(dojo.isIE||window.ActiveXObject!==undefined){_1c7=dom.createNode(1,name,this.ns.state);}else{_1c7=dom.createElementNS(this.ns.state,name);}return _1c7;}});dojo.declare("com.ibm.portal.state.SelectionAccessor",null,{constructor:function(_1c8,_1c9){this.selectionNode=_1c8;this.stateDOM=_1c9;this.parameters=new com.ibm.portal.state.Parameters(this.selectionNode,_1c9);this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};},getPageSelection:function(){return this.selectionNode.getAttribute("selection-node");},getFragmentSelection:function(){var _1ca=this.getParameters();var _1cb=_1ca.getValues("frg");var _1cc=null;if(_1cb!=null&&_1cb.length>0){_1cc=_1cb[0];if(_1cb.length>1){if(_1cc=="pw"){_1cc=_1cb[1];}}}return _1cc;},getMapping:function(_1cd){var expr="state:mapping[@src='"+_1cd+"']";var _1ce=com.ibm.portal.xpath.evaluateXPath(expr,this.selectionNode,this.ns);var _1cf=null;if(_1ce!=null&&_1ce.length>0){var _1d0=_1ce[0];_1cf=_1d0.getAttribute("dst");}return _1cf;},getMappingSources:function(){var expr="state:mapping";var _1d1=com.ibm.portal.xpath.evaluateXPath(expr,this.selectionNode,this.ns);var _1d2=[];if(_1d1&&_1d1.length>0){dojo.forEach(_1d1,function(node){var src=node.getAttribute("src");if(src){_1d2.push(src);}});}return _1d2;},getParameters:function(){return this.parameters;},setPageSelection:function(_1d3){this.selectionNode.setAttribute("selection-node",_1d3);},setURI:function(uri){this.selectionNode.setAttribute("selection-uri",uri);},getURI:function(){return this.selectionNode.getAttribute("selection-uri");},setFragmentSelection:function(_1d4,_1d5){var _1d6=this.getParameters();if(_1d5==null||_1d5==true){var _1d7=new Array(2);_1d7[0]=_1d4;_1d7[1]="pw";_1d6.setValues("frg",_1d7);}else{_1d6.setValue("frg",_1d4);}},setMapping:function(_1d8,_1d9){if(_1d9!=null){var expr="state:mapping[@src='"+_1d8+"']";var _1da=com.ibm.portal.xpath.evaluateXPath(expr,this.selectionNode,this.ns);var _1db;if(_1da!=null&&_1da.length>0){_1db=_1da[0];}else{_1db=this._createElement(this.stateDOM,"mapping");this._prependChild(_1db,this.selectionNode);_1db.setAttribute("src",_1d8);}_1db.setAttribute("dst",_1d9);}else{this.removeMapping(_1d8);}},removeMapping:function(_1dc){var expr="state:mapping[@src='"+_1dc+"']";var _1dd=com.ibm.portal.xpath.evaluateXPath(expr,this.selectionNode,this.ns);var _1de=false;if(_1dd!=null&&_1dd.length>0){for(var i=0;i<_1dd.length;i++){var _1df=_1dd[i];if(_1df&&_1df.parentNode){_1df.parentNode.removeChild(_1df);}}_1de=true;}return _1de;},_prependChild:function(node,_1e0){_1e0.firstChild?_1e0.insertBefore(node,_1e0.firstChild):_1e0.appendChild(node);},_createElement:function(dom,name){var _1e1;if(dojo.isIE||window.ActiveXObject!==undefined){_1e1=dom.createNode(1,name,this.ns.state);}else{_1e1=dom.createElementNS(this.ns.state,name);}return _1e1;},getSelection:function(){return this.getPageSelection();},setSelection:function(_1e2){this.setPageSelection(_1e2);}});dojo.declare("com.ibm.portal.state.SingleTokenAccessor",null,{constructor:function(node,_1e3){this.node=node;this.stateDOM=_1e3;},setValue:function(_1e4){dojox.xml.parser.removeChildren(this.node);if(_1e4){dojox.xml.parser.textContent(this.node,_1e4);}},getValue:function(){return dojox.xml.parser.textContent(this.node);},setAttribute:function(name,_1e5){this.node.setAttribute(name,_1e5);},getAttribute:function(name){return this.node.getAttribute(name);}});dojo.declare("com.ibm.portal.state.SoloStateAccessor",com.ibm.portal.state.SingleTokenAccessor,{constructor:function(_1e6,_1e7){this.soloNode=_1e6;this.stateDOM=_1e7;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};},setSoloPortlet:function(_1e8){this.setValue(_1e8);},getSoloPortlet:function(){return this.getValue();},setReturnSelection:function(_1e9){this.setAttribute("return-selection",_1e9);},getReturnSelection:function(){return this.getAttribute("return-selection");}});dojo.declare("com.ibm.portal.state.ThemeTemplateAccessor",com.ibm.portal.state.SingleTokenAccessor,{constructor:function(_1ea,_1eb){this.themeTemplateNode=_1ea;this.stateDOM=_1eb;},setThemeTemplate:function(_1ec){this.setValue(_1ec);},getThemeTemplate:function(){return this.getValue();}});dojo.declare("com.ibm.portal.state.ScreenTemplateAccessor",com.ibm.portal.state.SingleTokenAccessor,{constructor:function(_1ed,_1ee){this.screenTemplateNode=_1ed;this.stateDOM=_1ee;},setScreenTemplate:function(_1ef){this.setValue(_1ef);},getScreenTemplate:function(){return this.getValue();}});dojo.declare("com.ibm.portal.state.LocaleAccessor",com.ibm.portal.state.SingleTokenAccessor,{constructor:function(_1f0,_1f1){this.localeNode=_1f0;this.stateDOM=_1f1;},setLocale:function(_1f2){this.setValue(_1f2);},getLocale:function(){return this.getValue();}});dojo.declare("com.ibm.portal.state.ThemePolicyAccessor",com.ibm.portal.state.SingleTokenAccessor,{constructor:function(_1f3,_1f4){this.localeNode=_1f3;this.stateDOM=_1f4;},setThemePolicy:function(_1f5){this.setValue(_1f5);},getThemePolicy:function(){return this.getValue();}});dojo.declare("com.ibm.portal.state.StatePartitionAccessor",com.ibm.portal.state.SingleTokenAccessor,{constructor:function(_1f6,_1f7){this.statePartitionNode=_1f6;this.stateDOM=_1f7;},includeStatePartition:function(){this.setStatePartition(this._generateID());},setStatePartition:function(_1f8){this.setValue(_1f8);},getStatePartition:function(){return this.getValue();},_generateID:function(){return Math.floor(Math.random()*100);}});dojo.declare("com.ibm.portal.state.SerializationManager",null,{STATE_URI_SCHEME:"state",STATE_URI_POST:"state:encode",DOWNLOAD_MODE:"download",STATUS_UNDEFINED:0,STATUS_OK:1,STATUS_ERROR:2,STATE_NS_URI:"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state",JSON_SERIALIZATION:{names:{expansions:"exp",portlets:"pp",pMode:"m",pWState:"w",locale:"lcl",screenTemplate:"scrtm",selection:"sel",selPg:"pg",selFrg:"frg",selURI:"uri",selMaps:"mp",sharedState:"ss",statePartition:"sp",solo:"solo",soloPortlet:"soloP",soloReturn:"soloR",themePolicy:"thp",themeTemplate:"thtm",params:"parm",paramValue:"v"},portlet:{defMode:"view",defWState:"normal"}},constructor:function(_1f9){this.serviceURL=_1f9;},sendDebugRequest:function(_1fa,_1fb,_1fc){ibm.portal.debug.entry("SerializationManager.sendDebugRequest",[]);var _1fd=_1fc?_1fc:{};_1fd.portalURI=ibmPortalConfig["portalURI"];_1fd.stateServiceURL=this.serviceURL.substring(0,40);var _1fe=com.ibm.portal.navigation.controller.NAVIGATION_CONTROLLER.getState();_1fd.currPage=_1fe.getPageSelection();if(_1fb){_1fd.cType=_1fb.xhr.getResponseHeader("Content-Type");_1fd.status=_1fb.xhr.status;}var _1ff=ibmPortalConfig["portalURI"]+"/DEBUG"+this.buildDebugURLContent(_1fd)+"/DEBUG";dojo.xhrGet({url:_1ff,sync:false,content:{},headers:{"X-IBM-XHR":"true"},handleAs:"xml",handle:function(_200,_201){ibm.portal.debug.text("DebugRequest:Response: "+_200);com.ibm.ajax.auth.authenticationHandler();},transport:"XMLHTTPTransport"});ibm.portal.debug.exit("SerializationManager.sendDebugRequest",[]);},buildDebugURLContent:function(_202){ibm.portal.debug.entry("SerializationManager.buildDebugURLContent",[]);var _203="";for(var key in _202){_203+=("/"+key+":"+_202[key]);}ibm.portal.debug.exit("SerializationManager.buildDebugURLContent",_203);return _203;},isDebugReqNeeded:function(_204,_205){return _204 instanceof Error||!(_205.xhr.status>=200&&_205.xhr.status<300)||com.ibm.ajax.auth.isAuthenticationRequired(_204,_205);},jsonCoders:{to:{expansions:function(obj,mgr){var acc=mgr.newExpansionsListAccessor(),val=acc.getExpansions();if(val&&val.length>0){obj[this.JSON_SERIALIZATION.names.expansions]=val;}},portlets:function(obj,mgr){var acc=mgr.newPortletListAccessor(),fn=this.jsonCoders.to.portlet;dojo.forEach(acc.getPortlets(),function(pid){fn.call(this,pid,obj,mgr);},this);},portlet:function(pid,obj,mgr){var pAcc=mgr.newPortletAccessor(pid),mode=pAcc.getPortletMode(),_206=pAcc.getWindowState(),_207=pAcc.getRenderParameters(),_208=this.JSON_SERIALIZATION.names,_209=this.JSON_SERIALIZATION.portlet,pObj=null,path=[_208.portlets,pid].join(".");if(mode&&mode!=_209.defMode){if(!pObj){pObj=dojo.setObject(path,{},obj);}pObj[_208.pMode]=mode;}if(_206&&_206!=_209.defWState){if(!pObj){pObj=dojo.setObject(path,{},obj);}pObj[_208.pWState]=_206;}var _20a=_207.getNames();if(_20a.length>0){if(!pObj){pObj=dojo.setObject(path,{},obj);}this.jsonCoders.to.params.call(this,pObj,_207);}},selection:function(obj,mgr){var acc=mgr.newSelectionAccessor(),_20b=this.JSON_SERIALIZATION.names,sel=obj[_20b.selection]={},val=acc.getPageSelection(),_20c=acc.getParameters();if(val){sel[_20b.selPg]=val;}val=acc.getFragmentSelection();if(val){sel[_20b.selFrg]=val;}val=acc.getURI();if(val){sel[_20b.selURI]=val;}var _20d=acc.getMappingSources();if(_20d.length>0){var map=sel[_20b.selMaps]={};for(var i=0;i<_20d.length;i++){map[_20d[i]]=acc.getMapping(_20d[i]);}}var _20e=_20c.getNames();if(_20e.length>0){this.jsonCoders.to.params.call(this,sel,_20c);}},sharedStateList:function(obj,mgr){var acc=mgr.newSharedStateListAccessor(),fn=this.jsonCoders.to.sharedState;dojo.forEach(acc.getScopeIDs(),function(sid){fn.call(this,sid,obj,mgr);},this);},sharedState:function(_20f,obj,mgr){var acc=mgr.newSharedStateAccessor(_20f),_210=this.JSON_SERIALIZATION.names,_211=acc.getQNames();if(_211.length>0){var pObj=dojo.setObject([_210.sharedState,_20f].join("."),{},obj);for(var i=0;i<_211.length;i++){pObj[_211[i]]=acc.getValues(_211[i]);}}},params:function(obj,_212){var _213=_212.getNames();if(_213.length>0){var _214=obj[this.JSON_SERIALIZATION.names.params]={};for(var i=0;i<_213.length;i++){_214[_213[i]]=_212.getValues(_213[i]);}}}},from:{expansions:function(obj,mgr){var val=obj[this.JSON_SERIALIZATION.names.expansions];if(val&&val.length>0){mgr.newExpansionsListAccessor().setExpansions(val);}},portlets:function(obj,mgr){var fn=this.jsonCoders.from.portlet;for(var pid in obj[this.JSON_SERIALIZATION.names.portlets]){fn.call(this,pid,obj,mgr);}},portlet:function(pid,obj,mgr){var _215=this.JSON_SERIALIZATION.names,_216=this.JSON_SERIALIZATION.portlet,pObj=dojo.getObject([_215.portlets,pid].join("."),false,obj);if(pObj){var pAcc=mgr.newPortletAccessor(pid),mode=pObj[_215.pMode],_217=pObj[_215.pWState];if(mode&&mode!=_216.defMode){pAcc.setPortletMode(mode);}if(_217&&_217!=_216.defWState){pAcc.setWindowState(_217);}var _218=pObj[_215.params];if(_218){var _219=pAcc.getRenderParameters();this.jsonCoders.from.params.call(this,pObj,_219);}}},selection:function(obj,mgr){var _21a=this.JSON_SERIALIZATION.names,sel=obj[_21a.selection],acc;if(sel){var val=sel[_21a.selPg];if(val){acc=mgr.newSelectionAccessor();acc.setPageSelection(val);}val=sel[_21a.selFrg];if(val){if(!acc){acc=mgr.newSelectionAccessor();}acc.setFragmentSelection(val);}val=sel[_21a.selURI];if(val){if(!acc){acc=mgr.newSelectionAccessor();}acc.setURI(val);}val=sel[_21a.selMaps];for(var n in val){acc.setMapping(n,val[n]);}val=sel[_21a.params];if(val){var _21b=acc.getParameters();this.jsonCoders.from.params.call(this,sel,_21b);}}},sharedStateList:function(obj,mgr){var fn=this.jsonCoders.from.sharedState;for(var sid in obj[this.JSON_SERIALIZATION.names.sharedState]){fn.call(this,sid,obj,mgr);}},sharedState:function(_21c,obj,mgr){var acc=mgr.newSharedStateAccessor(_21c),_21d=this.JSON_SERIALIZATION.names,_21e=obj[_21d.sharedState][_21c];for(var n in _21e){acc.setValues(n,_21e[n]);}},params:function(obj,_21f){var _220=obj[this.JSON_SERIALIZATION.names.params];for(var n in _220){_21f.setValues(n,_220[n]);}}}},toJSON:function(_221){var mgr=new com.ibm.portal.state.StateManager(ibmPortalConfig.contentHandlerURI),obj={},acc,val,_222=this.JSON_SERIALIZATION.names;mgr.reset(_221);acc=mgr.newLocaleAccessor(),val=acc.getLocale();if(val){obj[_222.locale]=val;}this.jsonCoders.to.portlets.call(this,obj,mgr);this.jsonCoders.to.expansions.call(this,obj,mgr);acc=mgr.newScreenTemplateAccessor();val=acc.getScreenTemplate();if(val){obj[_222.screenTemplate]=val;}this.jsonCoders.to.selection.call(this,obj,mgr);this.jsonCoders.to.sharedStateList.call(this,obj,mgr);acc=mgr.newSoloStateAccessor();val=acc.getSoloPortlet();if(val){dojo.setObject([_222.solo,_222.soloPortlet].join("."),val,obj);}val=acc.getReturnSelection();if(val){dojo.setObject([_222.solo,_222.soloReturn].join("."),val,obj);}acc=mgr.newStatePartitionAccessor();val=acc.getStatePartition();if(val){obj[_222.statePartition]=val;}acc=mgr.newThemePolicyAccessor();val=acc.getThemePolicy();if(val){obj[_222.themePolicy]=val;}acc=mgr.newThemeTemplateAccessor();val=acc.getThemeTemplate();if(val){obj[_222.themeTemplate]=val;}return obj;},fromJSON:function(obj){var mgr=new com.ibm.portal.state.StateManager(ibmPortalConfig.contentHandlerURI),acc,val,_223=this.JSON_SERIALIZATION.names;mgr.reset(com.ibm.portal.xslt.loadXmlString());val=obj[_223.locale];if(val){mgr.newLocaleAccessor().setLocale(val);}this.jsonCoders.from.portlets.call(this,obj,mgr);this.jsonCoders.from.expansions.call(this,obj,mgr);val=obj[_223.screenTemplate];if(val){mgr.newScreenTemplateAccessor().setScreenTemplate(val);}this.jsonCoders.from.selection.call(this,obj,mgr);this.jsonCoders.from.sharedStateList.call(this,obj,mgr);acc=null;val=dojo.getObject([_223.solo,_223.soloPortlet].join("."),false,obj);if(val){acc=mgr.newSoloStateAccessor();acc.setSoloPortlet(val);}val=dojo.getObject([_223.solo,_223.soloReturn].join("."),false,obj);if(val){if(!acc){acc=mgr.newSoloStateAccessor();}acc.setReturnSelection(val);}val=obj[_223.statePartition];if(val){mgr.newStatePartitionAccessor().setStatePartition(val);}val=obj[_223.themePolicy];if(val){mgr.newThemePolicyAccessor().setThemePolicy(val);}val=obj[_223.themeTemplate];if(val){mgr.newThemeTemplateAccessor().setThemeTemplate(val);}return mgr.stateDOM;},serialize:function(_224,_225,_226,_227,_228){var _229=dojox.data.dom.innerXML(_224).replace(/[\r\n]/mg,"");ibm.portal.debug.entry("SerializationManager.serialize",[_229,_225,_226,_227,_228]);var _22a=encodeURIComponent(_229);var _22b=this._getMimeType();var _22c=null;var me=this;var auth=com.ibm.ajax.auth;var _22d=typeof ibmCfg!="undefined"&&ibmCfg?(ibmCfg&&ibmCfg.themeConfig?ibmCfg.themeConfig.onauthenticated:null):null;var _22e=com.ibm.portal.services.PortalRestServiceConfig.digest;if(typeof ibmPortalConfig!="undefined"&&_22a.length<=ibmPortalConfig.stateThreshold){var _22f=this.STATE_URI_SCHEME+":"+_22a;var _230={"uri":_22f,"mode":this.DOWNLOAD_MODE,"xmlns":this.STATE_NS_URI,"sessionDependencyAllowed":"true"};_225=(_225!=null&&_225==true);if(_225===true){_230.preprocessors="true";}if(_22e){_230.digest=_22e;}if(_227===true){_230.forceAbsolute=true;}var _231=false;if(_228&&(_228.project||(_228.project===null))){_230.project=_228.project;_231=true;}if(_231){var url=this.serviceURL;var _232=url.indexOf("$project");if(_232>=0){var _233=url.indexOf("!ut/p");if(_233<0){this.serviceURL=url.substring(0,_232);}else{this.serviceURL=url.substring(0,_232)+url.substring(_233);}}}dojo.xhrGet({url:this.serviceURL,sync:true,content:_230,handleAs:_22b,handle:function(_234,_235){if(auth.isAuthenticationRequired(_234,_235)){ibm.portal.debug.text("Authentication required.");auth.authenticationHandler(_234,_235,_22d);}else{_22c=me._handleSerializationResponse.call(me,_234,_226,_224,_225);return _234;}},transport:"XMLHTTPTransport"});}else{if(dojo.isIE||window.ActiveXObject!==undefined){var idx=_229.indexOf("UTF-16");if(idx>=0){_229=_229.replace(/UTF-16/,"UTF-8");}}var url=this.serviceURL;if(url.indexOf("?")==-1){url+="?";}else{url+="&";}url+="uri="+this.STATE_URI_POST+"&xmlns="+this.STATE_NS_URI+"&sessionDependencyAllowed=true";if(_22e!=null){url+="&digest="+_22e;}if(_225===true){url+="&preprocessors=true";}if(_227===true){url+="&forceAbsolute=true";}if(_228&&_228.project){url+="&project="+encodeURIComponent(_228.project);}var _231=false;if(_228&&(_228.project===null)){url+="&project=";_231=true;}if(_231){var _232=url.indexOf("$project");if(_232>=0){var _233=url.indexOf("!ut/p");if(_233<0){url=url.substring(0,_232);}else{url=url.substring(0,_232)+url.substring(_233);}}}dojo.rawXhrPost({url:url,sync:true,postData:_229,handleAs:_22b,headers:{"Content-Type":"text/xml","X-IBM-XHR":"true"},handle:function(_236,_237){if(auth.isAuthenticationRequired(_236,_237)){ibm.portal.debug.text("Authentication required.");auth.authenticationHandler(_236,_237,_22d);}else{_22c=me._handleSerializationResponse.call(me,_236,_226,_224,_225);return _236;}},transport:"XMLHTTPTransport"});}return _22c;},deserialize:function(url,_238){ibm.portal.debug.entry("SerializationManager.deserialize",[url]);var _239=this.STATE_URI_SCHEME+":"+encodeURIComponent(url);var _23a=null;var _23b=this._getMimeType();var me=this;var _23c=com.ibm.portal.services.PortalRestServiceConfig.digest;var auth=com.ibm.ajax.auth;var _23d=typeof ibmCfg!="undefined"&&ibmCfg?(ibmCfg&&ibmCfg.themeConfig?ibmCfg.themeConfig.onauthenticated:null):null;var _23e={"uri":_239,"mode":this.DOWNLOAD_MODE,"xmlns":this.STATE_NS_URI,"preprocessors":"true"};if(_23c!=null){_23e.digest=_23c;}dojo.xhrGet({url:this.serviceURL,sync:(_238)?false:true,content:_23e,headers:{"X-IBM-XHR":"true"},handleAs:_23b,handle:function(_23f,_240){var type=(_23f instanceof Error)?"error":"load";if(type=="load"){var _241=me._getResponseXML(_23f);if(_241.documentElement.nodeName=="parsererror"){_241=com.ibm.portal.xslt.loadXmlString();}if(_238){_238(1,url,_241);}else{_23a={"status":1,"input":me.serviceURL,"url":me.serviceURL,"returnObject":_241,"state":_241};}}else{if(type=="error"){if(auth.isAuthenticationRequired(_23f,_240)){ibm.portal.debug.text("Authentication required.");auth.authenticationHandler(_23f,_240,_23d);}else{if(_238){_238(2,url,null);}else{_23a={"status":2,"input":me.serviceURL,"url":me.serviceURL,"returnObject":null,"state":null};}}}}},transport:"XMLHTTPTransport"});return _23a;},_handleSerializationResponse:function(_242,_243,_244,_245){var _246=null;var type=(_242 instanceof Error)?"error":"load";if(type=="load"){var _247=this._getResponseXML(_242);var _248="atom:entry/atom:link";var ns={"atom":"http://www.w3.org/2005/Atom","state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};var _249=null;var _24a=com.ibm.portal.xpath.evaluateXPath(_248,_247,ns);if(_24a!=null&&_24a.length>0){_249=_24a[0].getAttribute("href");}else{com.ibm.ajax.auth.authenticationHandler();_246={"status":this.STATUS_ERROR,"input":_244,"state":_244,"returnObject":null,"url":null};return _246;}var _24b=_244;if(_245==true){var _24c="atom:entry/atom:content/state:root";var _24d=com.ibm.portal.xpath.evaluateXPath(_24c,_247,ns);if(_24d!=null&&_24d.length>0){var _24e=dojox.data.dom.innerXML(_24d[0]);_24b=com.ibm.portal.xslt.loadXmlString(_24e);}}if(_243){_243(1,_24b,_249);}else{_246={"status":1,"input":_24b,"state":_24b,"returnObject":_249,"url":_249};}}else{if(type=="error"){if(_243){_243(this.STATUS_ERROR,_244,null);}else{_246={"status":this.STATUS_ERROR,"input":_244,"state":_244,"returnObject":null,"url":null};}}}return _246;},_getMimeType:function(){var _24f="xml";if(dojo.isIE||window.ActiveXObject!==undefined){_24f="text";}return _24f;},_getResponseXML:function(data){var _250=data;if(dojo.isIE||window.ActiveXObject!==undefined){_250=com.ibm.portal.xslt.loadXmlString(data);}return _250;}});dojo.declare("com.ibm.portal.navigation.controller.StateVaryManager",null,{constructor:function(){this._expr=new Array();},setExpressions:function(id,_251){var _252=this._findBucket(id);if(_252==null){_252={"id":id,"expr":null};this._expr.push(_252);}_252.expr=_251;},getExpressions:function(id){var _253=null;var _254=this._findBucket(id);if(_254!=null){_253=_254.expr;}return _253;},_findBucket:function(id){var _255=null;for(i=0;i"+""+""+"pm:cid:0"+""+""+""+""+"";dojo.rawXhrPost({url:_277,sync:true,postData:_278,contentType:"application/xml",headers:{"X-IBM-XHR":"true"},handleAs:"xml",handle:dojo.hitch(this,function(_279,_27a){var type=(_279 instanceof Error)?"error":"load";if(type=="load"){var _27b=_279;if(!_27b||(typeof (dojox.data.dom.innerXML(_279))=="undefined")){_27b=com.ibm.portal.xslt.loadXmlString(_27a.xhr.responseText);}var ns={"atom":"http://www.w3.org/2005/Atom"};var expr="/atom:feed/atom:entry/atom:id";var _27c=ibm.portal.xml.xpath.evaluateXPath(expr,_27b,ns);this.requestedPreferenceID=dojox.data.dom.textContent(_27c[0]);}else{if(_27a.xhr.status==409){var _27b=com.ibm.portal.xslt.loadXmlString(_27a.xhr.responseText);var ns={"atom":"http://www.w3.org/2005/Atom"};var expr="/atom:feed/atom:entry/atom:id";var _27c=ibm.portal.xml.xpath.evaluateXPath(expr,_27b,ns);this.requestedPreferenceID=dojox.data.dom.textContent(_27c[0]);}}}),transport:"XMLHTTPTransport"});}else{this.requestedPreferenceID="pm:oid:"+this.preferenceEditID;}}}}var _271=this;var _272=null;dojo.xhrGet({url:_276,handleAs:"xml",preventCache:true,headers:{"X-IBM-XHR":"true","If-Modified-Since":"Thu, 1 Jan 1970 00:00:00 GMT"},sync:(_26f)?false:true,handle:function(_27d,_27e){if(_271.isAuthenticationRequired(_27e.xhr,_27e.args.handleAs)){_271.doAuthentication();}else{var type=(_27d instanceof Error)?"error":"load";if(type=="load"){var _27f=_27d;if(!_27f||(typeof (dojox.data.dom.innerXML(_27d))=="undefined")){_27f=com.ibm.portal.xslt.loadXmlString(_27e.xhr.responseText);}var _280=new ibm.portal.portlet.PortletPreferences(_271.isEnablerAvailable,_271.windowID,_271.pageID,_271.requestedPreferenceID,_27f,_271.widgetModel);if(_26f){_26f(_271,ibm.portal.portlet.PortletWindow.STATUS_OK,_280);}else{_272={"portletWindow":_271,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_280};}}else{if(type=="error"){if(_26f){_26f(_271,ibm.portal.portlet.PortletWindow.STATUS_ERROR,null);}else{_272={"portletWindow":_271,"status":ibm.portal.portlet.PortletWindow.STATUS_ERROR,"returnObject":null};}}}}},transport:"XMLHTTPTransport"});}if(this.isEnablerAvailable){this.logger.logExit(_270,_272);}return _272;},setPortletPreferences:function(_281,_282){if(this.isEnablerAvailable){var _283="setPortletPreferences()";this.logger.logEntry(_283,_282);}if(!ibm.portal.portlet._SafeToExecute){if(_282){var me=this;this._queueUp(function(){me.setPortletPreferences(_281,_282);});return false;}else{return this._throwInappropriateRequestError("setPortletPreferences");}}if(this.isEnablerAvailable){this.widgetModel.commit().start();var _284=this;var _285=null;if(_282){_282(_284,ibm.portal.portlet.PortletWindow.STATUS_OK,_281);}else{_285={"portletWindow":_284,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_281};}}else{this.status=ibm.portal.portlet.PortletWindow.STATUS_UNDEFINED;var _286=document.getElementById("com.ibm.wps.web2.portlet.root."+this.windowID).innerHTML;var idx=_286.indexOf("--portletwindowid--");var _287=_286.replace(/--portletwindowid--/g,this.windowID);if(_287.indexOf("?")<0){_287+="?verb=download";}else{_287+="&verb=download";}var _288=_281.requestedPreferenceID;var expr="/atom:feed/atom:entry[atom:id='"+_288+"']";var _289=ibm.portal.xml.xpath.evaluateXPath(expr,_281.xmlData,_281.ns);var _28a;if(_289&&_289.length>0){_28a=_289[0];}else{return null;}var _28b=_28a.parentNode;expr="/atom:feed/atom:entry";_289=ibm.portal.xml.xpath.evaluateXPath(expr,_281.xmlData,_281.ns);for(var i=0;i<_289.length;i++){var node=_289[i];if(node!=_28a){_28b.removeChild(node);}}var _284=this;var _285=null;var _28c={url:_287,sync:(_282)?false:true,contentType:"application/xml",headers:{"X-IBM-XHR":"true"},handleAs:"xml",handle:function(_28d,_28e){if(_284.isAuthenticationRequired(_28e.xhr,_28e.args.handleAs)){_284.doAuthentication();}else{var type=(_28d instanceof Error)?"error":"load";if(type=="load"){if(_282){_282(_284,ibm.portal.portlet.PortletWindow.STATUS_OK,_281);}else{_285={"portletWindow":_284,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_281};}}else{if(type=="error"){if(_282){_282(_284,ibm.portal.portlet.PortletWindow.STATUS_ERROR,null);}else{_285={"portletWindow":_284,"status":ibm.portal.portlet.PortletWindow.STATUS_ERROR,"returnObject":null};}}}}},transport:"XMLHTTPTransport"};var _28f="rawXhrPut";if(ibmPortalConfig&&ibmPortalConfig.xMethodOverride){_28c.headers["X-Method-Override"]="PUT";_28f="xhrPost";_28c.postData=dojox.data.dom.innerXML(_281.xmlData);}else{_28c.putData=dojox.data.dom.innerXML(_281.xmlData);}dojo[_28f](_28c);}if(this.isEnablerAvailable){this.logger.logExit(_283,_285);}return _285;},getUserProfile:function(_290){if(this.isEnablerAvailable){var _291="getUserProfile()";this.logger.logEntry(_291,_290);}if(!ibm.portal.portlet._SafeToExecute){if(_290){var me=this;this._queueUp(function(){me.getUserProfile(_290);});return false;}else{return this._throwInappropriateRequestError("getUserProfile");}}if(this.isEnablerAvailable){var _292=this;var _293=null;var _294=new ibm.portal.portlet.UserProfile(_292.isEnablerAvailable,_292.windowID,null,_292.userModel);if(_290){_290(_292,ibm.portal.portlet.PortletWindow.STATUS_OK,_294);}else{_293={"portletWindow":_292,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_294};}}else{this.status=ibm.portal.portlet.PortletWindow.STATUS_UNDEFINED;var _295=document.getElementById("com.ibm.wps.web2.portlet.user."+this.windowID).innerHTML;var _292=this;var _293=null;dojo.xhrGet({url:_295,headers:{"X-IBM-XHR":"true","If-Modified-Since":"Thu, 1 Jan 1970 00:00:00 GMT"},sync:(_290)?false:true,handleAs:"xml",handle:function(_296,_297){if(_292.isAuthenticationRequired(_297.xhr,_297.args.handleAs)){_292.doAuthentication();}else{var type=(_296 instanceof Error)?"error":"load";if(type=="load"){var _298=_296;if(!_298||(typeof (dojox.data.dom.innerXML(_296))=="undefined")){_298=com.ibm.portal.xslt.loadXmlString(_297.xhr.responseText);}var _299=new ibm.portal.portlet.UserProfile(_292.isEnablerAvailable,_292.windowID,_298,_292.userModel);if(_290){_290(_292,ibm.portal.portlet.PortletWindow.STATUS_OK,_299);}else{_293={"portletWindow":_292,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_299};}}else{if(type=="error"){if(_290){_290(_292,ibm.portal.portlet.PortletWindow.STATUS_ERROR,null);}else{_293={"portletWindow":_292,"status":ibm.portal.portlet.PortletWindow.STATUS_ERROR,"returnObject":null};}}}}},transport:"XMLHTTPTransport"});}if(this.isEnablerAvailable){this.logger.logExit(_291,_293);}return _293;},setUserProfile:function(_29a,_29b){if(this.isEnablerAvailable){var _29c="setUserProfile()";this.logger.logEntry(_29c,_29b);}if(!ibm.portal.portlet._SafeToExecute){if(_29b){var me=this;this._queueUp(function(){me.setUserProfile(_29a,_29b);});return false;}else{return this._throwInappropriateRequestError("setUserProfile");}}if(this.isEnablerAvailable){this.userModel.commit().start();var _29d=this;var _29e=null;if(_29b){_29b(_29d,ibm.portal.portlet.PortletWindow.STATUS_OK,_29d.userProfile);}else{_29e={"portletWindow":_29d,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_29a};}}else{this.status=ibm.portal.portlet.PortletWindow.STATUS_UNDEFINED;var _29f=document.getElementById("com.ibm.wps.web2.portlet.user."+this.windowID).innerHTML;var _29d=this;var _29e=null;dojo.rawXhrPost({url:_29f,sync:(_29b)?false:true,postData:dojox.data.dom.innerXML(_29a.xmlData),contentType:"application/xml",headers:{"X-IBM-XHR":"true"},handleAs:"xml",handle:function(_2a0,_2a1){if(_29d.isAuthenticationRequired(_2a1.xhr,_2a1.args.handleAs)){_29d.doAuthentication();}else{var type=(_2a0 instanceof Error)?"error":"load";if(type=="load"){if(_29b){_29b(_29d,ibm.portal.portlet.PortletWindow.STATUS_OK,_29a);}else{_29e={"portletWindow":_29d,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_29a};}}else{if(type=="error"){if(_29b){_29b(_29d,ibm.portal.portlet.PortletWindow.STATUS_ERROR,null);}else{_29e={"portletWindow":_29d,"status":ibm.portal.portlet.PortletWindow.STATUS_ERROR,"returnObject":null};}}}}},transport:"XMLHTTPTransport"});}if(this.isEnablerAvailable){this.logger.logExit(_29c,_29e);}return _29e;},newXMLPortletRequest:function(){return new ibm.portal.portlet.XMLPortletRequest(this);},isAuthenticationRequired:function(_2a2,_2a3){if(_2a2.readyState!=4){throw new Error("isAuthenticationRequired should only be called with a COMPLETED XMLHttpRequest! The readyState on the given XMLHttpRequest is not 4 (COMPLETE)!");}var _2a4={dojoType:"valid"};var _2a5={xhr:_2a2,args:{handleAs:_2a3}};return com.ibm.ajax.auth.isAuthenticationRequired(_2a4,_2a5);},setAuthenticationHandler:function(_2a6){this._authenticationFn=_2a6;},doAuthentication:function(){if(this._authenticationFn){this._authenticationFn();}else{com.ibm.ajax.auth.authenticationHandler();}}});if(typeof (ibmPortalConfig)=="undefined"||!ibmPortalConfig.isCSAListening){ibm.portal.portlet._SafeToExecuteDfd=new dojo.Deferred();ibm.portal.portlet._SafeToExecuteDfd.addCallback(function(){ibm.portal.portlet._SafeToExecute=true;});var f=new Function("ibm.portal.portlet._SafeToExecuteDfd.callback();");if(window.addEventListener){window.addEventListener("load",f,false);}else{if(window.attachEvent){window.attachEvent("onload",f);}}}dojo.declare("ibm.portal.portlet.PortletPreferences",null,{constructor:function(_2a7,_2a8,_2a9,_2aa,data,_2ab){this.windowID=_2a8;this.pageID=_2a9;this.requestedPreferenceID=_2aa;this.xmlData=data;this.xsltURL=dojo.moduleUrl("ibm","portal/portlet/");this.ns={"xsl":"http://www.w3.org/1999/XSL/Transform","thr":"http://purl.org/syndication/thread/1.0","atom":"http://www.w3.org/2005/Atom","xhtml":"http://www.w3.org/1999/xhtml","model":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model-elements","base":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/ibm-portal-composite-base","portal":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model","xsi":"http://www.w3.org/2001/XMLSchema-instance"};this.isEnablerAvailable=_2a7;if(this.isEnablerAvailable){var _2ac="ibm.portal.portlet.PortletPreferences";this.logger=new ibm.portal.portlet.Logger(_2ac);var _2ad="constructor()";this.logger.logEntry(_2ad);this.logger.log(_2ad,"windowid: ${0}",_2a8);this.logger.log(_2ad,"pageid: ${0}",_2a9);this.logger.log(_2ad,"requestedpreferenceid: ${0}",_2aa);this.logger.log(_2ad,"data: ${0}",data);this.logger.log(_2ad,"widgetModel: ${0}",_2ab);this.widgetModel=_2ab;this.logger.logExit(_2ad);}else{this.widgetModel=null;this.internal_reset();}},getMap:function(){if(this.isEnablerAvailable){var _2ae="getMap()";this.logger.logEntry(_2ae);var _2af=this.getNames();var _2b0=new Array();for(var n=0;n<_2af.length;n++){var _2b1=this.getValues(_2af[n]);var _2b2=this.isReadOnly(_2af[n]);_2b0[n]={name:_2af[n],values:_2b1,readOnly:_2b2};}this.logger.logExit(_2ae,_2b0);return _2b0;}else{if(this.result_getMap){return this.result_getMap;}var _2b3=ibm.portal.xml.xslt.loadXsl(this.xsltURL+"PortletPreferencesMap.xsl");if(_2b3.documentElement==null){alert("xslDoc is null");}var _2b4=ibm.portal.xml.xslt.transform(this.xmlData,_2b3,null,{"selectionid":this.requestedPreferenceID},true);if(_2b4==null){this.result_getNames=null;return null;}var _2b5=eval(_2b4);if(_2b5){_2b5=_2b5.preferences;}this.result_getMap=_2b5;return this.result_getMap;}},getNames:function(){if(this.isEnablerAvailable){var _2b6="getNames()";this.logger.logEntry(_2b6);var _2b7=this.getModifiablePreferences(this.widgetModel,this.pageID,this.windowID);var _2b8=_2b7.getNames();this.logger.logExit(_2b6,_2b8);return _2b8;}else{if(this.result_getNames){return this.result_getNames;}var _2b9=ibm.portal.xml.xslt.loadXsl(this.xsltURL+"PortletPreferencesNames.xsl");if(_2b9.documentElement==null){alert("xslDoc is null");}var _2ba=ibm.portal.xml.xslt.transform(this.xmlData,_2b9,null,{"selectionid":this.requestedPreferenceID},true);if(_2ba==null){this.result_getNames=null;return null;}var _2bb=eval(_2ba);if(_2bb){_2bb=_2bb.names;}this.result_getNames=_2bb;return this.result_getNames;}},getValue:function(key,def){if(this.isEnablerAvailable){var _2bc="getValue()";this.logger.logEntry(_2bc);this.logger.log(_2bc,"key: ${0}",key);var _2bd=this.getModifiablePreferences(this.widgetModel,this.pageID,this.windowID);var _2be=_2bd.getValue(key);this.logger.logExit(_2bc,_2be);return _2be;}else{var expr="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*/model:portletpreferences[@name='"+key+"']/base:value";var _2bf=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _2be;if(_2bf&&_2bf.length>0){_2be=_2bf[0].getAttribute("value");}else{_2be=def;}return _2be;}},getValues:function(key,def){if(this.isEnablerAvailable){var _2c0="getValues()";this.logger.logEntry(_2c0);this.logger.log(_2c0,"key: ${0}",key);var _2c1=this.getModifiablePreferences(this.widgetModel,this.pageID,this.windowID);var _2c2=_2c1.getValues(key);this.logger.logExit(_2c0,_2c2);return _2c2;}else{var expr="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*/model:portletpreferences[@name='"+key+"']/base:value";var _2c3=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _2c2;if(_2c3&&_2c3.length>0){_2c2=new Array();for(var i=0;i<_2c3.length;i++){_2c2[i]=_2c3[i].getAttribute("value");}}else{_2c2=def;}return _2c2;}},isReadOnly:function(key){if(this.isEnablerAvailable){var _2c4="isReadOnly()";this.logger.logEntry(_2c4);this.logger.log(_2c4,"key: ${0}",key);var _2c5=this.getModifiablePreferences(this.widgetModel,this.pageID,this.windowID);var _2c6=_2c5.isReadOnly(key);this.logger.logExit(_2c4,_2c6);return _2c6;}else{var id=this.requestedPreferenceID;var expr="/atom:feed/atom:entry[atom:id='"+id+"']/atom:content/*/model:portletpreferences[@name='"+key+"']";var _2c7=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _2c6=false;if(_2c7&&_2c7.length>0){var temp=_2c7[0].getAttribute("read-only");if(temp!=null){if(temp=="true"){_2c6=true;}}}return _2c6;}},reset:function(key){if(this.isEnablerAvailable){var _2c8="reset()";this.logger.logEntry(_2c8);this.logger.log(_2c8,"key: ${0}",key);var _2c9=this.getModifiablePreferences(this.widgetModel,this.pageID,this.windowID);_2c9.remove(key);this.logger.logExit(_2c8);}else{this.internal_reset();var expr="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*/model:portletpreferences[@name='"+key+"']";var _2ca=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);if(_2ca&&_2ca.length>0){var _2cb=_2ca[0];_2cb.parentNode.removeChild(_2cb);}}},setValue:function(key,_2cc){if(this.isEnablerAvailable){var _2cd="setValue()";this.logger.logEntry(_2cd);this.logger.log(_2cd,"key: ${0}",key);this.logger.log(_2cd,"value: ${0}",_2cc);var _2ce=this.getModifiablePreferences(this.widgetModel,this.pageID,this.windowID);_2ce.setValue(key,_2cc);this.logger.logExit(_2cd);}else{var _2cf=new Array();_2cf[0]=_2cc;this.setValues(key,_2cf);}},setValues:function(key,_2d0){if(this.isEnablerAvailable){var _2d1="setValues()";this.logger.logEntry(_2d1);this.logger.log(_2d1,"key: ${0}",key);this.logger.log(_2d1,"values: ${0}",_2d0);var _2d2=this.getModifiablePreferences(this.widgetModel,this.pageID,this.windowID);_2d2.setValues(key,_2d0);this.logger.logExit(_2d1);}else{this.internal_reset();var expr="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*/model:portletpreferences[@name='"+key+"']";var _2d3=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _2d4=null;if(_2d3&&_2d3.length>0){_2d4=_2d3[0];for(var i=_2d4.childNodes.length-1;i>=0;i--){_2d4.removeChild(_2d4.childNodes[i]);}}else{var _2d5="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*";var _2d6=ibm.portal.xml.xpath.evaluateXPath(_2d5,this.xmlData,this.ns);if(dojo.isIE||window.ActiveXObject!==undefined){_2d4=this.xmlData.createNode(1,"model:portletpreferences",this.ns.model);}else{_2d4=this.xmlData.createElementNS(this.ns.model,"model:portletpreferences");}_2d4.setAttribute("name",key);_2d4.setAttribute("read-only","false");_2d6[0].appendChild(_2d4);}for(var i=0;i<_2d0.length;i++){var _2d7;if(dojo.isIE||window.ActiveXObject!==undefined){_2d7=this.xmlData.createNode(1,"base:value",this.ns.base);var _2d8=this.xmlData.createNode(2,"xsi:type",this.ns.xsi);_2d8.nodeValue="String";_2d7.setAttributeNode(_2d8);}else{_2d7=this.xmlData.createElementNS(this.ns.base,"base:value");_2d7.setAttributeNS(this.ns.xsi,"xsi:type","String");}_2d7.setAttribute("value",_2d0[i]);_2d4.appendChild(_2d7);}}},internal_reset:function(){this.result_getMap=null;this.result_getNames=null;},clone:function(){var _2d9=dojox.data.dom.innerXML(this.xmlData);var _2da=com.ibm.portal.xslt.loadXmlString(_2d9);return new ibm.portal.portlet.PortletPreferences(this.isEnablerAvailable,this.windowID,this.pageID,this.requestedPreferenceID,_2da,this.widgetModel);},getModifiablePreferences:function(_2db,_2dc,_2dd){var _2de="getModifiablePreferences()";this.logger.logEntry(_2de);this.logger.logLevel(com.ibm.mashups.enabler.logging.LogLevel.INFO,_2de,"widgetModel: ${0}",_2db);this.logger.logLevel(com.ibm.mashups.enabler.logging.LogLevel.INFO,_2de,"windowID: ${0}",_2dd);var _2df=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();this.logger.logLevel(com.ibm.mashups.enabler.logging.LogLevel.INFO,_2de,"navigationModel: ${0}",_2df);var _2e0=_2df.find(_2dc).start();this.logger.logLevel(com.ibm.mashups.enabler.logging.LogLevel.INFO,_2de,"selectedNode: ${0}",_2e0);var _2e1=_2df.getLayoutModel(_2e0);this.logger.logLevel(com.ibm.mashups.enabler.logging.LogLevel.INFO,_2de,"layoutModel: ${0}",_2e1);var _2e2=_2e1.find(_2dd).start();this.logger.logLevel(com.ibm.mashups.enabler.logging.LogLevel.INFO,_2de,"layoutControl: ${0}",_2e2);var _2e3=_2db.getWidgetWindow(_2e2).start();this.logger.logLevel(com.ibm.mashups.enabler.logging.LogLevel.INFO,_2de,"widgetInstance: ${0}",_2e3);var _2e4=_2db.getHierarchicalPreferences(_2e3).start();this.logger.logExit(_2de,_2e4);return _2e4;}});dojo.declare("ibm.portal.portlet.PortletMode",null,{VIEW:"view",EDIT:"edit",EDIT_DEFAULTS:"edit_defaults",HELP:"help",CONFIG:"config"});dojo.declare("ibm.portal.portlet.WindowState",null,{NORMAL:"normal",MINIMIZED:"minimized",MAXIMIZED:"maximized"});dojo.declare("ibm.portal.portlet.PortletState",null,{constructor:function(_2e5,_2e6,_2e7,_2e8){this.windowID=_2e6;this.isEnablerAvailable=_2e5;if(this.isEnablerAvailable){var _2e9="ibm.portal.portlet.PortletState";this.logger=new ibm.portal.portlet.Logger(_2e9);var _2ea="constructor()";this.logger.logEntry(_2ea);this.logger.log(_2ea,"windowid: ${0}",_2e6);this.logger.log(_2ea,"portletWindowId: ${0}",_2e7);this.logger.log(_2ea,"navigationStateModel: ${0}",_2e8);this.navigationStateModel=_2e8;this.widgetAccessor=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(this.navigationStateModel,this.windowID);this.logger.logExit(_2ea);}else{var _2eb=new com.ibm.portal.state.StateManager(ibmPortalConfig["contentHandlerURI"]);if(dojo.isString(_2e6)){var _2ec=this._getExistingState(_2e6,_2eb.getSerializationManager());_2eb.reset(_2ec);}else{_2eb.reset(_2e6);_2e6=_2e7;}this.portletAccessor=_2eb.newPortletAccessor(_2e6);this.renderParameters=this.portletAccessor.getRenderParameters();}},_isCSA:function(){var _2ed=false;try{_2ed=(typeof (document.isCSA)!="undefined");}catch(e){}return _2ed;},_getExistingState:function(_2ee,_2ef){var _2f0=null;if(this._isCSA()){_2f0=com.ibm.portal.navigation.controller.NAVIGATION_CONTROLLER.getState().stateDOM;}else{if(_2ef!=null){var _2f1=_2ef.deserialize(location.href);_2f0=_2f1.returnObject;}else{_2f0=com.ibm.portal.xslt.loadXmlString();}}return _2f0;},getPortletMode:function(){if(this.isEnablerAvailable){var _2f2="getPortletMode()";this.logger.logEntry(_2f2);var _2f3=this.widgetAccessor.getWidgetMode();var _2f4=null;switch(_2f3){case "view":_2f4=new ibm.portal.portlet.PortletMode().VIEW;break;case "personalize":_2f4=new ibm.portal.portlet.PortletMode().EDIT;break;case "edit":_2f4=new ibm.portal.portlet.PortletMode().EDIT_DEFAULTS;break;case "config":_2f4=new ibm.portal.portlet.PortletMode().CONFIG;break;case "help":_2f4=new ibm.portal.portlet.PortletMode().HELP;break;}this.logger.logExit(_2f2,_2f4);return _2f4;}else{return this.portletAccessor.getPortletMode();}},setPortletMode:function(_2f5){if(this.isEnablerAvailable){var _2f6="setPortletMode()";this.logger.logEntry(_2f6);this.logger.log(_2f6,"portletMode: ${0}",_2f5);var _2f7=null;switch(_2f5){case new ibm.portal.portlet.PortletMode().VIEW:_2f7="view";break;case new ibm.portal.portlet.PortletMode().EDIT:_2f7="personalize";break;case new ibm.portal.portlet.PortletMode().EDIT_DEFAULTS:_2f7="edit";break;case new ibm.portal.portlet.PortletMode().CONFIG:_2f7="config";break;case new ibm.portal.portlet.PortletMode().HELP:_2f7="help";break;}this.widgetAccessor.setWidgetMode(_2f7);this.logger.logExit(_2f6,_2f5);return _2f5;}else{this.portletAccessor.setPortletMode(_2f5);return _2f5;}},getWindowState:function(){if(this.isEnablerAvailable){var _2f8="getWindowState()";this.logger.logEntry(_2f8);var _2f9=this.widgetAccessor.getWindowState();var _2fa=null;switch(_2f9){case "normal":_2fa=new ibm.portal.portlet.WindowState().NORMAL;break;case "minimize":_2fa=new ibm.portal.portlet.WindowState().MINIMIZED;break;case "maximize":_2fa=new ibm.portal.portlet.WindowState().MAXIMIZED;break;}this.logger.logExit(_2f8,_2fa);return _2fa;}else{return this.portletAccessor.getWindowState();}},setWindowState:function(_2fb){if(this.isEnablerAvailable){var _2fc="setWindowState()";this.logger.logEntry(_2fc);this.logger.log(_2fc,"windowState: ${0}",_2fb);var _2fd=null;switch(_2fb){case new ibm.portal.portlet.WindowState().NORMAL:_2fd="normal";break;case new ibm.portal.portlet.WindowState().MINIMIZED:_2fd="minimize";break;case new ibm.portal.portlet.WindowState().MAXIMIZED:_2fd="maximize";break;}this.widgetAccessor.setWindowState(_2fd);this.logger.logExit(_2fc,_2fb);return _2fb;}else{this.portletAccessor.setWindowState(_2fb);return _2fb;}},getParameterNames:function(){if(this.isEnablerAvailable){var _2fe="getParameterNames()";this.logger.logEntry(_2fe);var _2ff=this.widgetAccessor.getWidgetStateNames();this.logger.logExit(_2fe,_2ff);return _2ff;}else{return this.renderParameters.getNames();}},getParameterValue:function(name){if(this.isEnablerAvailable){var _300="getParameterValue()";this.logger.logEntry(_300);this.logger.log(_300,"name: ${0}",name);var _301=this.widgetAccessor.getWidgetState(name);this.logger.logExit(_300,_301);return _301;}else{return this.renderParameters.getValue(name);}},getParameterValues:function(name){if(this.isEnablerAvailable){var _302="getParameterValues()";this.logger.logEntry(_302);this.logger.log(_302,"name: ${0}",name);var _303=this.widgetAccessor.getWidgetStateValues(name);this.logger.logExit(_302,_303);return _303;}else{return this.renderParameters.getValues(name);}},getParameterMap:function(){if(this.isEnablerAvailable){var _304="getParameterMap()";this.logger.logEntry(_304);var _305=this.getParameterNames();var _306=new Array();for(var n=0;n<_305.length;n++){var _307=this.getParameterValues(_305[n]);_306[n]={name:_305[n],values:_307};}this.logger.logExit(_304,_306);return _306;}else{return this.renderParameters.getMap();}},setParameterValue:function(name,_308){if(this.isEnablerAvailable){var _309="setParameterValue()";this.logger.logEntry(_309);this.logger.log(_309,"name: ${0}",name);this.logger.log(_309,"value: ${0}",_308);this.widgetAccessor.setWidgetState(name,_308);this.logger.logExit(_309,_308);return _308;}else{this.renderParameters.setValue(name,_308);return _308;}},setParameterValues:function(name,_30a){if(this.isEnablerAvailable){var _30b="setParameterValues()";this.logger.logEntry(_30b);this.logger.log(_30b,"name: ${0}",name);this.logger.log(_30b,"values: ${0}",_30a);this.widgetAccessor.setWidgetState(name,_30a);this.logger.logExit(_30b,_30a);return _30a;}else{this.renderParameters.setValues(name,_30a);return _30a;}},setParameterMap:function(map,_30c){if(this.isEnablerAvailable){var _30d="setParameterMap()";this.logger.logEntry(_30d);this.logger.log(_30d,"map: ${0}",map);this.logger.log(_30d,"replace: ${0}",_30c);for(var n=0;n0){window.location.href=this._newPageURL(_31f);}}ibm.portal.debug.exit(_320);},_isCSA:function(){var _321=this.declaredClass+"._isCSA";ibm.portal.debug.entry(_321);var _322=false;try{_322=(typeof (document.isCSA)!="undefined");}catch(e){}ibm.portal.debug.exit(_321,_322);return _322;},_flag:function(_323){var _324=this.declaredClass+"._flag";ibm.portal.debug.entry(_324,[_323]);var id="lm:oid:"+this.windowID+"@oid:"+this.pageID;var _325=new com.ibm.portal.services.PortletFragmentService();var url=_325._flagPortletUrl(_323,id);ibm.portal.debug.exit(_324,url);return url;},_newPageURL:function(_326){var _327=this.declaredClass+"._newPageURL";ibm.portal.debug.entry(_327,[_326]);ibm.portal.debug.text(dojox.data.dom.innerXML(_326));var _328=new com.ibm.portal.state.StateManager(ibmPortalConfig["contentHandlerURI"]);var _329=_326;if(!_326){_329=com.ibm.portal.xslt.loadXmlString();}_328.reset(_329);var _32a=_328.getSerializationManager();var _32b=_32a.serialize(_329);var _32c=_32b["returnObject"];var url=_32c;ibm.portal.debug.exit(_327,url);return url;},open:function(_32d,uri){var _32e=this.declaredClass+".open";ibm.portal.debug.entry(_32e,[_32d,uri]);this.open(_32d,uri,false);ibm.portal.debug.exit(_32e);},open:function(_32f,uri,_330){var _331=this.declaredClass+".open";ibm.portal.debug.entry(_331,[_32f,uri,_330]);var xhr=this._getXHR();var me=this;this._location=uri;if(_330==undefined){_330=false;}this._async=_330;xhr.onreadystatechange=function(){me._onreadystatechangehandler();};xhr.open(_32f,this._flag(uri),_330);xhr.setRequestHeader("X-IBM-XHR","true");ibm.portal.debug.exit(_331);},setRequestHeader:function(_332,_333){var _334=this.declaredClass+".setRequestHeader";ibm.portal.debug.entry(_334,[_332,_333]);this._getXHR().setRequestHeader(_332,_333);ibm.portal.debug.exit(_334);},send:function(data){var _335=this.declaredClass+".send";ibm.portal.debug.entry(_335,[data]);this._getXHR().send(data);if(!this._async){this._onreadystatechangehandler();}ibm.portal.debug.exit(_335);},abort:function(){var _336=this.declaredClass+".abort";ibm.portal.debug.entry(_336);this._getXHR().abort();ibm.portal.debug.exit(_336);},getAllResponseHeaders:function(){return this._getXHR().getAllResponseHeaders();},getResponseHeader:function(_337){return this._getXHR().getResponseHeader(_337);}});dojo.declare("ibm.portal.portlet.UserProfile",null,{constructor:function(_338,_339,data,_33a){this.windowID=_339;this.xmlData=data;this.ns={"xsl":"http://www.w3.org/1999/XSL/Transform","atom":"http://www.w3.org/2005/Atom","xhtml":"http://www.w3.org/1999/xhtml","xsi":"http://www.w3.org/2001/XMLSchema-instance","um":"http://www.ibm.com/xmlns/prod/websphere/um.xsd"};this.isEnablerAvailable=_338;if(this.isEnablerAvailable){var _33b="ibm.portal.portlet.UserProfile";this.logger=new ibm.portal.portlet.Logger(_33b);var _33c="constructor()";this.logger.logEntry(_33c);this.logger.log(_33c,"windowid: ${0}",_339);this.logger.log(_33c,"data: ${0}",data);this.logger.log(_33c,"userModel: ${0}",_33a);this.userModel=_33a;this.logger.logExit(_33c);}else{this.userModel=null;}},getAttribute:function(name){if(this.isEnablerAvailable){var _33d="getAttribute()";this.logger.logEntry(_33d);this.logger.log(_33d,"name: ${0}",name);var user=this.userModel.findCurrentUser().start();var _33e=user.getAttribute(name);this.logger.logExit(_33d,_33e);return _33e;}else{var expr="/atom:entry/atom:content/um:profile[@type='user']/um:attribute[@name='"+name+"']/um:attributeValue";var _33f=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _33e=null;if(_33f&&_33f.length>0){if(_33f[0].textContent){_33e=_33f[0].textContent;}else{_33e=_33f[0].text;}}return _33e;}},setAttribute:function(name,_340){if(this.isEnablerAvailable){var _341="setAttribute()";this.logger.logEntry(_341);this.logger.log(_341,"name: ${0}",name);this.logger.log(_341,"value: ${0}",_340);var user=this.userModel.findCurrentUser().start();var _342=user.setAttribute(name,_340);this.logger.logExit(_341,_342);return _342;}else{var expr="/atom:entry/atom:content/um:profile[@type='user']/um:attribute[@name='"+name+"']/um:attributeValue";var _343=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _342=null;if(_343&&_343.length>0){if(_343[0].textContent){_342=_343[0].textContent;_343[0].textContent=_340;}else{_342=_343[0].text;_343[0].text=_340;}}else{var _344="/atom:entry/atom:content/um:profile[@type='user']/um:attribute[@name='"+name+"']";var _345=ibm.portal.xml.xpath.evaluateXPath(_344,this.xmlData,this.ns);var _346=null;if(_345&&_345.length>0){_346=_345[0];}else{var _347="/atom:entry/atom:content/um:profile[@type='user']";var _348=ibm.portal.xml.xpath.evaluateXPath(_347,this.xmlData,this.ns);if(dojo.isIE||window.ActiveXObject!==undefined){_346=this.xmlData.createNode(1,"um:attribute",this.ns.um);}else{_346=this.xmlData.createElementNS(this.ns.um,"um:attribute");}_346.setAttribute("type","xs:string");_346.setAttribute("multiValued","false");_346.setAttribute("name",name);_348[0].appendChild(_346);}var _349;if(dojo.isIE||window.ActiveXObject!==undefined){_349=this.xmlData.createNode(1,"um:attributeValue",this.ns.um);_349.text=_340;}else{_349=this.xmlData.createElementNS(this.ns.um,"um:attributeValue");_349.textContent=_340;}_346.appendChild(_349);}return _342;}},clone:function(){var _34a=dojox.data.dom.innerXML(this.xmlData);var _34b=com.ibm.portal.xslt.loadXmlString(_34a);return new ibm.portal.portlet.UserProfile(this.isEnablerAvailable,this.windowID,_34b,this.userModel);}});dojo.declare("ibm.portal.portlet.Error",null,{INFO:0,WARN:1,ERROR:2,constructor:function(_34c,_34d,_34e){this.errorCode=_34c;this.message=_34d;this.description=_34e;},getErrorCode:function(){return this.errorCode;},getMessage:function(){return this.message;},getDescription:function(){return this.description;}});dojo.declare("ibm.portal.portlet.Logger",null,{constructor:function(_34f){this.className=_34f;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(_34f);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;},logEntry:function(name,args){var _350=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_350){this.LOGGER.entering(name,args);}},log:function(name,msg,args){var _351=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_351){this.LOGGER.log(this.LOG_LEVEL,name,msg,args);}},logLevel:function(_352,name,msg,args){var _353=this.LOGGER.isLoggable(_352);if(_353){this.LOGGER.log(_352,name,msg,args);}},logExit:function(name,_354){var _355=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_355){this.LOGGER.exiting(name,_354);}}});var com_ibm_portal_portlet_portletwindow=new ibm.portal.portlet.PortletWindow();ibm.portal.portlet.PortletWindow.STATUS_UNDEFINED=com_ibm_portal_portlet_portletwindow.STATUS_UNDEFINED;ibm.portal.portlet.PortletWindow.STATUS_OK=com_ibm_portal_portlet_portletwindow.STATUS_OK;ibm.portal.portlet.PortletWindow.STATUS_ERROR=com_ibm_portal_portlet_portletwindow.STATUS_ERROR;com_ibm_portal_portlet_portletwindow=null;var com_ibm_portal_portlet_portletmode=new ibm.portal.portlet.PortletMode();ibm.portal.portlet.PortletMode.VIEW=com_ibm_portal_portlet_portletmode.VIEW;ibm.portal.portlet.PortletMode.EDIT=com_ibm_portal_portlet_portletmode.EDIT;ibm.portal.portlet.PortletMode.EDIT_DEFAULTS=com_ibm_portal_portlet_portletmode.EDIT_DEFAULTS;ibm.portal.portlet.PortletMode.HELP=com_ibm_portal_portlet_portletmode.HELP;ibm.portal.portlet.PortletMode.CONFIG=com_ibm_portal_portlet_portletmode.CONFIG;com_ibm_portal_portlet_portletmode=null;var com_ibm_portal_portlet_windowstate=new ibm.portal.portlet.WindowState();ibm.portal.portlet.WindowState.NORMAL=com_ibm_portal_portlet_windowstate.NORMAL;ibm.portal.portlet.WindowState.MINIMIZED=com_ibm_portal_portlet_windowstate.MINIMIZED;ibm.portal.portlet.WindowState.MAXIMIZED=com_ibm_portal_portlet_windowstate.MAXIMIZED;com_ibm_portal_portlet_windowstate=null;var com_ibm_portal_portlet_error=new ibm.portal.portlet.Error();ibm.portal.portlet.Error.INFO=com_ibm_portal_portlet_error.INFO;ibm.portal.portlet.Error.WARN=com_ibm_portal_portlet_error.WARN;ibm.portal.portlet.Error.ERROR=com_ibm_portal_portlet_error.ERROR;com_ibm_portal_portlet_error=null;}if(!dojo._hasResource["com.ibm.wcm.layer.base"]){dojo._hasResource["com.ibm.wcm.layer.base"]=true;dojo.provide("com.ibm.wcm.layer.base");} var OpenAjax=OpenAjax||{}; if(!OpenAjax.hub){ OpenAjax.hub=function(){ var _1={}; var _2="org.openajax.hub."; return {implementer:"http://openajax.org",implVersion:"2.0.7",specVersion:"2.0",implExtraData:{},libraries:_1,registerLibrary:function(_3,_4,_5,_6){ _1[_3]={prefix:_3,namespaceURI:_4,version:_5,extraData:_6}; this.publish(_2+"registerLibrary",_1[_3]); },unregisterLibrary:function(_7){ this.publish(_2+"unregisterLibrary",_1[_7]); delete _1[_7]; }}; }(); OpenAjax.hub.Error={BadParameters:"OpenAjax.hub.Error.BadParameters",Disconnected:"OpenAjax.hub.Error.Disconnected",Duplicate:"OpenAjax.hub.Error.Duplicate",NoContainer:"OpenAjax.hub.Error.NoContainer",NoSubscription:"OpenAjax.hub.Error.NoSubscription",NotAllowed:"OpenAjax.hub.Error.NotAllowed",WrongProtocol:"OpenAjax.hub.Error.WrongProtocol",IncompatBrowser:"OpenAjax.hub.Error.IncompatBrowser"}; OpenAjax.hub.SecurityAlert={LoadTimeout:"OpenAjax.hub.SecurityAlert.LoadTimeout",FramePhish:"OpenAjax.hub.SecurityAlert.FramePhish",ForgedMsg:"OpenAjax.hub.SecurityAlert.ForgedMsg"}; OpenAjax.hub._debugger=function(){ }; OpenAjax.hub.ManagedHub=function(_8){ if(!_8||!_8.onPublish||!_8.onSubscribe){ throw new Error(OpenAjax.hub.Error.BadParameters); } this._p=_8; this._onUnsubscribe=_8.onUnsubscribe?_8.onUnsubscribe:null; this._scope=_8.scope||window; if(_8.log){ var _9=this; this._log=function(_a){ try{ _8.log.call(_9._scope,"ManagedHub: "+_a); } catch(e){ OpenAjax.hub._debugger(); } }; }else{ this._log=function(){ }; } this._subscriptions={c:{},s:null}; this._containers={}; this._seq=0; this._active=true; this._isPublishing=false; this._pubQ=[]; }; OpenAjax.hub.ManagedHub.prototype.subscribeForClient=function(_b,_c,_d){ this._assertConn(); if(this._invokeOnSubscribe(_c,_b)){ return this._subscribe(_c,this._sendToClient,this,{c:_b,sid:_d}); } throw new Error(OpenAjax.hub.Error.NotAllowed); }; OpenAjax.hub.ManagedHub.prototype.unsubscribeForClient=function(_e,_f){ this._unsubscribe(_f); this._invokeOnUnsubscribe(_e,_f); }; OpenAjax.hub.ManagedHub.prototype.publishForClient=function(_10,_11,_12){ this._assertConn(); this._publish(_11,_12,_10); }; OpenAjax.hub.ManagedHub.prototype.disconnect=function(){ this._active=false; for(var c in this._containers){ this.removeContainer(this._containers[c]); } }; OpenAjax.hub.ManagedHub.prototype.getContainer=function(_13){ var _14=this._containers[_13]; return _14?_14:null; }; OpenAjax.hub.ManagedHub.prototype.listContainers=function(){ var res=[]; for(var c in this._containers){ res.push(this._containers[c]); } return res; }; OpenAjax.hub.ManagedHub.prototype.addContainer=function(_15){ this._assertConn(); var _16=_15.getClientID(); if(this._containers[_16]){ throw new Error(OpenAjax.hub.Error.Duplicate); } this._containers[_16]=_15; }; OpenAjax.hub.ManagedHub.prototype.removeContainer=function(_17){ var _18=_17.getClientID(); if(!this._containers[_18]){ throw new Error(OpenAjax.hub.Error.NoContainer); } _17.remove(); delete this._containers[_18]; }; OpenAjax.hub.ManagedHub.prototype.subscribe=function(_19,_1a,_1b,_1c,_1d){ this._assertConn(); this._assertSubTopic(_19); if(!_1a){ throw new Error(OpenAjax.hub.Error.BadParameters); } _1b=_1b||window; if(!this._invokeOnSubscribe(_19,null)){ this._invokeOnComplete(_1c,_1b,null,false,OpenAjax.hub.Error.NotAllowed); return; } var _1e=this; function _1f(_20,_21,sd,_22){ if(_1e._invokeOnPublish(_20,_21,_22,null)){ try{ _1a.call(_1b,_20,_21,_1d); } catch(e){ OpenAjax.hub._debugger(); _1e._log("caught error from onData callback to Hub.subscribe(): "+e.message); } } }; var _23=this._subscribe(_19,_1f,_1b,_1d); this._invokeOnComplete(_1c,_1b,_23,true); return _23; }; OpenAjax.hub.ManagedHub.prototype.publish=function(_24,_25){ this._assertConn(); this._assertPubTopic(_24); this._publish(_24,_25,null); }; OpenAjax.hub.ManagedHub.prototype.unsubscribe=function(_26,_27,_28){ this._assertConn(); if(!_26){ throw new Error(OpenAjax.hub.Error.BadParameters); } this._unsubscribe(_26); this._invokeOnUnsubscribe(null,_26); this._invokeOnComplete(_27,_28,_26,true); }; OpenAjax.hub.ManagedHub.prototype.isConnected=function(){ return this._active; }; OpenAjax.hub.ManagedHub.prototype.getScope=function(){ return this._scope; }; OpenAjax.hub.ManagedHub.prototype.getSubscriberData=function(_29){ this._assertConn(); var _2a=_29.split("."); var sid=_2a.pop(); var sub=this._getSubscriptionObject(this._subscriptions,_2a,0,sid); if(sub){ return sub.data; } throw new Error(OpenAjax.hub.Error.NoSubscription); }; OpenAjax.hub.ManagedHub.prototype.getSubscriberScope=function(_2b){ this._assertConn(); var _2c=_2b.split("."); var sid=_2c.pop(); var sub=this._getSubscriptionObject(this._subscriptions,_2c,0,sid); if(sub){ return sub.scope; } throw new Error(OpenAjax.hub.Error.NoSubscription); }; OpenAjax.hub.ManagedHub.prototype.getParameters=function(){ return this._p; }; OpenAjax.hub.ManagedHub.prototype._sendToClient=function(_2d,_2e,sd,_2f){ if(!this.isConnected()){ return; } if(this._invokeOnPublish(_2d,_2e,_2f,sd.c)){ sd.c.sendToClient(_2d,_2e,sd.sid); } }; OpenAjax.hub.ManagedHub.prototype._assertConn=function(){ if(!this.isConnected()){ throw new Error(OpenAjax.hub.Error.Disconnected); } }; OpenAjax.hub.ManagedHub.prototype._assertPubTopic=function(_30){ if(!_30||_30===""||(_30.indexOf("*")!=-1)||(_30.indexOf("..")!=-1)||(_30.charAt(0)==".")||(_30.charAt(_30.length-1)==".")){ throw new Error(OpenAjax.hub.Error.BadParameters); } }; OpenAjax.hub.ManagedHub.prototype._assertSubTopic=function(_31){ if(!_31){ throw new Error(OpenAjax.hub.Error.BadParameters); } var _32=_31.split("."); var len=_32.length; for(var i=0;i0){ var pub=this._pubQ.shift(); this._safePublish(pub.t,pub.d,pub.p); } }; OpenAjax.hub.ManagedHub.prototype._safePublish=function(_4e,_4f,_50){ this._isPublishing=true; var _51=_4e.split("."); this._recursivePublish(this._subscriptions,_51,0,_4e,_4f,_50); this._isPublishing=false; }; OpenAjax.hub.ManagedHub.prototype._recursivePublish=function(_52,_53,_54,_55,msg,_56){ if(typeof _52!="undefined"){ var _57; if(_54==_53.length){ _57=_52; }else{ this._recursivePublish(_52.c[_53[_54]],_53,_54+1,_55,msg,_56); this._recursivePublish(_52.c["*"],_53,_54+1,_55,msg,_56); _57=_52.c["**"]; } if(typeof _57!="undefined"){ var sub=_57.s; while(sub){ var sc=sub.scope; var cb=sub.cb; var d=sub.data; if(typeof cb=="string"){ cb=sc[cb]; } cb.call(sc,_55,msg,d,_56); sub=sub.next; } } } }; OpenAjax.hub.ManagedHub.prototype._unsubscribe=function(_58){ var _59=_58.split("."); var sid=_59.pop(); if(!this._recursiveUnsubscribe(this._subscriptions,_59,0,sid)){ throw new Error(OpenAjax.hub.Error.NoSubscription); } }; OpenAjax.hub.ManagedHub.prototype._recursiveUnsubscribe=function(_5a,_5b,_5c,sid){ if(typeof _5a=="undefined"){ return false; } if(_5c<_5b.length){ var _5d=_5a.c[_5b[_5c]]; if(!_5d){ return false; } this._recursiveUnsubscribe(_5d,_5b,_5c+1,sid); if(!_5d.s){ for(var x in _5d.c){ return true; } delete _5a.c[_5b[_5c]]; } }else{ var sub=_5a.s; var _5e=null; var _5f=false; while(sub){ if(sid==sub.sid){ _5f=true; if(sub==_5a.s){ _5a.s=sub.next; }else{ _5e.next=sub.next; } break; } _5e=sub; sub=sub.next; } if(!_5f){ return false; } } return true; }; OpenAjax.hub.ManagedHub.prototype._getSubscriptionObject=function(_60,_61,_62,sid){ if(typeof _60!="undefined"){ if(_62<_61.length){ var _63=_60.c[_61[_62]]; return this._getSubscriptionObject(_63,_61,_62+1,sid); } var sub=_60.s; while(sub){ if(sid==sub.sid){ return sub; } sub=sub.next; } } return null; }; OpenAjax.hub._hub=new OpenAjax.hub.ManagedHub({onSubscribe:function(_64,_65){ return true; },onPublish:function(_66,_67,_68,_69){ return true; }}); OpenAjax.hub.subscribe=function(_6a,_6b,_6c,_6d){ if(typeof _6b==="string"){ _6c=_6c||window; _6b=_6c[_6b]||null; } return OpenAjax.hub._hub.subscribe(_6a,_6b,_6c,null,_6d); }; OpenAjax.hub.unsubscribe=function(_6e){ return OpenAjax.hub._hub.unsubscribe(_6e); }; OpenAjax.hub.publish=function(_6f,_70){ OpenAjax.hub._hub.publish(_6f,_70); }; OpenAjax.hub.registerLibrary("OpenAjax","http://openajax.org/hub","2.0",{}); } OpenAjax.hub.InlineContainer=function(hub,_71,_72){ if(!hub||!_71||!_72||!_72.Container||!_72.Container.onSecurityAlert){ throw new Error(OpenAjax.hub.Error.BadParameters); } var _73=_72.Container.scope||window; var _74=false; var _75=[]; var _76=0; var _77=null; if(_72.Container.log){ var log=function(msg){ try{ _72.Container.log.call(_73,"InlineContainer::"+_71+": "+msg); } catch(e){ OpenAjax.hub._debugger(); } }; }else{ log=function(){ }; } this._init=function(){ hub.addContainer(this); }; this.getHub=function(){ return hub; }; this.sendToClient=function(_78,_79,_7a){ if(_74){ var sub=_75[_7a]; try{ sub.cb.call(sub.sc,_78,_79,sub.d); } catch(e){ OpenAjax.hub._debugger(); _77._log("caught error from onData callback to HubClient.subscribe(): "+e.message); } } }; this.remove=function(){ if(_74){ _7b(); } }; this.isConnected=function(){ return _74; }; this.getClientID=function(){ return _71; }; this.getPartnerOrigin=function(){ if(_74){ return window.location.protocol+"//"+window.location.hostname; } return null; }; this.getParameters=function(){ return _72; }; this.connect=function(_7c,_7d,_7e){ if(_74){ throw new Error(OpenAjax.hub.Error.Duplicate); } _74=true; _77=_7c; if(_72.Container.onConnect){ try{ _72.Container.onConnect.call(_73,this); } catch(e){ OpenAjax.hub._debugger(); log("caught error from onConnect callback to constructor: "+e.message); } } _7f(_7d,_7e,_7c,true); }; this.disconnect=function(_80,_81,_82){ if(!_74){ throw new Error(OpenAjax.hub.Error.Disconnected); } _7b(); if(_72.Container.onDisconnect){ try{ _72.Container.onDisconnect.call(_73,this); } catch(e){ OpenAjax.hub._debugger(); log("caught error from onDisconnect callback to constructor: "+e.message); } } _7f(_81,_82,_80,true); }; this.subscribe=function(_83,_84,_85,_86,_87){ _88(); _89(_83); if(!_84){ throw new Error(OpenAjax.hub.Error.BadParameters); } var _8a=""+_76++; var _8b=false; var msg=null; try{ var _8c=hub.subscribeForClient(this,_83,_8a); _8b=true; } catch(e){ _8a=null; msg=e.message; } _85=_85||window; if(_8b){ _75[_8a]={h:_8c,cb:_84,sc:_85,d:_87}; } _7f(_86,_85,_8a,_8b,msg); return _8a; }; this.publish=function(_8d,_8e){ _88(); _8f(_8d); hub.publishForClient(this,_8d,_8e); }; this.unsubscribe=function(_90,_91,_92){ _88(); if(typeof _90==="undefined"||_90===null){ throw new Error(OpenAjax.hub.Error.BadParameters); } var sub=_75[_90]; if(!sub){ throw new Error(OpenAjax.hub.Error.NoSubscription); } hub.unsubscribeForClient(this,sub.h); delete _75[_90]; _7f(_91,_92,_90,true); }; this.getSubscriberData=function(_93){ _88(); return _94(_93).d; }; this.getSubscriberScope=function(_95){ _88(); return _94(_95).sc; }; function _7f(_96,_97,_98,_99,_9a){ if(_96){ try{ _97=_97||window; _96.call(_97,_98,_99,_9a); } catch(e){ OpenAjax.hub._debugger(); _77._log("caught error from onComplete callback: "+e.message); } } }; function _7b(){ for(var _9b in _75){ hub.unsubscribeForClient(this,_75[_9b].h); } _75=[]; _76=0; _74=false; }; function _88(){ if(!_74){ throw new Error(OpenAjax.hub.Error.Disconnected); } }; function _8f(_9c){ if((_9c==null)||(_9c==="")||(_9c.indexOf("*")!=-1)||(_9c.indexOf("..")!=-1)||(_9c.charAt(0)==".")||(_9c.charAt(_9c.length-1)==".")){ throw new Error(OpenAjax.hub.Error.BadParameters); } }; function _89(_9d){ if(!_9d){ throw new Error(OpenAjax.hub.Error.BadParameters); } var _9e=_9d.split("."); var len=_9e.length; for(var i=0;i=0;i--){ var src=_b3[i].getAttribute("src"); if(!src){ continue; } var m=src.match(_b4); if(m){ var _b5=_b3[i].getAttribute("oaaConfig"); if(_b5){ try{ oaaConfig=eval("({ "+_b5+" })"); } catch(e){ } } break; } } } if(typeof oaaConfig!=="undefined"&&oaaConfig.gadgetsGlobal){ gadgets=OpenAjax.gadgets; } } })(); if(!OpenAjax.hub.IframeContainer){ (function(){ OpenAjax.hub.IframeContainer=function(hub,_b6,_b7){ _b8(arguments); var _b9=this; var _ba=_b7.Container.scope||window; var _bb=false; var _bc={}; var _bd; var _be; var _bf=_b7.IframeContainer.timeout||15000; var _c0; if(_b7.Container.log){ var log=function(msg){ try{ _b7.Container.log.call(_ba,"IframeContainer::"+_b6+": "+msg); } catch(e){ OpenAjax.hub._debugger(); } }; }else{ log=function(){ }; } this._init=function(){ hub.addContainer(this); _be=OpenAjax.hub.IframeContainer._rpcRouter.add(_b6,this); _bd=_114(_b7,_ba,log); var _c1=_b7.IframeContainer.clientRelay; var _c2=OpenAjax.gadgets.rpc.getRelayChannel(); if(_b7.IframeContainer.tunnelURI){ if(_c2!=="wpm"&&_c2!=="ifpc"){ throw new Error(OpenAjax.hub.Error.IncompatBrowser); } }else{ log("WARNING: Parameter 'IframeContaienr.tunnelURI' not specified. Connection will not be fully secure."); if(_c2==="rmr"&&!_c1){ _c1=OpenAjax.gadgets.rpc.getOrigin(_b7.IframeContainer.uri)+"/robots.txt"; } } _c3(); OpenAjax.gadgets.rpc.setupReceiver(_be,_c1); _c4(); }; this.sendToClient=function(_c5,_c6,_c7){ OpenAjax.gadgets.rpc.call(_be,"openajax.pubsub",null,"pub",_c5,_c6,_c7); }; this.remove=function(){ _c8(); clearTimeout(_c0); OpenAjax.gadgets.rpc.removeReceiver(_be); var _c9=document.getElementById(_be); _c9.parentNode.removeChild(_c9); OpenAjax.hub.IframeContainer._rpcRouter.remove(_be); }; this.isConnected=function(){ return _bb; }; this.getClientID=function(){ return _b6; }; this.getPartnerOrigin=function(){ if(_bb){ var _ca=OpenAjax.gadgets.rpc.getReceiverOrigin(_be); if(_ca){ return (/^([a-zA-Z]+:\/\/[^:]+).*/.exec(_ca)[1]); } } return null; }; this.getParameters=function(){ return _b7; }; this.getHub=function(){ return hub; }; this.getIframe=function(){ return document.getElementById(_be); }; function _b8(_cb){ var hub=_cb[0],_b6=_cb[1],_b7=_cb[2]; if(!hub||!_b6||!_b7||!_b7.Container||!_b7.Container.onSecurityAlert||!_b7.IframeContainer||!_b7.IframeContainer.parent||!_b7.IframeContainer.uri){ throw new Error(OpenAjax.hub.Error.BadParameters); } }; this._handleIncomingRPC=function(_cc,_cd,_ce){ switch(_cc){ case "pub": hub.publishForClient(_b9,_cd,_ce); break; case "sub": var _cf=""; try{ _bc[_ce]=hub.subscribeForClient(_b9,_cd,_ce); } catch(e){ _cf=e.message; } return _cf; case "uns": var _d0=_bc[_ce]; hub.unsubscribeForClient(_b9,_d0); delete _bc[_ce]; return _ce; case "con": _d1(); return true; case "dis": _c4(); _c8(); if(_b7.Container.onDisconnect){ try{ _b7.Container.onDisconnect.call(_ba,_b9); } catch(e){ OpenAjax.hub._debugger(); log("caught error from onDisconnect callback to constructor: "+e.message); } } return true; } }; this._onSecurityAlert=function(_d2){ _d3(_113[_d2]); }; function _c3(){ var _d4=document.createElement("span"); _b7.IframeContainer.parent.appendChild(_d4); var _d5=""; _d4.innerHTML=_d5; var _da; if(_b7.IframeContainer.tunnelURI){ _da="&parent="+encodeURIComponent(_b7.IframeContainer.tunnelURI)+"&forcesecure=true"; }else{ _da="&oahParent="+encodeURIComponent(OpenAjax.gadgets.rpc.getOrigin(window.location.href)); } var _db=""; if(_be!==_b6){ _db="&oahId="+_be.substring(_be.lastIndexOf("_")+1); } document.getElementById(_be).src=_b7.IframeContainer.uri+"#rpctoken="+_bd+_da+_db; }; function _d1(){ function _dc(_dd){ if(_dd){ _bb=true; clearTimeout(_c0); document.getElementById(_be).style.visibility="visible"; if(_b7.Container.onConnect){ try{ _b7.Container.onConnect.call(_ba,_b9); } catch(e){ OpenAjax.hub._debugger(); log("caught error from onConnect callback to constructor: "+e.message); } } } }; OpenAjax.gadgets.rpc.call(_be,"openajax.pubsub",_dc,"cmd","con"); }; function _c8(){ if(_bb){ _bb=false; document.getElementById(_be).style.visibility="hidden"; for(var s in _bc){ hub.unsubscribeForClient(_b9,_bc[s]); } _bc={}; } }; function _d3(_de){ try{ _b7.Container.onSecurityAlert.call(_ba,_b9,_de); } catch(e){ OpenAjax.hub._debugger(); log("caught error from onSecurityAlert callback to constructor: "+e.message); } }; function _c4(){ _c0=setTimeout(function(){ _d3(OpenAjax.hub.SecurityAlert.LoadTimeout); _b9._handleIncomingRPC=function(){ }; },_bf); }; this._init(); }; OpenAjax.hub.IframeHubClient=function(_df){ if(!_df||!_df.HubClient||!_df.HubClient.onSecurityAlert){ throw new Error(OpenAjax.hub.Error.BadParameters); } var _e0=this; var _e1=_df.HubClient.scope||window; var _e2=false; var _e3={}; var _e4=0; var _e5; if(_df.HubClient.log){ var log=function(msg){ try{ _df.HubClient.log.call(_e1,"IframeHubClient::"+_e5+": "+msg); } catch(e){ OpenAjax.hub._debugger(); } }; }else{ log=function(){ }; } this._init=function(){ var _e6=OpenAjax.gadgets.util.getUrlParameters(); if(!_e6.parent){ var _e7=_e6.oahParent+"/robots.txt"; OpenAjax.gadgets.rpc.setupReceiver("..",_e7); } if(_df.IframeHubClient&&_df.IframeHubClient.requireParentVerifiable&&OpenAjax.gadgets.rpc.getReceiverOrigin("..")===null){ OpenAjax.gadgets.rpc.removeReceiver(".."); throw new Error(OpenAjax.hub.Error.IncompatBrowser); } OpenAjax.hub.IframeContainer._rpcRouter.add("..",this); _e5=OpenAjax.gadgets.rpc.RPC_ID; if(_e6.oahId){ _e5=_e5.substring(0,_e5.lastIndexOf("_")); } }; this.connect=function(_e8,_e9){ if(_e2){ throw new Error(OpenAjax.hub.Error.Duplicate); } function _ea(_eb){ if(_eb){ _e2=true; if(_e8){ try{ _e8.call(_e9||window,_e0,true); } catch(e){ OpenAjax.hub._debugger(); log("caught error from onComplete callback to connect(): "+e.message); } } } }; OpenAjax.gadgets.rpc.call("..","openajax.pubsub",_ea,"con"); }; this.disconnect=function(_ec,_ed){ if(!_e2){ throw new Error(OpenAjax.hub.Error.Disconnected); } _e2=false; var _ee=null; if(_ec){ _ee=function(_ef){ try{ _ec.call(_ed||window,_e0,true); } catch(e){ OpenAjax.hub._debugger(); log("caught error from onComplete callback to disconnect(): "+e.message); } }; } OpenAjax.gadgets.rpc.call("..","openajax.pubsub",_ee,"dis"); }; this.getPartnerOrigin=function(){ if(_e2){ var _f0=OpenAjax.gadgets.rpc.getReceiverOrigin(".."); if(_f0){ return (/^([a-zA-Z]+:\/\/[^:]+).*/.exec(_f0)[1]); } } return null; }; this.getClientID=function(){ return _e5; }; this.subscribe=function(_f1,_f2,_f3,_f4,_f5){ _f6(); _f7(_f1); if(!_f2){ throw new Error(OpenAjax.hub.Error.BadParameters); } _f3=_f3||window; var _f8=""+_e4++; _e3[_f8]={cb:_f2,sc:_f3,d:_f5}; function _f9(_fa){ if(_fa!==""){ delete _e3[_f8]; } if(_f4){ try{ _f4.call(_f3,_f8,_fa==="",_fa); } catch(e){ OpenAjax.hub._debugger(); log("caught error from onComplete callback to subscribe(): "+e.message); } } }; OpenAjax.gadgets.rpc.call("..","openajax.pubsub",_f9,"sub",_f1,_f8); return _f8; }; this.publish=function(_fb,_fc){ _f6(); _fd(_fb); OpenAjax.gadgets.rpc.call("..","openajax.pubsub",null,"pub",_fb,_fc); }; this.unsubscribe=function(_fe,_ff,_100){ _f6(); if(!_fe){ throw new Error(OpenAjax.hub.Error.BadParameters); } if(!_e3[_fe]||_e3[_fe].uns){ throw new Error(OpenAjax.hub.Error.NoSubscription); } _e3[_fe].uns=true; function _101(_102){ delete _e3[_fe]; if(_ff){ try{ _ff.call(_100||window,_fe,true); } catch(e){ OpenAjax.hub._debugger(); log("caught error from onComplete callback to unsubscribe(): "+e.message); } } }; OpenAjax.gadgets.rpc.call("..","openajax.pubsub",_101,"uns",null,_fe); }; this.isConnected=function(){ return _e2; }; this.getScope=function(){ return _e1; }; this.getSubscriberData=function(_103){ _f6(); if(_e3[_103]){ return _e3[_103].d; } throw new Error(OpenAjax.hub.Error.NoSubscription); }; this.getSubscriberScope=function(_104){ _f6(); if(_e3[_104]){ return _e3[_104].sc; } throw new Error(OpenAjax.hub.Error.NoSubscription); }; this.getParameters=function(){ return _df; }; this._handleIncomingRPC=function(_105,_106,data,_107){ if(_105==="pub"){ if(_e3[_107]&&!_e3[_107].uns){ try{ _e3[_107].cb.call(_e3[_107].sc,_106,data,_e3[_107].d); } catch(e){ OpenAjax.hub._debugger(); log("caught error from onData callback to subscribe(): "+e.message); } } } if(_106==="con"){ return true; } return false; }; function _f6(){ if(!_e2){ throw new Error(OpenAjax.hub.Error.Disconnected); } }; function _f7(_108){ if(!_108){ throw new Error(OpenAjax.hub.Error.BadParameters); } var path=_108.split("."); var len=path.length; for(var i=0;i>5]|=(str.charCodeAt(i/_119)&mask)<<(32-_119-i%32); } return bin; },"hmac_sha1":function(_11a,_11b,_11c){ var ipad=Array(16),opad=Array(16); for(var i=0;i<16;i++){ ipad[i]=_11a[i]^909522486; opad[i]=_11a[i]^1549556828; } var hash=this.sha1(ipad.concat(this.strToWA(_11b,_11c)),512+_11b.length*_11c); return this.sha1(opad.concat(hash),512+160); },"newPRNG":function(_11d){ var that=this; if((typeof _11d!="string")||(_11d.length<12)){ alert("WARNING: Seed length too short ..."); } var _11e=[43417,15926,18182,33130,9585,30800,49772,40144,47678,55453,4659,38181,65340,6787,54417,65301]; var _11f=[]; var _120=0; function _121(_122){ return that.hmac_sha1(_11e,_122,8); }; function _123(_124){ var _125=_121(_124); for(var i=0;i<5;i++){ _11f[i]^=_125[i]; } }; _123(_11d); return {"addSeed":function(seed){ _123(seed); },"nextRandomOctets":function(len){ var _126=[]; while(len>0){ _120+=1; var _127=that.hmac_sha1(_11f,(_120).toString(16),8); for(i=0;(i<20)&(len>0);i++,len--){ _126.push((_127[i>>2]>>(i%4))%256); } } return _126; },"nextRandomB64Str":function(len){ var _128="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; var _129=this.nextRandomOctets(len); var _12a=""; for(var i=0;i>16)+(y>>16)+(lsw>>16); return (msw<<16)|(lsw&65535); }; var rol=function(num,cnt){ return (num<>>(32-cnt)); }; function _12c(t,b,c,d){ if(t<20){ return (b&c)|((~b)&d); } if(t<40){ return b^c^d; } if(t<60){ return (b&c)|(b&d)|(c&d); } return b^c^d; }; function _12d(t){ return (t<20)?1518500249:(t<40)?1859775393:(t<60)?-1894007588:-899497514; }; return function(_12e,_12f){ _12e[_12f>>5]|=128<<(24-_12f%32); _12e[((_12f+64>>9)<<4)+15]=_12f; var W=Array(80); var H0=1732584193; var H1=-271733879; var H2=-1732584194; var H3=271733878; var H4=-1009589776; for(var i=0;i<_12e.length;i+=16){ var a=H0; var b=H1; var c=H2; var d=H3; var e=H4; for(var j=0;j<80;j++){ W[j]=((j<16)?_12e[i+j]:rol(W[j-3]^W[j-8]^W[j-14]^W[j-16],1)); var T=_12b(_12b(rol(a,5),_12c(j,b,c,d)),_12b(_12b(e,W[j]),_12d(j))); e=d; d=c; c=rol(b,30); b=a; a=T; } H0=_12b(a,H0); H1=_12b(b,H1); H2=_12b(c,H2); H3=_12b(d,H3); H4=_12b(e,H4); } return Array(H0,H1,H2,H3,H4); }; }()}; if(!this.JSON){ JSON={}; } (function(){ function f(n){ return n<10?"0"+n:n; }; if(typeof Date.prototype.toJSON!=="function"){ Date.prototype.toJSON=function(key){ return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"; }; String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){ return this.valueOf(); }; } var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_130=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,_131,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"},rep; function _132(_133){ _130.lastIndex=0; return _130.test(_133)?"\""+_133.replace(_130,function(a){ var c=meta[a]; return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4); })+"\"":"\""+_133+"\""; }; function str(key,_134){ var i,k,v,_135,mind=gap,_136,_137=_134[key]; if(_137&&typeof _137==="object"&&typeof _137.toJSON==="function"){ _137=_137.toJSON(key); } if(typeof rep==="function"){ _137=rep.call(_134,key,_137); } switch(typeof _137){ case "string": return _132(_137); case "number": return isFinite(_137)?String(_137):"null"; case "boolean": case "null": return String(_137); case "object": if(!_137){ return "null"; } gap+=_131; _136=[]; if(Object.prototype.toString.apply(_137)==="[object Array]"){ _135=_137.length; for(i=0;i<_135;i+=1){ _136[i]=str(i,_137)||"null"; } v=_136.length===0?"[]":gap?"[\n"+gap+_136.join(",\n"+gap)+"\n"+mind+"]":"["+_136.join(",")+"]"; gap=mind; return v; } if(rep&&typeof rep==="object"){ _135=rep.length; for(i=0;i<_135;i+=1){ k=rep[i]; if(typeof k==="string"){ v=str(k,_137); if(v){ _136.push(_132(k)+(gap?": ":":")+v); } } } }else{ for(k in _137){ if(Object.hasOwnProperty.call(_137,k)){ v=str(k,_137); if(v){ _136.push(_132(k)+(gap?": ":":")+v); } } } } v=_136.length===0?"{}":gap?"{\n"+gap+_136.join(",\n"+gap)+"\n"+mind+"}":"{"+_136.join(",")+"}"; gap=mind; return v; } }; if(typeof JSON.stringify!=="function"){ JSON.stringify=function(_138,_139,_13a){ var i; gap=""; _131=""; if(typeof _13a==="number"){ for(i=0;i<_13a;i+=1){ _131+=" "; } }else{ if(typeof _13a==="string"){ _131=_13a; } } rep=_139; if(_139&&typeof _139!=="function"&&(typeof _139!=="object"||typeof _139.length!=="number")){ throw new Error("JSON.stringify"); } return str("",{"":_138}); }; } if(typeof JSON.parse!=="function"){ JSON.parse=function(text,_13b){ var j; function walk(_13c,key){ var k,v,_13d=_13c[key]; if(_13d&&typeof _13d==="object"){ for(k in _13d){ if(Object.hasOwnProperty.call(_13d,k)){ v=walk(_13d,k); if(v!==undefined){ _13d[k]=v; }else{ delete _13d[k]; } } } } return _13b.call(_13c,key,_13d); }; cx.lastIndex=0; if(cx.test(text)){ text=text.replace(cx,function(a){ return "\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4); }); } if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){ j=eval("("+text+")"); return typeof _13b==="function"?walk({"":j},""):j; } throw new SyntaxError("JSON.parse"); }; } })(); OpenAjax.gadgets.util=function(){ function _13e(url){ var _13f; var _140=url.indexOf("?"); var _141=url.indexOf("#"); if(_141===-1){ _13f=url.substr(_140+1); }else{ _13f=[url.substr(_140+1,_141-_140-1),"&",url.substr(_141+1)].join(""); } return _13f.split("&"); }; var _142=null; var _143=[]; return {getUrlParameters:function(_144){ if(_142!==null&&typeof _144==="undefined"){ return _142; } var _145={}; var _146=_13e(_144||document.location.href); var _147=window.decodeURIComponent?decodeURIComponent:unescape; for(var i=0,j=_146.length;i=0;--i){ var ifr=_16a[i]; try{ if(ifr&&(ifr.recyclable||ifr.readyState==="complete")){ ifr.parentNode.removeChild(ifr); if(window.ActiveXObject){ _16a[i]=ifr=null; _16a.splice(i,1); }else{ ifr.recyclable=false; _172=ifr; break; } } } catch(e){ } } if(!_172){ _172=document.createElement("iframe"); _172.style.border=_172.style.width=_172.style.height="0px"; _172.style.visibility="hidden"; _172.style.position="absolute"; _172.onload=function(){ this.recyclable=true; }; _16a.push(_172); } _172.src=src; window.setTimeout(function(){ document.body.appendChild(_172); },0); }; function _173(arr,_174){ for(var i=_174-1;i>=0;--i){ if(typeof arr[i]==="undefined"){ return false; } } return true; }; return {getCode:function(){ return "ifpc"; },isParentVerifiable:function(){ return true; },init:function(_175,_176){ _16c=_176; _16c("..",true); return true; },setup:function(_177,_178){ _16c(_177,true); return true; },call:function(_179,from,rpc){ var _17a=OpenAjax.gadgets.rpc.getRelayUrl(_179); ++_16b; if(!_17a){ OpenAjax.gadgets.warn("No relay file assigned for IFPC"); return; } var src=null,_17b=[]; if(rpc.l){ var _17c=rpc.a; src=[_17a,"#",_16f([from,_16b,1,0,_16f([from,rpc.s,"","",from].concat(_17c))])].join(""); _17b.push(src); }else{ src=[_17a,"#",_179,"&",from,"@",_16b,"&"].join(""); var _17d=encodeURIComponent(OpenAjax.gadgets.json.stringify(rpc)),_17e=_16d-src.length,_17f=Math.ceil(_17d.length/_17e),_180=0,part; while(_17d.length>0){ part=_17d.substring(0,_17e); _17d=_17d.substring(_17e); _17b.push([src,_17f,"&",_180,"&",part].join("")); _180+=1; } } do{ _171(_17b.shift()); }while(_17b.length>0); return true; },_receiveMessage:function(_181,_182){ var from=_181[1],_183=parseInt(_181[2],10),_184=parseInt(_181[3],10),_185=_181[_181.length-1],_186=_183===1; if(_183>1){ if(!_16e[from]){ _16e[from]=[]; } _16e[from][_184]=_185; if(_173(_16e[from],_183)){ _185=_16e[from].join(""); delete _16e[from]; _186=true; } } if(_186){ _182(OpenAjax.gadgets.json.parse(decodeURIComponent(_185))); } }}; }(); } OpenAjax.gadgets.rpctx=OpenAjax.gadgets.rpctx||{}; if(!OpenAjax.gadgets.rpctx.rmr){ OpenAjax.gadgets.rpctx.rmr=function(){ var _187=500; var _188=10; var _189={}; var _18a; var _18b; function _18c(_18d,_18e,data,_18f){ var _190=function(){ document.body.appendChild(_18d); _18d.src="about:blank"; if(_18f){ _18d.onload=function(){ _1a5(_18f); }; } _18d.src=_18e+"#"+data; }; if(document.body){ _190(); }else{ OpenAjax.gadgets.util.registerOnLoadHandler(function(){ _190(); }); } }; function _191(_192){ if(typeof _189[_192]==="object"){ return; } var _193=document.createElement("iframe"); var _194=_193.style; _194.position="absolute"; _194.top="0px"; _194.border="0"; _194.opacity="0"; _194.width="10px"; _194.height="1px"; _193.id="rmrtransport-"+_192; _193.name=_193.id; var _195=OpenAjax.gadgets.rpc.getRelayUrl(_192); if(!_195){ _195=OpenAjax.gadgets.rpc.getOrigin(OpenAjax.gadgets.util.getUrlParameters()["parent"])+"/robots.txt"; } _189[_192]={frame:_193,receiveWindow:null,relayUri:_195,searchCounter:0,width:10,waiting:true,queue:[],sendId:0,recvId:0}; if(_192!==".."){ _18c(_193,_195,_196(_192)); } _197(_192); }; function _197(_198){ var _199=null; _189[_198].searchCounter++; try{ var _19a=OpenAjax.gadgets.rpc._getTargetWin(_198); if(_198===".."){ _199=_19a.frames["rmrtransport-"+OpenAjax.gadgets.rpc.RPC_ID]; }else{ _199=_19a.frames["rmrtransport-.."]; } } catch(e){ } var _19b=false; if(_199){ _19b=_19c(_198,_199); } if(!_19b){ if(_189[_198].searchCounter>_188){ return; } window.setTimeout(function(){ _197(_198); },_187); } }; function _19d(_19e,_19f,from,rpc){ var _1a0=null; if(from!==".."){ _1a0=_189[".."]; }else{ _1a0=_189[_19e]; } if(_1a0){ if(_19f!==OpenAjax.gadgets.rpc.ACK){ _1a0.queue.push(rpc); } if(_1a0.waiting||(_1a0.queue.length===0&&!(_19f===OpenAjax.gadgets.rpc.ACK&&rpc&&rpc.ackAlone===true))){ return true; } if(_1a0.queue.length>0){ _1a0.waiting=true; } var url=_1a0.relayUri+"#"+_196(_19e); try{ _1a0.frame.contentWindow.location=url; var _1a1=_1a0.width==10?20:10; _1a0.frame.style.width=_1a1+"px"; _1a0.width=_1a1; } catch(e){ return false; } } return true; }; function _196(_1a2){ var _1a3=_189[_1a2]; var _1a4={id:_1a3.sendId}; if(_1a3){ _1a4.d=Array.prototype.slice.call(_1a3.queue,0); _1a4.d.push({s:OpenAjax.gadgets.rpc.ACK,id:_1a3.recvId}); } return OpenAjax.gadgets.json.stringify(_1a4); }; function _1a5(_1a6){ var _1a7=_189[_1a6]; var data=_1a7.receiveWindow.location.hash.substring(1); var _1a8=OpenAjax.gadgets.json.parse(decodeURIComponent(data))||{}; var _1a9=_1a8.d||[]; var _1aa=false; var _1ab=false; var _1ac=0; var _1ad=(_1a7.recvId-_1a8.id); for(var i=0;i<_1a9.length;++i){ var rpc=_1a9[i]; if(rpc.s===OpenAjax.gadgets.rpc.ACK){ _18b(_1a6,true); if(_1a7.waiting){ _1ab=true; } _1a7.waiting=false; var _1ae=Math.max(0,rpc.id-_1a7.sendId); _1a7.queue.splice(0,_1ae); _1a7.sendId=Math.max(_1a7.sendId,rpc.id||0); continue; } _1aa=true; if(++_1ac<=_1ad){ continue; } ++_1a7.recvId; _18a(rpc); } if(_1aa||(_1ab&&_1a7.queue.length>0)){ var from=(_1a6==="..")?OpenAjax.gadgets.rpc.RPC_ID:".."; _19d(_1a6,OpenAjax.gadgets.rpc.ACK,from,{ackAlone:_1aa}); } }; function _19c(_1af,_1b0){ var _1b1=_189[_1af]; try{ var _1b2=false; _1b2="document" in _1b0; if(!_1b2){ return false; } _1b2=typeof _1b0["document"]=="object"; if(!_1b2){ return false; } var loc=_1b0.location.href; if(loc==="about:blank"){ return false; } } catch(ex){ return false; } _1b1.receiveWindow=_1b0; function _1b3(){ _1a5(_1af); }; if(typeof _1b0.attachEvent==="undefined"){ _1b0.onresize=_1b3; }else{ _1b0.attachEvent("onresize",_1b3); } if(_1af===".."){ _18c(_1b1.frame,_1b1.relayUri,_196(_1af),_1af); }else{ _1a5(_1af); } return true; }; return {getCode:function(){ return "rmr"; },isParentVerifiable:function(){ return true; },init:function(_1b4,_1b5){ _18a=_1b4; _18b=_1b5; return true; },setup:function(_1b6,_1b7){ try{ _191(_1b6); } catch(e){ OpenAjax.gadgets.warn("Caught exception setting up RMR: "+e); return false; } return true; },call:function(_1b8,from,rpc){ return _19d(_1b8,rpc.s,from,rpc); }}; }(); } OpenAjax.gadgets.rpctx=OpenAjax.gadgets.rpctx||{}; if(!OpenAjax.gadgets.rpctx.wpm){ OpenAjax.gadgets.rpctx.wpm=function(){ var _1b9,_1ba; var _1bb; var _1bc=false; var _1bd=false; function _1be(){ var hit=false; function _1bf(_1c0){ if(_1c0.data=="postmessage.test"){ hit=true; if(typeof _1c0.origin==="undefined"){ _1bd=true; } } }; OpenAjax.gadgets.util.attachBrowserEvent(window,"message",_1bf,false); window.postMessage("postmessage.test","*"); if(hit){ _1bc=true; } OpenAjax.gadgets.util.removeBrowserEvent(window,"message",_1bf,false); }; function _1c1(_1c2){ var rpc=OpenAjax.gadgets.json.parse(_1c2.data); if(!rpc||!rpc.f){ return; } var _1c3=OpenAjax.gadgets.rpc.getRelayUrl(rpc.f)||OpenAjax.gadgets.util.getUrlParameters()["parent"]; var _1c4=OpenAjax.gadgets.rpc.getOrigin(_1c3); if(!_1bd?_1c2.origin!==_1c4:_1c2.domain!==/^.+:\/\/([^:]+).*/.exec(_1c4)[1]){ return; } _1b9(rpc); }; return {getCode:function(){ return "wpm"; },isParentVerifiable:function(){ return true; },init:function(_1c5,_1c6){ _1b9=_1c5; _1ba=_1c6; _1be(); if(!_1bc){ _1bb=function(win,msg,_1c7){ win.postMessage(msg,_1c7); }; }else{ _1bb=function(win,msg,_1c8){ window.setTimeout(function(){ win.postMessage(msg,_1c8); },0); }; } OpenAjax.gadgets.util.attachBrowserEvent(window,"message",_1c1,false); _1ba("..",true); return true; },setup:function(_1c9,_1ca,_1cb){ if(_1c9===".."){ if(_1cb){ OpenAjax.gadgets.rpc._createRelayIframe(_1ca); }else{ OpenAjax.gadgets.rpc.call(_1c9,OpenAjax.gadgets.rpc.ACK); } } return true; },call:function(_1cc,from,rpc){ var _1cd=OpenAjax.gadgets.rpc._getTargetWin(_1cc); var _1ce=OpenAjax.gadgets.rpc.getRelayUrl(_1cc)||OpenAjax.gadgets.util.getUrlParameters()["parent"]; var _1cf=OpenAjax.gadgets.rpc.getOrigin(_1ce); if(_1cf){ _1bb(_1cd,OpenAjax.gadgets.json.stringify(rpc),_1cf); }else{ OpenAjax.gadgets.error("No relay set (used as window.postMessage targetOrigin)"+", cannot send cross-domain message"); } return true; },relayOnload:function(_1d0,data){ _1ba(_1d0,true); }}; }(); } if(!OpenAjax.gadgets.rpc){ OpenAjax.gadgets.rpc=function(){ var _1d1="__cb"; var _1d2=""; var ACK="__ack"; var _1d3=500; var _1d4=10; var _1d5={}; var _1d6={}; var _1d7={}; var _1d8={}; var _1d9=0; var _1da={}; var _1db={}; var _1dc={}; var _1dd={}; var _1de={}; var _1df={}; var _1e0=(window.top!==window.self); var _1e1=window.name; var _1e2=function(){ }; var _1e3=0; var _1e4=1; var _1e5=2; var _1e6=(function(){ function _1e7(name){ return function(){ OpenAjax.gadgets.log("gadgets.rpc."+name+"("+OpenAjax.gadgets.json.stringify(Array.prototype.slice.call(arguments))+"): call ignored. [caller: "+document.location+", isChild: "+_1e0+"]"); }; }; return {getCode:function(){ return "noop"; },isParentVerifiable:function(){ return true; },init:_1e7("init"),setup:_1e7("setup"),call:_1e7("call")}; })(); if(OpenAjax.gadgets.util){ _1dd=OpenAjax.gadgets.util.getUrlParameters(); } function _1e8(){ return typeof window.postMessage==="function"?OpenAjax.gadgets.rpctx.wpm:typeof window.postMessage==="object"?OpenAjax.gadgets.rpctx.wpm:navigator.userAgent.indexOf("WebKit")>0?OpenAjax.gadgets.rpctx.rmr:navigator.product==="Gecko"?OpenAjax.gadgets.rpctx.frameElement:OpenAjax.gadgets.rpctx.ifpc; }; function _1e9(_1ea,_1eb){ var tx=_1ec; if(!_1eb){ tx=_1e6; } _1de[_1ea]=tx; var _1ed=_1df[_1ea]||[]; for(var i=0;i<_1ed.length;++i){ var rpc=_1ed[i]; rpc.t=_1ee(_1ea); tx.call(_1ea,rpc.f,rpc); } _1df[_1ea]=[]; }; var _1ef=false,_1f0=false; function _1f1(){ if(_1f0){ return; } function _1f2(){ _1ef=true; }; OpenAjax.gadgets.util.attachBrowserEvent(window,"unload",_1f2,false); _1f0=true; }; function _1f3(_1f4,_1f5,_1f6,data,_1f7){ if(!_1d8[_1f5]||_1d8[_1f5]!==_1f6){ OpenAjax.gadgets.error("Invalid auth token. "+_1d8[_1f5]+" vs "+_1f6); _1e2(_1f5,_1e5); } _1f7.onunload=function(){ if(_1db[_1f5]&&!_1ef){ _1e2(_1f5,_1e4); OpenAjax.gadgets.rpc.removeReceiver(_1f5); } }; _1f1(); data=OpenAjax.gadgets.json.parse(decodeURIComponent(data)); _1ec.relayOnload(_1f5,data); }; function _1f8(rpc){ if(rpc&&typeof rpc.s==="string"&&typeof rpc.f==="string"&&rpc.a instanceof Array){ if(_1d8[rpc.f]){ if(_1d8[rpc.f]!==rpc.t){ OpenAjax.gadgets.error("Invalid auth token. "+_1d8[rpc.f]+" vs "+rpc.t); _1e2(rpc.f,_1e5); } } if(rpc.s===ACK){ window.setTimeout(function(){ _1e9(rpc.f,true); },0); return; } if(rpc.c){ rpc.callback=function(_1f9){ OpenAjax.gadgets.rpc.call(rpc.f,_1d1,null,rpc.c,_1f9); }; } var _1fa=(_1d5[rpc.s]||_1d5[_1d2]).apply(rpc,rpc.a); if(rpc.c&&typeof _1fa!=="undefined"){ OpenAjax.gadgets.rpc.call(rpc.f,_1d1,null,rpc.c,_1fa); } } }; function _1fb(url){ if(!url){ return ""; } url=url.toLowerCase(); if(url.indexOf("//")==0){ url=window.location.protocol+url; } if(url.indexOf("://")==-1){ url=window.location.protocol+"//"+url; } var host=url.substring(url.indexOf("://")+3); var _1fc=host.indexOf("/"); if(_1fc!=-1){ host=host.substring(0,_1fc); } var _1fd=url.substring(0,url.indexOf("://")); var _1fe=""; var _1ff=host.indexOf(":"); if(_1ff!=-1){ var port=host.substring(_1ff+1); host=host.substring(0,_1ff); if((_1fd==="http"&&port!=="80")||(_1fd==="https"&&port!=="443")){ _1fe=":"+port; } } return _1fd+"://"+host+_1fe; }; function _200(id){ if(typeof id==="undefined"||id===".."){ return window.parent; } id=String(id); var _201=window.frames[id]; if(_201){ return _201; } _201=document.getElementById(id); if(_201&&_201.contentWindow){ return _201.contentWindow; } return null; }; var _1ec=_1e8(); _1d5[_1d2]=function(){ OpenAjax.gadgets.warn("Unknown RPC service: "+this.s); }; _1d5[_1d1]=function(_202,_203){ var _204=_1da[_202]; if(_204){ delete _1da[_202]; _204(_203); } }; function _205(_206,_207,_208){ if(_1db[_206]===true){ return; } if(typeof _1db[_206]==="undefined"){ _1db[_206]=0; } var _209=document.getElementById(_206); if(_206===".."||_209!=null){ if(_1ec.setup(_206,_207,_208)===true){ _1db[_206]=true; return; } } if(_1db[_206]!==true&&_1db[_206]++<_1d4){ window.setTimeout(function(){ _205(_206,_207,_208); },_1d3); }else{ _1de[_206]=_1e6; _1db[_206]=true; } }; function _20a(_20b,rpc){ if(typeof _1dc[_20b]==="undefined"){ _1dc[_20b]=false; var _20c=OpenAjax.gadgets.rpc.getRelayUrl(_20b); if(_1fb(_20c)!==_1fb(window.location.href)){ return false; } var _20d=_200(_20b); try{ _1dc[_20b]=_20d.OpenAjax.gadgets.rpc.receiveSameDomain; } catch(e){ OpenAjax.gadgets.error("Same domain call failed: parent= incorrectly set."); } } if(typeof _1dc[_20b]==="function"){ _1dc[_20b](rpc); return true; } return false; }; function _20e(_20f,url,_210){ if(!/http(s)?:\/\/.+/.test(url)){ if(url.indexOf("//")==0){ url=window.location.protocol+url; }else{ if(url.charAt(0)=="/"){ url=window.location.protocol+"//"+window.location.host+url; }else{ if(url.indexOf("://")==-1){ url=window.location.protocol+"//"+url; } } } } _1d6[_20f]=url; _1d7[_20f]=!!_210; }; function _1ee(_211){ return _1d8[_211]; }; function _212(_213,_214,_215){ _214=_214||""; _1d8[_213]=String(_214); _205(_213,_214,_215); }; function _216(_217,_218){ function init(_219){ var _21a=_219?_219.rpc:{}; var _21b=_21a.parentRelayUrl; if(_21b.substring(0,7)!=="http://"&&_21b.substring(0,8)!=="https://"&&_21b.substring(0,2)!=="//"){ if(typeof _1dd.parent==="string"&&_1dd.parent!==""){ if(_21b.substring(0,1)!=="/"){ var _21c=_1dd.parent.lastIndexOf("/"); _21b=_1dd.parent.substring(0,_21c+1)+_21b; }else{ _21b=_1fb(_1dd.parent)+_21b; } } } var _21d=!!_21a.useLegacyProtocol; _20e("..",_21b,_21d); if(_21d){ _1ec=OpenAjax.gadgets.rpctx.ifpc; _1ec.init(_1f8,_1e9); } var _21e=_218||_1dd.forcesecure||false; _212("..",_217,_21e); }; var _21f={parentRelayUrl:OpenAjax.gadgets.config.NonEmptyStringValidator}; OpenAjax.gadgets.config.register("rpc",_21f,init); }; function _220(_221,_222,_223){ var _224=_223||_1dd.forcesecure||false; var _225=_222||_1dd.parent; if(_225){ _20e("..",_225); _212("..",_221,_224); } }; function _226(_227,_228,_229,_22a){ if(!OpenAjax.gadgets.util){ return; } var _22b=document.getElementById(_227); if(!_22b){ throw new Error("Cannot set up gadgets.rpc receiver with ID: "+_227+", element not found."); } var _22c=_228||_22b.src; _20e(_227,_22c); var _22d=OpenAjax.gadgets.util.getUrlParameters(_22b.src); var _22e=_229||_22d.rpctoken; var _22f=_22a||_22d.forcesecure; _212(_227,_22e,_22f); }; function _230(_231,_232,_233,_234){ if(_231===".."){ var _235=_233||_1dd.rpctoken||_1dd.ifpctok||""; if(window["__isgadget"]===true){ _216(_235,_234); }else{ _220(_235,_232,_234); } }else{ _226(_231,_232,_233,_234); } }; return {config:function(_236){ if(typeof _236.securityCallback==="function"){ _1e2=_236.securityCallback; } },register:function(_237,_238){ if(_237===_1d1||_237===ACK){ throw new Error("Cannot overwrite callback/ack service"); } if(_237===_1d2){ throw new Error("Cannot overwrite default service:"+" use registerDefault"); } _1d5[_237]=_238; },unregister:function(_239){ if(_239===_1d1||_239===ACK){ throw new Error("Cannot delete callback/ack service"); } if(_239===_1d2){ throw new Error("Cannot delete default service:"+" use unregisterDefault"); } delete _1d5[_239]; },registerDefault:function(_23a){ _1d5[_1d2]=_23a; },unregisterDefault:function(){ delete _1d5[_1d2]; },forceParentVerifiable:function(){ if(!_1ec.isParentVerifiable()){ _1ec=OpenAjax.gadgets.rpctx.ifpc; } },call:function(_23b,_23c,_23d,_23e){ _23b=_23b||".."; var from=".."; if(_23b===".."){ from=_1e1; } ++_1d9; if(_23d){ _1da[_1d9]=_23d; } var rpc={s:_23c,f:from,c:_23d?_1d9:0,a:Array.prototype.slice.call(arguments,3),t:_1d8[_23b],l:_1d7[_23b]}; if(_23b!==".."&&!document.getElementById(_23b)){ OpenAjax.gadgets.log("WARNING: attempted send to nonexistent frame: "+_23b); return; } if(_20a(_23b,rpc)){ return; } var _23f=_1de[_23b]; if(!_23f){ if(!_1df[_23b]){ _1df[_23b]=[rpc]; }else{ _1df[_23b].push(rpc); } return; } if(_1d7[_23b]){ _23f=OpenAjax.gadgets.rpctx.ifpc; } if(_23f.call(_23b,from,rpc)===false){ _1de[_23b]=_1e6; _1ec.call(_23b,from,rpc); } },getRelayUrl:function(_240){ var url=_1d6[_240]; if(url&&url.substring(0,1)==="/"){ if(url.substring(1,2)==="/"){ url=document.location.protocol+url; }else{ url=document.location.protocol+"//"+document.location.host+url; } } return url; },setRelayUrl:_20e,setAuthToken:_212,setupReceiver:_230,getAuthToken:_1ee,removeReceiver:function(_241){ delete _1d6[_241]; delete _1d7[_241]; delete _1d8[_241]; delete _1db[_241]; delete _1dc[_241]; delete _1de[_241]; },getRelayChannel:function(){ return _1ec.getCode(); },receive:function(_242,_243){ if(_242.length>4){ _1ec._receiveMessage(_242,_1f8); }else{ _1f3.apply(null,_242.concat(_243)); } },receiveSameDomain:function(rpc){ rpc.a=Array.prototype.slice.call(rpc.a); window.setTimeout(function(){ _1f8(rpc); },0); },getOrigin:_1fb,getReceiverOrigin:function(_244){ var _245=_1de[_244]; if(!_245){ return null; } if(!_245.isParentVerifiable(_244)){ return null; } var _246=OpenAjax.gadgets.rpc.getRelayUrl(_244)||OpenAjax.gadgets.util.getUrlParameters().parent; return OpenAjax.gadgets.rpc.getOrigin(_246); },init:function(){ if(_1ec.init(_1f8,_1e9)===false){ _1ec=_1e6; } if(_1e0){ _230(".."); } },_getTargetWin:_200,_createRelayIframe:function(_247,data){ var _248=OpenAjax.gadgets.rpc.getRelayUrl(".."); if(!_248){ return; } var src=_248+"#..&"+_1e1+"&"+_247+"&"+encodeURIComponent(OpenAjax.gadgets.json.stringify(data)); var _249=document.createElement("iframe"); _249.style.border=_249.style.width=_249.style.height="0px"; _249.style.visibility="hidden"; _249.style.position="absolute"; function _24a(){ document.body.appendChild(_249); _249.src="javascript:\"\""; _249.src=src; }; if(document.body){ _24a(); }else{ OpenAjax.gadgets.util.registerOnLoadHandler(function(){ _24a(); }); } return _249; },ACK:ACK,RPC_ID:_1e1,SEC_ERROR_LOAD_TIMEOUT:_1e3,SEC_ERROR_FRAME_PHISH:_1e4,SEC_ERROR_FORGED_MSG:_1e5}; }(); OpenAjax.gadgets.rpc.init(); }