Advertisement
Guest User

Untitled

a guest
Oct 26th, 2015
1,014
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. "function" != typeof Object.create && (Object.create = function() {
  2.     function F() {}
  3.     return function(o) {
  4.         if (1 !== arguments.length) throw new Error("This Object.create implementation only accepts one parameter.");
  5.         return F.prototype = o, new F
  6.     }
  7. }());
  8. var apex = {};
  9. apex.jQuery = jQuery,
  10.     function($, undefined) {
  11.         "use strict";
  12.         apex.gPageContext$ = $(document), apex.gParentPageContext$ = apex.gPageContext$, $(document).on("pagebeforecreate pageshow", function(pEvent) {
  13.             var lNewPageContext$ = $(pEvent.target);
  14.             "dialog" === lNewPageContext$.data("role") ? 1 === lNewPageContext$.has("[role='listbox']").length ? apex.gPageContext$ = apex.gParentPageContext$ : apex.gPageContext$ = $(pEvent.target) : (apex.gPageContext$ = $(pEvent.target), apex.gParentPageContext$ = apex.gPageContext$)
  15.         }), $(document).on("pageshow", function(pEvent) {
  16.             var lData = $(pEvent.target).data();
  17.             lData.apexPageTransition && ($.mobile.defaultPageTransition = lData.apexPageTransition), lData.apexPopupTransition && ($.mobile.defaultDialogTransition = lData.apexPopupTransition)
  18.         });
  19.         var resizeTimerId, lastStoredHeight = 0,
  20.             lastStoredWidth = 0;
  21.         $(window).resize(function() {
  22.             ($(window).height() != lastStoredHeight || $(window).width() != lastStoredWidth) && (lastStoredHeight = $(window).height(), lastStoredWidth = $(window).width(), resizeTimerId && clearTimeout(resizeTimerId), resizeTimerId = setTimeout(function() {
  23.                 $(window).trigger("apexwindowresized"), resizeTimerId = null
  24.             }, 200))
  25.         });
  26.         var ie_upto10 = /MSIE \d/.test(navigator.userAgent),
  27.             ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),
  28.             ie = ie_upto10 || ie_11up,
  29.             ie_version = ie && (ie_upto10 ? document.documentMode || 7 : ie_11up[1]);
  30.         7 === ie_version ? $("html").addClass("ie7 lt-ie8 lt-ie9 lte-ie9 lte-ie10") : 8 === ie_version ? $("html").addClass("ie8 lt-ie9 lte-ie9 lte-ie10") : 9 === ie_version ? $("html").addClass("ie9 lte-ie9 lte-ie10") : 10 === ie_version && $("html").addClass("ie10 lte-ie10"), $(document).ready(function() {
  31.             var lTestColour;
  32.             $("body").append("<p id='hcmtest' style='position:absolute;top:0;left:-99999px;background-color:#878787;'></p>"), lTestColour = $("#hcmtest").css("background-color").toLowerCase(), $("#hcmtest").remove(), "#878787" !== lTestColour && "rgb(135, 135, 135)" !== lTestColour && $("body").addClass("u-HCM")
  33.         })
  34.     }(apex.jQuery);
  35. apex.debug = {}, apex.debug = function() {
  36.         "use strict";
  37.         apex.debug.log.apply(this, arguments)
  38.     },
  39.     function(debug, $, undefined) {
  40.         "use strict";
  41.  
  42.         function noop() {}
  43.  
  44.         function ie7log(a, b, c) {
  45.             c !== undefined ? console.log(a, b, c) : b !== undefined ? console.log(a, b) : console.log(a)
  46.         }
  47.         var gDebugLogLevel = -1,
  48.             log = noop,
  49.             error = noop,
  50.             warn = noop,
  51.             info = noop;
  52.         window.console && console.log && ("undefined" == typeof console.log.apply ? (log = ie7log, error = ie7log, warn = ie7log, info = ie7log) : (log = console.log, error = console.error ? console.error : console.log, warn = console.warn ? console.warn : console.log, info = console.info ? console.info : console.log)), debug.LOG_LEVEL = {
  53.             OFF: 0,
  54.             ERROR: 1,
  55.             WARN: 2,
  56.             INFO: 4,
  57.             APP_TRACE: 6,
  58.             ENGINE_TRACE: 9
  59.         }, debug.getLevel = function() {
  60.             var lDebugValue;
  61.             return 0 > gDebugLogLevel && (lDebugValue = $("#pdebug", apex.gPageContext$).val(), gDebugLogLevel = "YES" === lDebugValue ? debug.LOG_LEVEL.INFO : /^LEVEL[0-9]$/.test(lDebugValue) ? parseInt(lDebugValue.substr(5), 10) : debug.LOG_LEVEL.OFF), gDebugLogLevel
  62.         }, debug.setLevel = function(pLevel) {
  63.             var lLevel, lPdebug$, lOldLevel = gDebugLogLevel;
  64.             gDebugLogLevel = "number" == typeof pLevel ? pLevel : debug.LOG_LEVEL.OFF, (0 > gDebugLogLevel || gDebugLogLevel > 9) && (gDebugLogLevel = debug.LOG_LEVEL.OFF), gDebugLogLevel !== lOldLevel && (lLevel = "LEVEL" + gDebugLogLevel, lPdebug$ = $("#pdebug", apex.gPageContext$), 0 === lPdebug$.length && (lPdebug$ = $("<input id='pdebug' type='hidden' name='p_debug'>").prependTo($("#wwvFlowForm", apex.gPageContext$))), lPdebug$.val(lLevel))
  65.         }, debug.message = function(pLevel) {
  66.             var fn = log;
  67.             debug.getLevel() >= pLevel && pLevel > 0 && (pLevel === debug.LOG_LEVEL.ERROR ? fn = error : pLevel <= debug.LOG_LEVEL.WARN ? fn = warn : pLevel <= debug.LOG_LEVEL.INFO && (fn = info), fn.apply(console, Array.prototype.slice.call(arguments, 1)))
  68.         }, debug.error = function() {
  69.             error.apply(console, arguments), console.trace && console.trace()
  70.         }, debug.warn = function() {
  71.             debug.getLevel() >= debug.LOG_LEVEL.WARN && warn.apply(console, arguments)
  72.         }, debug.info = function() {
  73.             debug.getLevel() >= debug.LOG_LEVEL.INFO && info.apply(console, arguments)
  74.         }, debug.trace = function() {
  75.             debug.getLevel() >= debug.LOG_LEVEL.APP_TRACE && log.apply(console, arguments)
  76.         }, debug.log = function() {
  77.             debug.getLevel() > debug.LOG_LEVEL.OFF && log.apply(console, arguments)
  78.         }, debug.deprecated = function(message) {
  79.             debug.warn("DEPRECATED: " + message)
  80.         }
  81.     }(apex.debug, apex.jQuery);
  82. apex.util = {},
  83.     function(util, $, undefined) {
  84.         "use strict";
  85.         util.toArray = function(pValue, pSeparator) {
  86.             var lSeparator, lReturn = [];
  87.             return "string" == typeof pValue ? (lSeparator = pSeparator === undefined ? ":" : pSeparator, lReturn = pValue.split(lSeparator)) : lReturn = $.makeArray(pValue), lReturn
  88.         }, util.escapeHTML = function(pValue) {
  89.             return pValue.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;").replace(/\//g, "&#x2F;")
  90.         }, util.escapeRegExp = function(pValue) {
  91.             var lReturn = "";
  92.             return pValue ? pValue.replace(/([\.\$\*\+\-\?\(\)\{\}\|\^\[\]\\])/g, "\\$1") : lReturn
  93.         };
  94.         var CSS_META_CHARS_REGEXP = new RegExp("([" + util.escapeRegExp(" !#$%&'()*+,./:;<=>?@[\\]^`{|}~\"") + "])", "g");
  95.         util.escapeCSS = function(pValue) {
  96.             var lReturn = "";
  97.             return pValue ? pValue.replace(CSS_META_CHARS_REGEXP, "\\$1") : lReturn
  98.         }, util.escapeHTMLContent = util.escapeHTMLAttr = function(s) {
  99.             return s = "" + s, util.escapeHTML(s)
  100.         };
  101.         var htmlBuilderPrototype = {
  102.             markup: function(t) {
  103.                 return this.html += t, this
  104.             },
  105.             attr: function(name, value) {
  106.                 return 1 === arguments.length && (value = name, name = null), name && (this.html += " ", this.html += name, this.html += "='"), this.html += util.escapeHTMLAttr(value), name && (this.html += "'"), this
  107.             },
  108.             optionalAttr: function(name, value) {
  109.                 return value && "object" != typeof value && (this.html += " ", this.html += name, this.html += "='", this.html += util.escapeHTMLAttr(value), this.html += "'"), this
  110.             },
  111.             optionalBoolAttr: function(name, value) {
  112.                 return value === !0 && (this.html += " ", this.html += name), this
  113.             },
  114.             content: function(t) {
  115.                 return this.html += util.escapeHTMLContent(t), this
  116.             },
  117.             clear: function() {
  118.                 this.html = ""
  119.             },
  120.             toString: function() {
  121.                 return this.html
  122.             }
  123.         };
  124.         util.htmlBuilder = function() {
  125.             var that = Object.create(htmlBuilderPrototype);
  126.             return that.clear(), that
  127.         }, util.makeApplicationUrl = function(pArgs) {
  128.             var i, lUrl = "f?p=";
  129.             if (lUrl += pArgs.appId || $v("pFlowId"), lUrl += ":", lUrl += pArgs.pageId || $v("pFlowStepId"), lUrl += ":", lUrl += pArgs.session || $v("pInstance"), lUrl += ":", lUrl += pArgs.request || $v("pRequest"), lUrl += ":", lUrl += pArgs.debug || $v("pdebug") || "", lUrl += ":", lUrl += pArgs.clearCache || "", lUrl += ":", pArgs.itemNames && (lUrl += pArgs.itemNames.join(",")), lUrl += ":", pArgs.itemValues)
  130.                 for (i = 0; i < pArgs.itemValues.length; i++) i > 0 && (lUrl += ","), lUrl += encodeURIComponent(pArgs.itemValues[i]);
  131.             return lUrl += ":", lUrl += pArgs.printerFriendly || ""
  132.         }, util.showSpinner = function(pContainer, pOptions) {
  133.             var lSpinner$, lTop, lBottom, lYPosition, lYOffset, out = util.htmlBuilder(),
  134.                 lContainer$ = $(pContainer ? pContainer : "body"),
  135.                 lWindow$ = $(window),
  136.                 lContainer = lContainer$.offset(),
  137.                 lOptions = $.extend({
  138.                     alert: apex.lang.getMessage("APEX.PROCESSING")
  139.                 }, pOptions),
  140.                 lViewport = {
  141.                     top: lWindow$.scrollTop(),
  142.                     left: lWindow$.scrollLeft()
  143.                 };
  144.             return lViewport.bottom = lViewport.top + lWindow$.height(), lViewport.right = lViewport.left + lWindow$.width(), lContainer.bottom = lContainer.top + lContainer$.outerHeight(), lContainer.right = lContainer.left + lContainer$.outerWidth(), lTop = lContainer.top > lViewport.top ? lContainer.top : lViewport.top, lBottom = lContainer.bottom < lViewport.bottom ? lContainer.bottom : lViewport.bottom, lYPosition = (lBottom - lTop) / 2, lYOffset = lViewport.top - lContainer.top, lYOffset > 0 && (lYPosition += lYOffset), out.markup("<span").attr("class", "u-Processing").attr("role", "alert").markup(">").markup("<span").attr("class", "u-Processing-spinner").markup(">").markup("</span>").markup("<span").attr("class", "u-VisuallyHidden").markup(">").content(lOptions.alert).markup("</span>").markup("</span>"), lSpinner$ = $(out.toString()), lSpinner$.appendTo(lContainer$), lSpinner$.position({
  145.                 my: "center",
  146.                 at: "left+50% top+" + lYPosition + "px",
  147.                 of: lContainer$,
  148.                 collision: "fit"
  149.             }), lSpinner$
  150.         }, util.delayLinger = function() {
  151.             function getScope(scopeName) {
  152.                 var s = scopes[scopeName];
  153.                 return s || (s = {
  154.                     count: 0,
  155.                     timer: null
  156.                 }, scopes[scopeName] = s), s
  157.             }
  158.  
  159.             function removeScope(scopeName) {
  160.                 delete scopes[scopeName]
  161.             }
  162.             var scopes = {},
  163.                 busyDelay = 200,
  164.                 busyLinger = 1e3;
  165.             return {
  166.                 start: function(pScopeName, pAction) {
  167.                     var s = getScope(pScopeName);
  168.                     s.count += 1, 1 === s.count && null === s.timer && (s.start = (new Date).getTime(), s.timer = setTimeout(function() {
  169.                         s.timer = null, pAction()
  170.                     }, busyDelay))
  171.                 },
  172.                 finish: function(pScopeName, pAction) {
  173.                     var elapsed, s = getScope(pScopeName);
  174.                     if (0 === s.count) throw "delayLinger.finish called before start for scope " + pScopeName;
  175.                     elapsed = (new Date).getTime() - s.start, s.count -= 1, 0 === s.count && (null === s.timer ? busyLinger > elapsed ? setTimeout(function() {
  176.                         pAction(), removeScope(pScopeName)
  177.                     }, busyLinger - elapsed) : (pAction(), removeScope(pScopeName)) : (clearTimeout(s.timer), s.timer = null, removeScope(pScopeName)))
  178.                 }
  179.             }
  180.         }(), util.setOuterHeight = function($e, h) {
  181.             $.each(["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom", "marginTop", "marginBottom"], function(i, p) {
  182.                 var v = parseInt($e.css(p), 10);
  183.                 isNaN(v) || (h -= v)
  184.             }), $e.height(h)
  185.         }, util.setOuterWidth = function($e, w) {
  186.             $.each(["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight", "marginLeft", "marginRight"], function(i, p) {
  187.                 var v = parseInt($e.css(p), 10);
  188.                 isNaN(v) || (w -= v)
  189.             }), $e.width(w)
  190.         }, util.getDateFromISO8601String = function(pDateStr) {
  191.             var date, year, month, day, hr = 0,
  192.                 min = 0,
  193.                 sec = 0,
  194.                 ms = 0,
  195.                 m = /^(\d\d\d\d)-(\d\d)-(\d\d)(T(\d\d):(\d\d)(:(\d\d)(.(\d\d\d))?)?Z?)?$/.exec(pDateStr);
  196.             if (!m) throw "Invalid date format";
  197.             return year = parseInt(m[1], 10), month = parseInt(m[2], 10) - 1, day = parseInt(m[3], 10), m[5] && (hr = parseInt(m[5], 10), min = parseInt(m[6], 10), m[8] && (sec = parseInt(m[8], 10), m[10] && (ms = parseInt(m[10], 10)))), date = new Date(Date.UTC(year, month, day, hr, min, sec, ms))
  198.         };
  199.         var gTopApex = null;
  200.         util.getTopApex = function() {
  201.             function get(w) {
  202.                 var a;
  203.                 try {
  204.                     a = w.apex || null
  205.                 } catch (ex) {
  206.                     a = null
  207.                 }
  208.                 return a
  209.             }
  210.             var curWindow, lastApex;
  211.             if (null !== gTopApex) return gTopApex;
  212.             if (gTopApex = get(top), null !== gTopApex) return gTopApex;
  213.             for (curWindow = window; lastApex = get(curWindow), null !== lastApex && curWindow.parent && curWindow.parent !== curWindow;) gTopApex = lastApex, curWindow = curWindow.parent;
  214.             return gTopApex
  215.         }
  216.     }(apex.util, apex.jQuery);
  217. apex.locale = {},
  218.     function(locale) {
  219.         "use strict";
  220.         var gOptions = {
  221.             separators: {
  222.                 group: ",",
  223.                 decimal: "."
  224.             }
  225.         };
  226.         locale.init = function(pOptions) {
  227.             gOptions = pOptions
  228.         }, locale.getGroupSeparator = function() {
  229.             return gOptions.separators.group
  230.         }, locale.getDecimalSeparator = function() {
  231.             return gOptions.separators.decimal
  232.         }
  233.     }(apex.locale);
  234. apex.lang = {},
  235.     function(lang, util, debug, $, undefined) {
  236.         "use strict";
  237.  
  238.         function formatMessage(pUnsafe, pPattern) {
  239.             var args, re = /%([0-9,%])/g;
  240.             args = $.isArray(arguments[2]) ? arguments[2] : Array.prototype.slice.call(arguments, 2);
  241.             var count = 0,
  242.                 result = pPattern.replace(re, function(m, p1) {
  243.                     var n;
  244.                     if ("%" === p1) return "%";
  245.                     if (n = parseInt(p1, 10), count++, n >= args.length) throw "format(" + pPattern + "): too few arguments";
  246.                     return pUnsafe ? util.escapeHTML(args[n] + "") : args[n]
  247.                 });
  248.             return count < args.length && debug.error("Format(" + pPattern + "): too many arguments. Expecting " + count + ", got " + args.length), result
  249.         }
  250.         var gMessages = {};
  251.         lang.addMessages = function(pMessages) {
  252.             $.extend(gMessages, pMessages)
  253.         }, lang.clearMessages = function() {
  254.             gMessages = {}
  255.         }, lang.getMessage = function(pKey) {
  256.             var msg;
  257.             return msg = gMessages[pKey], null === msg || msg === undefined ? pKey : msg
  258.         }, lang.formatMessage = function(pKey) {
  259.             var pattern = lang.getMessage(pKey),
  260.                 args = [pattern].concat(Array.prototype.slice.call(arguments, 1));
  261.             return lang.format.apply(this, args)
  262.         }, lang.format = function(pPattern) {
  263.             var args = Array.prototype.slice.call(arguments, 1);
  264.             return formatMessage(!0, pPattern, args)
  265.         }, lang.formatMessageNoEscape = function(pKey) {
  266.             var pattern = lang.getMessage(pKey),
  267.                 args = [pattern].concat(Array.prototype.slice.call(arguments, 1));
  268.             return lang.formatNoEscape.apply(this, args)
  269.         }, lang.formatNoEscape = function(pPattern) {
  270.             var args = Array.prototype.slice.call(arguments, 1);
  271.             return formatMessage(!1, pPattern, args)
  272.         }
  273.     }(apex.lang, apex.util, apex.debug, apex.jQuery);
  274. apex.storage = {},
  275.     function(storage, $, undefined) {
  276.         "use strict";
  277.  
  278.         function makeDomStorage(check, store, options) {
  279.             var that;
  280.             return check() ? (that = Object.create(storagePrototype), that.prefix = makeKeyPrefix(options), that._store = store, that._re = new RegExp("^" + that.prefix), that.length = countKeys(that._store, that._re)) : (that = Object.create(noopStoragePrototype), that.prefix = makeKeyPrefix(options)), that
  281.         }
  282.  
  283.         function makeKeyPrefix(options) {
  284.             var prefix = (options.prefix || "") + ".";
  285.             return (options.useAppId === undefined || null === options.AppId) && (options.useAppId = !0), options.useAppId && (prefix += $("#pFlowId").val() + "."), options.usePageId && (prefix += $("#pFlowStepId").val() + "."), options.regionId && (prefix += options.regionId + "."), prefix
  286.         }
  287.  
  288.         function countKeys(store, re) {
  289.             var i, count = 0;
  290.             for (i = 0; i < store.length; i++) re.test(store.key(i)) && (count += 1);
  291.             return count
  292.         }
  293.         storage.getCookieVal = function(pOffset) {
  294.             var lEndPos = document.cookie.indexOf(";", pOffset);
  295.             return -1 === lEndPos && (lEndPos = document.cookie.length), unescape(document.cookie.substring(pOffset, lEndPos))
  296.         }, storage.getCookie = function(pName) {
  297.             for (var lArg = pName + "=", lArgLength = lArg.length, lCookieLength = document.cookie.length, i = 0; lCookieLength > i;) {
  298.                 var j = i + lArgLength;
  299.                 if (document.cookie.substring(i, j) === lArg) return storage.getCookieVal(j);
  300.                 if (i = document.cookie.indexOf(" ", i) + 1, 0 === i) break
  301.             }
  302.             return null
  303.         }, storage.setCookie = function(pName, pValue) {
  304.             var argv = arguments,
  305.                 argc = arguments.length,
  306.                 expires = argc > 2 ? argv[2] : null,
  307.                 path = argc > 3 ? argv[3] : null,
  308.                 domain = argc > 4 ? argv[4] : null,
  309.                 secure = argc > 5 ? !0 : !1;
  310.             document.cookie = pName + "=" + escape(pValue) + (null === expires ? "" : "; expires=" + expires.toGMTString()) + (null === path ? "" : "; path=" + path) + (null === domain ? "" : "; domain=" + domain) + (secure === !0 || "https:" === window.location.protocol ? "; secure" : "")
  311.         }, storage.hasLocalStorageSupport = function() {
  312.             var localStorageSupport = null,
  313.                 test = "$test$";
  314.             return function() {
  315.                 if (null !== localStorageSupport) return localStorageSupport;
  316.                 if (window.Modernizr && window.Modernizr.hasOwnProperty("localstorage")) localStorageSupport = Modernizr.localstorage;
  317.                 else try {
  318.                     localStorage.setItem(test, test), localStorage.removeItem(test), localStorageSupport = !0
  319.                 } catch (e) {
  320.                     localStorageSupport = !1
  321.                 }
  322.                 return localStorageSupport
  323.             }
  324.         }(), storage.hasSessionStorageSupport = function() {
  325.             var sessionStorageSupport = null,
  326.                 test = "$test$";
  327.             return function() {
  328.                 if (null !== sessionStorageSupport) return sessionStorageSupport;
  329.                 if (window.Modernizr && window.Modernizr.hasOwnProperty("sessionstorage")) sessionStorageSupport = Modernizr.localstorage;
  330.                 else try {
  331.                     sessionStorage.setItem(test, test), sessionStorage.removeItem(test), sessionStorageSupport = !0
  332.                 } catch (e) {
  333.                     sessionStorageSupport = !1
  334.                 }
  335.                 return sessionStorageSupport
  336.             }
  337.         }();
  338.         var storagePrototype = {
  339.                 prefix: "",
  340.                 length: 0,
  341.                 key: function(index) {
  342.                     var i, k, scopeIndex = 0;
  343.                     if (index < this._store.length)
  344.                         for (i = 0; i < this._store.length; i++)
  345.                             if (k = this._store.key(i), this._re.test(k)) {
  346.                                 if (index === scopeIndex) return k;
  347.                                 scopeIndex += 1
  348.                             }
  349.                     return null
  350.                 },
  351.                 getItem: function(key) {
  352.                     return this._store.getItem(this.prefix + key)
  353.                 },
  354.                 setItem: function(key, data) {
  355.                     var old = this.getItem(key);
  356.                     this._store.setItem(this.prefix + key, data), null === old && (this.length += 1)
  357.                 },
  358.                 removeItem: function(key) {
  359.                     var old = this.getItem(key);
  360.                     this._store.removeItem(this.prefix + key), null !== old && (this.length -= 1)
  361.                 },
  362.                 clear: function() {
  363.                     var i, k;
  364.                     for (i = 0; i < this._store.length; i++) k = this._store.key(i), this._re.test(k) && this._store.removeItem(k);
  365.                     this.length = 0
  366.                 },
  367.                 sync: function() {
  368.                     this.length = countKeys(this._store, this._re)
  369.                 }
  370.             },
  371.             noopStoragePrototype = {
  372.                 prefix: "",
  373.                 length: 0,
  374.                 key: function(index) {
  375.                     return null
  376.                 },
  377.                 getItem: function(key) {
  378.                     return null
  379.                 },
  380.                 setItem: function(key, data) {},
  381.                 removeItem: function(key) {},
  382.                 clear: function() {}
  383.             };
  384.         storage.getScopedSessionStorage = function(options) {
  385.             return makeDomStorage(storage.hasSessionStorageSupport, window.sessionStorage, options)
  386.         }, storage.getScopedLocalStorage = function(options) {
  387.             return makeDomStorage(storage.hasLocalStorageSupport, window.localStorage, options)
  388.         }
  389.     }(apex.storage, apex.jQuery);
  390. apex.navigation = {},
  391.     function(navigation, util, $, undefined) {
  392.         "use strict";
  393.         var DIALOG_DIV_ID = "apex_dialog_",
  394.             INTERNAL_CLOSE_EVENT = "apexclosedialoginternal";
  395.         navigation.redirect = function(pWhere) {
  396.             $.mobile && pWhere.substring(0, pWhere.indexOf(":")) === "f?p=" + $v("pFlowId") ? $(":mobile-pagecontainer").pagecontainer("change", pWhere, {
  397.                 reload: !0
  398.             }) : location.href = pWhere
  399.         }, navigation.popup = function(pOptions) {
  400.             var lOptions = $.extend({
  401.                     url: "about:blank",
  402.                     name: "_blank",
  403.                     width: 600,
  404.                     height: 600,
  405.                     scroll: "yes",
  406.                     resizable: "yes",
  407.                     toolbar: "no",
  408.                     location: "no",
  409.                     statusbar: "no",
  410.                     menubar: "no"
  411.                 }, pOptions),
  412.                 lWindow = window.open(lOptions.url, "_blank" === (lOptions.name + "").toLowerCase() ? lOptions.name : lOptions.name + "_" + $v("pInstance"), "toolbar=" + lOptions.toolbar + ",scrollbars=" + lOptions.scroll + ",location=" + lOptions.location + ",status=" + lOptions.statusbar + ",menubar=" + lOptions.menubar + ",resizable=" + lOptions.resizable + ",width=" + lOptions.width + ",height=" + lOptions.height);
  413.             return lWindow && (null === lWindow.opener && (lWindow.opener = window.self), lWindow.focus()), lWindow
  414.         }, navigation.openInNewWindow = function(pURL, pWindowName, pOptions) {
  415.             var other, features, altSuffix = pOptions ? pOptions.altSuffix || null : null;
  416.             return pWindowName === undefined && (pWindowName = "_blank"), "_blank" !== pWindowName.toLowerCase() && (null === altSuffix && (altSuffix = $v("pInstance")), altSuffix && (pWindowName += "_" + altSuffix)), pOptions && pOptions.favorTabbedBrowsing === !0 || (features = /(msie) ([\w.]+)/.exec(navigator.userAgent.toLowerCase()) ? "personalbar,menubar,titlebar,toolbar,location,resizable,scrollbars" : "personalbar,menubar,titlebar,toolbar,location,status,resizable,scrollbars"), other = features ? window.open(pURL, pWindowName, features) : window.open(pURL, pWindowName), other && other.focus(), other
  417.         }, navigation.popup.url = function(pURL) {
  418.             navigation.popup({
  419.                 url: pURL,
  420.                 name: "winLov",
  421.                 width: 800,
  422.                 height: 600
  423.             })
  424.         }, navigation.popup.close = function(pItem, pValue) {
  425.             window.opener.$x_Value(pItem, pValue), window.close()
  426.         }, util.getTopApex().navigation._gNextDialogId || (util.getTopApex().navigation._gNextDialogId = 1), navigation.dialog = function(pUrl, pOptions, pCssClasses, pTriggeringElement) {
  427.             var lTriggeringElement$, lDialog$, lDialogId, lPopupWindow, lWindowName, lUserClose, lDefaults = {
  428.                     width: 500,
  429.                     maxWidth: 1500,
  430.                     height: 500,
  431.                     closeText: apex.lang.getMessage("APEX.DIALOG.CLOSE"),
  432.                     modal: !0,
  433.                     resizable: !1,
  434.                     scroll: "auto",
  435.                     closeOnEscape: !0,
  436.                     dialog: null,
  437.                     dialogClass: "ui-dialog--apex"
  438.                 },
  439.                 lOptions = $.extend(lDefaults, pOptions);
  440.             pOptions.dialogClass && (lOptions.dialogClass = "ui-dialog--apex " + pOptions.dialogClass), lUserClose = lOptions.close, lOptions.close = function(event, ui) {
  441.                 lUserClose && lUserClose(event, ui), util.getTopApex().jQuery(this).dialog("destroy").remove()
  442.             }, pCssClasses && (lOptions.dialogClass += " " + pCssClasses), $.mobile ? null === lOptions.dialog ? (lTriggeringElement$ = $(pTriggeringElement, apex.gPageContext$), $.mobile && pUrl.substring(0, pUrl.indexOf(":")) === "f?p=" + $v("pFlowId") && (navigation.redirect(pUrl), navigation.dialog.registerCloseHandler({
  443.                 handler$: lTriggeringElement$,
  444.                 dialog: $(".ui-dialog"),
  445.                 triggeringElement$: lTriggeringElement$,
  446.                 closeFunction: function() {
  447.                     navigation.redirect(pTriggeringElement.context.URL)
  448.                 }
  449.             }))) : $(window.parent.location).attr("href", pUrl) : (lTriggeringElement$ = $(pTriggeringElement, apex.gPageContext$), lOptions.modal ? null === lOptions.dialog ? (lDialogId = DIALOG_DIV_ID + util.getTopApex().navigation._gNextDialogId, util.getTopApex().navigation._gNextDialogId += 1, lDialog$ = util.getTopApex().jQuery('<div id="' + lDialogId + '"><iframe src="' + util.escapeHTMLAttr(pUrl) + '"title="' + util.escapeHTMLAttr(lOptions.title) + '" width="100%" height="100%" style="min-width: 95%;height:100%;" scrolling="' + util.escapeHTMLAttr(lOptions.scroll) + '"></iframe></div>'), lDialog$.on("dialogcreate", function() {
  450.                 $(this).closest(".ui-dialog").css("position", "fixed")
  451.             }).on("dialogopen", function() {
  452.                 lOptions.modal && util.getTopApex().navigation.beginFreezeScroll(), lDialog$.children("iframe").on("load", function() {
  453.                     $(this.contentDocument.body).on("keydown", function(event) {
  454.                         if (event.which === $.ui.keyCode.ESCAPE) lDialog$.dialog("close");
  455.                         else if (event.which === $.ui.keyCode.TAB) {
  456.                             var pageLast = $(this).find(":tabbable").last(),
  457.                                 first = lDialog$.closest(".ui-dialog").find(":tabbable").first();
  458.                             event.target !== pageLast[0] || event.shiftKey || (first.focus(1), event.preventDefault())
  459.                         }
  460.                     })
  461.                 })
  462.             }).on("dialogclose", function() {
  463.                 lOptions.modal && util.getTopApex().navigation.endFreezeScroll()
  464.             }).on("dialogresize", function() {
  465.                 var h = lDialog$.height(),
  466.                     w = lDialog$.width();
  467.                 lDialog$.closest(".ui-dialog").css("position", "fixed"), lDialog$.children("iframe").width(w).height(h)
  468.             }), lDialog$.dialog(lOptions), lDialog$.closest(".ui-dialog").on("keydown", function(event) {
  469.                 if (event.keyCode === $.ui.keyCode.TAB) {
  470.                     var pageTabbables = $(lDialog$.children("iframe")[0].contentDocument.body).find(":tabbable"),
  471.                         pageFirst = pageTabbables.filter(":first"),
  472.                         pageLast = pageTabbables.filter(":last"),
  473.                         tabbables = $(this).find(":tabbable"),
  474.                         first = tabbables.filter(":first"),
  475.                         last = tabbables.filter(":last");
  476.                     event.target !== last[0] && event.target !== lDialog$[0] || event.shiftKey ? event.target !== first[0] && event.target !== lDialog$[0] || !event.shiftKey || (pageLast.focus(1), event.preventDefault()) : (pageFirst.focus(1), event.preventDefault())
  477.                 }
  478.             }), navigation.dialog.registerCloseHandler({
  479.                 handler$: lDialog$,
  480.                 dialog: lDialog$,
  481.                 triggeringElement$: lTriggeringElement$,
  482.                 closeFunction: function() {
  483.                     lDialog$.dialog("close")
  484.                 }
  485.             })) : lOptions.dialog.dialog("option", "title", lOptions.title).children("iframe").attr("src", pUrl) : null === lOptions.dialog ? (lWindowName = lTriggeringElement$.id !== undefined && lTriggeringElement$[0].id !== undefined && "" !== lTriggeringElement$[0].id && lTriggeringElement$ ? lTriggeringElement$[0].id : "winDialog", lPopupWindow = navigation.popup({
  486.                 url: pUrl,
  487.                 name: lWindowName,
  488.                 width: lOptions.width,
  489.                 height: lOptions.height
  490.             }), navigation.dialog.registerCloseHandler({
  491.                 handler$: lTriggeringElement$,
  492.                 dialog: lPopupWindow,
  493.                 triggeringElement$: lTriggeringElement$,
  494.                 closeFunction: function() {
  495.                     lPopupWindow.close()
  496.                 }
  497.             })) : (lOptions.dialog.location.href = pUrl, lOptions.dialog.resizeTo(lOptions.width, lOptions.height)))
  498.         }, navigation.dialog.close = function(pIsModal, pAction) {
  499.             function apexCheck() {
  500.                 try {
  501.                     if (window.opener.apex && window.opener.apex.jQuery) return !0
  502.                 } catch (ex) {
  503.                     return !1
  504.                 }
  505.                 return !1
  506.             }
  507.  
  508.             function getValuesForItems(pItemNames) {
  509.                 var i, val, name, lItems = {};
  510.                 for (i = 0; i < pItemNames.length; i++) name = pItemNames[i], val = $v(name), lItems[name] = val;
  511.                 return lItems
  512.             }
  513.             var lTriggeringId;
  514.             $.isArray(pAction) && (pAction = getValuesForItems(pAction)), $.mobile ? $.isFunction(pAction) ? pAction.call(this, window) : navigation.redirect(apex.jQuery.ajaxSettings.url) : pIsModal ? navigation.dialog.fireCloseHandler(util.getTopApex().jQuery(".ui-dialog--apex").last().children(".ui-dialog-content"), pAction) : window.opener && !window.opener.closed && apexCheck() ? (lTriggeringId = window.name, lTriggeringId.lastIndexOf("_") > 0 && (lTriggeringId = lTriggeringId.substring(0, lTriggeringId.lastIndexOf("_"))), lTriggeringId === undefined ? window.close() : "winDialog" === lTriggeringId ? $.isFunction(pAction) ? pAction.call(this, window) : window.close() : navigation.dialog.fireCloseHandler(window.opener.apex.jQuery("#" + lTriggeringId), pAction)) : $.isFunction(pAction) ? pAction.call(this, window) : window.close()
  515.         }, navigation.dialog.cancel = function(pIsModal) {
  516.             navigation.dialog.close(pIsModal, !1)
  517.         }, navigation.dialog.registerCloseHandler = function(pOptions) {
  518.             pOptions.handler$.off(INTERNAL_CLOSE_EVENT).on(INTERNAL_CLOSE_EVENT, function(pEvent, pAction) {
  519.                 $.isFunction(pAction) ? pAction.call(this, pOptions.dialog) : "string" === $.type(pAction) ? (navigation.redirect(pAction), pOptions.closeFunction.call()) : pAction === !1 ? pOptions.closeFunction.call() : (pOptions.closeFunction.call(), pOptions.triggeringElement$.trigger("apexafterclosedialog", [pAction]))
  520.             })
  521.         }, navigation.dialog.fireCloseHandler = function(pHandler$, pAction) {
  522.             pHandler$.trigger(INTERNAL_CLOSE_EVENT, pAction)
  523.         };
  524.         var gDefaultBodyWidth, gFreezeDepth = 0,
  525.             allowNormalWidth = function() {
  526.                 $(document.body).css("width", gDefaultBodyWidth), $(window).off("apexwindowresized", allowNormalWidth)
  527.             };
  528.         navigation.beginFreezeScroll = function() {
  529.             0 === gFreezeDepth && ($(window).on("apexwindowresized", allowNormalWidth), gDefaultBodyWidth = document.body.style.width, $(document.body).width($(document.body).width()).addClass("apex-no-scroll")), gFreezeDepth += 1
  530.         }, navigation.endFreezeScroll = function() {
  531.             gFreezeDepth -= 1, 0 >= gFreezeDepth && (allowNormalWidth(), $(document.body).removeClass("apex-no-scroll"), gFreezeDepth = 0)
  532.         }
  533.     }(apex.navigation, apex.util, apex.jQuery);
  534. apex.event = {},
  535.     function(event, $) {
  536.         "use strict";
  537.         event.gCancelFlag = !1, event.trigger = function(pSelector, pEvent, pData) {
  538.             return event.gCancelFlag = !1, $(pSelector, apex.gPageContext$).trigger(pEvent, pData), event.gCancelFlag
  539.         }
  540.     }(apex.event, apex.jQuery);
  541. apex.server = {}, apex.jQuery.ajaxSettings.traditional = !0, apex.jQuery.ajaxPrefilter("script", function(options) {
  542.         options.cache = !0
  543.     }),
  544.     function(server, $, util, undefined) {
  545.         "use strict";
  546.  
  547.         function addToQueue(pQueueName, pAction, pRequest, pData, pOptions) {
  548.             function getQueue(name) {
  549.                 var queue = queues[name];
  550.                 return queue || (queue = queues[name] = []), queue
  551.             }
  552.  
  553.             function sendNext(name) {
  554.                 var item, jqXHR, queue = getQueue(name);
  555.                 queue.length >= 1 && (item = queue[0], jqXHR = item.jqXHR = _call(item.request, item.data, item.options), jqXHR.then(function(data, status) {
  556.                     queue.shift(), sendNext(name)
  557.                 }, function(jqXHR, status) {
  558.                     var i, item;
  559.                     for (i = 1; i < queue.length; i++) item = queue[i], item.error && item.error({
  560.                         status: 0
  561.                     }, "abort", null), item.complete && item.complete({
  562.                         status: 0
  563.                     }, "abort");
  564.                     queue.length = 0
  565.                 }))
  566.             }
  567.  
  568.             function findInQueue(pQueue, pName) {
  569.                 var i;
  570.                 for (i = 0; i < pQueue.length; i++)
  571.                     if (pQueue[i].name === pName) return pQueue[i];
  572.                 return null
  573.             }
  574.             var queue, delta, config, currentItem;
  575.             if ("lazyWrite" === pAction) {
  576.                 if (config = findInQueue(lazyWriteQueue, pQueueName)) return config.request = pRequest, config.data = pData, void(config.options = pOptions);
  577.                 if (lazyWriteQueue.push({
  578.                         name: pQueueName,
  579.                         request: pRequest,
  580.                         data: pData,
  581.                         options: pOptions
  582.                     }), lastWriteTimerId) return;
  583.                 null === lastWriteTime ? delta = 10 : (delta = lastWriteTime + MIN_LAZY_WRITE_FREQ - (new Date).getTime(), delta = 0 > delta ? 10 : delta), lastWriteTimerId = setTimeout(function() {
  584.                     var item;
  585.                     for (lastWriteTimerId = null, lastWriteTime = (new Date).getTime(); lazyWriteQueue.length > 0;) item = lazyWriteQueue.shift(), _call(item.request, item.data, item.options)
  586.                 }, delta)
  587.             } else queue = getQueue(pQueueName), "replace" === pAction && queue.length >= 1 && (currentItem = queue.shift(), queue.length = 0, currentItem.jqXHR && currentItem.jqXHR.abort()), queue.push({
  588.                 request: pRequest,
  589.                 data: pData,
  590.                 options: pOptions
  591.             }), 1 === queue.length && sendNext(pQueueName)
  592.         }
  593.  
  594.         function callOrQueue(pRequest, pData, pOptions) {
  595.             var lQName, lAction;
  596.             return pOptions && pOptions.queue ? (lQName = pOptions.queue.name, lAction = pOptions.queue.action, delete pOptions.queue, addToQueue(lQName, lAction, pRequest, pData, pOptions), null) : _call(pRequest, pData, pOptions)
  597.         }
  598.  
  599.         function _call(pRequest, pData, pOptions) {
  600.             var i, lItem, lIdx, lParameterName, lValue, lLoadingIndicator$, C_MAX_SAFE_LEN = 8e3,
  601.                 lProgressScopeName = null,
  602.                 lOptions = $.extend({
  603.                     dataType: "json",
  604.                     type: "post",
  605.                     async: !0,
  606.                     url: "wwv_flow.show",
  607.                     traditional: !0,
  608.                     loadingIndicatorPosition: "after"
  609.                 }, pOptions),
  610.                 lSuccessCallback = lOptions.success,
  611.                 lErrorCallback = lOptions.error,
  612.                 lData = $.extend({
  613.                     p_request: pRequest,
  614.                     p_flow_id: $v("pFlowId"),
  615.                     p_flow_step_id: $v("pFlowStepId"),
  616.                     p_instance: $v("pInstance"),
  617.                     p_debug: $v("pdebug"),
  618.                     p_arg_names: [],
  619.                     p_arg_values: []
  620.                 }, pData),
  621.                 lLoadingIndicatorTmpl$ = $('<span class="u-Processing u-Processing--inline"><span class="u-Processing-spinner"></span></span>'),
  622.                 lLoadingIndicators$ = $(),
  623.                 lLoadingIndicatorPosition = lOptions.loadingIndicatorPosition;
  624.             if ($.isArray(lData.pageItems))
  625.                 for (i = 0; i < lData.pageItems.length; i++) lItem = $x(lData.pageItems[i]), lItem && (lIdx = lData.p_arg_names.length, lData.p_arg_names[lIdx] = lItem.id, lData.p_arg_values[lIdx] = $v(lItem));
  626.             else $(lData.pageItems, apex.gPageContext$).each(function() {
  627.                 var lIdx = lData.p_arg_names.length;
  628.                 lData.p_arg_names[lIdx] = this.id, lData.p_arg_values[lIdx] = $v(this)
  629.             });
  630.             for (delete lData.pageItems, i = 1; 20 >= i; i++)
  631.                 if (lParameterName = "f" + (10 > i ? "0" + i : i), lData.hasOwnProperty(lParameterName) && !$.isArray(lData[lParameterName]) && (lValue = lData[lParameterName] + "", lValue.length > C_MAX_SAFE_LEN)) {
  632.                     for (lData[lParameterName] = []; lValue.length > C_MAX_SAFE_LEN;) lData[lParameterName].push(lValue.substr(0, C_MAX_SAFE_LEN)), lValue = lValue.substr(C_MAX_SAFE_LEN);
  633.                     lData[lParameterName].push(lValue)
  634.                 }
  635.             return apex.event.trigger(lOptions.refreshObject, "apexbeforerefresh", lOptions.refreshObjectData) ? !1 : ($.isFunction(lOptions.clear) && lOptions.clear(), delete lOptions.loadingIndicatorPosition, (lOptions.loadingIndicator || "page" === lLoadingIndicatorPosition) && (progressScopeNameIndex += 1, lProgressScopeName = "_call" + progressScopeNameIndex, util.delayLinger.start(lProgressScopeName, function() {
  636.                 "page" === lLoadingIndicatorPosition ? (lLoadingIndicator$ = util.showSpinner(), lLoadingIndicators$ = lLoadingIndicators$.add(lLoadingIndicator$)) : $.isFunction(lOptions.loadingIndicator) ? lLoadingIndicators$ = lOptions.loadingIndicator(lLoadingIndicatorTmpl$) : $(lOptions.loadingIndicator).each(function() {
  637.                     lLoadingIndicator$ = lLoadingIndicatorTmpl$.clone(), apex.item(this).callbacks.loadingIndicator !== undefined ? lLoadingIndicator$ = apex.item(this).loadingIndicator(lLoadingIndicator$) : "before" === lLoadingIndicatorPosition ? lLoadingIndicator$ = lLoadingIndicator$.insertBefore($(this, apex.gPageContext$).filter(":not(:hidden)")) : "after" === lLoadingIndicatorPosition ? lLoadingIndicator$ = lLoadingIndicator$.insertAfter($(this, apex.gPageContext$).filter(":not(:hidden)")) : "prepend" === lLoadingIndicatorPosition ? lLoadingIndicator$ = lLoadingIndicator$.prependTo($(this, apex.gPageContext$)) : "append" === lLoadingIndicatorPosition ? lLoadingIndicator$ = lLoadingIndicator$.appendTo($(this, apex.gPageContext$)) : "centered" === lLoadingIndicatorPosition && (lLoadingIndicator$ = util.showSpinner($(this, apex.gPageContext$))), lLoadingIndicators$ = lLoadingIndicators$.add(lLoadingIndicator$)
  638.                 })
  639.             })), lOptions.data = lData, lOptions.error = function(pjqXHR, pTextStatus, pErrorThrown) {
  640.                 _error(pjqXHR, pTextStatus, pErrorThrown, {
  641.                     callback: lErrorCallback,
  642.                     loadingIndicator: lLoadingIndicators$,
  643.                     progressScopeName: lProgressScopeName
  644.                 })
  645.             }, lOptions.success = function(pData, pTextStatus, pjqXHR) {
  646.                 _success(pData, pTextStatus, pjqXHR, {
  647.                     callback: lSuccessCallback,
  648.                     errorCallback: lOptions.error,
  649.                     loadingIndicator: lLoadingIndicators$,
  650.                     progressScopeName: lProgressScopeName,
  651.                     refreshObject: lOptions.refreshObject
  652.                 })
  653.             }, $.ajax(lOptions))
  654.         }
  655.  
  656.         function _removeLoadingIndicator(pLoadingIndicator, pProgressScopeName) {
  657.             function cleanup() {
  658.                 $.isFunction(pLoadingIndicator) ? pLoadingIndicator() : $(pLoadingIndicator, apex.gPageContext$).remove()
  659.             }
  660.             pProgressScopeName ? util.delayLinger.finish(pProgressScopeName, function() {
  661.                 cleanup()
  662.             }) : cleanup()
  663.         }
  664.  
  665.         function _success(pData, pTextStatus, pjqXHR, pOptions) {
  666.             var lResult = !0,
  667.                 lErrorHeader = pjqXHR.getResponseHeader("X-APEX-ERROR");
  668.             if (pData) {
  669.                 if (pData.error) return pOptions.errorCallback(pjqXHR, "APEX", pData.error);
  670.                 if (lErrorHeader) return pOptions.errorCallback(pjqXHR, "APEX", lErrorHeader)
  671.             }
  672.             return _removeLoadingIndicator(pOptions.loadingIndicator, pOptions.progressScopeName), $.isFunction(pOptions.callback) && (lResult = pOptions.callback(pData, pTextStatus, pjqXHR)), (lResult || lResult == undefined) && apex.event.trigger(pOptions.refreshObject, "apexafterrefresh", pOptions.refreshObjectData) ? !1 : lResult
  673.         }
  674.  
  675.         function _error(pjqXHR, pTextStatus, pErrorThrown, pOptions) {
  676.             var lMsg, lResult = !1;
  677.             return _removeLoadingIndicator(pOptions.loadingIndicator, pOptions.progressScopeName), $.isFunction(pOptions.callback) ? lResult = pOptions.callback(pjqXHR, pTextStatus, pErrorThrown) : 0 !== pjqXHR.status && (lMsg = "APEX" === pTextStatus ? pErrorThrown : "Error: " + pTextStatus + " - " + pErrorThrown, $.isFunction(window.onerror) ? window.onerror(lMsg, null, null) : window.alert(lMsg)), lResult
  678.         }
  679.         server.plugin = function(pAjaxIdentifier, pData, pOptions) {
  680.             return callOrQueue("PLUGIN=" + pAjaxIdentifier, pData, pOptions)
  681.         }, server.pluginUrl = function(pAjaxIdentifier, pData) {
  682.             return server.url($.extend({}, pData, {
  683.                 p_request: "PLUGIN=" + pAjaxIdentifier
  684.             }))
  685.         }, server.url = function(pData, pPage) {
  686.             var i, lKey, lUrl, lPage = pPage;
  687.             (null === lPage || lPage === undefined) && (lPage = $v("pFlowStepId")), lUrl = "wwv_flow.show?p_flow_id=" + $v("pFlowId") + "&p_flow_step_id=" + lPage + "&p_instance=" + $v("pInstance") + "&p_debug=" + $v("pdebug");
  688.             for (lKey in pData)
  689.                 if (pData.hasOwnProperty(lKey))
  690.                     if ("pageItems" === lKey)
  691.                         if ($.isArray(pData.pageItems))
  692.                             for (i = 0, lItem; i < pData.pageItems.length; i++) lItem = $x(pData.pageItems[i]), lItem && (lUrl = lUrl + "&p_arg_names=" + encodeURIComponent(lItem.id) + "&p_arg_values=" + encodeURIComponent($v(lItem)));
  693.                         else $(pData.pageItems, apex.gPageContext$).each(function() {
  694.                             lUrl = lUrl + "&p_arg_names=" + encodeURIComponent(this.id) + "&p_arg_values=" + encodeURIComponent($v(this))
  695.                         });
  696.             else lUrl = lUrl + "&" + lKey + "=" + encodeURIComponent(pData[lKey]);
  697.             return lUrl
  698.         }, server.process = function(pName, pData, pOptions) {
  699.             return _call("APPLICATION_PROCESS=" + pName, pData, pOptions)
  700.         }, server.widget = function(pName, pData, pOptions) {
  701.             var lData = pData || {};
  702.             return lData.p_widget_name = pName, _call("APXWGT", lData, pOptions)
  703.         };
  704.         var MIN_LAZY_WRITE_FREQ = 5e3,
  705.             lastWriteTimerId = null,
  706.             lastWriteTime = null,
  707.             lazyWriteQueue = [],
  708.             queues = {},
  709.             progressScopeNameIndex = 0
  710.     }(apex.server, apex.jQuery, apex.util);
  711. apex.page = {},
  712.     function(page, $, event, undefined) {
  713.         function _getSubmitOptions(pOptions, pMode) {
  714.             var lRequestDefault, lDefaults, lOptions = {};
  715.             switch ("SUBMIT" === pMode ? lRequestDefault = null : "CONFIRM" === pMode && (lRequestDefault = "Delete"), lDefaults = {
  716.                 request: lRequestDefault,
  717.                 set: null,
  718.                 showWait: !1,
  719.                 waitMsg: null,
  720.                 form: "wwv_flow"
  721.             }, typeof pOptions) {
  722.                 case "string":
  723.                     lOptions = $.extend(lDefaults, {
  724.                         request: pOptions
  725.                     });
  726.                     break;
  727.                 case "object":
  728.                     lOptions = $.extend(lDefaults, pOptions);
  729.                     break;
  730.                 default:
  731.                     lOptions = lDefaults
  732.             }
  733.             return lOptions
  734.         }
  735.         page.itemCallbacks = {}, page.submit = function(pOptions) {
  736.             var lKeyCode, lWaitPopup, lNumTimeouts, lForm$, lRunSubmitProcessing, lOptions = _getSubmitOptions(pOptions, "SUBMIT"),
  737.                 lCancelSubmit = !1;
  738.             if (lOptions.submitIfEnter !== undefined && (lKeyCode = window.event ? window.event.keyCode : lOptions.submitIfEnter.which, 13 !== lKeyCode)) return !0;
  739.             if (lCancelSubmit = event.trigger(apex.gPageContext$, "apexbeforepagesubmit", lOptions.request)) event.gCancelFlag = !1;
  740.             else {
  741.                 lOptions.showWait && (lWaitPopup = apex.widget.waitPopup()), lOptions.set && $.each(lOptions.set, function(pId, pValue) {
  742.                     pId && pValue !== undefined && $s(pId, pValue)
  743.                 }), flowSelectAll(), $("#pRequest", apex.gPageContext$).val(lOptions.request);
  744.                 try {
  745.                     window.external && "unknown" == typeof window.external.AutoCompleteSaveForm && window.external.AutoCompleteSaveForm($("form[name=" + lOptions.form + "]", apex.gPageContext$).get(0))
  746.                 } catch (e) {}
  747.                 lNumTimeouts = 0, lForm$ = $("form[name=" + lOptions.form + "]", apex.gPageContext$), lRunSubmitProcessing = function() {
  748.                     "wwv_flow.accept" === lForm$.attr("action") && 0 === $("#pPageChecksum", apex.gPageContext$).length ? (lNumTimeouts++, lNumTimeouts > 5 ? (lWaitPopup && lWaitPopup.remove(), window.alert(apex.lang.getMessage("APEX.WAIT_UNTIL_PAGE_LOADED"))) : (lWaitPopup === undefined && 1 === lNumTimeouts && (lWaitPopup = apex.widget.waitPopup()), window.setTimeout(lRunSubmitProcessing, 300))) : (event.trigger(apex.gPageContext$, "apexpagesubmit", lOptions.request), lForm$.trigger("submit"))
  749.                 }, lRunSubmitProcessing()
  750.             }
  751.             return lOptions.submitIfEnter !== undefined ? !1 : void 0
  752.         }, page.confirm = function(pMessage, pOptions) {
  753.             var lMessage, lOptions = _getSubmitOptions(pOptions, "CONFIRM");
  754.             lMessage = pMessage ? pMessage : "Would you like to perform this delete action?", confirm(lMessage) && page.submit(lOptions)
  755.         }, apex.submit = page.submit, apex.confirm = page.confirm
  756.     }(apex.page, apex.jQuery, apex.event);
  757. apex.item = function(pNd, pCallbacks) {
  758.     function init(pNd, pCallbacks) {
  759.         try {
  760.             switch (typeof pNd) {
  761.                 case "string":
  762.                     _self.node = apex.jQuery("#" + apex.util.escapeCSS(pNd), apex.gPageContext$)[0];
  763.                     break;
  764.                 case "object":
  765.                     _self.node = pNd;
  766.                     break;
  767.                 default:
  768.                     _self.node = !1
  769.             }
  770.             _self.node && 1 === _self.node.nodeType || (_self.node = !1)
  771.         } catch (e) {
  772.             _self.node = !1
  773.         }
  774.         if (_self.node) {
  775.             _self.id = _self.node.id, pCallbacks ? apex.page.itemCallbacks[_self.id] = _self.callbacks : apex.page.itemCallbacks[_self.id] && (_self.callbacks = apex.page.itemCallbacks[_self.id]);
  776.             var lNodeType = _self.node.nodeName.toUpperCase(),
  777.                 lClass = _self.node.className.toUpperCase();
  778.             if ("FIELDSET" === lNodeType) switch (_self.item_type = lClass, lClass) {
  779.                 case "CHECKBOX_GROUP":
  780.                 case "RADIO_GROUP":
  781.                 case "SHUTTLE":
  782.                     break;
  783.                 default:
  784.                     _self.item_type = !1
  785.             } else if ("INPUT" === lNodeType) switch (_self.item_type = _self.node.type.toUpperCase(), _self.item_type) {
  786.                 case "CHECKBOX":
  787.                 case "RADIO":
  788.                     break;
  789.                 case "TEXT":
  790.                     var TEXT_TYPE = _self.node.parentNode.className.toUpperCase();
  791.                     switch (TEXT_TYPE) {
  792.                         case "DATEPICKER":
  793.                             _self.item_type = TEXT_TYPE;
  794.                             break;
  795.                         case "LOV":
  796.                             apex.jQuery("#" + _self.id + "_HIDDENVALUE", apex.gPageContext$).length > 0 ? _self.item_type = "POPUP_KEY_LOV" : _self.item_type = "POPUP_LOV"
  797.                     }
  798.                     break;
  799.                 case "HIDDEN":
  800.                     _self.display_span = $x(_self.id + "_DISPLAY"), _self.display_span && (_self.item_type = "DISPLAY_SAVES_STATE");
  801.                     break;
  802.                 default:
  803.                     _self.item_type = "TEXT"
  804.             } else switch (_self.item_type = lNodeType, _self.item_type) {
  805.                 case "TEXTAREA":
  806.                     if ("html_editor" === _self.node.parentNode.className && "FIELDSET" === _self.node.parentNode.tagName) _self.item_type = "FCKEDITOR";
  807.                     else try {
  808.                         window.CKEDITOR && window.CKEDITOR.instances[_self.id] && (_self.item_type = "CKEDITOR3")
  809.                     } catch (e) {}
  810.                     break;
  811.                 case "SELECT":
  812.                     break;
  813.                 case "SPAN":
  814.                     "display_only" === _self.node.className && (_self.item_type = "DISPLAY_ONLY");
  815.                     break;
  816.                 default:
  817.                     _self.item_type = !1
  818.             }
  819.         }
  820.     }
  821.  
  822.     function getValue() {
  823.         if (!_self.node) return "";
  824.         if (apex.jQuery.isFunction(_self.callbacks.getValue)) return _self.callbacks.getValue.call(_self);
  825.         var oEditor, lRadio$, lArray = !0,
  826.             lReturn = [];
  827.         switch (_self.item_type) {
  828.             case "RADIO_GROUP":
  829.                 lRadio$ = apex.jQuery(":checked", _self.node), lReturn = 0 === lRadio$.length ? "" : lRadio$.val();
  830.                 break;
  831.             case "CHECKBOX_GROUP":
  832.                 apex.jQuery(":checked", _self.node).each(function() {
  833.                     lReturn[lReturn.length] = this.value
  834.                 });
  835.                 break;
  836.             case "SELECT":
  837.                 lReturn = apex.jQuery(_self.node).val(), (null === lReturn || void 0 === lReturn) && (lReturn = apex.jQuery(_self.node).attr("multiple") ? [] : "");
  838.                 break;
  839.             default:
  840.                 lArray = !1
  841.         }
  842.         if (!lArray) switch (_self.item_type) {
  843.             case "CHECKBOX":
  844.                 lReturn = _self.node.checked ? _self.node.value : "";
  845.                 break;
  846.             case "RADIO":
  847.                 lReturn = _self.node.checked ? _self.node.value : "";
  848.                 break;
  849.             case "TEXT":
  850.                 lReturn = _self.node.value;
  851.                 break;
  852.             case "POPUP_LOV":
  853.                 lReturn = _self.node.value;
  854.                 break;
  855.             case "POPUP_KEY_LOV":
  856.                 lReturn = apex.jQuery("#" + _self.node.id + "_HIDDENVALUE", apex.gPageContext$).val();
  857.                 break;
  858.             case "DATEPICKER":
  859.                 lReturn = _self.node.value;
  860.                 break;
  861.             case "HIDDEN":
  862.                 lReturn = _self.node.value;
  863.                 break;
  864.             case "DISPLAY_SAVES_STATE":
  865.                 lReturn = _self.node.value;
  866.                 break;
  867.             case "DISPLAY_ONLY":
  868.                 lReturn = _self.node.innerHTML;
  869.                 break;
  870.             case "TEXTAREA":
  871.                 lReturn = _self.node.value;
  872.                 break;
  873.             case "FCKEDITOR":
  874.                 oEditor = FCKeditorAPI.GetInstance(_self.node.id), lReturn = oEditor.GetHTML();
  875.                 break;
  876.             default:
  877.                 lReturn = ""
  878.         }
  879.         return lReturn
  880.     }
  881.  
  882.     function setValue(pValue, pDisplayValue, pSuppressChangeEvent) {
  883.         if (apex.jQuery.isFunction(_self.callbacks.setValue)) _self.callbacks.setValue.call(_self, pValue, pDisplayValue, pSuppressChangeEvent);
  884.         else {
  885.             var lCheck, lOpts = !1,
  886.                 lSelf$ = apex.jQuery(_self.node, apex.gPageContext$);
  887.             if (!_self.node) return;
  888.             switch (_self.item_type) {
  889.                 case "RADIO_GROUP":
  890.                     lOpts = $x_FormItems(_self.node, "RADIO");
  891.                     break;
  892.                 case "CHECKBOX_GROUP":
  893.                     lOpts = $x_FormItems(_self.node, "CHECKBOX");
  894.                     break;
  895.                 case "POPUP_KEY_LOV":
  896.                     apex.jQuery("#" + _self.node.id + "_HIDDENVALUE", apex.gPageContext$).val(pValue), lSelf$.val(pDisplayValue);
  897.                     break;
  898.                 case "SELECT":
  899.                     lOpts = _self.node.options;
  900.                     break;
  901.                 default:
  902.                     lOpts = !1
  903.             }
  904.             if (lOpts)
  905.                 for (var i = 0, len = lOpts.length; len > i; i++) lCheck = lOpts[i].value == pValue, "RADIO_GROUP" === _self.item_type || "CHECKBOX_GROUP" === _self.item_type ? lOpts[i].checked = lCheck : lOpts[i].selected = lCheck;
  906.             else switch (_self.item_type) {
  907.                 case "CHECKBOX":
  908.                 case "RADIO":
  909.                     _self.node.value == pValue && (_self.node.checked = !0);
  910.                     break;
  911.                 case "TEXT":
  912.                 case "POPUP_LOV":
  913.                 case "DATEPICKER":
  914.                 case "PASSWORD":
  915.                 case "HIDDEN":
  916.                 case "TEXTAREA":
  917.                     lSelf$.val(pValue);
  918.                     break;
  919.                 case "DISPLAY_SAVES_STATE":
  920.                     lSelf$.val(pValue), apex.jQuery(_self.display_span, apex.gPageContext$).html(pValue);
  921.                     break;
  922.                 case "DISPLAY_ONLY":
  923.                     lSelf$.html(pValue);
  924.                     break;
  925.                 case "FCKEDITOR":
  926.                     var oEditor = FCKeditorAPI.GetInstance(_self.node.id);
  927.                     oEditor.SetHTML(pValue);
  928.                     break;
  929.                 default:
  930.                     _self.node.innerHTML = pValue
  931.             }
  932.         }
  933.         _self.afterModify(), pSuppressChangeEvent || apex.jQuery(_self.node).trigger("change")
  934.     }
  935.  
  936.     function enable() {
  937.         apex.jQuery.isFunction(_self.callbacks.enable) ? _self.callbacks.enable.call(_self) : (apex.jQuery(_self.node).removeClass("apex_disabled").prop("disabled", !1), !$.mobile || "TEXTAREA" !== _self.item_type && -1 == apex.jQuery.inArray(_self.node.type, ["text", "email", "url", "tel", "search", "number", "password", "time", "date", "month", "week", "datetime", "datetime-local", "color"]) || apex.jQuery(_self.node).textinput("enable")), _self.afterModify()
  938.     }
  939.  
  940.     function disable() {
  941.         apex.jQuery.isFunction(_self.callbacks.disable) ? _self.callbacks.disable.call(_self) : (apex.jQuery(_self.node).addClass("apex_disabled").prop("disabled", !0), !$.mobile || "TEXTAREA" !== _self.item_type && -1 == apex.jQuery.inArray(_self.node.type, ["text", "email", "url", "tel", "search", "number", "password", "time", "date", "month", "week", "datetime", "datetime-local", "color"]) || apex.jQuery(_self.node).textinput("disable")), _self.afterModify()
  942.     }
  943.  
  944.     function show(pShowRow) {
  945.         var lNodeId = apex.util.escapeCSS(_self.node.id),
  946.             lNodeDisplay$ = apex.jQuery("#" + lNodeId + "_CONTAINER", apex.gPageContext$);
  947.         lNodeDisplay$.length > 0 ? lNodeDisplay$.show() : pShowRow ? $x_ItemRow(_self.node, "SHOW") : (apex.jQuery.isFunction(_self.callbacks.show) ? _self.callbacks.show.call(_self) : (lNodeDisplay$ = apex.jQuery("#" + lNodeId + "_DISPLAY", apex.gPageContext$), lNodeDisplay$.length > 0 ? lNodeDisplay$.show() : apex.jQuery(_self.node).show().trigger("apexaftershow")), lNodeId && apex.jQuery("label[for=" + lNodeId + "]", apex.gPageContext$).show())
  948.     }
  949.  
  950.     function hide(pHideRow) {
  951.         var lNodeId = apex.util.escapeCSS(_self.node.id),
  952.             lNodeDisplay$ = apex.jQuery("#" + lNodeId + "_CONTAINER", apex.gPageContext$);
  953.         lNodeDisplay$.length > 0 ? lNodeDisplay$.hide() : pHideRow ? $x_ItemRow(_self.node, "HIDE") : (apex.jQuery.isFunction(_self.callbacks.hide) ? _self.callbacks.hide.call(_self) : (lNodeDisplay$ = apex.jQuery("#" + lNodeId + "_DISPLAY", apex.gPageContext$), lNodeDisplay$.length > 0 ? lNodeDisplay$.hide() : apex.jQuery(_self.node).hide().trigger("apexafterhide")), lNodeId && apex.jQuery("label[for=" + lNodeId + "]", apex.gPageContext$).hide())
  954.     }
  955.  
  956.     function isEmpty() {
  957.         var lItemValue, re, lThis, lOpts, lReturn, lNullValue = "";
  958.         return lItemValue = _self.getValue(), lItemValue = apex.jQuery.isArray(lItemValue) ? lItemValue.join(":") : "" + lItemValue, re = /^\s{1,}$/g, lThis = $x(_self.node), lOpts = !1, "nullValue" in _self.callbacks ? apex.jQuery.isFunction(_self.callbacks.nullValue) ? _self.callbacks.nullValue.call(_self) : 0 === lItemValue.length || null === lItemValue || lItemValue === _self.callbacks.nullValue || lItemValue.search(re) > -1 ? !0 : !1 : ("SELECT" === _self.item_type ? (apex.widget && apex.widget.report && apex.widget.report.tabular && apex.widget.report.tabular.gNullValueList && apex.jQuery.each(apex.widget.report.tabular.gNullValueList, function(pId, pValue) {
  959.             return this.name === lThis.name ? (lNullValue = pValue.value, !1) : void 0
  960.         }), lReturn = lThis.multiple ? 0 === lItemValue.length || lItemValue === lNullValue : lNullValue || "" === lNullValue ? lItemValue === lNullValue : !1) : lReturn = 0 === lItemValue.length || null === lItemValue || lItemValue.search(re) > -1 ? !0 : !1, lReturn)
  961.     }
  962.  
  963.     function addValue(pValue) {
  964.         apex.jQuery.isFunction(_self.callbacks.addValue) ? _self.callbacks.addValue.call(_self, pValue) : alert("No default handling defined for addValue"), _self.afterModify()
  965.     }
  966.  
  967.     function removeValue() {
  968.         apex.jQuery.isFunction(_self.callbacks.removeValue) ? _self.callbacks.removeValue.call(_self) : alert("No default handling defined for removeValue"), _self.afterModify()
  969.     }
  970.  
  971.     function setFocus() {
  972.         var lSetFocusTo$;
  973.         lSetFocusTo$ = "setFocusTo" in _self.callbacks ? apex.jQuery.isFunction(_self.callbacks.setFocusTo) ? _self.callbacks.setFocusTo.call(_self) : apex.jQuery(_self.callbacks.setFocusTo) : apex.jQuery("#" + apex.util.escapeCSS(_self.id), apex.gPageContext$), lSetFocusTo$.focus()
  974.     }
  975.  
  976.     function setStyle(pPropertyName, pPropertyValue) {
  977.         var lSetStyleTo$;
  978.         lSetStyleTo$ = "setStyleTo" in _self.callbacks ? apex.jQuery.isFunction(_self.callbacks.setStyleTo) ? _self.callbacks.setStyleTo.call(_self) : apex.jQuery(_self.callbacks.setStyleTo) : apex.jQuery("#" + apex.util.escapeCSS(_self.id), apex.gPageContext$), lSetStyleTo$.css(pPropertyName, pPropertyValue), _self.afterModify()
  979.     }
  980.  
  981.     function afterModify() {
  982.         apex.jQuery.isFunction(_self.callbacks.afterModify) && _self.callbacks.afterModify.call(_self)
  983.     }
  984.  
  985.     function loadingIndicator(pLoadingIndicator$) {
  986.         var lLoadingIndicator$;
  987.         return "loadingIndicator" in _self.callbacks && apex.jQuery.isFunction(_self.callbacks.loadingIndicator) && (lLoadingIndicator$ = _self.callbacks.loadingIndicator.call(_self, pLoadingIndicator$)), lLoadingIndicator$
  988.     }
  989.     if (!(this instanceof arguments.callee)) return new apex.item(pNd, pCallbacks);
  990.     var _self = this;
  991.     this.node = !1, this.item_type = !1, this.id = !1, this.getValue = getValue, this.init = init, this.setValue = setValue, this.isEmpty = isEmpty, this.enable = enable, this.disable = disable, this.show = show, this.hide = hide, this.addValue = addValue, this.removeValue = removeValue, this.setFocus = setFocus, this.setStyle = setStyle, this.afterModify = afterModify, this.loadingIndicator = loadingIndicator, pCallbacks ? this.callbacks = pCallbacks : this.callbacks = {}, this.init(pNd, pCallbacks)
  992. };
  993.  
  994. function $d_LOV_from_JSON() {
  995.     function create(pThis, pJSON, pType, pId, pCheckedValue, pForceNewLine) {
  996.         var myObject = apex.jQuery.parseJSON(pJSON);
  997.         if ("SHUTTLE" == that.l_Type) {
  998.             var lvar = '<table cellspacing="0" cellpadding="0" border="0" class="ajax_shuttle" summary=""><tbody><tr><td class="shuttleSelect1" id="shuttle1"></td><td align="center" class="shuttleControl"><img title="Reset" alt="Reset" onclick="g_Shuttlep_v01.reset();" src="/i/htmldb/icons/shuttle_reload.png"/><img title="Move All" alt="Move All" onclick="g_Shuttlep_v01.move_all();" src="/i/htmldb/icons/shuttle_last.png"/><img title="Move" alt="Move" onclick="g_Shuttlep_v01.move();" src="/i/htmldb/icons/shuttle_right.png"/><img title="Remove" alt="Remove" onclick="g_Shuttlep_v01.remove();" src="/i/htmldb/icons/shuttle_left.png"/><img title="Remove All" alt="Remove All" onclick="g_Shuttlep_v01.remove_all();" src="/i/htmldb/icons/shuttle_first.png"/></td><td class="shuttleSelect2" id="shuttle2"></td><td class="shuttleSort2"><img title="Top" alt="Top" onclick="g_Shuttlep_v01.sort2(\'T\');" src="/i/htmldb/icons/shuttle_top.png"/><img title="Up" alt="Up" onclick="g_Shuttlep_v01.sort2(\'U\');" src="/i/htmldb/icons/shuttle_up.png"/><img title="Down" alt="Down" onclick="g_Shuttlep_v01.sort2(\'D\');" src="/i/htmldb/icons/shuttle_down.png"/><img title="Bottom" alt="Bottom" onclick="g_Shuttlep_v01.sort2(\'B\');" src="/i/htmldb/icons/shuttle_bottom.png"/></td></tr></tbody></table>';
  999.             $x(pThis).innerHTML = lvar;
  1000.             var lSelect = $dom_AddTag("shuttle1", "select"),
  1001.                 lSelect2 = $dom_AddTag("shuttle2", "select");
  1002.             lSelect.multiple = !0, lSelect2.multiple = !0;
  1003.             for (var i = 0, len = myObject.row.length; len > i; i++)
  1004.                 if (myObject.row[i]) {
  1005.                     var lTest = myObject.row[i].C ? parseInt(myObject.row[i].C) : !1;
  1006.                     if (lTest) var lOption = $dom_AddTag(lSelect2, "option");
  1007.                     else var lOption = $dom_AddTag(lSelect, "option");
  1008.                     lOption.text = myObject.row[i].D, lOption.value = myObject.row[i].R
  1009.                 }
  1010.             if (window.g_Shuttlep_v01 = null, !flowSelectArray) var flowSelectArray = [];
  1011.             return flowSelectArray[2] = lSelect, flowSelectArray[1] = lSelect2, window.g_Shuttlep_v01 = new dhtml_ShuttleObject(lSelect, lSelect2), window.g_Shuttlep_v01
  1012.         }
  1013.         if ("SELECT" == that.l_Type || "MULTISELECT" == that.l_Type) {
  1014.             for (var lSelect = $dom_AddTag(pThis, "select"), i = 0, len = myObject.row.length; len > i; i++)
  1015.                 if (myObject.row[i]) {
  1016.                     var lOption = $dom_AddTag(lSelect, "option");
  1017.                     lOption.text = myObject.row[i].D, lOption.value = myObject.row[i].R;
  1018.                     var lTest = parseInt(myObject.row[i].C);
  1019.                     lOption.selected = lTest
  1020.                 }
  1021.             return that.l_Dom = lSelect, that
  1022.         }
  1023.         if ("RADIO" == that.l_Type) {
  1024.             for (var ltable = $dom_AddTag(pThis, "table"), i = 0, len = myObject.row.length; len > i; i++)
  1025.                 if (myObject.row[i]) {
  1026.                     (i % 10 == 0 || pForceNewLine) && (lrow = $dom_AddTag(ltable, "tr"));
  1027.                     var lTd = $dom_AddTag(lrow, "td"),
  1028.                         lTest = !1;
  1029.                     pCheckedValue && pCheckedValue == myObject.row[i].R && (lTest = !0);
  1030.                     var lCheck = $dom_AddInput(lTd, "radio", myObject.row[i].R);
  1031.                     lCheck.checked = lTest, $dom_AddTag(lTd, "span", myObject.row[i].D)
  1032.                 }
  1033.             return that.l_Dom = lSelect, that
  1034.         }
  1035.         if ("CHECKBOX" == that.l_Type) {
  1036.             for (var ltable = $dom_AddTag(pThis, "table"), i = 0, len = myObject.row.length; len > i; i++)
  1037.                 if (myObject.row[i]) {
  1038.                     (i % 10 == 0 || pForceNewLine) && (lrow = $dom_AddTag(ltable, "tr"));
  1039.                     var lTd = $dom_AddTag(lrow, "td"),
  1040.                         lTest = parseInt(myObject.row[i].C),
  1041.                         lCheck = $dom_AddInput(lTd, "checkbox", myObject.row[i].R);
  1042.                     lCheck.checked = lTest, $dom_AddTag(lTd, "span", myObject.row[i].D)
  1043.                 }
  1044.             return that.l_Dom = lSelect, that
  1045.         }
  1046.         for (var lHolder = $dom_AddTag(pThis, "div"), i = 0, len = myObject.row.length; len > i; i++)
  1047.             if (myObject.row[i] && myObject.row[i].R) {
  1048.                 var l_D = myObject.row[i].D ? myObject.row[i].D : myObject.row[i].R,
  1049.                     lThis = $dom_AddTag(lHolder, that.l_Type.toUpperCase(), l_D);
  1050.                 that.l_NewEls[that.l_NewEls.length] = lThis, lThis.id = myObject.row[i].R;
  1051.                 var lTest = parseInt(myObject.row[i].C);
  1052.                 lTest && (lThis.className = "checked")
  1053.             }
  1054.         return that.l_Dom = lHolder, that
  1055.     }
  1056.     var that = this;
  1057.     this.l_Type = !1, this.l_Json = !1, this.l_This = !1, this.l_JSON = !1, this.l_Id = "json_temp", this.l_NewEls = [], this.create = create, this.l_Dom = !1
  1058. }
  1059.  
  1060. function item_menu(pThis, pColumn) {
  1061.     $x_Style("item_menu", "position", "absolute");
  1062.     for (var lA = $x("item_menu").getElementsByTagName("a"), i = 0, len = lA.length; len > i; i++) {
  1063.         var lHref = lA[i].href;
  1064.         lHref = lHref.split(":"), lHref[lHref.length - 1] = pColumn, lA[i].href = $u_ArrayToString(lHref, ":")
  1065.     }
  1066.     dhtml_ButtonDropDown(pThis, "item_menu"), $x_Show("item_menu")
  1067. }
  1068.  
  1069. function doMultiple(pNd, pMode) {
  1070.     pNd = $u_Carray(pNd);
  1071.     for (var i = 0; i < pNd.length; i++) {
  1072.         var node = $x(pNd[i]);
  1073.         apex.item(node)[pMode]()
  1074.     }
  1075.     return $u_Narray(pNd)
  1076. }
  1077.  
  1078. function base_disableItem(pNd, pTest) {
  1079.     pTest = !!pTest, $x(pNd) && (pNd = [pNd]);
  1080.     for (var i = 0, len = pNd.length; len > i; i++) {
  1081.         var node = $x_object(pNd[i]);
  1082.         if (node) {
  1083.             var l_Dom_Node = node.node;
  1084.             "RADIO_GROUP" == node.item_type || "CHECKBOX_GROUP" == node.item_type ? (l_Dom_Node = $x_FormItems(l_Dom_Node, "RADIO_GROUP" == node.item_type ? "RADIO" : "CHECKBOX"), base_disableItem(l_Dom_Node, pTest)) : "radio" == l_Dom_Node.type || "checkbox" == l_Dom_Node.type ? (apex.jQuery(l_Dom_Node).toggleClass("apex_disabled_multi", pTest), l_Dom_Node.disabled = pTest) : (apex.jQuery(l_Dom_Node).toggleClass("apex_disabled", pTest), l_Dom_Node.disabled = pTest)
  1085.         }
  1086.     }
  1087.     return 1 == pNd.length && (pNd = pNd[0]), pNd
  1088. }
  1089.  
  1090. function htmldb_Get(obj, flow, req, page, instance, proc, queryString) {
  1091.     function setNode(id) {
  1092.         this.node = $x(id)
  1093.     }
  1094.  
  1095.     function replaceNode(newNode) {
  1096.         var i = 0;
  1097.         for (i = this.node.childNodes.length - 1; i >= 0; i--) this.node.removeChild(this.node.childNodes[i]);
  1098.         this.node.appendChild(newNode)
  1099.     }
  1100.     this.obj = $x(obj), this.proc = proc ? proc : "wwv_flow.show", this.flow = flow ? flow : $v("pFlowId"), this.request = req ? req : "", this.page = page ? page : "0", this.queryString = queryString ? queryString : null, this.params = "", this.response = "", this.base = null, this.syncMode = !1, this.addParam = htmldb_Get_addParam, this.add = htmldb_Get_addItem, this.getPartial = htmldb_Get_trimPartialPage, this.getFull = function(obj) {
  1101.         var result, node;
  1102.         return obj && (this.obj = $x(obj)), this.obj && ("INPUT" == this.obj.nodeName ? this.obj.value = this.response : document.all ? (result = this.response, node = this.obj, setTimeout(function() {
  1103.             htmldb_get_WriteResult(node, result)
  1104.         }, 100)) : $s(this.obj, this.response)), this.response
  1105.     }, this.get = function(mode, startTag, endTag) {
  1106.         var p;
  1107.         try {
  1108.             p = new XMLHttpRequest
  1109.         } catch (e) {
  1110.             p = new ActiveXObject("Msxml2.XMLHTTP")
  1111.         }
  1112.         try {
  1113.             new Date;
  1114.             return p.open("POST", this.base, this.syncMode), p.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), p.send(null == this.queryString ? this.params : this.queryString), this.response = p.responseText, this.node && this.replaceNode(p.responseXML), null == mode || "PPR" == mode ? this.getPartial(startTag, endTag) : "XML" == mode ? p.responseXML : this.getFull()
  1115.         } catch (e) {
  1116.             return
  1117.         }
  1118.     }, this.url = htmldb_Get_getUrl, this.escape = htmldb_Get_escape, this.clear = htmldb_Get_clear, this.sync = htmldb_Get_sync, this.setNode = setNode, this.replaceNode = replaceNode;
  1119.     var u = window.location.href.indexOf("?") > 0 ? window.location.href.substring(0, window.location.href.indexOf("?")) : window.location.href;
  1120.     this.base = u.substring(0, u.lastIndexOf("/")), this.proc || (this.proc = u.substring(u.lastIndexOf("/") + 1)), this.base = this.base + "/" + this.proc, null == instance || "" == instance ? this.instance = $v("pInstance") : this.instance = instance, queryString || (this.addParam("p_request", this.request), this.addParam("p_instance", this.instance), this.addParam("p_flow_id", this.flow), this.addParam("p_flow_step_id", this.page))
  1121. }
  1122.  
  1123. function htmldb_Get_sync(s) {
  1124.     this.syncMode = s
  1125. }
  1126.  
  1127. function htmldb_Get_clear(val) {
  1128.     this.addParam("p_clear_cache", val)
  1129. }
  1130.  
  1131. function htmldb_Get_getUrl() {
  1132.     return null == this.queryString ? this.base + "?" + this.params : this.queryString
  1133. }
  1134.  
  1135. function htmldb_Get_escape(val) {
  1136.     return val += "", val = val.replace(/\%/g, "%25"), val = val.replace(/\+/g, "%2B"), val = val.replace(/\ /g, "%20"), val = val.replace(/\./g, "%2E"), val = val.replace(/\*/g, "%2A"), val = val.replace(/\?/g, "%3F"), val = val.replace(/\\/g, "%5C"), val = val.replace(/\//g, "%2F"), val = val.replace(/\>/g, "%3E"), val = val.replace(/\</g, "%3C"), val = val.replace(/\{/g, "%7B"), val = val.replace(/\}/g, "%7D"), val = val.replace(/\~/g, "%7E"), val = val.replace(/\[/g, "%5B"), val = val.replace(/\]/g, "%5D"), val = val.replace(/\`/g, "%60"), val = val.replace(/\;/g, "%3B"), val = val.replace(/\?/g, "%3F"), val = val.replace(/\@/g, "%40"), val = val.replace(/\&/g, "%26"), val = val.replace(/\#/g, "%23"), val = val.replace(/\|/g, "%7C"), val = val.replace(/\^/g, "%5E"), val = val.replace(/\:/g, "%3A"), val = val.replace(/\=/g, "%3D"), val = val.replace(/\$/g, "%24")
  1137. }
  1138.  
  1139. function htmldb_Get_addParam(name, val) {
  1140.     "" == this.params ? this.params = name + "=" + (null != val ? this.escape(val) : "") : this.params = this.params + "&" + name + "=" + (null != val ? this.escape(val) : "")
  1141. }
  1142.  
  1143. function htmldb_Get_addItem(name, value) {
  1144.     this.addParam("p_arg_names", name), this.addParam("p_arg_values", value)
  1145. }
  1146.  
  1147. function htmldb_Get_trimPartialPage(startTag, endTag, obj) {
  1148.     obj && (this.obj = $x(obj)), startTag || (startTag = "<!--START-->"), endTag || (endTag = "<!--END-->");
  1149.     var result, node, start = this.response.indexOf(startTag);
  1150.     if (start > 0) {
  1151.         this.response = this.response.substring(start + startTag.length);
  1152.         var end = this.response.indexOf(endTag);
  1153.         this.response = this.response.substring(0, end)
  1154.     }
  1155.     return this.obj && (document.all ? (result = this.response, node = this.obj, setTimeout(function() {
  1156.         htmldb_get_WriteResult(node, result)
  1157.     }, 100)) : $s(this.obj, this.response)), this.response
  1158. }
  1159.  
  1160. function htmldb_get_WriteResult(node, result) {
  1161.     $s(node, result)
  1162. }
  1163.  
  1164. function htmldb_ExternalPost(pThis, pRegion, pPostUrl) {
  1165.     var pURL = "f?p=" + $x("pFlowId").value + ":" + $x("pFlowStepId").value + ":" + $x("pInstance").value + ":FLOW_FOP_OUTPUT_R" + pRegion;
  1166.     document.body.innerHTML = document.body.innerHTML + '<div style="display:none;" id="dbaseSecondForm"><form id="xmlFormPost" action="' + pPostUrl + '?ie=.pdf" method="post" target="pdf"><textarea name="vXML" id="vXML" style="width:500px;height:500px;"></textarea></form></div>';
  1167.     var l_El = $x("vXML"),
  1168.         get = new htmldb_Get(l_El, null, null, null, null, "f", pURL.substring(2));
  1169.     get.get(), get = null, setTimeout(function() {
  1170.         $x("xmlFormPost").submit()
  1171.     }, 10)
  1172. }
  1173.  
  1174. function $xml_Control(pThis) {
  1175.     function _CloneAndPlace(pThis, pThat, pText) {
  1176.         var lThat = $x(pThat);
  1177.         if (document.all) {
  1178.             this.xsl_processor.addParameter("xpath", pThis), this.xsl_processor.input = this.xml, this.xsl_processor.transform;
  1179.             var newFragment = this.xsl_processor.output
  1180.         } else {
  1181.             this.xsl_processor.setParameter(null, "xpath", pThis);
  1182.             var newFragment = this.xsl_processor.transformToFragment(this.xml, this.ownerDocument)
  1183.         }
  1184.         return lThat ? (ie ? $s(lThat, newFragment) : ($s(lThat, ""), lThat.appendChild(newFragment)), newFragment) : void 0
  1185.     }
  1186.     this.xsl_string = '<?xml version="1.0"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="html"/><xsl:param name="xpath" /><xsl:template match="/"><xsl:copy-of select="//*[@id=$xpath]"/></xsl:template></xsl:stylesheet>', document.all ? (this.xsl_object = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0"), this.xsl_object.async = !1, this.xsl_object.loadXML(this.xsl_string), tmp = new ActiveXObject("Msxml2.XSLTemplate.3.0"), tmp.stylesheet = this.xsl_object, this.xsl_processor = tmp.createProcessor()) : (this.xsl_object = (new DOMParser).parseFromString(this.xsl_string, "text/xml"), this.xsl_processor = new XSLTProcessor, this.xsl_processor.importStylesheet(this.xsl_object), this.ownerDocument = document.implementation.createDocument("", "test", null)), this.xml = pThis, this.CloneAndPlace = _CloneAndPlace
  1187. }
  1188.  
  1189. function $a_PostClob(pThis, pRequest, pPage, pReturnFunction) {
  1190.     var get = new htmldb_Get(null, $v("pFlowId"), pRequest, pPage, null, "wwv_flow.accept");
  1191.     get.AddArrayClob($x(pThis).value, 1), get.GetAsync(pReturnFunction), get = null
  1192. }
  1193.  
  1194. function $a_GetClob(pRequest, pPage, pReturnFunction) {
  1195.     var get = new htmldb_Get(null, $v("pFlowId"), pRequest, pPage, null, "wwv_flow.accept");
  1196.     get.GetAsync(pReturnFunction), get = null, x = null
  1197. }
  1198.  
  1199. function $s_Split(pString, pLength) {
  1200.     var lArray = [];
  1201.     if (pString.length <= pLength) lArray[lArray.length] = pString;
  1202.     else {
  1203.         for (; pString.length > 4e3;) lArray[lArray.length] = pString.substr(0, 4e3), pString = pString.substr(4e3, pString.length - 4e3);
  1204.         lArray[lArray.length] = pString.substr(0, 4e3)
  1205.     }
  1206.     return lArray
  1207. }
  1208.  
  1209. function json_SetItems(gReturn) {
  1210.     gReturn = apex.jQuery.parseJSON(gReturn);
  1211.     for (var j = 0, len = gReturn.item.length; len > j; j++) apex.item(gReturn.item[j].id).setValue(gReturn.item[j].value)
  1212. }
  1213.  
  1214. function $x(pNd) {
  1215.     return apex.item(pNd).node
  1216. }
  1217.  
  1218. function $x_object(pNd) {
  1219.     return apex.item(pNd)
  1220. }
  1221.  
  1222. function $v(pNd) {
  1223.     var lValue = apex.item(pNd).getValue();
  1224.     return apex.jQuery.isArray(lValue) ? lValue.join(":") : lValue
  1225. }
  1226.  
  1227. function $v2(pNd) {
  1228.     return apex.item(pNd).getValue()
  1229. }
  1230.  
  1231. function $s(pNd, pValue, pDisplayValue, pSuppressChangeEvent) {
  1232.     return apex.item(pNd).setValue(pValue, pDisplayValue, pSuppressChangeEvent)
  1233. }
  1234.  
  1235. function $u_Carray(pNd) {
  1236.     return $x(pNd) ? [pNd] : pNd
  1237. }
  1238.  
  1239. function $u_Narray(pNd) {
  1240.     return 1 == pNd.length ? pNd[0] : pNd
  1241. }
  1242.  
  1243. function $nvl(pTest, pDefault) {
  1244.     return null != pTest ? pTest : pDefault ? pDefault : ""
  1245. }
  1246.  
  1247. function $x_Check_For_Compound(pNd) {
  1248.     var lNode = $x(pNd);
  1249.     return lNode && $x(lNode.id + "_fieldset") ? $x(lNode.id + "_fieldset") : lNode
  1250. }
  1251.  
  1252. function $x_Style(pNd, pStyle, pString) {
  1253.     pNd = $u_Carray(pNd);
  1254.     for (var i = 0; i < pNd.length; i++) {
  1255.         var node = $x(pNd[i]);
  1256.         node ? node.style[pStyle] = pString : null
  1257.     }
  1258.     return $u_Narray(pNd)
  1259. }
  1260.  
  1261. function $x_Hide(pNd) {
  1262.     return doMultiple(pNd, "hide")
  1263. }
  1264.  
  1265. function $x_Show(pNd) {
  1266.     return doMultiple(pNd, "show")
  1267. }
  1268.  
  1269. function $x_Show_Hide(pShow, pHide) {
  1270.     $x_Hide(pHide), $x_Show(pShow)
  1271. }
  1272.  
  1273. function $x_Toggle(pNd) {
  1274.     var id, node, testNode;
  1275.     pNd = $u_Carray(pNd);
  1276.     for (var i = 0; i < pNd.length; i++) node = $x(pNd[i]), "string" == typeof pNd[i] ? id = pNd[i] : pNd[i].id && (id = pNd[i].id), id && (testNode = apex.jQuery("#" + id + "_CONTAINER").get(0), testNode || (testNode = apex.jQuery("#" + id + "_DISPLAY").get(0))), testNode || (testNode = node), node && (0 === apex.jQuery(testNode).filter(":visible").length ? $x_Show(node) : $x_Hide(node));
  1277.     return $u_Narray(pNd)
  1278. }
  1279.  
  1280. function $x_Remove(pNd) {
  1281.     pNd = $u_Carray(pNd);
  1282.     for (var i = 0, len = pNd.length; len > i; i++) {
  1283.         var node = $x(pNd[i]),
  1284.             lParent = node.parentNode;
  1285.         node && lParent && (lParent.removeChild(node), lParent.normalize())
  1286.     }
  1287.     return $u_Narray(pNd)
  1288. }
  1289.  
  1290. function $x_Value(pNd, pValue) {
  1291.     pNd = $u_Carray(pNd);
  1292.     for (var j = 0, len = pNd.length; len > j; j++) {
  1293.         var lTemp = $item(pNd[j]);
  1294.         lTemp.setValue(pValue)
  1295.     }
  1296. }
  1297.  
  1298. function $x_UpTill(pNd, pToTag, pToClass) {
  1299.     var node = $x(pNd);
  1300.     if (node) {
  1301.         var tPar = node.parentNode;
  1302.         if (pToClass)
  1303.             for (; tPar && (tPar.nodeName != pToTag || !apex.jQuery(tPar).hasClass(pToClass));) tPar = tPar.parentNode;
  1304.         else
  1305.             for (; tPar && tPar.nodeName != pToTag;) tPar = tPar.parentNode;
  1306.         return tPar || !1
  1307.     }
  1308.     return !1
  1309. }
  1310.  
  1311. function $x_ItemRow(pNd, pFunc) {
  1312.     var node, lTr;
  1313.     pNd = $u_Carray(pNd);
  1314.     for (var i = 0; i < pNd.length; i++)
  1315.         if (node = $x_Check_For_Compound(pNd[i]), lTr = $x_UpTill(node, "TR")) switch (pFunc) {
  1316.             case "TOGGLE":
  1317.                 $x_Toggle(lTr);
  1318.                 break;
  1319.             case "SHOW":
  1320.                 $x_Show(lTr);
  1321.                 break;
  1322.             case "HIDE":
  1323.                 $x_Hide(lTr)
  1324.         }
  1325. }
  1326.  
  1327. function $x_HideItemRow(pNd) {
  1328.     $x_ItemRow(pNd, "HIDE")
  1329. }
  1330.  
  1331. function $x_ShowItemRow(pNd) {
  1332.     $x_ItemRow(pNd, "SHOW")
  1333. }
  1334.  
  1335. function $x_ToggleItemRow(pNd) {
  1336.     $x_ItemRow(pNd, "TOGGLE")
  1337. }
  1338.  
  1339. function $x_HideAllExcept(pNd, pNdArray) {
  1340.     var l_Node = $x(pNd);
  1341.     return l_Node && ($x_Hide(pNdArray), $x_Show(l_Node)), l_Node
  1342. }
  1343.  
  1344. function $x_HideSiblings(pNd) {
  1345.     var lNode = apex.jQuery($x(pNd));
  1346.     return lNode.show().siblings().hide().get()
  1347. }
  1348.  
  1349. function $x_ShowSiblings(pNd) {
  1350.     var lNode = apex.jQuery($x(pNd));
  1351.     return lNode.show().siblings().show().get()
  1352. }
  1353.  
  1354. function $x_Class(pNd, pClass) {
  1355.     $x(pNd) && (pNd = [pNd]);
  1356.     for (var l = pNd.length, i = 0; l > i; i++) $x(pNd[i]) && ($x(pNd[i]).className = pClass);
  1357.     return $u_Narray(pNd)
  1358. }
  1359.  
  1360. function $x_SetSiblingsClass(pNd, pClass, pNdClass) {
  1361.     var l_Node = apex.jQuery($x(pNd));
  1362.     return l_Node.siblings().removeClass("").addClass(pClass), pNdClass && l_Node.removeClass("").addClass(pNdClass), l_Node.get()
  1363. }
  1364.  
  1365. function $x_ByClass(pClass, pNd, pTag) {
  1366.     var lClass = pTag ? pTag + "." + pClass : "." + pClass;
  1367.     return apex.jQuery(lClass, $x(pNd)).get()
  1368. }
  1369.  
  1370. function $x_ShowAllByClass(pNd, pClass, pTag) {
  1371.     lClass = pTag ? pTag + "." + pClass : "." + pClass, apex.jQuery(lClass, $x(pNd)).show()
  1372. }
  1373.  
  1374. function $x_ShowChildren(pNd) {
  1375.     apex.jQuery($x(pNd)).children().show()
  1376. }
  1377.  
  1378. function $x_HideChildren(pNd) {
  1379.     apex.jQuery($x(pNd)).children().hide()
  1380. }
  1381.  
  1382. function $x_disableItem(pNd, pTest) {
  1383.     var lMode = pTest ? "disable" : "enable";
  1384.     return doMultiple(pNd, lMode)
  1385. }
  1386.  
  1387. function $f_get_emptys(pNd, pClassFail, pClass) {
  1388.     var l_temp = [],
  1389.         l_temp2 = [];
  1390.     $x(pNd) && (pNd = [pNd]);
  1391.     for (var i = 0, len = pNd.length; len > i; i++) {
  1392.         var node = $x(pNd[i]);
  1393.         node && (apex.item(node).isEmpty() ? l_temp[l_temp.length] = node : l_temp2[l_temp2.length] = node)
  1394.     }
  1395.     return pClassFail && $x_Class(l_temp, pClassFail), pClass && $x_Class(l_temp2, pClass), 0 === l_temp.length ? l_temp = !1 : l_temp[0].focus(), l_temp
  1396. }
  1397.  
  1398. function $v_Array(pNd) {
  1399.     return apex.jQuery.makeArray(apex.item(pNd).getValue())
  1400. }
  1401.  
  1402. function $f_ReturnChecked(pNd) {
  1403.     return $x(pNd) ? $v_Array(pNd) : !1
  1404. }
  1405.  
  1406. function $d_ClearAndHide(pNd) {
  1407.     $x(pNd) && (pNd = [pNd]);
  1408.     for (var i = 0, len = pNd.length; len > i; i++) {
  1409.         var lNode = $x(pNd[i]);
  1410.         lNode && ($x_Hide(lNode).innerHTML = "")
  1411.     }
  1412. }
  1413.  
  1414. function $f_SelectedOptions(pNd) {
  1415.     var lSelect = $x(pNd),
  1416.         lValue = [];
  1417.     if ("SELECT" == lSelect.nodeName) {
  1418.         for (var lOpts = lSelect.options, i = 0, len = lOpts.length; len > i; i++) lOpts[i].selected && (lValue[lValue.length] = lOpts[i]);
  1419.         return $u_Narray(lValue)
  1420.     }
  1421.     return !1
  1422. }
  1423.  
  1424. function $f_SelectValue(pNd) {
  1425.     var lValue = $v_Array(pNd);
  1426.     return $u_Narray(lValue)
  1427. }
  1428.  
  1429. function $u_ArrayToString(pArray, pDelim) {
  1430.     var lReturn = "";
  1431.     pDelim && (pDelim = ":"), pArray = $u_Carray(pArray);
  1432.     for (var i = 0, len = pArray.length; len > i; i++) lReturn += pArray[i] ? pArray[i] + pDelim : "" + pDelim;
  1433.     return lReturn.substr(0, lReturn.length - 1)
  1434. }
  1435.  
  1436. function $v_CheckValueAgainst(pThis, pValue) {
  1437.     var lTest = !1,
  1438.         lArray = [],
  1439.         lValue = !1;
  1440.     pValue.constructor == Array ? lArray = pValue : lArray[0] = pValue, lValue = $v(pThis);
  1441.     for (var i = 0, len = lArray.length; len > i && !(lTest = lValue == lArray[i]); i++);
  1442.     return lTest
  1443. }
  1444.  
  1445. function $f_Hide_On_Value_Item(pThis, pThat, pValue) {
  1446.     var lTest = $v_CheckValueAgainst(pThis, pValue);
  1447.     return lTest ? $x_Hide(pThat) : $x_Show(pThat), lTest
  1448. }
  1449.  
  1450. function $f_Show_On_Value_Item(pThis, pThat, pValue) {
  1451.     var lTest = $v_CheckValueAgainst(pThis, pValue);
  1452.     return lTest ? $x_Show(pThat) : $x_Hide(pThat), lTest
  1453. }
  1454.  
  1455. function $f_Hide_On_Value_Item_Row(pThis, pThat, pValue) {
  1456.     var lTest = $v_CheckValueAgainst(pThis, pValue);
  1457.     return lTest ? $x_HideItemRow(pThat) : $x_ShowItemRow(pThat), lTest
  1458. }
  1459.  
  1460. function $f_Show_On_Value_Item_Row(pThis, pThat, pValue) {
  1461.     var lTest = $v_CheckValueAgainst(pThis, pValue);
  1462.     return lTest ? $x_ShowItemRow(pThat) : $x_HideItemRow(pThat), lTest
  1463. }
  1464.  
  1465. function $f_DisableOnValue(pThis, pValue, pThat) {
  1466.     var lTest = $v_CheckValueAgainst(pThis, pValue),
  1467.         lNd = [];
  1468.     if (pThat) {
  1469.         if (pThat instanceof Array) lNd = pThat;
  1470.         else
  1471.             for (var i = 2; i < arguments.length; i++) arguments[i] && (lNd[lNd.length] = arguments[i]);
  1472.         $x_disableItem(lNd, lTest)
  1473.     }
  1474.     return lTest
  1475. }
  1476.  
  1477. function $x_ClassByClass(pNd, pClass, pTag, pClass2) {
  1478.     var l_Els = $x_ByClass(pClass, pNd, pTag);
  1479.     return $x_Class(l_Els, pClass2), l_Els
  1480. }
  1481.  
  1482. function $f_ValuesToArray(pThis, pClass, pTag) {
  1483.     for (var lTemp = $x_ByClass(pClass, pThis, pTag), lArray = [], i = 0, len = lTemp.length; len > i; i++) lArray[i] = lTemp[i].value;
  1484.     return lArray
  1485. }
  1486.  
  1487. function $dom_JoinNodeLists(pThis, pThat) {
  1488.     var i, len, lArray = [];
  1489.     for (i = 0, len = pThis.length; len > i; i++) lArray[i] = pThis[i];
  1490.     for (i = 0, len = pThat.length; len > i; i++) lArray[lArray.length] = pThat[i];
  1491.     return lArray
  1492. }
  1493.  
  1494. function $x_FormItems(pNd, pType) {
  1495.     var lType = pType ? pType.toUpperCase() : "ALL",
  1496.         l_Inputs = [],
  1497.         l_Array = [],
  1498.         l_This = $x(pNd);
  1499.     if (l_This) {
  1500.         if ("SELECT" == l_This.nodeName || "INPUT" == l_This.nodeName || "TEXTAREA" == l_This.nodeName) return [l_This];
  1501.         if (l_Selects = l_This.getElementsByTagName("SELECT"), l_Inputs = l_This.getElementsByTagName("INPUT"), l_Textarea = l_This.getElementsByTagName("TEXTAREA"), l_Fieldset = l_This.getElementsByTagName("FIELDSET"), "SELECT" == lType ? l_Inputs = l_Selects : "TEXTAREA" == lType ? l_Inputs = l_Textarea : "ALL" == lType && (l_Inputs = $dom_JoinNodeLists(l_Inputs, l_Fieldset), l_Inputs = $dom_JoinNodeLists(l_Inputs, l_Selects), l_Inputs = $dom_JoinNodeLists(l_Inputs, l_Textarea)), "SELECT" == lType || "TEXTAREA" == lType || "ALL" == lType) l_Array = l_Inputs;
  1502.         else
  1503.             for (var i = 0; i < l_Inputs.length; i++) l_Inputs[i].type.toUpperCase() == pType.toUpperCase() && (l_Array[l_Array.length] = l_Inputs[i]);
  1504.         return l_Array
  1505.     }
  1506. }
  1507.  
  1508. function $f_CheckAll(pThis, pCheck, pArray) {
  1509.     var l_Inputs;
  1510.     l_Inputs = pArray ? pArray : $x_FormItems(pThis, "CHECKBOX");
  1511.     for (var i = 0, l = l_Inputs.length; l > i; i++) l_Inputs[i].checked = pCheck
  1512. }
  1513.  
  1514. function $f_CheckFirstColumn(pNd) {
  1515.     for (var lTable = $x_UpTill(pNd, "TABLE"), lArray = [], i = 0, len = lTable.rows.length; len > i; i++) {
  1516.         var l_Temp = $x_FormItems(lTable.rows[i], "CHECKBOX")[0];
  1517.         l_Temp && (lArray[lArray.length] = l_Temp)
  1518.     }
  1519.     return $f_CheckAll(!1, pNd.checked, lArray), lArray
  1520. }
  1521.  
  1522. function $x_ToggleWithImage(pThis, pNd) {
  1523.     pThis = $x(pThis), $x_CheckImageSrc(pThis, "plus") ? ($x_Class(pThis, gToggleWithImageI), pThis.src = html_StringReplace(pThis.src, "plus", "minus")) : ($x_Class(pThis, gToggleWithImageA), pThis.src = html_StringReplace(pThis.src, "minus", "plus"));
  1524.     var node = $x_Toggle(pNd);
  1525.     return node
  1526. }
  1527.  
  1528. function $x_SwitchImageSrc(pNd, pSearch, pReplace) {
  1529.     var lEl = $x(pNd);
  1530.     return lEl && "IMG" == lEl.nodeName && -1 != lEl.src.indexOf(pSearch) && (lEl.src = pReplace), lEl
  1531. }
  1532.  
  1533. function $x_CheckImageSrc(pNd, pSearch) {
  1534.     var lEL = $x(pNd),
  1535.         lReturn = !1;
  1536.     return lEL && "IMG" == lEL.nodeName && (lReturn = $u_SubString(lEL.src, pSearch)), lReturn
  1537. }
  1538.  
  1539. function $u_SubString(pText, pMatch) {
  1540.     return -1 != pText.toString().indexOf(pMatch.toString())
  1541. }
  1542.  
  1543. function html_RemoveAllChildren(pNd) {
  1544.     var lEl = $x(pNd);
  1545.     if (lEl && lEl.hasChildNodes && lEl.removeChild)
  1546.         for (; lEl.hasChildNodes();) lEl.removeChild(lEl.firstChild)
  1547. }
  1548.  
  1549. function ajax_Loading(pState) {
  1550.     1 == pState ? $x_Show("loader", "wait") : $x_Hide("loader")
  1551. }
  1552.  
  1553. function html_SetSelectValue(pId, pValue) {
  1554.     var lSelect = $x(pId);
  1555.     if ("SELECT" == lSelect.nodeName) {
  1556.         lSelect.selectedIndex = 0;
  1557.         for (var i = 0, l = lSelect.options.length; l > i; i++) lSelect.options[i].value == pValue && (lSelect.options[i].selected = !0)
  1558.     }
  1559. }
  1560.  
  1561. function addLoadEvent(pFunction) {
  1562.     apex.jQuery(document).ready(pFunction)
  1563. }
  1564.  
  1565. function $f_Swap(pThis, pThat) {
  1566.     var lThis = $x(pThis);
  1567.     lThat = $x(pThat), pThis && pThat && ($x_Value(pThis, lThat.value), $x_Value(pThat, lThis.value))
  1568. }
  1569.  
  1570. function $f_Enter(e) {
  1571.     var keycode;
  1572.     if (window.event) keycode = window.event.keyCode;
  1573.     else {
  1574.         if (!e) return !1;
  1575.         keycode = e.which
  1576.     }
  1577.     return 13 == keycode ? !0 : !1
  1578. }
  1579.  
  1580. function $f_SetValueSequence(pArray, pMultiple) {
  1581.     for (var lLength = pArray.length, i = 0; lLength > i; i++) $x_Value(pArray[i], (i + 1) * pMultiple)
  1582. }
  1583.  
  1584. function $dom_AddTag(pThis, pTag, pText) {
  1585.     var lThis = document.createElement(pTag),
  1586.         lThat = $x(pThis);
  1587.     return lThat && lThat.appendChild(lThis), null != pText && (lThis.innerHTML = pText), lThis
  1588. }
  1589.  
  1590. function $tr_AddTD(pThis, pText) {
  1591.     return $dom_AddTag($x(pThis), "TD", pText)
  1592. }
  1593.  
  1594. function $tr_AddTH(pThis, pText) {
  1595.     return $dom_AddTag($x(pThis), "TH", pText)
  1596. }
  1597.  
  1598. function $dom_Replace(pThis, pThat) {
  1599.     var lThis = $x(pThis),
  1600.         lParent = lThis.parentNode;
  1601.     return lThat = $dom_AddTag(lParent, pThat), lParent.replaceChild(lThat, lThis)
  1602. }
  1603.  
  1604. function $dom_AddInput(pThis, pType, pId, pName, pValue) {
  1605.     var lThis = $dom_AddTag(!1, "INPUT");
  1606.     return lThis.type = pType ? pType : "text", lThis.id = pId ? pId : "", lThis.name = pName ? pName : "", lThis.value = pValue ? pValue : "", pThis && $x(pThis).appendChild(lThis), lThis
  1607. }
  1608.  
  1609. function $dom_MakeParent(pThis, p_Parent) {
  1610.     var l_Node = $x(pThis),
  1611.         l_Parent = $x(p_Parent);
  1612.     return l_Node && l_Parent && l_Node.parentNode != l_Parent && l_Parent.appendChild(l_Node), l_Node
  1613. }
  1614.  
  1615. function $x_RowHighlight(pThis, pColor) {
  1616.     var lThis = $x(pThis);
  1617.     lThis && $x_Style(lThis.getElementsByTagName("TD"), "backgroundColor", pColor), gCurrentRow = lThis
  1618. }
  1619.  
  1620. function $x_RowHighlightOff(pThis) {
  1621.     var lThis = $x(pThis);
  1622.     lThis && $x_Style(lThis.getElementsByTagName("TD"), "backgroundColor", "")
  1623. }
  1624.  
  1625. function $v_Upper(pId) {
  1626.     var obj = $x(pId);
  1627.     obj && (obj.value = obj.value.toUpperCase())
  1628. }
  1629.  
  1630. function $d_Find(pThis, pString, pTags, pClass) {
  1631.     if (pTags || (pTags = "DIV"), pThis = $x(pThis)) {
  1632.         var d = pThis.getElementsByTagName(pTags);
  1633.         pThis.style.display = "none", gRegex || (gRegex = new RegExp("test")), gRegex.compile(pString, "i");
  1634.         for (var i = 0, len = d.length; len > i; i++) gRegex.test(d[i].innerHTML) ? d[i].style.display = "block" : d[i].style.display = "none";
  1635.         pThis.style.display = "block"
  1636.     }
  1637. }
  1638.  
  1639. function $f_First_field(pNd) {
  1640.     var lThis = $x(pNd);
  1641.     try {
  1642.         return lThis && ("hidden" == lThis.type || lThis.disabled || lThis.focus()), !0
  1643.     } catch (e) {}
  1644. }
  1645.  
  1646. function html_StringReplace(string, text, by) {
  1647.     by || (by = "");
  1648.     var strLength = string.length,
  1649.         txtLength = text.length;
  1650.     if (0 === strLength || 0 === txtLength) return string;
  1651.     var i = string.indexOf(text);
  1652.     if (!i && text != string.substring(0, txtLength)) return string;
  1653.     if (-1 == i) return string;
  1654.     var newstr = string.substring(0, i) + by;
  1655.     return strLength > i + txtLength && (newstr += html_StringReplace(string.substring(i + txtLength, strLength), text, by)), newstr
  1656. }
  1657.  
  1658. function getScrollXY() {
  1659.     var scrOfX = 0,
  1660.         scrOfY = 0;
  1661.     return "number" == typeof window.pageYOffset ? (scrOfY = window.pageYOffset, scrOfX = window.pageXOffset) : document.body && (document.body.scrollLeft || document.body.scrollTop) ? (scrOfY = document.body.scrollTop, scrOfX = document.body.scrollLeft) : document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop) && (scrOfY = document.documentElement.scrollTop, scrOfX = document.documentElement.scrollLeft), [scrOfX, scrOfY]
  1662. }
  1663.  
  1664. function html_GetTarget(e) {
  1665.     var targ;
  1666.     return e || (e = window.event), e.target ? targ = e.target : e.srcElement && (targ = e.srcElement), 3 == targ.nodeType && (targ = targ.parentNode), targ
  1667. }
  1668.  
  1669. function findPosX(obj) {
  1670.     var lEl = $x(obj),
  1671.         curleft = 0;
  1672.     if (lEl.x) return lEl.x;
  1673.     if (lEl.offsetParent)
  1674.         for (; lEl.offsetParent;) {
  1675.             if (lEl.style.left) return curleft += parseInt(lEl.style.left.substring(0, lEl.style.left.length - 2), 10);
  1676.             curleft += lEl.offsetLeft, lEl = lEl.offsetParent
  1677.         }
  1678.     return curleft
  1679. }
  1680.  
  1681. function findPosY(obj) {
  1682.     var lEl = $x(obj),
  1683.         curtop = 0;
  1684.     if (lEl.y) return lEl.y;
  1685.     if (lEl.offsetParent)
  1686.         for (; lEl.offsetParent;) {
  1687.             if (lEl.style.top) return curtop += parseInt(lEl.style.top.substring(0, lEl.style.top.length - 2), 10);
  1688.             curtop += lEl.offsetTop, lEl = lEl.offsetParent
  1689.         }
  1690.     return curtop
  1691. }
  1692.  
  1693. function setSelectionRange(input, selectionStart, selectionEnd) {
  1694.     var lInputLength;
  1695.     if (input.setSelectionRange) lInputLength = input.value.length, selectionStart > lInputLength && (selectionStart = lInputLength), selectionEnd > lInputLength && (selectionEnd = lInputLength), input.focus(), input.setSelectionRange(selectionStart, selectionEnd);
  1696.     else if (input.createTextRange) {
  1697.         var range = input.createTextRange();
  1698.         range.collapse(!0), range.moveEnd("character", selectionEnd), range.moveStart("character", selectionStart), range.select()
  1699.     }
  1700. }
  1701.  
  1702. function setCaretToPos(input, pos) {
  1703.     setSelectionRange(input, pos, pos)
  1704. }
  1705.  
  1706. function html_ReturnToTextSelection(pText, pThis, pNoSpace) {
  1707.     var cmd = $x(pThis),
  1708.         lSpace = apex.item(cmd).isEmpty() || pNoSpace ? "" : " ";
  1709.     if (document.selection) {
  1710.         cmd.focus();
  1711.         var sel = document.selection,
  1712.             rng = sel.createRange();
  1713.         rng.text = rng.text + lSpace + pText
  1714.     } else start = cmd.selectionStart, end = cmd.selectionEnd, cmd.value = cmd.value.slice(0, start) + lSpace + pText + cmd.value.slice(end, cmd.value.length), cmd.focus(), setCaretToPos(cmd, end + (pText.length + 2))
  1715. }
  1716.  
  1717. function setCaretToEnd(input) {
  1718.     setSelectionRange(input, input.value.length, input.value.length)
  1719. }
  1720.  
  1721. function setCaretToBegin(input) {
  1722.     setSelectionRange(input, 0, 0)
  1723. }
  1724.  
  1725. function selectString(input, string) {
  1726.     var match = new RegExp(string, "i").exec(input.value);
  1727.     match && setSelectionRange(input, match.index, match.index + match[0].length)
  1728. }
  1729.  
  1730. function ob_PPR_TAB(l_URL) {
  1731.     top.gLastTab = l_URL;
  1732.     var lBody = document.body,
  1733.         http = new htmldb_Get(lBody, null, null, null, null, "f", l_URL.substring(2));
  1734.     http.get(null, '<body  style="padding:10px;">', "</body>")
  1735. }
  1736.  
  1737. function flowSelectAll() {
  1738.     var theList, lListLength, i;
  1739.     if ("undefined" == typeof flowSelectArray) return !0;
  1740.     for (var a = 0, len = flowSelectArray.length; len > a; a++) {
  1741.         for (theList = $x(flowSelectArray[a]), lListLength = theList.length, i = 0; lListLength - 1 >= i; i++) theList.options[i].selected = !1;
  1742.         for (i = 0; lListLength - 1 >= i; i++) theList.options[i].selected = !0
  1743.     }
  1744.     return !0
  1745. }
  1746.  
  1747. function htmldb_item_change(e) {
  1748.     htmldb_ch = !0
  1749. }
  1750.  
  1751. function htmldb_doUpdate(r) {
  1752.     htmldb_ch ? (lc_SetChange(), apex.submit(r)) : apex.submit(r)
  1753. }
  1754.  
  1755. function htmldb_goSubmit(r) {
  1756.     htmldb_ch ? (htmldb_ch_message && null !== htmldb_ch_message || (htmldb_ch_message = "Are you sure you want to leave this page without saving? /n Please use translatable string."), window.confirm(htmldb_ch_message) && apex.submit(r)) : apex.submit(r)
  1757. }
  1758.  
  1759. function $p_DatePicker(p_element_index, p_form_index, p_date_format, p_bgcolor, p_dd, p_hh, p_mi, p_pm, p_yyyy, p_lang, p_application_format, p_application_id, p_security_group_id, p_mm, p_height) {
  1760.     var w = open("wwv_flow_utilities.show_as_popup_calendar?p_element_index=" + escape(p_element_index) + "&p_form_index=" + escape(p_form_index) + "&p_date_format=" + escape(p_date_format) + "&p_bgcolor=" + escape(p_bgcolor) + "&p_dd=" + escape(p_dd) + "&p_hh=" + escape(p_hh) + "&p_mi=" + escape(p_mi) + "&p_pm=" + escape(p_pm) + "&p_yyyy=" + escape(p_yyyy) + "&p_lang=" + escape(p_lang) + "&p_application_format=" + escape(p_application_format) + "&p_application_id=" + escape(p_application_id) + "&p_security_group_id=" + escape(p_security_group_id) + "&p_mm=" + escape(p_mm), "winLov", "Scrollbars=no,resizable=yes,width=258,height=" + p_height);
  1761.     return null == w.opener && (w.opener = self), w.focus(), w
  1762. }
  1763.  
  1764. function confirmDelete2(p_Msg, p_Req) {
  1765.     var l_req = p_Req ? p_Req : "DELETE",
  1766.         l_msg = p_Msg ? p_Msg : "Would you like to perform this delete action?";
  1767.     confirm(l_msg) && (apex.submit(l_req), window.close())
  1768. }
  1769.  
  1770. function lc_SetChange() {
  1771.     gChangeCheck && (gChangeCheck.value = 1, gChangeCheck.type = "text")
  1772. }
  1773.  
  1774. function setValue2(id, val, errorMsg) {
  1775.     var obj = $x(id);
  1776.     obj && ($x_Value(obj, val), $v(obj) != val && alert(errorMsg))
  1777. }
  1778.  
  1779. function dhtml_CloseAllSubMenus(pStart) {
  1780.     var l_Start = null;
  1781.     l_Start = pStart ? pStart : 0;
  1782.     for (var i = l_Start; i <= gSubMenuArray.length; i++)
  1783.         if (gSubMenuArray[i]) {
  1784.             var l_Sm = $x_Hide(gSubMenuArray[i]);
  1785.             l_Sm && $x_Hide(l_Sm)
  1786.         }
  1787.     pStart || (gSubMenuArray.length = 0), htmldb_IE_Select_Item_Fix(!1), $gCurrentAnchorList = apex.jQuery("#" + gCurrentAppMenu).children().children().filter("a[class!=eLink]")
  1788. }
  1789.  
  1790. function dhtml_CloseAllSubMenusL(pThis) {
  1791.     var l_Start = parseInt($x_UpTill(pThis, "UL").getAttribute("htmldb:listlevel"), 10) + 1;
  1792.     dhtml_CloseAllSubMenus(l_Start)
  1793. }
  1794.  
  1795. function app_AppMenuMultiClose() {
  1796.     if (gCurrentAppMenu) {
  1797.         var lMenu = $x(gCurrentAppMenu);
  1798.         gCurrentAppMenuImage.className = g_dhtmlMenu, $x_Hide(lMenu), gCurrentAppMenu = !1, gCurrentAppMenuImage = !1, $gCurrentAnchorList = !1
  1799.     }
  1800. }
  1801.  
  1802. function dhtml_DocMenuCheck(e) {
  1803.     for (var tPar = html_GetTarget(e), l_Test = !0;
  1804.         "BODY" != tPar.nodeName;) tPar = tPar.parentNode, $u_SubString(tPar.className, "dhtmlMenuLG") && (l_Test = !l_Test);
  1805.     l_Test && (app_AppMenuMultiClose(), dhtml_CloseAllSubMenus(), document.onclick = null)
  1806. }
  1807.  
  1808. function dhtml_ButtonDropDown(pThis, pThat, pDir, pX, pY) {
  1809.     dhtml_SingeMenuOpen(pThis, pThat, "Bottom", pX, pY)
  1810. }
  1811.  
  1812. function dhtml_KeyAction(pEvent, pEventNamespace) {
  1813.     var $lCurrentAnchor, lIndex;
  1814.     switch ($lCurrentAnchor = apex.jQuery(pEvent.target), lIndex = $gCurrentAnchorList.index($lCurrentAnchor), pEvent.which) {
  1815.         case 40:
  1816.             $gCurrentAnchorList.eq(lIndex + 1).focus();
  1817.             break;
  1818.         case 38:
  1819.             $gCurrentAnchorList.eq(lIndex - 1).focus();
  1820.             break;
  1821.         case 37:
  1822.             var $lParent = apex.jQuery("#" + gCurrentAppMenu + " a").filter(function() {
  1823.                 return 1 == apex.jQuery(this).data("setParent")
  1824.             });
  1825.             $lParent.length > 0 && (dhtml_CloseAllSubMenusL($lParent[0]), $lParent.focus().data("setParent", !1));
  1826.             break;
  1827.         case 39:
  1828.             ($lCurrentAnchor.parent().hasClass("dhtmlSubMenuN") || $lCurrentAnchor.parent().hasClass("dhtmlSubMenuS")) && ($lCurrentAnchor.trigger("mouseover"), $gCurrentAnchorList[0].focus(), $lCurrentAnchor.data("setParent", !0));
  1829.             break;
  1830.         case 13:
  1831.             return
  1832.     }
  1833.     pEvent.preventDefault()
  1834. }
  1835.  
  1836. function dhtml_MenuOpen(pThis, pThat, pSub, pDir, pRoot) {
  1837.     var lNamespace;
  1838.     if ($x(pThat)) {
  1839.         if (lNamespace = "menu_keys_" + pThat, document.onclick = dhtml_DocMenuCheck, apex.jQuery(document).unbind("keydown." + lNamespace + "_esc").bind("keydown." + lNamespace + "_esc", function(event) {
  1840.                 27 === event.which && (app_AppMenuMultiClose(), dhtml_CloseAllSubMenus(), document.onclick = null, pRoot && apex.jQuery(pRoot).focus())
  1841.             }), pSub) {
  1842.             var l_Level = parseInt($x(pThat).getAttribute("htmldb:listlevel"), 10),
  1843.                 l_Temp = gSubMenuArray[l_Level];
  1844.             l_Temp && $x_Hide(l_Temp), gSubMenuArray[l_Level] = $x(pThat)
  1845.         } else dhtml_CloseAllSubMenus(), gCurrentAppMenu = pThat;
  1846.         $gCurrentAnchorList = apex.jQuery("#" + pThat).children().children().filter("a[class!=eLink]"), apex.jQuery(document).unbind("keydown." + lNamespace).bind("keydown." + lNamespace, function(event) {
  1847.             var lKeyCodes = [40, 38, 37, 39, 13];
  1848.             apex.jQuery("#" + pThat + ":visible").filter("ul")[0] && -1 !== apex.jQuery.inArray(event.which, lKeyCodes) && dhtml_KeyAction(event, lNamespace)
  1849.         });
  1850.         var lMenu = $x(pThat);
  1851.         document.body.appendChild(lMenu), pDir && "Right" != pDir ? "Bottom" == pDir ? (lMenu.style.position = "absolute", lMenu.style.top = parseInt(findPosY(pThis), 10) + parseInt(pThis.offsetHeight, 10) + "px", lMenu.style.left = parseInt(findPosX(pThis), 10) + "px") : "BottomRight" == pDir ? (lMenu.style.position = "absolute", lMenu.style.top = parseInt(findPosY(pThis), 10) + parseInt(pThis.offsetHeight, 10) + "px", lMenu.style.left = parseInt(findPosX(pThis), 10) - parseInt(pThis.offsetWidth, 10) + "px") : (lMenu.style.position = "absolute", lMenu.style.top = parseInt(findPosY(pThis), 10) + "px", lMenu.style.left = parseInt(findPosX(pThis), 10) + parseInt(pThis.offsetWidth, 10) + "px") : (lMenu.style.position = "absolute", lMenu.style.top = parseInt(findPosY(pThis), 10) + "px", lMenu.style.left = parseInt(findPosX(pThis), 10) + "px"), $x_Show(lMenu), dhtml_FixLeft(pThis, lMenu, pDir), htmldb_IE_Select_Item_Fix(lMenu)
  1852.     }
  1853. }
  1854.  
  1855. function dhtml_DocMenuSingleCheck(e, force) {
  1856.     if (g_Single_Menu_Count > 0) {
  1857.         var l_Test = !0;
  1858.         if (e)
  1859.             for (var tPar = html_GetTarget(e);
  1860.                 "BODY" != tPar.nodeName && !force;) tPar = tPar.parentNode, tPar == g_Single_Menu && (l_Test = !l_Test);
  1861.         (l_Test || force) && ($x_Hide(g_Single_Menu), document.onclick = null)
  1862.     } else g_Single_Menu_Count = 1
  1863. }
  1864.  
  1865. function dhtml_SingeMenuOpen(pThis, pThat, pDir, pX, pY) {
  1866.     var lMenu = $x(pThat),
  1867.         lThis = $x(pThis);
  1868.     lMenu.style.zIndex = 2001,
  1869.         document.body.appendChild(lMenu), pDir && "Right" != pDir ? "Bottom" == pDir ? (lMenu.style.position = "absolute", lMenu.style.top = parseInt(findPosY(lThis), 10) + parseInt(lThis.offsetHeight, 10) + "px", lMenu.style.left = parseInt(findPosX(lThis), 10) + "px") : "BottomRight" == pDir ? (lMenu.style.position = "absolute", lMenu.style.top = parseInt(findPosY(lThis), 10) + parseInt(lThis.offsetHeight, 10) + "px", lMenu.style.left = parseInt(findPosX(lThis), 10) - parseInt(lThis.offsetWidth, 10) + "px") : "Set" == pDir ? (lMenu.style.position = "absolute", lMenu.style.top = parseInt(pY, 10) + "px", lMenu.style.left = parseInt(pX, 10) + "px") : (lMenu.style.position = "absolute", lMenu.style.top = parseInt(findPosY(lThis), 10) + "px", lMenu.style.left = parseInt(findPosX(lThis), 10) + parseInt(lThis.offsetWidth, 10) + "px") : (lMenu.style.position = "absolute", lMenu.style.top = parseInt(findPosY(lThis), 10) + "px", lMenu.style.left = parseInt(findPosX(lThis), 10) + "px"), $x_Show(lMenu), dhtml_FixLeft(lThis, lMenu, pDir), htmldb_IE_Select_Item_Fix(!0), g_Single_Menu_Count = 0, g_Single_Menu = lMenu, document.onclick = dhtml_DocMenuSingleCheck
  1870. }
  1871.  
  1872. function dhtml_FixLeft(pThis, pMenu, pDir) {
  1873.     var l_Width;
  1874.     l_Width = document.all ? document.body.clientWidth : window.innerWidth, "Bottom" == pDir ? parseInt(l_Width, 10) < parseInt(findPosX(pThis), 10) + parseInt(pThis.offsetWidth, 10) + parseInt(pMenu.offsetWidth, 10) && (pMenu.style.position = "absolute", pMenu.style.left = parseInt(findPosX(pThis), 10) - parseInt(pMenu.offsetWidth, 10) + parseInt(pThis.offsetWidth, 10) + "px") : parseInt(l_Width, 10) < parseInt(findPosX(pThis), 10) + parseInt(pMenu.offsetWidth, 10) && (pMenu.style.position = "absolute", pMenu.style.left = parseInt(findPosX(pThis), 10) - parseInt(pMenu.offsetWidth, 10) + "px")
  1875. }
  1876.  
  1877. function htmldb_IE_Select_Item_Fix(pTest) {
  1878.     var lSel = document.getElementsByTagName("SELECT").length >= 1;
  1879.     document.all && pTest && lSel && pTest.firstChild && "IFRAME" != pTest.firstChild.nodeName && (pTest.innerHTML = '<iframe  src="' + htmldb_Img_Dir + 'blank.html" width="' + pTest.offsetWidth + '" height="' + pTest.offsetHeight + '" style="z-index:-10;position: absolute;left: 0;top: 0;filter: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0);" scrolling="no" frameborder="0"></iframe>' + pTest.innerHTML)
  1880. }
  1881.  
  1882. function app_AppMenuMultiOpenBottom(pThis, pThat, pSub) {
  1883.     $x(pThat);
  1884.     if (pThis != gCurrentAppMenuImage) {
  1885.         app_AppMenuMultiClose();
  1886.         var l_That = pThis.previousSibling.firstChild;
  1887.         pThis.className = g_dhtmlMenuOn, dhtml_MenuOpen(l_That, pThat, !1, "Bottom", pThis), gCurrentAppMenuImage = pThis
  1888.     } else dhtml_CloseAllSubMenus(), app_AppMenuMultiClose()
  1889. }
  1890.  
  1891. function app_AppMenuMultiOpenBottom2(pThis, pThat, pSub) {
  1892.     $x(pThat);
  1893.     if (pThis != gCurrentAppMenuImage) {
  1894.         app_AppMenuMultiClose();
  1895.         var l_That = pThis.parentNode;
  1896.         pThis.className = g_dhtmlMenuOn, dhtml_MenuOpen(l_That, pThat, !1, "Bottom", pThis), gCurrentAppMenuImage = pThis
  1897.     } else dhtml_CloseAllSubMenus(), app_AppMenuMultiClose()
  1898. }
  1899.  
  1900. function app_AppMenuMultiOpenBottom3(pThis, pThat, pMenu, pSub) {
  1901.     $x(pThat);
  1902.     if (pThis != gCurrentAppMenuImage) {
  1903.         app_AppMenuMultiClose();
  1904.         var l_That = $x(pMenu);
  1905.         pThis.className = g_dhtmlMenuOn, dhtml_MenuOpen(l_That, pThat, !1, "Bottom", pThis), gCurrentAppMenuImage = pThis
  1906.     } else dhtml_CloseAllSubMenus(), app_AppMenuMultiClose()
  1907. }
  1908.  
  1909. function $u_js_temp_drop() {
  1910.     var lTemp = apex.jQuery("#apex_js_temp_drop");
  1911.     return lTemp.length > 0 ? lTemp.empty() : lTemp = apex.jQuery('<div id="apex_js_temp_drop"></div>').prependTo(document.body).hide(), lTemp[0]
  1912. }
  1913.  
  1914. function $u_js_temp_clear() {
  1915.     var lThis = $x("apex_js_temp_drop");
  1916.     return lThis && (lThis.innerHTML = ""), lThis
  1917. }
  1918.  
  1919. function ie_RowFixStart(pThis) {
  1920.     if (document.all) {
  1921.         var l_Items = $x_FormItems(pThis, "checkbox");
  1922.         g_CheckedArray_IE = [];
  1923.         for (var i = 0, len = l_Items.length; len > i; i++) "checkbox" == l_Items[i].type && (g_CheckedArray_IE[i] = l_Items[i].checked)
  1924.     }
  1925. }
  1926.  
  1927. function ie_RowFixFinish(pThis) {
  1928.     if (document.all)
  1929.         for (var l_Items = $x_FormItems(pThis, "checkbox"), i = 0, len = l_Items.length; len > i; i++) "checkbox" == l_Items[i].type && (l_Items[i].checked = g_CheckedArray_IE[i])
  1930. }
  1931.  
  1932. function $tr_RowMoveFollow(pThis, pColorLastRow) {
  1933.     gLastRowHighlight && (pColorLastRow && gLastRowMoved && $x_RowHighlightOff(gLastRowMoved), $x_RowHighlight(pThis, gLastRowMovedColor)), gLastRowMoved = pThis
  1934. }
  1935.  
  1936. function html_RowUp(pThis, pColorLastRow) {
  1937.     var l_Row = $x_UpTill(pThis, "TR");
  1938.     ie_RowFixStart(l_Row), $tr_RowMoveFollow(l_Row, pColorLastRow);
  1939.     for (var l_Table = l_Row.parentNode, l_RowPrev = l_Row.previousSibling; l_RowPrev && 1 != l_RowPrev.nodeType;) l_RowPrev = l_RowPrev.previousSibling;
  1940.     return l_RowPrev && l_RowPrev.firstChild && "TH" != l_RowPrev.firstChild.nodeName && "TR" == l_RowPrev.nodeName ? oElement = l_Table.insertBefore(l_Row, l_RowPrev) : oElement = l_Table.appendChild(l_Row), ie_RowFixFinish(oElement), oElement
  1941. }
  1942.  
  1943. function html_RowDown(pThis, pColorLastRow) {
  1944.     var l_Row = $x_UpTill(pThis, "TR");
  1945.     ie_RowFixStart(l_Row), $tr_RowMoveFollow(l_Row, pColorLastRow);
  1946.     for (var l_Table = l_Row.parentNode, l_RowNext = l_Row.nextSibling; l_RowNext && 1 != l_RowNext.nodeType;) l_RowNext = l_RowNext.nextSibling;
  1947.     return l_RowNext && "TR" == l_RowNext.nodeName ? oElement = l_Table.insertBefore(l_Row, l_RowNext.nextSibling) : oElement = l_Table.insertBefore(l_Row, l_Table.getElementsByTagName("TR")[1]), ie_RowFixFinish(oElement), oElement
  1948. }
  1949.  
  1950. function toolTip_init() {
  1951.     return document && document.body ? (gToolTipContent = $x("gToolTipContent"), gToolTip = $x("dhtmltooltip"), gToolTip || (gToolTip = $dom_AddTag(document.body, "DIV"), gToolTip.id = "dhtmltooltip", gToolTip.className = "htmldbToolTip", gToolTip.style.position = "absolute", gToolTip.style.border = "1px solid black", gToolTip.style.padding = "2px", gToolTip.style.backgroundColor = "", gToolTip.style.visibility = "hidden", gToolTip.style.zIndex = 1e4), gToopTipPointer = $x("dhtmlpointer"), gToopTipPointer || (gToopTipPointer = $dom_AddTag(document.body, "IMG"), gToopTipPointer.id = "dhtmlpointer", gToopTipPointer.src = htmldb_Img_Dir + gToolTipGraphic, gToopTipPointer.style.position = "absolute", gToopTipPointer.style.zIndex = 10001), !0) : !1
  1952. }
  1953.  
  1954. function toolTip_disable() {
  1955.     toolTip_init() && (tt_target = null, gToolTip.style.visibility = "hidden", gToolTip.style.backgroundColor = "", gToolTip.style.width = "", gToopTipPointer.style.visibility = "hidden", gToolTipContent ? gToolTipContent.innerHTML = "" : gToolTip.innerHTML = "")
  1956. }
  1957.  
  1958. function toolTip_enable(evt, obj, tip, width, color) {
  1959.     evt = evt ? evt : window.event ? event : null;
  1960.     var target_x = evt.pageX ? evt.pageX : evt.clientX + getScrollXY()[0],
  1961.         target_y = evt.pageY ? evt.pageY : evt.clientY + getScrollXY()[1];
  1962.     if (toolTip_init()) {
  1963.         tt_target = obj, tip || (tip = obj.getAttribute("htmldb:tip")), gToolTipContent ? gToolTipContent.innerHTML = tip : gToolTip.innerHTML = tip, width && (gToolTip.style.width = width + "px"), color ? gToolTip.style.backgroundColor = color : gToolTip.style.backgroundColor = "lightyellow", gToopTipPointer.style.left = 10 + target_x + "px", gToopTipPointer.style.top = 15 + target_y + "px", gToolTip.style.left = 7 + target_x + "px", gToolTip.style.top = 28 + target_y + "px", gToolTip.style.visibility = "visible", gToolTip.style.zIndex = 1e4, gToopTipPointer.style.zIndex = 10001, gToopTipPointer.style.visibility = "visible";
  1964.         try {
  1965.             obj.addEventListener("mouseout", toolTip_disable, !1)
  1966.         } catch (e) {
  1967.             obj.attachEvent("onmouseout", toolTip_disable)
  1968.         }
  1969.     }
  1970.     return !1
  1971. }
  1972.  
  1973. function toolTip_follow(evt, obj) {
  1974.     evt = evt ? evt : window.event ? event : null;
  1975.     var target_x = evt.pageX ? evt.pageX : evt.clientX + getScrollXY()[0],
  1976.         target_y = evt.pageY ? evt.pageY : evt.clientY + getScrollXY()[1];
  1977.     return gToolTip && (gToolTip.style.left = 7 + target_x + "px", gToolTip.style.top = 28 + target_y + "px", gToolTip.style.visibility = "visible", gToolTip.style.zIndex = 1e4, gToopTipPointer.style.left = 10 + target_x + "px", gToopTipPointer.style.top = 15 + target_y + "px", gToopTipPointer.style.zIndex = 10001, gToopTipPointer.style.visibility = "visible"), !1
  1978. }
  1979.  
  1980. function dhtml_ShuttleObject(pThis, pThat) {
  1981.     this.Select1 = $x(pThis), this.Select2 = $x(pThat), this.Select1ArrayInit = this.Select1.cloneNode(!0), this.Select2ArrayInit = this.Select2.cloneNode(!0), this.Op1Init = [], this.Op2Init = [], this.Op1Init = this.Select1ArrayInit.options, this.Op2Init = this.Select2ArrayInit.options, this.move = function() {
  1982.         var l_A = $f_SelectedOptions(this.Select1);
  1983.         $x(l_A) && (l_A = [l_A]);
  1984.         for (var l_AL = l_A.length, i = 0; l_AL > i; i++) this.Select2.appendChild(l_A[i])
  1985.     }, this.remove = function() {
  1986.         var l_A = $f_SelectedOptions(this.Select2);
  1987.         $x(l_A) && (l_A = [l_A]);
  1988.         for (var l_AL = l_A.length, i = 0; l_AL > i; i++) this.Select1.appendChild(l_A[i])
  1989.     }, this.reset = function() {
  1990.         this.Select1.options.length = 0, this.Select2.options.length = 0;
  1991.         for (var L_Count1 = this.Op1Init.length, i = 0; L_Count1 > i; i++) this.Select1.options[i] = new Option(this.Op1Init[i].text, this.Op1Init[i].value);
  1992.         for (var L_Count2 = this.Op2Init.length, i2 = 0; L_Count2 > i2; i2++) this.Select2.options[i2] = new Option(this.Op2Init[i2].text, this.Op2Init[i2].value)
  1993.     }, this.move_all = function() {
  1994.         for (var i = 0, len = this.Select1.options.length; len > i; i++) this.Select1.options[i].selected = !0;
  1995.         this.move()
  1996.     }, this.remove_all = function() {
  1997.         for (var i = 0, len = this.Select2.options.length; len > i; i++) this.Select2.options[i].selected = !0;
  1998.         this.remove()
  1999.     }, this.sort = function(pShuttle, pDir) {
  2000.         var i, lLength = pShuttle.options.length;
  2001.         if ("U" == pDir)
  2002.             for (i = 0; lLength > i; i++) pShuttle.options[i].selected && "U" == pDir && i && pShuttle.insertBefore(pShuttle.options[i], pShuttle.options[i - 1]);
  2003.         else if ("D" == pDir)
  2004.             for (i = lLength - 1; i >= 0; i--) pShuttle.options[i].selected && "D" == pDir && i != lLength - 1 && pShuttle.insertBefore(pShuttle.options[i], pShuttle.options[i + 2]);
  2005.         else {
  2006.             var l_Opt = [];
  2007.             for (i = 0; lLength > i; i++) pShuttle.options[i].selected && (l_Opt[l_Opt.length] = pShuttle.options[i]);
  2008.             if ("B" == pDir)
  2009.                 for (i = 0; i < l_Opt.length; i++) pShuttle.appendChild(l_Opt[i]);
  2010.             else if ("T" == pDir)
  2011.                 for (i = l_Opt.length - 1; i >= 0; i--) pShuttle.insertBefore(l_Opt[i], pShuttle.firstChild)
  2012.         }
  2013.     }, this.sort1 = function(pDir) {
  2014.         this.sort(this.Select1, pDir)
  2015.     }, this.sort2 = function(pDir) {
  2016.         this.sort(this.Select2, pDir)
  2017.     }
  2018. }
  2019.  
  2020. function hideShow(objectID, imgID, showImg, hideImg) {
  2021.     var theImg = $x(imgID),
  2022.         theDiv = $x(objectID);
  2023.     "none" == theDiv.style.display || "" == theDiv.style.display || null == theDiv.style ? (theImg.src = hideImg, $x(objectID).style.display = "block") : (theImg.src = showImg, $x(objectID).style.display = "none")
  2024. }(null === apex.spreadsheet || "object" != typeof apex.spreadsheet) && (apex.spreadsheet = {}), (null === apex.items || "object" != typeof apex.items) && (apex.items = {}), (null === apex.ajax || "object" != typeof apex.ajax) && (apex.ajax = {}), (null === apex.dhtml || "object" != typeof apex.dhtml) && (apex.dhtml = {}), (null === apex.worksheet || "object" != typeof apex.worksheet) && (apex.worksheet = {}), apex.ajax = {
  2025.     clob: function(pReturn) {
  2026.         function _get(pValue) {
  2027.             that.ajax.addParam("x05", "GET"), that.ajax.GetAsync(that._return)
  2028.         }
  2029.  
  2030.         function _set(pValue) {
  2031.             that.ajax.addParam("x05", "SET"), that.ajax.AddArrayClob(pValue, 1), that.ajax.GetAsync(that._return)
  2032.         }
  2033.  
  2034.         function _return() {
  2035.             if (1 == p.readyState);
  2036.             else if (2 == p.readyState);
  2037.             else if (3 != p.readyState) return 4 == p.readyState ? p : !1
  2038.         }
  2039.         var that = this;
  2040.         this.ajax = new htmldb_Get(null, $x("pFlowId").value, "APXWGT", 0), this.ajax.addParam("p_widget_name", "apex_utility"), this.ajax.addParam("x04", "CLOB_CONTENT"), this._get = _get, this._set = _set, this._return = pReturn ? pReturn : _return
  2041.     },
  2042.     test: function(pReturn) {
  2043.         function _get(pValue) {
  2044.             that.ajax.GetAsync(that._return)
  2045.         }
  2046.  
  2047.         function _set(pValue) {}
  2048.  
  2049.         function _return(pValue) {}
  2050.         var that = this;
  2051.         this.ajax = new htmldb_Get(null, $x("pFlowId").value, "APXWGT", 0), this.ajax.addParam("p_widget_name", "apex_utility"), this._get = _get, this._set = _set, this._return = pReturn ? pReturn : _return
  2052.     },
  2053.     widget: function(pWidget, pReturn) {
  2054.         function _get(pValue) {
  2055.             that.ajax.GetAsync(that._return)
  2056.         }
  2057.  
  2058.         function _set(pValue) {}
  2059.  
  2060.         function _return(pValue) {}
  2061.         var that = this;
  2062.         this.ajax = new htmldb_Get(null, $x("pFlowId").value, "APXWGT", 0), this.ajax.addParam("p_widget_name", pWidget), this._get = _get, this._set = _set, this._return = pReturn ? pReturn : _return
  2063.     },
  2064.     ondemand: function(pWidget, pReturn) {
  2065.         function _get(pValue) {
  2066.             that.ajax.GetAsync(that._return)
  2067.         }
  2068.  
  2069.         function _set(pValue) {}
  2070.  
  2071.         function _return(pValue) {}
  2072.         var that = this;
  2073.         this.ajax = new htmldb_Get(null, $x("pFlowId").value, "APPLICATION_PROCESS=" + pWidget, 0), this._get = _get, this._set = _set, this._return = pReturn ? pReturn : _return
  2074.     },
  2075.     url: function(pUrl, pReturn) {
  2076.         function _get(pValue) {
  2077.             that.ajax.GetAsync(that._return)
  2078.         }
  2079.  
  2080.         function _set(pValue) {}
  2081.  
  2082.         function _return(pValue) {}
  2083.         var that = this;
  2084.         this.ajax = new htmldb_Get(null, null, null, null, null, "f", pUrl), this._get = _get, this._set = _set, this._return = pReturn ? pReturn : _return
  2085.     }
  2086. };
  2087. var gResult = null,
  2088.     gNode = null;
  2089. htmldb_Get.prototype.GetAsync = function(pCallback) {
  2090.     var lRequest;
  2091.     try {
  2092.         lRequest = new XMLHttpRequest
  2093.     } catch (e) {
  2094.         lRequest = new ActiveXObject("Msxml2.XMLHTTP")
  2095.     }
  2096.     try {
  2097.         new Date;
  2098.         if (lRequest.open("POST", this.base, !0), lRequest) return lRequest.onreadystatechange = function() {
  2099.             p = lRequest, pCallback(lRequest)
  2100.         }, lRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), lRequest.send(null == this.queryString ? this.params : this.queryString), lRequest
  2101.     } catch (e) {
  2102.         return !1
  2103.     }
  2104. }, htmldb_Get.prototype.AddArray = function(pArray, pFnumber) {
  2105.     var lFName = "f";
  2106.     pFnumber = $nvl(pFnumber, 1), lFName += 10 > pFnumber ? "0" + pFnumber : pFnumber;
  2107.     for (var i = 0, len = pArray.length; len > i; i++) this.addParam(lFName, pArray[i]);
  2108.     return this
  2109. }, htmldb_Get.prototype.AddArrayItems = function(pArray, pFnumber) {
  2110.     var lFName = "f";
  2111.     pFnumber = $nvl(pFnumber, 1), lFName += 10 > pFnumber ? "0" + pFnumber : pFnumber;
  2112.     for (var i = 0, len = pArray.length; len > i; i++) this.addParam(lFName, $nvl($v(pArray[i])), "");
  2113.     return this
  2114. }, htmldb_Get.prototype.AddNameValue = function(pName, pValue, pFnumber) {
  2115.     var lFName = "f",
  2116.         lFName2 = "f";
  2117.     return pFnumber = $nvl(pFnumber, 1), pFnumber2 = pFnumber + 1, lFName += 10 > pFnumber ? "0" + pFnumber : pFnumber, lFName2 += pFnumber2 < 10 ? "0" + pFnumber2 : pFnumber2, this.addParam(lFName, pName), this.addParam(lFName2, $nvl(pValue), ""), this
  2118. }, htmldb_Get.prototype.AddArrayItems2 = function(pArray, pFnumber, pKey) {
  2119.     var lFName = "f",
  2120.         lFName2 = "f";
  2121.     pFnumber = $nvl(pFnumber, 1), pFnumber2 = pFnumber + 1, lFName += 10 > pFnumber ? "0" + pFnumber : pFnumber, lFName2 += pFnumber2 < 10 ? "0" + pFnumber2 : pFnumber2;
  2122.     for (var i = 0, len = pArray.length; len > i; i++) {
  2123.         var lTest = $x(pArray[i]);
  2124.         lTest && 0 != lTest.id.length && (pKey ? this.addParam(lFName, apex.jQuery(lTest).attr(pKey)) : this.addParam(lFName, lTest.id))
  2125.     }
  2126.     for (var i = 0, len = pArray.length; len > i; i++) {
  2127.         var lTest = $x(pArray[i]);
  2128.         lTest && 0 != lTest.id.length && this.addParam(lFName2, $nvl($v(lTest)), "")
  2129.     }
  2130.     return this
  2131. }, htmldb_Get.prototype.AddArrayClob = function(pText, pFnumber) {
  2132.     var lArray = $s_Split(pText, 4e3);
  2133.     return this.AddArray(lArray, pFnumber), this
  2134. }, htmldb_Get.prototype.AddPageItems = function(pArray) {
  2135.     for (var i = 0, len = pArray.length; len > i; i++) $x(pArray[i]) && this.add($x(pArray[i]).id, $v(pArray[i]))
  2136. }, htmldb_Get.prototype.AddGlobals = function(p_widget_mod, p_widget_action, p_widget_action_mod, p_widget_num_return, x01, x02, x03, x04, x05, x06, x07, x08, x09, x10) {
  2137.     return this.addParam("p_widget_mod", p_widget_mod), this.addParam("p_widget_action", p_widget_action), this.addParam("p_widget_action_mod", p_widget_action_mod), this.addParam("p_widget_num_return", p_widget_num_return), this.addParam("x01", x01), this.addParam("x02", x02), this.addParam("x03", x03), this.addParam("x04", x04), this.addParam("x05", x05), this.addParam("x06", x06), this.addParam("x07", x07), this.addParam("x08", x08), this.addParam("x09", x09), this.addParam("x10", x10), this
  2138. };
  2139. var gDebug = !0,
  2140.     gkeyPressTime, gLastTab = !1,
  2141.     gRegex = !1,
  2142.     ie = document.all ? !0 : !1;
  2143. ie && (document.expando = !0);
  2144. var gDebugWindow = !1;
  2145. $item = $x_object;
  2146. var gToggleWithImageA = "pseudoButtonActive",
  2147.     gToggleWithImageI = "pseudoButtonInactive",
  2148.     gCurrentRow = !1,
  2149.     htmldb_ch = !1,
  2150.     gChangeCheck = !1,
  2151.     gCurrentAppMenu = !1,
  2152.     gCurrentAppMenuImage = !1,
  2153.     $gCurrentAnchorList = !1,
  2154.     gSubMenuArray = [],
  2155.     g_Single_Menu = !1,
  2156.     g_Single_Menu_Count = 0,
  2157.     g_dhtmlMenu = "dhtmlMenu",
  2158.     g_dhtmlMenuOn = "dhtmlMenuOn",
  2159.     g_CheckedArray_IE, gLastRowMoved = null,
  2160.     gLastRowMovedColor = "#CCCCCC",
  2161.     gLastRowHighlight = !0,
  2162.     tt_target, gToolTipGraphic = "arrow2.gif",
  2163.     gToolTip = !1,
  2164.     gToopTipPointer = !1,
  2165.     gToolTipContent = !1;
  2166. apex.security = {},
  2167.     function(security, $, undefined) {
  2168.         "use strict";
  2169.         security.framebreaker = function(pMode) {
  2170.             self != top && (null == pMode || "D" === pMode || "S" === pMode && top.location.host != self.location.host) ? (document.documentElement.style.visibility = "hidden", $(function() {
  2171.                 document.write("X")
  2172.             }), top.location = self.location) : document.documentElement.style.visibility = "visible"
  2173.         }
  2174.     }(apex.security, apex.jQuery);
  2175. apex.widget = {
  2176.     waitPopup: function(pContent) {
  2177.         var lWaitPopup$, lPopup$, lSpinner;
  2178.         return pContent ? (lWaitPopup$ = apex.jQuery('<div id="apex_wait_popup" class="apex_wait_popup"></div><div id="apex_wait_overlay" class="apex_wait_overlay"></div>').prependTo("body"), lPopup$ = lWaitPopup$.first(), pContent.indexOf("<img") >= 0 && lPopup$.hide(), window.setTimeout(function() {
  2179.             lPopup$.html(pContent).find("img").hide().on("load", function() {
  2180.                 $(this).show(), lPopup$.show()
  2181.             })
  2182.         }, 10)) : (lWaitPopup$ = apex.jQuery('<div id="apex_wait_overlay" class="apex_wait_overlay"></div>').prependTo("body"), window.setTimeout(function() {
  2183.             void 0 !== lWaitPopup$ && (lSpinner = apex.util.showSpinner())
  2184.         }, 10), lWaitPopup$.css("visibility", "visible")), {
  2185.             remove: function() {
  2186.                 void 0 !== lSpinner && lSpinner.remove(), lWaitPopup$.remove(), lWaitPopup$ = void 0
  2187.             }
  2188.         }
  2189.     }
  2190. }, apex.widget.initPageItem = function(pName, pOptions) {
  2191.     apex.item(pName, pOptions)
  2192. }, apex.widget.textareaClob = {
  2193.     upload: function(pItemName, pRequest) {
  2194.         var lClob = new apex.ajax.clob(function() {
  2195.             if (1 === p.readyState);
  2196.             else if (2 === p.readyState);
  2197.             else if (3 === p.readyState);
  2198.             else {
  2199.                 if (4 !== p.readyState) return !1;
  2200.                 $s(pItemName, ""), apex.submit(pRequest)
  2201.             }
  2202.         });
  2203.         lClob._set($v(pItemName))
  2204.     }
  2205. };
  2206. apex.widget.util = {},
  2207.     function(util, $) {
  2208.         util.cascadingLov = function(pList, pAjaxIdentifier, pData, pOptions) {
  2209.             var lList$ = $(pList, apex.gPageContext$),
  2210.                 lQueueName = lList$[0] ? lList$[0].id : "lov",
  2211.                 lOptions = $.extend({
  2212.                     optimizeRefresh: !0,
  2213.                     queue: {
  2214.                         name: lQueueName,
  2215.                         action: "replace"
  2216.                     }
  2217.                 }, pOptions),
  2218.                 lNullFound = !1;
  2219.             return lOptions.refreshObject || (lOptions.refreshObject = lList$), lOptions.loadingIndicator || (lOptions.loadingIndicator = lList$), lOptions.optimizeRefresh && ($(lOptions.dependingOn, apex.gPageContext$).each(function() {
  2220.                 return apex.item(this).isEmpty() ? (lNullFound = !0, !1) : void 0
  2221.             }), lNullFound) ? (lOptions.refreshObject.trigger("apexbeforerefresh"), $.isFunction(lOptions.clear) && lOptions.clear(), lList$.change(), void lOptions.refreshObject.trigger("apexafterrefresh")) : (pData.pageItems = $(pData.pageItems, apex.gPageContext$).add(lOptions.dependingOn), apex.server.plugin(pAjaxIdentifier, pData, lOptions))
  2222.         }, util.callPopupLov = function(pAjaxIdentifier, pData, pOptions) {
  2223.             var lUrl, lWindow, lData = pData || {},
  2224.                 lOptions = pOptions || {};
  2225.             return lOptions.filterOutput && (lData.x02 = lOptions.filterValue), lUrl = apex.server.pluginUrl(pAjaxIdentifier, lData), lWindow = window.open(lUrl, "winLovList_" + $v("pInstance"), lOptions.windowParameters), null === lWindow.opener && (lWindow.opener = self), lWindow.focus(), !1
  2226.         }, util.enableIcon = function($pContainer, pHref, pClickHandler) {
  2227.             $pContainer.find("img").css({
  2228.                 opacity: 1,
  2229.                 cursor: ""
  2230.             }).parent("a").attr("href", pHref), pClickHandler && $pContainer.click(pClickHandler)
  2231.         }, util.disableIcon = function($pContainer) {
  2232.             $pContainer.find("img").css({
  2233.                 opacity: .5,
  2234.                 cursor: "default"
  2235.             }).parent("a").removeAttr("href").unbind("click")
  2236.         }
  2237.     }(apex.widget.util, apex.jQuery);
  2238. apex.da = {},
  2239.     function(da, $, event, util, undefined) {
  2240.         "use strict";
  2241.         da.gEventList = [], da.gCancelActions = !1, da.init = function() {
  2242.             $(da.gEventList).each(function() {
  2243.                 var lDefaults, lEvent, lSelector, lLiveSelector$;
  2244.                 lDefaults = {
  2245.                     name: null,
  2246.                     bindDelegateTo: null
  2247.                 }, lEvent = $.extend(lDefaults, this), lSelector = da.constructSelector({
  2248.                     elementType: lEvent.triggeringElementType,
  2249.                     element: lEvent.triggeringElement,
  2250.                     regionId: lEvent.triggeringRegionId,
  2251.                     buttonId: lEvent.triggeringButtonId
  2252.                 }), -1 === $.inArray(lEvent.bindEventType, ["ready", "pageinit"]) && ("bind" === lEvent.bindType ? $(lSelector, apex.gPageContext$).on(lEvent.bindEventType, function(pBrowserEvent, pData) {
  2253.                     da.actions(this, lEvent, pBrowserEvent, pData)
  2254.                 }) : "live" === lEvent.bindType ? (lLiveSelector$ = lEvent.bindDelegateTo ? $(lEvent.bindDelegateTo, apex.gPageContext$) : apex.gPageContext$, lLiveSelector$.on(lEvent.bindEventType, lSelector, function(pBrowserEvent, pData) {
  2255.                     da.actions(this, lEvent, pBrowserEvent, pData)
  2256.                 })) : "one" === lEvent.bindType && $(lSelector, apex.gPageContext$).one(lEvent.bindEventType, function(pBrowserEvent, pData) {
  2257.                     da.actions(this, lEvent, pBrowserEvent, pData)
  2258.                 })), da.actions(lSelector, lEvent, "load")
  2259.             })
  2260.         }, da.constructSelector = function(pOptions) {
  2261.             var lLen, lDefaults, lOptions, lSelector = "";
  2262.             switch (lDefaults = {
  2263.                 elementType: null,
  2264.                 element: null,
  2265.                 regionId: null,
  2266.                 buttonId: null,
  2267.                 triggeringElement: null,
  2268.                 eventTarget: null
  2269.             }, lOptions = $.extend(lDefaults, pOptions), lOptions.elementType) {
  2270.                 case "ITEM":
  2271.                     lSelector = "#" + lOptions.element.replace(/,/g, ",#");
  2272.                     break;
  2273.                 case "REGION":
  2274.                     lSelector = "#" + util.escapeCSS(lOptions.regionId);
  2275.                     break;
  2276.                 case "BUTTON":
  2277.                     lSelector = "#" + util.escapeCSS(lOptions.buttonId);
  2278.                     break;
  2279.                 case "JAVASCRIPT_EXPRESSION":
  2280.                     lSelector = lOptions.element();
  2281.                     break;
  2282.                 case "DOM_OBJECT":
  2283.                     apex.debug.deprecated("DOM Object selector"), lSelector = "#" + lOptions.element.replace(/,/g, ",#");
  2284.                     try {
  2285.                         lLen = $(lSelector, apex.gPageContext$).length
  2286.                     } catch (ex) {
  2287.                         lLen = 0
  2288.                     }
  2289.                     if (0 === lLen) try {
  2290.                         lSelector = eval(lOptions.element)
  2291.                     } catch (err) {
  2292.                         lSelector = lOptions.element
  2293.                     }
  2294.                     break;
  2295.                 case "JQUERY_SELECTOR":
  2296.                     lSelector = lOptions.element;
  2297.                     break;
  2298.                 case "TRIGGERING_ELEMENT":
  2299.                     lSelector = lOptions.triggeringElement;
  2300.                     break;
  2301.                 case "EVENT_SOURCE":
  2302.                     lSelector = lOptions.eventTarget;
  2303.                     break;
  2304.                 default:
  2305.                     lSelector = apex.gPageContext$
  2306.             }
  2307.             return "#" === lSelector && (lSelector = undefined), lSelector
  2308.         }, da.doAction = function(pTriggeringElement, pSelector, pAction, pBrowserEvent, pData, pDynamicActionName, pResumeCallback) {
  2309.             var lContext = {
  2310.                 triggeringElement: pTriggeringElement,
  2311.                 affectedElements: $(pSelector, apex.gPageContext$),
  2312.                 action: pAction,
  2313.                 browserEvent: pBrowserEvent,
  2314.                 data: pData,
  2315.                 resumeCallback: pResumeCallback
  2316.             };
  2317.             return pAction.javascriptFunction ? (apex.debug.log("Dynamic Action Fired: " + pDynamicActionName + " (" + pAction.action + ")", lContext), pAction.javascriptFunction.call(lContext)) : void 0
  2318.         }, da.doActions = function(pEvent, pStartWithAction, pBrowserEvent, pData, pConditionResult, pTriggeringElement) {
  2319.             for (var lActionCount = pEvent.actionList.length, lActionIterator = pStartWithAction; lActionCount > lActionIterator; lActionIterator++) {
  2320.                 var lDefaults, lAction, lSelector, lWaitCallback;
  2321.                 if (da.gCancelActions) return !1;
  2322.                 if (lDefaults = {
  2323.                         eventResult: null,
  2324.                         executeOnPageInit: !1,
  2325.                         stopExecutionOnError: !0,
  2326.                         action: null,
  2327.                         affectedElementsType: null,
  2328.                         affectedRegionId: null,
  2329.                         affectedElements: null,
  2330.                         javascriptFunction: null,
  2331.                         ajaxIdentifier: null,
  2332.                         attribute01: null,
  2333.                         attribute02: null,
  2334.                         attribute03: null,
  2335.                         attribute04: null,
  2336.                         attribute05: null,
  2337.                         attribute06: null,
  2338.                         attribute07: null,
  2339.                         attribute08: null,
  2340.                         attribute09: null,
  2341.                         attribute10: null,
  2342.                         attribute11: null,
  2343.                         attribute12: null,
  2344.                         attribute13: null,
  2345.                         attribute14: null,
  2346.                         attribute15: null
  2347.                     }, lAction = $.extend(lDefaults, pEvent.actionList[lActionIterator]), ("load" !== pBrowserEvent || "load" === pBrowserEvent && (lAction.executeOnPageInit || -1 !== $.inArray(pEvent.bindEventType, ["ready", "pageinit"]))) && lAction.eventResult === pConditionResult && (lSelector = da.constructSelector({
  2348.                         elementType: lAction.affectedElementsType,
  2349.                         element: lAction.affectedElements,
  2350.                         regionId: lAction.affectedRegionId,
  2351.                         buttonId: lAction.affectedButtonId,
  2352.                         triggeringElement: pTriggeringElement,
  2353.                         eventTarget: pBrowserEvent.target
  2354.                     }), lAction.waitForResult && (lWaitCallback = function(pErrorOccurred) {
  2355.                         da.gCancelActions = lAction.stopExecutionOnError && pErrorOccurred, da.doActions(pEvent, lActionIterator + 1, pBrowserEvent, pData, pConditionResult, pTriggeringElement)
  2356.                     }), da.doAction(pTriggeringElement, lSelector, lAction, pBrowserEvent, pData, pEvent.name, lWaitCallback) === !1 && lAction.stopExecutionOnError && (da.gCancelActions = !0), lAction.waitForResult)) return !1
  2357.             }
  2358.         }, da.actions = function(pSelector, pEvent, pBrowserEvent, pData) {
  2359.             function _getConditionResult(pElement) {
  2360.                 var lConditionResult, lExpressionArray, lContext, lApexItem = apex.item(pElement.id),
  2361.                     lValue = lApexItem.getValue();
  2362.                 switch (pEvent.triggeringConditionType) {
  2363.                     case "EQUALS":
  2364.                         $.isArray(lValue) ? (lConditionResult = !1, $.each(lValue, function(index, value) {
  2365.                             return lConditionResult = value === pEvent.triggeringExpression, lConditionResult ? !1 : void 0
  2366.                         })) : lConditionResult = lValue === pEvent.triggeringExpression;
  2367.                         break;
  2368.                     case "NOT_EQUALS":
  2369.                         $.isArray(lValue) ? (lConditionResult = !0, $.each(lValue, function(index, value) {
  2370.                             return lConditionResult = value !== pEvent.triggeringExpression, lConditionResult ? void 0 : !1
  2371.                         })) : lConditionResult = lValue !== pEvent.triggeringExpression;
  2372.                         break;
  2373.                     case "IN_LIST":
  2374.                         lExpressionArray = pEvent.triggeringExpression.split(","), $.isArray(lValue) ? (lConditionResult = !1, $.each(lValue, function(index, value) {
  2375.                             return lConditionResult = -1 !== $.inArray(value, lExpressionArray), lConditionResult ? !1 : void 0
  2376.                         })) : lConditionResult = -1 !== $.inArray(lValue, lExpressionArray);
  2377.                         break;
  2378.                     case "NOT_IN_LIST":
  2379.                         lExpressionArray = pEvent.triggeringExpression.split(","), $.isArray(lValue) ? (lConditionResult = !0, $.each(lValue, function(index, value) {
  2380.                             return lConditionResult = -1 === $.inArray(value, lExpressionArray), lConditionResult ? void 0 : !1
  2381.                         })) : lConditionResult = -1 === $.inArray(lValue, lExpressionArray);
  2382.                         break;
  2383.                     case "GREATER_THAN":
  2384.                         $.isArray(lValue) ? (lConditionResult = !0, $.each(lValue, function(index, value) {
  2385.                             return lConditionResult = value > parseFloat(pEvent.triggeringExpression, 10), lConditionResult ? void 0 : !1
  2386.                         })) : lConditionResult = lValue > parseFloat(pEvent.triggeringExpression, 10);
  2387.                         break;
  2388.                     case "GREATER_THAN_OR_EQUAL":
  2389.                         $.isArray(lValue) ? (lConditionResult = !0, $.each(lValue, function(index, value) {
  2390.                             return lConditionResult = value >= parseFloat(pEvent.triggeringExpression, 10), lConditionResult ? void 0 : !1
  2391.                         })) : lConditionResult = lValue >= parseFloat(pEvent.triggeringExpression, 10);
  2392.                         break;
  2393.                     case "LESS_THAN":
  2394.                         $.isArray(lValue) ? (lConditionResult = !0, $.each(lValue, function(index, value) {
  2395.                             return lConditionResult = value < parseFloat(pEvent.triggeringExpression, 10), lConditionResult ? void 0 : !1
  2396.                         })) : lConditionResult = lValue < parseFloat(pEvent.triggeringExpression, 10);
  2397.                         break;
  2398.                     case "LESS_THAN_OR_EQUAL":
  2399.                         $.isArray(lValue) ? (lConditionResult = !0, $.each(lValue, function(index, value) {
  2400.                             return lConditionResult = value <= parseFloat(pEvent.triggeringExpression, 10), lConditionResult ? void 0 : !1
  2401.                         })) : lConditionResult = lValue <= parseFloat(pEvent.triggeringExpression, 10);
  2402.                         break;
  2403.                     case "NULL":
  2404.                         lConditionResult = lApexItem.isEmpty();
  2405.                         break;
  2406.                     case "NOT_NULL":
  2407.                         lConditionResult = !lApexItem.isEmpty();
  2408.                         break;
  2409.                     case "JAVASCRIPT_EXPRESSION":
  2410.                         lContext = {
  2411.                             triggeringElement: pElement,
  2412.                             browserEvent: pBrowserEvent,
  2413.                             data: pData
  2414.                         }, lConditionResult = pEvent.triggeringExpression.call(lContext);
  2415.                         break;
  2416.                     default:
  2417.                         lConditionResult = !0
  2418.                 }
  2419.                 return lConditionResult
  2420.             }
  2421.             event.gCancelFlag = !1, da.gCancelActions = !1, $(pSelector, apex.gPageContext$).each(function() {
  2422.                 da.doActions(pEvent, 0, pBrowserEvent, pData, _getConditionResult(this), this), da.gCancelActions = !1
  2423.             })
  2424.         }, da.resume = function(pCallback, pErrorOccurred) {
  2425.             $.isFunction(pCallback) && pCallback(pErrorOccurred)
  2426.         }, da.handleAjaxErrors = function(pjqXHR, pTextStatus, pErrorThrown, pResumeCallback) {
  2427.             var lMsg;
  2428.             0 !== pjqXHR.status && (lMsg = "APEX" === pTextStatus ? pErrorThrown : "Error: " + pTextStatus + " - " + pErrorThrown, $.isFunction(window.onerror) ? window.onerror(lMsg, null, null) : window.alert(lMsg)), da.resume(pResumeCallback, !0)
  2429.         }
  2430.     }(apex.da, apex.jQuery, apex.event, apex.util);
  2431. ! function(da, server, item, $) {
  2432.     "use strict";
  2433.     da.show = function() {
  2434.         var lShowRow;
  2435.         this.affectedElements && (lShowRow = "Y" === this.action.attribute01, this.affectedElements.each(function() {
  2436.             item(this).show(lShowRow)
  2437.         }))
  2438.     }, da.hide = function() {
  2439.         var lHideRow;
  2440.         this.affectedElements && (lHideRow = "Y" === this.action.attribute01, this.affectedElements.each(function() {
  2441.             item(this).hide(lHideRow)
  2442.         }))
  2443.     }, da.enable = function() {
  2444.         this.affectedElements && this.affectedElements.each(function() {
  2445.             item(this).enable()
  2446.         })
  2447.     }, da.disable = function() {
  2448.         this.affectedElements && this.affectedElements.each(function() {
  2449.             item(this).disable()
  2450.         })
  2451.     }, da.setValue = function() {
  2452.         function _setValue(pValue) {
  2453.             lAffectedElements$.each(function(i) {
  2454.                 $s(this, pValue, null, lSuppressChangeEvent)
  2455.             }), da.resume(lResumeCallback, !1)
  2456.         }
  2457.  
  2458.         function _clear() {
  2459.             lAsync && lAffectedElements$.each(function() {
  2460.                 $s(this, "", null, !0)
  2461.             })
  2462.         }
  2463.  
  2464.         function _success(pData) {
  2465.             var lAffectedElementArray, lValue;
  2466.             if ("SQL_STATEMENT" === lSetType)
  2467.                 if ("ITEM" === lAction.affectedElementsType) {
  2468.                     lAffectedElementArray = lAction.affectedElements.split(",");
  2469.                     for (var i = 0, len = lAffectedElementArray.length; len > i; i++) lValue = "undefined" != typeof pData.values[i] ? pData.values[i] : "", $s(lAffectedElementArray[i], lValue, null, lSuppressChangeEvent);
  2470.                     da.resume(lResumeCallback, !1)
  2471.                 } else _setValue(pData.values[0]);
  2472.             else _setValue(pData.value)
  2473.         }
  2474.  
  2475.         function _error(pjqXHR, pTextStatus, pErrorThrown) {
  2476.             da.handleAjaxErrors(pjqXHR, pTextStatus, pErrorThrown, lResumeCallback)
  2477.         }
  2478.         var lAction = this.action,
  2479.             lSetType = lAction.attribute01,
  2480.             lStaticAssignment = lAction.attribute02,
  2481.             lPageItemsToSubmit = lAction.attribute04,
  2482.             lJavaScriptExpression = lAction.attribute05,
  2483.             lSuppressChangeEvent = "Y" === lAction.attribute09,
  2484.             lDialogReturnItem = lAction.attribute10,
  2485.             lAsync = !lAction.waitForResult,
  2486.             lAffectedElements$ = this.affectedElements,
  2487.             lResumeCallback = this.resumeCallback;
  2488.         "STATIC_ASSIGNMENT" === lSetType ? _setValue(lStaticAssignment) : "SQL_STATEMENT" === lSetType || "PLSQL_EXPRESSION" === lSetType || "FUNCTION_BODY" === lSetType ? server.plugin(lAction.ajaxIdentifier, {
  2489.             pageItems: lPageItemsToSubmit
  2490.         }, {
  2491.             loadingIndicator: lAffectedElements$,
  2492.             clear: _clear,
  2493.             success: _success,
  2494.             error: _error,
  2495.             async: lAsync
  2496.         }) : "JAVASCRIPT_EXPRESSION" === lSetType ? _setValue(lJavaScriptExpression.call(this)) : "DIALOG_RETURN_ITEM" === lSetType && _setValue(this.data[lDialogReturnItem])
  2497.     }, da.executePlSqlCode = function() {
  2498.         function _clear() {
  2499.             lAsync && $(lPageItemsToReturn, apex.gPageContext$).each(function() {
  2500.                 $s(this, "", null, !0)
  2501.             })
  2502.         }
  2503.  
  2504.         function _success(pData) {
  2505.             var lItemCount, lItemArray;
  2506.             if (pData && pData.item) {
  2507.                 lItemCount = pData.item.length, lItemArray = pData.item;
  2508.                 for (var lItemIterator = 0; lItemCount > lItemIterator; lItemIterator++) $s(lItemArray[lItemIterator].id, lItemArray[lItemIterator].value, null, lSuppressChangeEvent)
  2509.             }
  2510.             da.resume(lResumeCallback, !1)
  2511.         }
  2512.  
  2513.         function _error(pjqXHR, pTextStatus, pErrorThrown) {
  2514.             da.handleAjaxErrors(pjqXHR, pTextStatus, pErrorThrown, lResumeCallback)
  2515.         }
  2516.         var lAction = this.action,
  2517.             lPageItemsToSubmit = lAction.attribute01,
  2518.             lPageItemsToReturn = lAction.attribute02,
  2519.             lSuppressChangeEvent = "Y" === lAction.attribute04,
  2520.             lAsync = !lAction.waitForResult,
  2521.             lResumeCallback = this.resumeCallback;
  2522.         server.plugin(lAction.ajaxIdentifier, {
  2523.             pageItems: lPageItemsToSubmit
  2524.         }, {
  2525.             dataType: lPageItemsToReturn ? "json" : "",
  2526.             loadingIndicator: lPageItemsToReturn,
  2527.             clear: _clear,
  2528.             success: _success,
  2529.             error: _error,
  2530.             async: lAsync
  2531.         })
  2532.     }, da.clear = function() {
  2533.         this.affectedElements && this.affectedElements.each(function() {
  2534.             $s(this, "", "")
  2535.         })
  2536.     }, da.addClass = function() {
  2537.         this.affectedElements && this.affectedElements.addClass(this.action.attribute01)
  2538.     }, da.removeClass = function() {
  2539.         this.affectedElements && (this.action.attribute01 ? this.affectedElements.removeClass(this.action.attribute01) : this.affectedElements.removeClass())
  2540.     }, da.setCSS = function() {
  2541.         var lAction = this.action;
  2542.         this.affectedElements.each(function() {
  2543.             item(this).setStyle(lAction.attribute01, lAction.attribute02)
  2544.         })
  2545.     }, da.setFocus = function() {
  2546.         this.affectedElements.each(function() {
  2547.             item(this).setFocus()
  2548.         })
  2549.     }, da.submitPage = function() {
  2550.         var lAction = this.action,
  2551.             lRequest = lAction.attribute01,
  2552.             lShowProcessing = "Y" === lAction.attribute02;
  2553.         apex.submit({
  2554.             request: lRequest,
  2555.             showWait: lShowProcessing
  2556.         })
  2557.     }, da.refresh = function() {
  2558.         this.affectedElements && this.affectedElements.trigger("apexrefresh")
  2559.     }, da.cancelEvent = function() {
  2560.         apex.event.gCancelFlag = !0, da.gCancelActions = !0, this.browserEvent.stopImmediatePropagation(), this.browserEvent.preventDefault()
  2561.     }, da.showAlert = function() {
  2562.         window.alert(this.action.attribute01)
  2563.     }, da.askConfirm = function() {
  2564.         confirm(this.action.attribute01) || (apex.event.gCancelFlag = !0, da.gCancelActions = !0)
  2565.     }
  2566. }(apex.da, apex.server, apex.item, apex.jQuery);
  2567. /*! jQuery UI - v1.10.4 - 2014-10-15
  2568.  * http://jqueryui.com
  2569.  * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.resizable.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.tooltip.js, jquery.ui.effect.js, jquery.ui.effect-drop.js
  2570.  * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
  2571.  
  2572. (function(e, t) {
  2573.     function i(t, i) {
  2574.         var a, n, r, o = t.nodeName.toLowerCase();
  2575.         return "area" === o ? (a = t.parentNode, n = a.name, t.href && n && "map" === a.nodeName.toLowerCase() ? (r = e("img[usemap=#" + n + "]")[0], !!r && s(r)) : !1) : (/input|select|textarea|button|object/.test(o) ? !t.disabled : "a" === o ? t.href || i : i) && s(t)
  2576.     }
  2577.  
  2578.     function s(t) {
  2579.         return e.expr.filters.visible(t) && !e(t).parents().addBack().filter(function() {
  2580.             return "hidden" === e.css(this, "visibility")
  2581.         }).length
  2582.     }
  2583.     var a = 0,
  2584.         n = /^ui-id-\d+$/;
  2585.     e.ui = e.ui || {}, e.extend(e.ui, {
  2586.         version: "1.10.4",
  2587.         keyCode: {
  2588.             BACKSPACE: 8,
  2589.             COMMA: 188,
  2590.             DELETE: 46,
  2591.             DOWN: 40,
  2592.             END: 35,
  2593.             ENTER: 13,
  2594.             ESCAPE: 27,
  2595.             HOME: 36,
  2596.             LEFT: 37,
  2597.             NUMPAD_ADD: 107,
  2598.             NUMPAD_DECIMAL: 110,
  2599.             NUMPAD_DIVIDE: 111,
  2600.             NUMPAD_ENTER: 108,
  2601.             NUMPAD_MULTIPLY: 106,
  2602.             NUMPAD_SUBTRACT: 109,
  2603.             PAGE_DOWN: 34,
  2604.             PAGE_UP: 33,
  2605.             PERIOD: 190,
  2606.             RIGHT: 39,
  2607.             SPACE: 32,
  2608.             TAB: 9,
  2609.             UP: 38
  2610.         }
  2611.     }), e.fn.extend({
  2612.         focus: function(t) {
  2613.             return function(i, s) {
  2614.                 return "number" == typeof i ? this.each(function() {
  2615.                     var t = this;
  2616.                     setTimeout(function() {
  2617.                         e(t).focus(), s && s.call(t)
  2618.                     }, i)
  2619.                 }) : t.apply(this, arguments)
  2620.             }
  2621.         }(e.fn.focus),
  2622.         scrollParent: function() {
  2623.             var t;
  2624.             return t = e.ui.ie && /(static|relative)/.test(this.css("position")) || /absolute/.test(this.css("position")) ? this.parents().filter(function() {
  2625.                 return /(relative|absolute|fixed)/.test(e.css(this, "position")) && /(auto|scroll)/.test(e.css(this, "overflow") + e.css(this, "overflow-y") + e.css(this, "overflow-x"))
  2626.             }).eq(0) : this.parents().filter(function() {
  2627.                 return /(auto|scroll)/.test(e.css(this, "overflow") + e.css(this, "overflow-y") + e.css(this, "overflow-x"))
  2628.             }).eq(0), /fixed/.test(this.css("position")) || !t.length ? e(document) : t
  2629.         },
  2630.         zIndex: function(i) {
  2631.             if (i !== t) return this.css("zIndex", i);
  2632.             if (this.length)
  2633.                 for (var s, a, n = e(this[0]); n.length && n[0] !== document;) {
  2634.                     if (s = n.css("position"), ("absolute" === s || "relative" === s || "fixed" === s) && (a = parseInt(n.css("zIndex"), 10), !isNaN(a) && 0 !== a)) return a;
  2635.                     n = n.parent()
  2636.                 }
  2637.             return 0
  2638.         },
  2639.         uniqueId: function() {
  2640.             return this.each(function() {
  2641.                 this.id || (this.id = "ui-id-" + ++a)
  2642.             })
  2643.         },
  2644.         removeUniqueId: function() {
  2645.             return this.each(function() {
  2646.                 n.test(this.id) && e(this).removeAttr("id")
  2647.             })
  2648.         }
  2649.     }), e.extend(e.expr[":"], {
  2650.         data: e.expr.createPseudo ? e.expr.createPseudo(function(t) {
  2651.             return function(i) {
  2652.                 return !!e.data(i, t)
  2653.             }
  2654.         }) : function(t, i, s) {
  2655.             return !!e.data(t, s[3])
  2656.         },
  2657.         focusable: function(t) {
  2658.             return i(t, !isNaN(e.attr(t, "tabindex")))
  2659.         },
  2660.         tabbable: function(t) {
  2661.             var s = e.attr(t, "tabindex"),
  2662.                 a = isNaN(s);
  2663.             return (a || s >= 0) && i(t, !a)
  2664.         }
  2665.     }), e("<a>").outerWidth(1).jquery || e.each(["Width", "Height"], function(i, s) {
  2666.         function a(t, i, s, a) {
  2667.             return e.each(n, function() {
  2668.                 i -= parseFloat(e.css(t, "padding" + this)) || 0, s && (i -= parseFloat(e.css(t, "border" + this + "Width")) || 0), a && (i -= parseFloat(e.css(t, "margin" + this)) || 0)
  2669.             }), i
  2670.         }
  2671.         var n = "Width" === s ? ["Left", "Right"] : ["Top", "Bottom"],
  2672.             r = s.toLowerCase(),
  2673.             o = {
  2674.                 innerWidth: e.fn.innerWidth,
  2675.                 innerHeight: e.fn.innerHeight,
  2676.                 outerWidth: e.fn.outerWidth,
  2677.                 outerHeight: e.fn.outerHeight
  2678.             };
  2679.         e.fn["inner" + s] = function(i) {
  2680.             return i === t ? o["inner" + s].call(this) : this.each(function() {
  2681.                 e(this).css(r, a(this, i) + "px")
  2682.             })
  2683.         }, e.fn["outer" + s] = function(t, i) {
  2684.             return "number" != typeof t ? o["outer" + s].call(this, t) : this.each(function() {
  2685.                 e(this).css(r, a(this, t, !0, i) + "px")
  2686.             })
  2687.         }
  2688.     }), e.fn.addBack || (e.fn.addBack = function(e) {
  2689.         return this.add(null == e ? this.prevObject : this.prevObject.filter(e))
  2690.     }), e("<a>").data("a-b", "a").removeData("a-b").data("a-b") && (e.fn.removeData = function(t) {
  2691.         return function(i) {
  2692.             return arguments.length ? t.call(this, e.camelCase(i)) : t.call(this)
  2693.         }
  2694.     }(e.fn.removeData)), e.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()), e.support.selectstart = "onselectstart" in document.createElement("div"), e.fn.extend({
  2695.         disableSelection: function() {
  2696.             return this.bind((e.support.selectstart ? "selectstart" : "mousedown") + ".ui-disableSelection", function(e) {
  2697.                 e.preventDefault()
  2698.             })
  2699.         },
  2700.         enableSelection: function() {
  2701.             return this.unbind(".ui-disableSelection")
  2702.         }
  2703.     }), e.extend(e.ui, {
  2704.         plugin: {
  2705.             add: function(t, i, s) {
  2706.                 var a, n = e.ui[t].prototype;
  2707.                 for (a in s) n.plugins[a] = n.plugins[a] || [], n.plugins[a].push([i, s[a]])
  2708.             },
  2709.             call: function(e, t, i) {
  2710.                 var s, a = e.plugins[t];
  2711.                 if (a && e.element[0].parentNode && 11 !== e.element[0].parentNode.nodeType)
  2712.                     for (s = 0; a.length > s; s++) e.options[a[s][0]] && a[s][1].apply(e.element, i)
  2713.             }
  2714.         },
  2715.         hasScroll: function(t, i) {
  2716.             if ("hidden" === e(t).css("overflow")) return !1;
  2717.             var s = i && "left" === i ? "scrollLeft" : "scrollTop",
  2718.                 a = !1;
  2719.             return t[s] > 0 ? !0 : (t[s] = 1, a = t[s] > 0, t[s] = 0, a)
  2720.         }
  2721.     })
  2722. })(jQuery);
  2723. (function(e, t) {
  2724.     var i = 0,
  2725.         s = Array.prototype.slice,
  2726.         a = e.cleanData;
  2727.     e.cleanData = function(t) {
  2728.         for (var i, s = 0; null != (i = t[s]); s++) try {
  2729.             e(i).triggerHandler("remove")
  2730.         } catch (n) {}
  2731.         a(t)
  2732.     }, e.widget = function(i, s, a) {
  2733.         var n, r, o, h, l = {},
  2734.             u = i.split(".")[0];
  2735.         i = i.split(".")[1], n = u + "-" + i, a || (a = s, s = e.Widget), e.expr[":"][n.toLowerCase()] = function(t) {
  2736.             return !!e.data(t, n)
  2737.         }, e[u] = e[u] || {}, r = e[u][i], o = e[u][i] = function(e, i) {
  2738.             return this._createWidget ? (arguments.length && this._createWidget(e, i), t) : new o(e, i)
  2739.         }, e.extend(o, r, {
  2740.             version: a.version,
  2741.             _proto: e.extend({}, a),
  2742.             _childConstructors: []
  2743.         }), h = new s, h.options = e.widget.extend({}, h.options), e.each(a, function(i, a) {
  2744.             return e.isFunction(a) ? (l[i] = function() {
  2745.                 var e = function() {
  2746.                         return s.prototype[i].apply(this, arguments)
  2747.                     },
  2748.                     t = function(e) {
  2749.                         return s.prototype[i].apply(this, e)
  2750.                     };
  2751.                 return function() {
  2752.                     var i, s = this._super,
  2753.                         n = this._superApply;
  2754.                     return this._super = e, this._superApply = t, i = a.apply(this, arguments), this._super = s, this._superApply = n, i
  2755.                 }
  2756.             }(), t) : (l[i] = a, t)
  2757.         }), o.prototype = e.widget.extend(h, {
  2758.             widgetEventPrefix: r ? h.widgetEventPrefix || i : i
  2759.         }, l, {
  2760.             constructor: o,
  2761.             namespace: u,
  2762.             widgetName: i,
  2763.             widgetFullName: n
  2764.         }), r ? (e.each(r._childConstructors, function(t, i) {
  2765.             var s = i.prototype;
  2766.             e.widget(s.namespace + "." + s.widgetName, o, i._proto)
  2767.         }), delete r._childConstructors) : s._childConstructors.push(o), e.widget.bridge(i, o)
  2768.     }, e.widget.extend = function(i) {
  2769.         for (var a, n, r = s.call(arguments, 1), o = 0, h = r.length; h > o; o++)
  2770.             for (a in r[o]) n = r[o][a], r[o].hasOwnProperty(a) && n !== t && (i[a] = e.isPlainObject(n) ? e.isPlainObject(i[a]) ? e.widget.extend({}, i[a], n) : e.widget.extend({}, n) : n);
  2771.         return i
  2772.     }, e.widget.bridge = function(i, a) {
  2773.         var n = a.prototype.widgetFullName || i;
  2774.         e.fn[i] = function(r) {
  2775.             var o = "string" == typeof r,
  2776.                 h = s.call(arguments, 1),
  2777.                 l = this;
  2778.             return r = !o && h.length ? e.widget.extend.apply(null, [r].concat(h)) : r, o ? this.each(function() {
  2779.                 var s, a = e.data(this, n);
  2780.                 return a ? e.isFunction(a[r]) && "_" !== r.charAt(0) ? (s = a[r].apply(a, h), s !== a && s !== t ? (l = s && s.jquery ? l.pushStack(s.get()) : s, !1) : t) : e.error("no such method '" + r + "' for " + i + " widget instance") : e.error("cannot call methods on " + i + " prior to initialization; " + "attempted to call method '" + r + "'")
  2781.             }) : this.each(function() {
  2782.                 var t = e.data(this, n);
  2783.                 t ? t.option(r || {})._init() : e.data(this, n, new a(r, this))
  2784.             }), l
  2785.         }
  2786.     }, e.Widget = function() {}, e.Widget._childConstructors = [], e.Widget.prototype = {
  2787.         widgetName: "widget",
  2788.         widgetEventPrefix: "",
  2789.         defaultElement: "<div>",
  2790.         options: {
  2791.             disabled: !1,
  2792.             create: null
  2793.         },
  2794.         _createWidget: function(t, s) {
  2795.             s = e(s || this.defaultElement || this)[0], this.element = e(s), this.uuid = i++, this.eventNamespace = "." + this.widgetName + this.uuid, this.options = e.widget.extend({}, this.options, this._getCreateOptions(), t), this.bindings = e(), this.hoverable = e(), this.focusable = e(), s !== this && (e.data(s, this.widgetFullName, this), this._on(!0, this.element, {
  2796.                 remove: function(e) {
  2797.                     e.target === s && this.destroy()
  2798.                 }
  2799.             }), this.document = e(s.style ? s.ownerDocument : s.document || s), this.window = e(this.document[0].defaultView || this.document[0].parentWindow)), this._create(), this._trigger("create", null, this._getCreateEventData()), this._init()
  2800.         },
  2801.         _getCreateOptions: e.noop,
  2802.         _getCreateEventData: e.noop,
  2803.         _create: e.noop,
  2804.         _init: e.noop,
  2805.         destroy: function() {
  2806.             this._destroy(), this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)), this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName + "-disabled " + "ui-state-disabled"), this.bindings.unbind(this.eventNamespace), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus")
  2807.         },
  2808.         _destroy: e.noop,
  2809.         widget: function() {
  2810.             return this.element
  2811.         },
  2812.         option: function(i, s) {
  2813.             var a, n, r, o = i;
  2814.             if (0 === arguments.length) return e.widget.extend({}, this.options);
  2815.             if ("string" == typeof i)
  2816.                 if (o = {}, a = i.split("."), i = a.shift(), a.length) {
  2817.                     for (n = o[i] = e.widget.extend({}, this.options[i]), r = 0; a.length - 1 > r; r++) n[a[r]] = n[a[r]] || {}, n = n[a[r]];
  2818.                     if (i = a.pop(), 1 === arguments.length) return n[i] === t ? null : n[i];
  2819.                     n[i] = s
  2820.                 } else {
  2821.                     if (1 === arguments.length) return this.options[i] === t ? null : this.options[i];
  2822.                     o[i] = s
  2823.                 }
  2824.             return this._setOptions(o), this
  2825.         },
  2826.         _setOptions: function(e) {
  2827.             var t;
  2828.             for (t in e) this._setOption(t, e[t]);
  2829.             return this
  2830.         },
  2831.         _setOption: function(e, t) {
  2832.             return this.options[e] = t, "disabled" === e && (this.widget().toggleClass(this.widgetFullName + "-disabled ui-state-disabled", !!t).attr("aria-disabled", t), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus")), this
  2833.         },
  2834.         enable: function() {
  2835.             return this._setOption("disabled", !1)
  2836.         },
  2837.         disable: function() {
  2838.             return this._setOption("disabled", !0)
  2839.         },
  2840.         _on: function(i, s, a) {
  2841.             var n, r = this;
  2842.             "boolean" != typeof i && (a = s, s = i, i = !1), a ? (s = n = e(s), this.bindings = this.bindings.add(s)) : (a = s, s = this.element, n = this.widget()), e.each(a, function(a, o) {
  2843.                 function h() {
  2844.                     return i || r.options.disabled !== !0 && !e(this).hasClass("ui-state-disabled") ? ("string" == typeof o ? r[o] : o).apply(r, arguments) : t
  2845.                 }
  2846.                 "string" != typeof o && (h.guid = o.guid = o.guid || h.guid || e.guid++);
  2847.                 var l = a.match(/^(\w+)\s*(.*)$/),
  2848.                     u = l[1] + r.eventNamespace,
  2849.                     d = l[2];
  2850.                 d ? n.delegate(d, u, h) : s.bind(u, h)
  2851.             })
  2852.         },
  2853.         _off: function(e, t) {
  2854.             t = (t || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, e.unbind(t).undelegate(t)
  2855.         },
  2856.         _delay: function(e, t) {
  2857.             function i() {
  2858.                 return ("string" == typeof e ? s[e] : e).apply(s, arguments)
  2859.             }
  2860.             var s = this;
  2861.             return setTimeout(i, t || 0)
  2862.         },
  2863.         _hoverable: function(t) {
  2864.             this.hoverable = this.hoverable.add(t), this._on(t, {
  2865.                 mouseenter: function(t) {
  2866.                     e(t.currentTarget).addClass("ui-state-hover")
  2867.                 },
  2868.                 mouseleave: function(t) {
  2869.                     e(t.currentTarget).removeClass("ui-state-hover")
  2870.                 }
  2871.             })
  2872.         },
  2873.         _focusable: function(t) {
  2874.             this.focusable = this.focusable.add(t), this._on(t, {
  2875.                 focusin: function(t) {
  2876.                     e(t.currentTarget).addClass("ui-state-focus")
  2877.                 },
  2878.                 focusout: function(t) {
  2879.                     e(t.currentTarget).removeClass("ui-state-focus")
  2880.                 }
  2881.             })
  2882.         },
  2883.         _trigger: function(t, i, s) {
  2884.             var a, n, r = this.options[t];
  2885.             if (s = s || {}, i = e.Event(i), i.type = (t === this.widgetEventPrefix ? t : this.widgetEventPrefix + t).toLowerCase(), i.target = this.element[0], n = i.originalEvent)
  2886.                 for (a in n) a in i || (i[a] = n[a]);
  2887.             return this.element.trigger(i, s), !(e.isFunction(r) && r.apply(this.element[0], [i].concat(s)) === !1 || i.isDefaultPrevented())
  2888.         }
  2889.     }, e.each({
  2890.         show: "fadeIn",
  2891.         hide: "fadeOut"
  2892.     }, function(t, i) {
  2893.         e.Widget.prototype["_" + t] = function(s, a, n) {
  2894.             "string" == typeof a && (a = {
  2895.                 effect: a
  2896.             });
  2897.             var r, o = a ? a === !0 || "number" == typeof a ? i : a.effect || i : t;
  2898.             a = a || {}, "number" == typeof a && (a = {
  2899.                 duration: a
  2900.             }), r = !e.isEmptyObject(a), a.complete = n, a.delay && s.delay(a.delay), r && e.effects && e.effects.effect[o] ? s[t](a) : o !== t && s[o] ? s[o](a.duration, a.easing, n) : s.queue(function(i) {
  2901.                 e(this)[t](), n && n.call(s[0]), i()
  2902.             })
  2903.         }
  2904.     })
  2905. })(jQuery);
  2906. (function(e) {
  2907.     var t = !1;
  2908.     e(document).mouseup(function() {
  2909.         t = !1
  2910.     }), e.widget("ui.mouse", {
  2911.         version: "1.10.4",
  2912.         options: {
  2913.             cancel: "input,textarea,button,select,option",
  2914.             distance: 1,
  2915.             delay: 0
  2916.         },
  2917.         _mouseInit: function() {
  2918.             var t = this;
  2919.             this.element.bind("mousedown." + this.widgetName, function(e) {
  2920.                 return t._mouseDown(e)
  2921.             }).bind("click." + this.widgetName, function(i) {
  2922.                 return !0 === e.data(i.target, t.widgetName + ".preventClickEvent") ? (e.removeData(i.target, t.widgetName + ".preventClickEvent"), i.stopImmediatePropagation(), !1) : undefined
  2923.             }), this.started = !1
  2924.         },
  2925.         _mouseDestroy: function() {
  2926.             this.element.unbind("." + this.widgetName), this._mouseMoveDelegate && e(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate)
  2927.         },
  2928.         _mouseDown: function(i) {
  2929.             if (!t) {
  2930.                 this._mouseStarted && this._mouseUp(i), this._mouseDownEvent = i;
  2931.                 var s = this,
  2932.                     a = 1 === i.which,
  2933.                     n = "string" == typeof this.options.cancel && i.target.nodeName ? e(i.target).closest(this.options.cancel).length : !1;
  2934.                 return a && !n && this._mouseCapture(i) ? (this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function() {
  2935.                     s.mouseDelayMet = !0
  2936.                 }, this.options.delay)), this._mouseDistanceMet(i) && this._mouseDelayMet(i) && (this._mouseStarted = this._mouseStart(i) !== !1, !this._mouseStarted) ? (i.preventDefault(), !0) : (!0 === e.data(i.target, this.widgetName + ".preventClickEvent") && e.removeData(i.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate = function(e) {
  2937.                     return s._mouseMove(e)
  2938.                 }, this._mouseUpDelegate = function(e) {
  2939.                     return s._mouseUp(e)
  2940.                 }, e(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate), i.preventDefault(), t = !0, !0)) : !0
  2941.             }
  2942.         },
  2943.         _mouseMove: function(t) {
  2944.             return e.ui.ie && (!document.documentMode || 9 > document.documentMode) && !t.button ? this._mouseUp(t) : this._mouseStarted ? (this._mouseDrag(t), t.preventDefault()) : (this._mouseDistanceMet(t) && this._mouseDelayMet(t) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent, t) !== !1, this._mouseStarted ? this._mouseDrag(t) : this._mouseUp(t)), !this._mouseStarted)
  2945.         },
  2946.         _mouseUp: function(t) {
  2947.             return e(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate), this._mouseStarted && (this._mouseStarted = !1, t.target === this._mouseDownEvent.target && e.data(t.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(t)), !1
  2948.         },
  2949.         _mouseDistanceMet: function(e) {
  2950.             return Math.max(Math.abs(this._mouseDownEvent.pageX - e.pageX), Math.abs(this._mouseDownEvent.pageY - e.pageY)) >= this.options.distance
  2951.         },
  2952.         _mouseDelayMet: function() {
  2953.             return this.mouseDelayMet
  2954.         },
  2955.         _mouseStart: function() {},
  2956.         _mouseDrag: function() {},
  2957.         _mouseStop: function() {},
  2958.         _mouseCapture: function() {
  2959.             return !0
  2960.         }
  2961.     })
  2962. })(jQuery);
  2963. (function(e, t) {
  2964.     function i(e, t, i) {
  2965.         return [parseFloat(e[0]) * (p.test(e[0]) ? t / 100 : 1), parseFloat(e[1]) * (p.test(e[1]) ? i / 100 : 1)]
  2966.     }
  2967.  
  2968.     function s(t, i) {
  2969.         return parseInt(e.css(t, i), 10) || 0
  2970.     }
  2971.  
  2972.     function a(t) {
  2973.         var i = t[0];
  2974.         return 9 === i.nodeType ? {
  2975.             width: t.width(),
  2976.             height: t.height(),
  2977.             offset: {
  2978.                 top: 0,
  2979.                 left: 0
  2980.             }
  2981.         } : e.isWindow(i) ? {
  2982.             width: t.width(),
  2983.             height: t.height(),
  2984.             offset: {
  2985.                 top: t.scrollTop(),
  2986.                 left: t.scrollLeft()
  2987.             }
  2988.         } : i.preventDefault ? {
  2989.             width: 0,
  2990.             height: 0,
  2991.             offset: {
  2992.                 top: i.pageY,
  2993.                 left: i.pageX
  2994.             }
  2995.         } : {
  2996.             width: t.outerWidth(),
  2997.             height: t.outerHeight(),
  2998.             offset: t.offset()
  2999.         }
  3000.     }
  3001.     e.ui = e.ui || {};
  3002.     var n, r = Math.max,
  3003.         o = Math.abs,
  3004.         h = Math.round,
  3005.         l = /left|center|right/,
  3006.         u = /top|center|bottom/,
  3007.         d = /[\+\-]\d+(\.[\d]+)?%?/,
  3008.         c = /^\w+/,
  3009.         p = /%$/,
  3010.         f = e.fn.position;
  3011.     e.position = {
  3012.             scrollbarWidth: function() {
  3013.                 if (n !== t) return n;
  3014.                 var i, s, a = e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),
  3015.                     r = a.children()[0];
  3016.                 return e("body").append(a), i = r.offsetWidth, a.css("overflow", "scroll"), s = r.offsetWidth, i === s && (s = a[0].clientWidth), a.remove(), n = i - s
  3017.             },
  3018.             getScrollInfo: function(t) {
  3019.                 var i = t.isWindow || t.isDocument ? "" : t.element.css("overflow-x"),
  3020.                     s = t.isWindow || t.isDocument ? "" : t.element.css("overflow-y"),
  3021.                     a = "scroll" === i || "auto" === i && t.width < t.element[0].scrollWidth,
  3022.                     n = "scroll" === s || "auto" === s && t.height < t.element[0].scrollHeight;
  3023.                 return {
  3024.                     width: n ? e.position.scrollbarWidth() : 0,
  3025.                     height: a ? e.position.scrollbarWidth() : 0
  3026.                 }
  3027.             },
  3028.             getWithinInfo: function(t) {
  3029.                 var i = e(t || window),
  3030.                     s = e.isWindow(i[0]),
  3031.                     a = !!i[0] && 9 === i[0].nodeType;
  3032.                 return {
  3033.                     element: i,
  3034.                     isWindow: s,
  3035.                     isDocument: a,
  3036.                     offset: i.offset() || {
  3037.                         left: 0,
  3038.                         top: 0
  3039.                     },
  3040.                     scrollLeft: i.scrollLeft(),
  3041.                     scrollTop: i.scrollTop(),
  3042.                     width: s ? i.width() : i.outerWidth(),
  3043.                     height: s ? i.height() : i.outerHeight()
  3044.                 }
  3045.             }
  3046.         }, e.fn.position = function(t) {
  3047.             if (!t || !t.of) return f.apply(this, arguments);
  3048.             t = e.extend({}, t);
  3049.             var n, p, m, g, v, y, b = e(t.of),
  3050.                 _ = e.position.getWithinInfo(t.within),
  3051.                 x = e.position.getScrollInfo(_),
  3052.                 k = (t.collision || "flip").split(" "),
  3053.                 w = {};
  3054.             return y = a(b), b[0].preventDefault && (t.at = "left top"), p = y.width, m = y.height, g = y.offset, v = e.extend({}, g), e.each(["my", "at"], function() {
  3055.                 var e, i, s = (t[this] || "").split(" ");
  3056.                 1 === s.length && (s = l.test(s[0]) ? s.concat(["center"]) : u.test(s[0]) ? ["center"].concat(s) : ["center", "center"]), s[0] = l.test(s[0]) ? s[0] : "center", s[1] = u.test(s[1]) ? s[1] : "center", e = d.exec(s[0]), i = d.exec(s[1]), w[this] = [e ? e[0] : 0, i ? i[0] : 0], t[this] = [c.exec(s[0])[0], c.exec(s[1])[0]]
  3057.             }), 1 === k.length && (k[1] = k[0]), "right" === t.at[0] ? v.left += p : "center" === t.at[0] && (v.left += p / 2), "bottom" === t.at[1] ? v.top += m : "center" === t.at[1] && (v.top += m / 2), n = i(w.at, p, m), v.left += n[0], v.top += n[1], this.each(function() {
  3058.                 var a, l, u = e(this),
  3059.                     d = u.outerWidth(),
  3060.                     c = u.outerHeight(),
  3061.                     f = s(this, "marginLeft"),
  3062.                     y = s(this, "marginTop"),
  3063.                     D = d + f + s(this, "marginRight") + x.width,
  3064.                     T = c + y + s(this, "marginBottom") + x.height,
  3065.                     S = e.extend({}, v),
  3066.                     M = i(w.my, u.outerWidth(), u.outerHeight());
  3067.                 "right" === t.my[0] ? S.left -= d : "center" === t.my[0] && (S.left -= d / 2), "bottom" === t.my[1] ? S.top -= c : "center" === t.my[1] && (S.top -= c / 2), S.left += M[0], S.top += M[1], e.support.offsetFractions || (S.left = h(S.left), S.top = h(S.top)), a = {
  3068.                     marginLeft: f,
  3069.                     marginTop: y
  3070.                 }, e.each(["left", "top"], function(i, s) {
  3071.                     e.ui.position[k[i]] && e.ui.position[k[i]][s](S, {
  3072.                         targetWidth: p,
  3073.                         targetHeight: m,
  3074.                         elemWidth: d,
  3075.                         elemHeight: c,
  3076.                         collisionPosition: a,
  3077.                         collisionWidth: D,
  3078.                         collisionHeight: T,
  3079.                         offset: [n[0] + M[0], n[1] + M[1]],
  3080.                         my: t.my,
  3081.                         at: t.at,
  3082.                         within: _,
  3083.                         elem: u
  3084.                     })
  3085.                 }), t.using && (l = function(e) {
  3086.                     var i = g.left - S.left,
  3087.                         s = i + p - d,
  3088.                         a = g.top - S.top,
  3089.                         n = a + m - c,
  3090.                         h = {
  3091.                             target: {
  3092.                                 element: b,
  3093.                                 left: g.left,
  3094.                                 top: g.top,
  3095.                                 width: p,
  3096.                                 height: m
  3097.                             },
  3098.                             element: {
  3099.                                 element: u,
  3100.                                 left: S.left,
  3101.                                 top: S.top,
  3102.                                 width: d,
  3103.                                 height: c
  3104.                             },
  3105.                             horizontal: 0 > s ? "left" : i > 0 ? "right" : "center",
  3106.                             vertical: 0 > n ? "top" : a > 0 ? "bottom" : "middle"
  3107.                         };
  3108.                     d > p && p > o(i + s) && (h.horizontal = "center"), c > m && m > o(a + n) && (h.vertical = "middle"), h.important = r(o(i), o(s)) > r(o(a), o(n)) ? "horizontal" : "vertical", t.using.call(this, e, h)
  3109.                 }), u.offset(e.extend(S, {
  3110.                     using: l
  3111.                 }))
  3112.             })
  3113.         }, e.ui.position = {
  3114.             fit: {
  3115.                 left: function(e, t) {
  3116.                     var i, s = t.within,
  3117.                         a = s.isWindow ? s.scrollLeft : s.offset.left,
  3118.                         n = s.width,
  3119.                         o = e.left - t.collisionPosition.marginLeft,
  3120.                         h = a - o,
  3121.                         l = o + t.collisionWidth - n - a;
  3122.                     t.collisionWidth > n ? h > 0 && 0 >= l ? (i = e.left + h + t.collisionWidth - n - a, e.left += h - i) : e.left = l > 0 && 0 >= h ? a : h > l ? a + n - t.collisionWidth : a : h > 0 ? e.left += h : l > 0 ? e.left -= l : e.left = r(e.left - o, e.left)
  3123.                 },
  3124.                 top: function(e, t) {
  3125.                     var i, s = t.within,
  3126.                         a = s.isWindow ? s.scrollTop : s.offset.top,
  3127.                         n = t.within.height,
  3128.                         o = e.top - t.collisionPosition.marginTop,
  3129.                         h = a - o,
  3130.                         l = o + t.collisionHeight - n - a;
  3131.                     t.collisionHeight > n ? h > 0 && 0 >= l ? (i = e.top + h + t.collisionHeight - n - a, e.top += h - i) : e.top = l > 0 && 0 >= h ? a : h > l ? a + n - t.collisionHeight : a : h > 0 ? e.top += h : l > 0 ? e.top -= l : e.top = r(e.top - o, e.top)
  3132.                 }
  3133.             },
  3134.             flip: {
  3135.                 left: function(e, t) {
  3136.                     var i, s, a = t.within,
  3137.                         n = a.offset.left + a.scrollLeft,
  3138.                         r = a.width,
  3139.                         h = a.isWindow ? a.scrollLeft : a.offset.left,
  3140.                         l = e.left - t.collisionPosition.marginLeft,
  3141.                         u = l - h,
  3142.                         d = l + t.collisionWidth - r - h,
  3143.                         c = "left" === t.my[0] ? -t.elemWidth : "right" === t.my[0] ? t.elemWidth : 0,
  3144.                         p = "left" === t.at[0] ? t.targetWidth : "right" === t.at[0] ? -t.targetWidth : 0,
  3145.                         f = -2 * t.offset[0];
  3146.                     0 > u ? (i = e.left + c + p + f + t.collisionWidth - r - n, (0 > i || o(u) > i) && (e.left += c + p + f)) : d > 0 && (s = e.left - t.collisionPosition.marginLeft + c + p + f - h, (s > 0 || d > o(s)) && (e.left += c + p + f))
  3147.                 },
  3148.                 top: function(e, t) {
  3149.                     var i, s, a = t.within,
  3150.                         n = a.offset.top + a.scrollTop,
  3151.                         r = a.height,
  3152.                         h = a.isWindow ? a.scrollTop : a.offset.top,
  3153.                         l = e.top - t.collisionPosition.marginTop,
  3154.                         u = l - h,
  3155.                         d = l + t.collisionHeight - r - h,
  3156.                         c = "top" === t.my[1],
  3157.                         p = c ? -t.elemHeight : "bottom" === t.my[1] ? t.elemHeight : 0,
  3158.                         f = "top" === t.at[1] ? t.targetHeight : "bottom" === t.at[1] ? -t.targetHeight : 0,
  3159.                         m = -2 * t.offset[1];
  3160.                     0 > u ? (s = e.top + p + f + m + t.collisionHeight - r - n, e.top + p + f + m > u && (0 > s || o(u) > s) && (e.top += p + f + m)) : d > 0 && (i = e.top - t.collisionPosition.marginTop + p + f + m - h, e.top + p + f + m > d && (i > 0 || d > o(i)) && (e.top += p + f + m))
  3161.                 }
  3162.             },
  3163.             flipfit: {
  3164.                 left: function() {
  3165.                     e.ui.position.flip.left.apply(this, arguments), e.ui.position.fit.left.apply(this, arguments)
  3166.                 },
  3167.                 top: function() {
  3168.                     e.ui.position.flip.top.apply(this, arguments), e.ui.position.fit.top.apply(this, arguments)
  3169.                 }
  3170.             }
  3171.         },
  3172.         function() {
  3173.             var t, i, s, a, n, r = document.getElementsByTagName("body")[0],
  3174.                 o = document.createElement("div");
  3175.             t = document.createElement(r ? "div" : "body"), s = {
  3176.                 visibility: "hidden",
  3177.                 width: 0,
  3178.                 height: 0,
  3179.                 border: 0,
  3180.                 margin: 0,
  3181.                 background: "none"
  3182.             }, r && e.extend(s, {
  3183.                 position: "absolute",
  3184.                 left: "-1000px",
  3185.                 top: "-1000px"
  3186.             });
  3187.             for (n in s) t.style[n] = s[n];
  3188.             t.appendChild(o), i = r || document.documentElement, i.insertBefore(t, i.firstChild), o.style.cssText = "position: absolute; left: 10.7432222px;", a = e(o).offset().left, e.support.offsetFractions = a > 10 && 11 > a, t.innerHTML = "", i.removeChild(t)
  3189.         }()
  3190. })(jQuery);
  3191. (function(e) {
  3192.     e.widget("ui.draggable", e.ui.mouse, {
  3193.         version: "1.10.4",
  3194.         widgetEventPrefix: "drag",
  3195.         options: {
  3196.             addClasses: !0,
  3197.             appendTo: "parent",
  3198.             axis: !1,
  3199.             connectToSortable: !1,
  3200.             containment: !1,
  3201.             cursor: "auto",
  3202.             cursorAt: !1,
  3203.             grid: !1,
  3204.             handle: !1,
  3205.             helper: "original",
  3206.             iframeFix: !1,
  3207.             opacity: !1,
  3208.             refreshPositions: !1,
  3209.             revert: !1,
  3210.             revertDuration: 500,
  3211.             scope: "default",
  3212.             scroll: !0,
  3213.             scrollSensitivity: 20,
  3214.             scrollSpeed: 20,
  3215.             snap: !1,
  3216.             snapMode: "both",
  3217.             snapTolerance: 20,
  3218.             stack: !1,
  3219.             zIndex: !1,
  3220.             drag: null,
  3221.             start: null,
  3222.             stop: null
  3223.         },
  3224.         _create: function() {
  3225.             "original" !== this.options.helper || /^(?:r|a|f)/.test(this.element.css("position")) || (this.element[0].style.position = "relative"), this.options.addClasses && this.element.addClass("ui-draggable"), this.options.disabled && this.element.addClass("ui-draggable-disabled"), this._mouseInit()
  3226.         },
  3227.         _destroy: function() {
  3228.             this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"), this._mouseDestroy()
  3229.         },
  3230.         _mouseCapture: function(t) {
  3231.             var i = this.options;
  3232.             return this.helper || i.disabled || e(t.target).closest(".ui-resizable-handle").length > 0 ? !1 : (this.handle = this._getHandle(t), this.handle ? (e(i.iframeFix === !0 ? "iframe" : i.iframeFix).each(function() {
  3233.                 e("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({
  3234.                     width: this.offsetWidth + "px",
  3235.                     height: this.offsetHeight + "px",
  3236.                     position: "absolute",
  3237.                     opacity: "0.001",
  3238.                     zIndex: 1e3
  3239.                 }).css(e(this).offset()).appendTo("body")
  3240.             }), !0) : !1)
  3241.         },
  3242.         _mouseStart: function(t) {
  3243.             var i = this.options;
  3244.             return this.helper = this._createHelper(t), this.helper.addClass("ui-draggable-dragging"), this._cacheHelperProportions(), e.ui.ddmanager && (e.ui.ddmanager.current = this), this._cacheMargins(), this.cssPosition = this.helper.css("position"), this.scrollParent = this.helper.scrollParent(), this.offsetParent = this.helper.offsetParent(), this.offsetParentCssPosition = this.offsetParent.css("position"), this.offset = this.positionAbs = this.element.offset(), this.offset = {
  3245.                 top: this.offset.top - this.margins.top,
  3246.                 left: this.offset.left - this.margins.left
  3247.             }, this.offset.scroll = !1, e.extend(this.offset, {
  3248.                 click: {
  3249.                     left: t.pageX - this.offset.left,
  3250.                     top: t.pageY - this.offset.top
  3251.                 },
  3252.                 parent: this._getParentOffset(),
  3253.                 relative: this._getRelativeOffset()
  3254.             }), this.originalPosition = this.position = this._generatePosition(t), this.originalPageX = t.pageX, this.originalPageY = t.pageY, i.cursorAt && this._adjustOffsetFromHelper(i.cursorAt), this._setContainment(), this._trigger("start", t) === !1 ? (this._clear(), !1) : (this._cacheHelperProportions(), e.ui.ddmanager && !i.dropBehaviour && e.ui.ddmanager.prepareOffsets(this, t), this._mouseDrag(t, !0), e.ui.ddmanager && e.ui.ddmanager.dragStart(this, t), !0)
  3255.         },
  3256.         _mouseDrag: function(t, i) {
  3257.             if ("fixed" === this.offsetParentCssPosition && (this.offset.parent = this._getParentOffset()), this.position = this._generatePosition(t), this.positionAbs = this._convertPositionTo("absolute"), !i) {
  3258.                 var s = this._uiHash();
  3259.                 if (this._trigger("drag", t, s) === !1) return this._mouseUp({}), !1;
  3260.                 this.position = s.position
  3261.             }
  3262.             return this.options.axis && "y" === this.options.axis || (this.helper[0].style.left = this.position.left + "px"), this.options.axis && "x" === this.options.axis || (this.helper[0].style.top = this.position.top + "px"), e.ui.ddmanager && e.ui.ddmanager.drag(this, t), !1
  3263.         },
  3264.         _mouseStop: function(t) {
  3265.             var i = this,
  3266.                 s = !1;
  3267.             return e.ui.ddmanager && !this.options.dropBehaviour && (s = e.ui.ddmanager.drop(this, t)), this.dropped && (s = this.dropped, this.dropped = !1), "original" !== this.options.helper || e.contains(this.element[0].ownerDocument, this.element[0]) ? ("invalid" === this.options.revert && !s || "valid" === this.options.revert && s || this.options.revert === !0 || e.isFunction(this.options.revert) && this.options.revert.call(this.element, s) ? e(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
  3268.                 i._trigger("stop", t) !== !1 && i._clear()
  3269.             }) : this._trigger("stop", t) !== !1 && this._clear(), !1) : !1
  3270.         },
  3271.         _mouseUp: function(t) {
  3272.             return e("div.ui-draggable-iframeFix").each(function() {
  3273.                 this.parentNode.removeChild(this)
  3274.             }), e.ui.ddmanager && e.ui.ddmanager.dragStop(this, t), e.ui.mouse.prototype._mouseUp.call(this, t)
  3275.         },
  3276.         cancel: function() {
  3277.             return this.helper.is(".ui-draggable-dragging") ? this._mouseUp({}) : this._clear(), this
  3278.         },
  3279.         _getHandle: function(t) {
  3280.             return this.options.handle ? !!e(t.target).closest(this.element.find(this.options.handle)).length : !0
  3281.         },
  3282.         _createHelper: function(t) {
  3283.             var i = this.options,
  3284.                 s = e.isFunction(i.helper) ? e(i.helper.apply(this.element[0], [t])) : "clone" === i.helper ? this.element.clone().removeAttr("id") : this.element;
  3285.             return s.parents("body").length || s.appendTo("parent" === i.appendTo ? this.element[0].parentNode : i.appendTo), s[0] === this.element[0] || /(fixed|absolute)/.test(s.css("position")) || s.css("position", "absolute"), s
  3286.         },
  3287.         _adjustOffsetFromHelper: function(t) {
  3288.             "string" == typeof t && (t = t.split(" ")), e.isArray(t) && (t = {
  3289.                 left: +t[0],
  3290.                 top: +t[1] || 0
  3291.             }), "left" in t && (this.offset.click.left = t.left + this.margins.left), "right" in t && (this.offset.click.left = this.helperProportions.width - t.right + this.margins.left), "top" in t && (this.offset.click.top = t.top + this.margins.top), "bottom" in t && (this.offset.click.top = this.helperProportions.height - t.bottom + this.margins.top)
  3292.         },
  3293.         _getParentOffset: function() {
  3294.             var t = this.offsetParent.offset();
  3295.             return "absolute" === this.cssPosition && this.scrollParent[0] !== document && e.contains(this.scrollParent[0], this.offsetParent[0]) && (t.left += this.scrollParent.scrollLeft(), t.top += this.scrollParent.scrollTop()), (this.offsetParent[0] === document.body || this.offsetParent[0].tagName && "html" === this.offsetParent[0].tagName.toLowerCase() && e.ui.ie) && (t = {
  3296.                 top: 0,
  3297.                 left: 0
  3298.             }), {
  3299.                 top: t.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
  3300.                 left: t.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
  3301.             }
  3302.         },
  3303.         _getRelativeOffset: function() {
  3304.             if ("relative" === this.cssPosition) {
  3305.                 var e = this.element.position();
  3306.                 return {
  3307.                     top: e.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(),
  3308.                     left: e.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()
  3309.                 }
  3310.             }
  3311.             return {
  3312.                 top: 0,
  3313.                 left: 0
  3314.             }
  3315.         },
  3316.         _cacheMargins: function() {
  3317.             this.margins = {
  3318.                 left: parseInt(this.element.css("marginLeft"), 10) || 0,
  3319.                 top: parseInt(this.element.css("marginTop"), 10) || 0,
  3320.                 right: parseInt(this.element.css("marginRight"), 10) || 0,
  3321.                 bottom: parseInt(this.element.css("marginBottom"), 10) || 0
  3322.             }
  3323.         },
  3324.         _cacheHelperProportions: function() {
  3325.             this.helperProportions = {
  3326.                 width: this.helper.outerWidth(),
  3327.                 height: this.helper.outerHeight()
  3328.             }
  3329.         },
  3330.         _setContainment: function() {
  3331.             var t, i, s, a = this.options;
  3332.             return a.containment ? "window" === a.containment ? (this.containment = [e(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, e(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, e(window).scrollLeft() + e(window).width() - this.helperProportions.width - this.margins.left, e(window).scrollTop() + (e(window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top], undefined) : "document" === a.containment ? (this.containment = [0, 0, e(document).width() - this.helperProportions.width - this.margins.left, (e(document).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top], undefined) : a.containment.constructor === Array ? (this.containment = a.containment, undefined) : ("parent" === a.containment && (a.containment = this.helper[0].parentNode), i = e(a.containment), s = i[0], s && (t = "hidden" !== i.css("overflow"), this.containment = [(parseInt(i.css("borderLeftWidth"), 10) || 0) + (parseInt(i.css("paddingLeft"), 10) || 0), (parseInt(i.css("borderTopWidth"), 10) || 0) + (parseInt(i.css("paddingTop"), 10) || 0), (t ? Math.max(s.scrollWidth, s.offsetWidth) : s.offsetWidth) - (parseInt(i.css("borderRightWidth"), 10) || 0) - (parseInt(i.css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (t ? Math.max(s.scrollHeight, s.offsetHeight) : s.offsetHeight) - (parseInt(i.css("borderBottomWidth"), 10) || 0) - (parseInt(i.css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom], this.relative_container = i), undefined) : (this.containment = null, undefined)
  3333.         },
  3334.         _convertPositionTo: function(t, i) {
  3335.             i || (i = this.position);
  3336.             var s = "absolute" === t ? 1 : -1,
  3337.                 a = "absolute" !== this.cssPosition || this.scrollParent[0] !== document && e.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent;
  3338.             return this.offset.scroll || (this.offset.scroll = {
  3339.                 top: a.scrollTop(),
  3340.                 left: a.scrollLeft()
  3341.             }), {
  3342.                 top: i.top + this.offset.relative.top * s + this.offset.parent.top * s - ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : this.offset.scroll.top) * s,
  3343.                 left: i.left + this.offset.relative.left * s + this.offset.parent.left * s - ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : this.offset.scroll.left) * s
  3344.             }
  3345.         },
  3346.         _generatePosition: function(t) {
  3347.             var i, s, a, n, r = this.options,
  3348.                 o = "absolute" !== this.cssPosition || this.scrollParent[0] !== document && e.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent,
  3349.                 h = t.pageX,
  3350.                 l = t.pageY;
  3351.             return this.offset.scroll || (this.offset.scroll = {
  3352.                 top: o.scrollTop(),
  3353.                 left: o.scrollLeft()
  3354.             }), this.originalPosition && (this.containment && (this.relative_container ? (s = this.relative_container.offset(), i = [this.containment[0] + s.left, this.containment[1] + s.top, this.containment[2] + s.left, this.containment[3] + s.top]) : i = this.containment, t.pageX - this.offset.click.left < i[0] && (h = i[0] + this.offset.click.left), t.pageY - this.offset.click.top < i[1] && (l = i[1] + this.offset.click.top), t.pageX - this.offset.click.left > i[2] && (h = i[2] + this.offset.click.left), t.pageY - this.offset.click.top > i[3] && (l = i[3] + this.offset.click.top)), r.grid && (a = r.grid[1] ? this.originalPageY + Math.round((l - this.originalPageY) / r.grid[1]) * r.grid[1] : this.originalPageY, l = i ? a - this.offset.click.top >= i[1] || a - this.offset.click.top > i[3] ? a : a - this.offset.click.top >= i[1] ? a - r.grid[1] : a + r.grid[1] : a, n = r.grid[0] ? this.originalPageX + Math.round((h - this.originalPageX) / r.grid[0]) * r.grid[0] : this.originalPageX, h = i ? n - this.offset.click.left >= i[0] || n - this.offset.click.left > i[2] ? n : n - this.offset.click.left >= i[0] ? n - r.grid[0] : n + r.grid[0] : n)), {
  3355.                 top: l - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : this.offset.scroll.top),
  3356.                 left: h - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : this.offset.scroll.left)
  3357.             }
  3358.         },
  3359.         _clear: function() {
  3360.             this.helper.removeClass("ui-draggable-dragging"), this.helper[0] === this.element[0] || this.cancelHelperRemoval || this.helper.remove(), this.helper = null, this.cancelHelperRemoval = !1
  3361.         },
  3362.         _trigger: function(t, i, s) {
  3363.             return s = s || this._uiHash(), e.ui.plugin.call(this, t, [i, s]), "drag" === t && (this.positionAbs = this._convertPositionTo("absolute")), e.Widget.prototype._trigger.call(this, t, i, s)
  3364.         },
  3365.         plugins: {},
  3366.         _uiHash: function() {
  3367.             return {
  3368.                 helper: this.helper,
  3369.                 position: this.position,
  3370.                 originalPosition: this.originalPosition,
  3371.                 offset: this.positionAbs
  3372.             }
  3373.         }
  3374.     }), e.ui.plugin.add("draggable", "connectToSortable", {
  3375.         start: function(t, i) {
  3376.             var s = e(this).data("ui-draggable"),
  3377.                 a = s.options,
  3378.                 n = e.extend({}, i, {
  3379.                     item: s.element
  3380.                 });
  3381.             s.sortables = [], e(a.connectToSortable).each(function() {
  3382.                 var i = e.data(this, "ui-sortable");
  3383.                 i && !i.options.disabled && (s.sortables.push({
  3384.                     instance: i,
  3385.                     shouldRevert: i.options.revert
  3386.                 }), i.refreshPositions(), i._trigger("activate", t, n))
  3387.             })
  3388.         },
  3389.         stop: function(t, i) {
  3390.             var s = e(this).data("ui-draggable"),
  3391.                 a = e.extend({}, i, {
  3392.                     item: s.element
  3393.                 });
  3394.             e.each(s.sortables, function() {
  3395.                 this.instance.isOver ? (this.instance.isOver = 0, s.cancelHelperRemoval = !0, this.instance.cancelHelperRemoval = !1, this.shouldRevert && (this.instance.options.revert = this.shouldRevert), this.instance._mouseStop(t), this.instance.options.helper = this.instance.options._helper, "original" === s.options.helper && this.instance.currentItem.css({
  3396.                     top: "auto",
  3397.                     left: "auto"
  3398.                 })) : (this.instance.cancelHelperRemoval = !1, this.instance._trigger("deactivate", t, a))
  3399.             })
  3400.         },
  3401.         drag: function(t, i) {
  3402.             var s = e(this).data("ui-draggable"),
  3403.                 a = this;
  3404.             e.each(s.sortables, function() {
  3405.                 var n = !1,
  3406.                     r = this;
  3407.                 this.instance.positionAbs = s.positionAbs, this.instance.helperProportions = s.helperProportions, this.instance.offset.click = s.offset.click, this.instance._intersectsWith(this.instance.containerCache) && (n = !0, e.each(s.sortables, function() {
  3408.                     return this.instance.positionAbs = s.positionAbs, this.instance.helperProportions = s.helperProportions, this.instance.offset.click = s.offset.click, this !== r && this.instance._intersectsWith(this.instance.containerCache) && e.contains(r.instance.element[0], this.instance.element[0]) && (n = !1), n
  3409.                 })), n ? (this.instance.isOver || (this.instance.isOver = 1, this.instance.currentItem = e(a).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item", !0), this.instance.options._helper = this.instance.options.helper, this.instance.options.helper = function() {
  3410.                     return i.helper[0]
  3411.                 }, t.target = this.instance.currentItem[0], this.instance._mouseCapture(t, !0), this.instance._mouseStart(t, !0, !0), this.instance.offset.click.top = s.offset.click.top, this.instance.offset.click.left = s.offset.click.left, this.instance.offset.parent.left -= s.offset.parent.left - this.instance.offset.parent.left, this.instance.offset.parent.top -= s.offset.parent.top - this.instance.offset.parent.top, s._trigger("toSortable", t), s.dropped = this.instance.element, s.currentItem = s.element, this.instance.fromOutside = s), this.instance.currentItem && this.instance._mouseDrag(t)) : this.instance.isOver && (this.instance.isOver = 0, this.instance.cancelHelperRemoval = !0, this.instance.options.revert = !1, this.instance._trigger("out", t, this.instance._uiHash(this.instance)), this.instance._mouseStop(t, !0), this.instance.options.helper = this.instance.options._helper, this.instance.currentItem.remove(), this.instance.placeholder && this.instance.placeholder.remove(), s._trigger("fromSortable", t), s.dropped = !1)
  3412.             })
  3413.         }
  3414.     }), e.ui.plugin.add("draggable", "cursor", {
  3415.         start: function() {
  3416.             var t = e("body"),
  3417.                 i = e(this).data("ui-draggable").options;
  3418.             t.css("cursor") && (i._cursor = t.css("cursor")), t.css("cursor", i.cursor)
  3419.         },
  3420.         stop: function() {
  3421.             var t = e(this).data("ui-draggable").options;
  3422.             t._cursor && e("body").css("cursor", t._cursor)
  3423.         }
  3424.     }), e.ui.plugin.add("draggable", "opacity", {
  3425.         start: function(t, i) {
  3426.             var s = e(i.helper),
  3427.                 a = e(this).data("ui-draggable").options;
  3428.             s.css("opacity") && (a._opacity = s.css("opacity")), s.css("opacity", a.opacity)
  3429.         },
  3430.         stop: function(t, i) {
  3431.             var s = e(this).data("ui-draggable").options;
  3432.             s._opacity && e(i.helper).css("opacity", s._opacity)
  3433.         }
  3434.     }), e.ui.plugin.add("draggable", "scroll", {
  3435.         start: function() {
  3436.             var t = e(this).data("ui-draggable");
  3437.             t.scrollParent[0] !== document && "HTML" !== t.scrollParent[0].tagName && (t.overflowOffset = t.scrollParent.offset())
  3438.         },
  3439.         drag: function(t) {
  3440.             var i = e(this).data("ui-draggable"),
  3441.                 s = i.options,
  3442.                 a = !1;
  3443.             i.scrollParent[0] !== document && "HTML" !== i.scrollParent[0].tagName ? (s.axis && "x" === s.axis || (i.overflowOffset.top + i.scrollParent[0].offsetHeight - t.pageY < s.scrollSensitivity ? i.scrollParent[0].scrollTop = a = i.scrollParent[0].scrollTop + s.scrollSpeed : t.pageY - i.overflowOffset.top < s.scrollSensitivity && (i.scrollParent[0].scrollTop = a = i.scrollParent[0].scrollTop - s.scrollSpeed)), s.axis && "y" === s.axis || (i.overflowOffset.left + i.scrollParent[0].offsetWidth - t.pageX < s.scrollSensitivity ? i.scrollParent[0].scrollLeft = a = i.scrollParent[0].scrollLeft + s.scrollSpeed : t.pageX - i.overflowOffset.left < s.scrollSensitivity && (i.scrollParent[0].scrollLeft = a = i.scrollParent[0].scrollLeft - s.scrollSpeed))) : (s.axis && "x" === s.axis || (t.pageY - e(document).scrollTop() < s.scrollSensitivity ? a = e(document).scrollTop(e(document).scrollTop() - s.scrollSpeed) : e(window).height() - (t.pageY - e(document).scrollTop()) < s.scrollSensitivity && (a = e(document).scrollTop(e(document).scrollTop() + s.scrollSpeed))), s.axis && "y" === s.axis || (t.pageX - e(document).scrollLeft() < s.scrollSensitivity ? a = e(document).scrollLeft(e(document).scrollLeft() - s.scrollSpeed) : e(window).width() - (t.pageX - e(document).scrollLeft()) < s.scrollSensitivity && (a = e(document).scrollLeft(e(document).scrollLeft() + s.scrollSpeed)))), a !== !1 && e.ui.ddmanager && !s.dropBehaviour && e.ui.ddmanager.prepareOffsets(i, t)
  3444.         }
  3445.     }), e.ui.plugin.add("draggable", "snap", {
  3446.         start: function() {
  3447.             var t = e(this).data("ui-draggable"),
  3448.                 i = t.options;
  3449.             t.snapElements = [], e(i.snap.constructor !== String ? i.snap.items || ":data(ui-draggable)" : i.snap).each(function() {
  3450.                 var i = e(this),
  3451.                     s = i.offset();
  3452.                 this !== t.element[0] && t.snapElements.push({
  3453.                     item: this,
  3454.                     width: i.outerWidth(),
  3455.                     height: i.outerHeight(),
  3456.                     top: s.top,
  3457.                     left: s.left
  3458.                 })
  3459.             })
  3460.         },
  3461.         drag: function(t, i) {
  3462.             var s, a, n, r, o, h, l, u, d, c, p = e(this).data("ui-draggable"),
  3463.                 m = p.options,
  3464.                 f = m.snapTolerance,
  3465.                 g = i.offset.left,
  3466.                 v = g + p.helperProportions.width,
  3467.                 y = i.offset.top,
  3468.                 b = y + p.helperProportions.height;
  3469.             for (d = p.snapElements.length - 1; d >= 0; d--) o = p.snapElements[d].left, h = o + p.snapElements[d].width, l = p.snapElements[d].top, u = l + p.snapElements[d].height, o - f > v || g > h + f || l - f > b || y > u + f || !e.contains(p.snapElements[d].item.ownerDocument, p.snapElements[d].item) ? (p.snapElements[d].snapping && p.options.snap.release && p.options.snap.release.call(p.element, t, e.extend(p._uiHash(), {
  3470.                 snapItem: p.snapElements[d].item
  3471.             })), p.snapElements[d].snapping = !1) : ("inner" !== m.snapMode && (s = f >= Math.abs(l - b), a = f >= Math.abs(u - y), n = f >= Math.abs(o - v), r = f >= Math.abs(h - g), s && (i.position.top = p._convertPositionTo("relative", {
  3472.                 top: l - p.helperProportions.height,
  3473.                 left: 0
  3474.             }).top - p.margins.top), a && (i.position.top = p._convertPositionTo("relative", {
  3475.                 top: u,
  3476.                 left: 0
  3477.             }).top - p.margins.top), n && (i.position.left = p._convertPositionTo("relative", {
  3478.                 top: 0,
  3479.                 left: o - p.helperProportions.width
  3480.             }).left - p.margins.left), r && (i.position.left = p._convertPositionTo("relative", {
  3481.                 top: 0,
  3482.                 left: h
  3483.             }).left - p.margins.left)), c = s || a || n || r, "outer" !== m.snapMode && (s = f >= Math.abs(l - y), a = f >= Math.abs(u - b), n = f >= Math.abs(o - g), r = f >= Math.abs(h - v), s && (i.position.top = p._convertPositionTo("relative", {
  3484.                 top: l,
  3485.                 left: 0
  3486.             }).top - p.margins.top), a && (i.position.top = p._convertPositionTo("relative", {
  3487.                 top: u - p.helperProportions.height,
  3488.                 left: 0
  3489.             }).top - p.margins.top), n && (i.position.left = p._convertPositionTo("relative", {
  3490.                 top: 0,
  3491.                 left: o
  3492.             }).left - p.margins.left), r && (i.position.left = p._convertPositionTo("relative", {
  3493.                 top: 0,
  3494.                 left: h - p.helperProportions.width
  3495.             }).left - p.margins.left)), !p.snapElements[d].snapping && (s || a || n || r || c) && p.options.snap.snap && p.options.snap.snap.call(p.element, t, e.extend(p._uiHash(), {
  3496.                 snapItem: p.snapElements[d].item
  3497.             })), p.snapElements[d].snapping = s || a || n || r || c)
  3498.         }
  3499.     }), e.ui.plugin.add("draggable", "stack", {
  3500.         start: function() {
  3501.             var t, i = this.data("ui-draggable").options,
  3502.                 s = e.makeArray(e(i.stack)).sort(function(t, i) {
  3503.                     return (parseInt(e(t).css("zIndex"), 10) || 0) - (parseInt(e(i).css("zIndex"), 10) || 0)
  3504.                 });
  3505.             s.length && (t = parseInt(e(s[0]).css("zIndex"), 10) || 0, e(s).each(function(i) {
  3506.                 e(this).css("zIndex", t + i)
  3507.             }), this.css("zIndex", t + s.length))
  3508.         }
  3509.     }), e.ui.plugin.add("draggable", "zIndex", {
  3510.         start: function(t, i) {
  3511.             var s = e(i.helper),
  3512.                 a = e(this).data("ui-draggable").options;
  3513.             s.css("zIndex") && (a._zIndex = s.css("zIndex")), s.css("zIndex", a.zIndex)
  3514.         },
  3515.         stop: function(t, i) {
  3516.             var s = e(this).data("ui-draggable").options;
  3517.             s._zIndex && e(i.helper).css("zIndex", s._zIndex)
  3518.         }
  3519.     })
  3520. })(jQuery);
  3521. (function(e) {
  3522.     function t(e) {
  3523.         return parseInt(e, 10) || 0
  3524.     }
  3525.  
  3526.     function i(e) {
  3527.         return !isNaN(parseInt(e, 10))
  3528.     }
  3529.     e.widget("ui.resizable", e.ui.mouse, {
  3530.         version: "1.10.4",
  3531.         widgetEventPrefix: "resize",
  3532.         options: {
  3533.             alsoResize: !1,
  3534.             animate: !1,
  3535.             animateDuration: "slow",
  3536.             animateEasing: "swing",
  3537.             aspectRatio: !1,
  3538.             autoHide: !1,
  3539.             containment: !1,
  3540.             ghost: !1,
  3541.             grid: !1,
  3542.             handles: "e,s,se",
  3543.             helper: !1,
  3544.             maxHeight: null,
  3545.             maxWidth: null,
  3546.             minHeight: 10,
  3547.             minWidth: 10,
  3548.             zIndex: 90,
  3549.             resize: null,
  3550.             start: null,
  3551.             stop: null
  3552.         },
  3553.         _create: function() {
  3554.             var t, i, s, a, n, r = this,
  3555.                 o = this.options;
  3556.             if (this.element.addClass("ui-resizable"), e.extend(this, {
  3557.                     _aspectRatio: !!o.aspectRatio,
  3558.                     aspectRatio: o.aspectRatio,
  3559.                     originalElement: this.element,
  3560.                     _proportionallyResizeElements: [],
  3561.                     _helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null
  3562.                 }), this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i) && (this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({
  3563.                     position: this.element.css("position"),
  3564.                     width: this.element.outerWidth(),
  3565.                     height: this.element.outerHeight(),
  3566.                     top: this.element.css("top"),
  3567.                     left: this.element.css("left")
  3568.                 })), this.element = this.element.parent().data("ui-resizable", this.element.data("ui-resizable")), this.elementIsWrapper = !0, this.element.css({
  3569.                     marginLeft: this.originalElement.css("marginLeft"),
  3570.                     marginTop: this.originalElement.css("marginTop"),
  3571.                     marginRight: this.originalElement.css("marginRight"),
  3572.                     marginBottom: this.originalElement.css("marginBottom")
  3573.                 }), this.originalElement.css({
  3574.                     marginLeft: 0,
  3575.                     marginTop: 0,
  3576.                     marginRight: 0,
  3577.                     marginBottom: 0
  3578.                 }), this.originalResizeStyle = this.originalElement.css("resize"), this.originalElement.css("resize", "none"), this._proportionallyResizeElements.push(this.originalElement.css({
  3579.                     position: "static",
  3580.                     zoom: 1,
  3581.                     display: "block"
  3582.                 })), this.originalElement.css({
  3583.                     margin: this.originalElement.css("margin")
  3584.                 }), this._proportionallyResize()), this.handles = o.handles || (e(".ui-resizable-handle", this.element).length ? {
  3585.                     n: ".ui-resizable-n",
  3586.                     e: ".ui-resizable-e",
  3587.                     s: ".ui-resizable-s",
  3588.                     w: ".ui-resizable-w",
  3589.                     se: ".ui-resizable-se",
  3590.                     sw: ".ui-resizable-sw",
  3591.                     ne: ".ui-resizable-ne",
  3592.                     nw: ".ui-resizable-nw"
  3593.                 } : "e,s,se"), this.handles.constructor === String)
  3594.                 for ("all" === this.handles && (this.handles = "n,e,s,w,se,sw,ne,nw"), t = this.handles.split(","), this.handles = {}, i = 0; t.length > i; i++) s = e.trim(t[i]), n = "ui-resizable-" + s, a = e("<div class='ui-resizable-handle " + n + "'></div>"), a.css({
  3595.                     zIndex: o.zIndex
  3596.                 }), "se" === s && a.addClass("ui-icon ui-icon-gripsmall-diagonal-se"), this.handles[s] = ".ui-resizable-" + s, this.element.append(a);
  3597.             this._renderAxis = function(t) {
  3598.                 var i, s, a, n;
  3599.                 t = t || this.element;
  3600.                 for (i in this.handles) this.handles[i].constructor === String && (this.handles[i] = e(this.handles[i], this.element).show()), this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i) && (s = e(this.handles[i], this.element), n = /sw|ne|nw|se|n|s/.test(i) ? s.outerHeight() : s.outerWidth(), a = ["padding", /ne|nw|n/.test(i) ? "Top" : /se|sw|s/.test(i) ? "Bottom" : /^e$/.test(i) ? "Right" : "Left"].join(""), t.css(a, n), this._proportionallyResize()), e(this.handles[i]).length
  3601.             }, this._renderAxis(this.element), this._handles = e(".ui-resizable-handle", this.element).disableSelection(), this._handles.mouseover(function() {
  3602.                 r.resizing || (this.className && (a = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)), r.axis = a && a[1] ? a[1] : "se")
  3603.             }), o.autoHide && (this._handles.hide(), e(this.element).addClass("ui-resizable-autohide").mouseenter(function() {
  3604.                 o.disabled || (e(this).removeClass("ui-resizable-autohide"), r._handles.show())
  3605.             }).mouseleave(function() {
  3606.                 o.disabled || r.resizing || (e(this).addClass("ui-resizable-autohide"), r._handles.hide())
  3607.             })), this._mouseInit()
  3608.         },
  3609.         _destroy: function() {
  3610.             this._mouseDestroy();
  3611.             var t, i = function(t) {
  3612.                 e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()
  3613.             };
  3614.             return this.elementIsWrapper && (i(this.element), t = this.element, this.originalElement.css({
  3615.                 position: t.css("position"),
  3616.                 width: t.outerWidth(),
  3617.                 height: t.outerHeight(),
  3618.                 top: t.css("top"),
  3619.                 left: t.css("left")
  3620.             }).insertAfter(t), t.remove()), this.originalElement.css("resize", this.originalResizeStyle), i(this.originalElement), this
  3621.         },
  3622.         _mouseCapture: function(t) {
  3623.             var i, s, a = !1;
  3624.             for (i in this.handles) s = e(this.handles[i])[0], (s === t.target || e.contains(s, t.target)) && (a = !0);
  3625.             return !this.options.disabled && a
  3626.         },
  3627.         _mouseStart: function(i) {
  3628.             var s, a, n, r = this.options,
  3629.                 o = this.element.position(),
  3630.                 h = this.element;
  3631.             return this.resizing = !0, /absolute/.test(h.css("position")) ? h.css({
  3632.                 position: "absolute",
  3633.                 top: h.css("top"),
  3634.                 left: h.css("left")
  3635.             }) : h.is(".ui-draggable") && h.css({
  3636.                 position: "absolute",
  3637.                 top: o.top,
  3638.                 left: o.left
  3639.             }), this._renderProxy(), s = t(this.helper.css("left")), a = t(this.helper.css("top")), r.containment && (s += e(r.containment).scrollLeft() || 0, a += e(r.containment).scrollTop() || 0), this.offset = this.helper.offset(), this.position = {
  3640.                 left: s,
  3641.                 top: a
  3642.             }, this.size = this._helper ? {
  3643.                 width: this.helper.width(),
  3644.                 height: this.helper.height()
  3645.             } : {
  3646.                 width: h.width(),
  3647.                 height: h.height()
  3648.             }, this.originalSize = this._helper ? {
  3649.                 width: h.outerWidth(),
  3650.                 height: h.outerHeight()
  3651.             } : {
  3652.                 width: h.width(),
  3653.                 height: h.height()
  3654.             }, this.originalPosition = {
  3655.                 left: s,
  3656.                 top: a
  3657.             }, this.sizeDiff = {
  3658.                 width: h.outerWidth() - h.width(),
  3659.                 height: h.outerHeight() - h.height()
  3660.             }, this.originalMousePosition = {
  3661.                 left: i.pageX,
  3662.                 top: i.pageY
  3663.             }, this.aspectRatio = "number" == typeof r.aspectRatio ? r.aspectRatio : this.originalSize.width / this.originalSize.height || 1, n = e(".ui-resizable-" + this.axis).css("cursor"), e("body").css("cursor", "auto" === n ? this.axis + "-resize" : n), h.addClass("ui-resizable-resizing"), this._propagate("start", i), !0
  3664.         },
  3665.         _mouseDrag: function(t) {
  3666.             var i, s = this.helper,
  3667.                 a = {},
  3668.                 n = this.originalMousePosition,
  3669.                 r = this.axis,
  3670.                 o = this.position.top,
  3671.                 h = this.position.left,
  3672.                 l = this.size.width,
  3673.                 u = this.size.height,
  3674.                 d = t.pageX - n.left || 0,
  3675.                 c = t.pageY - n.top || 0,
  3676.                 p = this._change[r];
  3677.             return p ? (i = p.apply(this, [t, d, c]), this._updateVirtualBoundaries(t.shiftKey), (this._aspectRatio || t.shiftKey) && (i = this._updateRatio(i, t)), i = this._respectSize(i, t), this._updateCache(i), this._propagate("resize", t), this.position.top !== o && (a.top = this.position.top + "px"), this.position.left !== h && (a.left = this.position.left + "px"), this.size.width !== l && (a.width = this.size.width + "px"), this.size.height !== u && (a.height = this.size.height + "px"), s.css(a), !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(), e.isEmptyObject(a) || this._trigger("resize", t, this.ui()), !1) : !1
  3678.         },
  3679.         _mouseStop: function(t) {
  3680.             this.resizing = !1;
  3681.             var i, s, a, n, r, o, h, l = this.options,
  3682.                 u = this;
  3683.             return this._helper && (i = this._proportionallyResizeElements, s = i.length && /textarea/i.test(i[0].nodeName), a = s && e.ui.hasScroll(i[0], "left") ? 0 : u.sizeDiff.height, n = s ? 0 : u.sizeDiff.width, r = {
  3684.                 width: u.helper.width() - n,
  3685.                 height: u.helper.height() - a
  3686.             }, o = parseInt(u.element.css("left"), 10) + (u.position.left - u.originalPosition.left) || null, h = parseInt(u.element.css("top"), 10) + (u.position.top - u.originalPosition.top) || null, l.animate || this.element.css(e.extend(r, {
  3687.                 top: h,
  3688.                 left: o
  3689.             })), u.helper.height(u.size.height), u.helper.width(u.size.width), this._helper && !l.animate && this._proportionallyResize()), e("body").css("cursor", "auto"), this.element.removeClass("ui-resizable-resizing"), this._propagate("stop", t), this._helper && this.helper.remove(), !1
  3690.         },
  3691.         _updateVirtualBoundaries: function(e) {
  3692.             var t, s, a, n, r, o = this.options;
  3693.             r = {
  3694.                 minWidth: i(o.minWidth) ? o.minWidth : 0,
  3695.                 maxWidth: i(o.maxWidth) ? o.maxWidth : 1 / 0,
  3696.                 minHeight: i(o.minHeight) ? o.minHeight : 0,
  3697.                 maxHeight: i(o.maxHeight) ? o.maxHeight : 1 / 0
  3698.             }, (this._aspectRatio || e) && (t = r.minHeight * this.aspectRatio, a = r.minWidth / this.aspectRatio, s = r.maxHeight * this.aspectRatio, n = r.maxWidth / this.aspectRatio, t > r.minWidth && (r.minWidth = t), a > r.minHeight && (r.minHeight = a), r.maxWidth > s && (r.maxWidth = s), r.maxHeight > n && (r.maxHeight = n)), this._vBoundaries = r
  3699.         },
  3700.         _updateCache: function(e) {
  3701.             this.offset = this.helper.offset(), i(e.left) && (this.position.left = e.left), i(e.top) && (this.position.top = e.top), i(e.height) && (this.size.height = e.height), i(e.width) && (this.size.width = e.width)
  3702.         },
  3703.         _updateRatio: function(e) {
  3704.             var t = this.position,
  3705.                 s = this.size,
  3706.                 a = this.axis;
  3707.             return i(e.height) ? e.width = e.height * this.aspectRatio : i(e.width) && (e.height = e.width / this.aspectRatio), "sw" === a && (e.left = t.left + (s.width - e.width), e.top = null), "nw" === a && (e.top = t.top + (s.height - e.height), e.left = t.left + (s.width - e.width)), e
  3708.         },
  3709.         _respectSize: function(e) {
  3710.             var t = this._vBoundaries,
  3711.                 s = this.axis,
  3712.                 a = i(e.width) && t.maxWidth && t.maxWidth < e.width,
  3713.                 n = i(e.height) && t.maxHeight && t.maxHeight < e.height,
  3714.                 r = i(e.width) && t.minWidth && t.minWidth > e.width,
  3715.                 o = i(e.height) && t.minHeight && t.minHeight > e.height,
  3716.                 h = this.originalPosition.left + this.originalSize.width,
  3717.                 l = this.position.top + this.size.height,
  3718.                 u = /sw|nw|w/.test(s),
  3719.                 d = /nw|ne|n/.test(s);
  3720.             return r && (e.width = t.minWidth), o && (e.height = t.minHeight), a && (e.width = t.maxWidth), n && (e.height = t.maxHeight), r && u && (e.left = h - t.minWidth), a && u && (e.left = h - t.maxWidth), o && d && (e.top = l - t.minHeight), n && d && (e.top = l - t.maxHeight), e.width || e.height || e.left || !e.top ? e.width || e.height || e.top || !e.left || (e.left = null) : e.top = null, e
  3721.         },
  3722.         _proportionallyResize: function() {
  3723.             if (this._proportionallyResizeElements.length) {
  3724.                 var e, t, i, s, a, n = this.helper || this.element;
  3725.                 for (e = 0; this._proportionallyResizeElements.length > e; e++) {
  3726.                     if (a = this._proportionallyResizeElements[e], !this.borderDif)
  3727.                         for (this.borderDif = [], i = [a.css("borderTopWidth"), a.css("borderRightWidth"), a.css("borderBottomWidth"), a.css("borderLeftWidth")], s = [a.css("paddingTop"), a.css("paddingRight"), a.css("paddingBottom"), a.css("paddingLeft")], t = 0; i.length > t; t++) this.borderDif[t] = (parseInt(i[t], 10) || 0) + (parseInt(s[t], 10) || 0);
  3728.                     a.css({
  3729.                         height: n.height() - this.borderDif[0] - this.borderDif[2] || 0,
  3730.                         width: n.width() - this.borderDif[1] - this.borderDif[3] || 0
  3731.                     })
  3732.                 }
  3733.             }
  3734.         },
  3735.         _renderProxy: function() {
  3736.             var t = this.element,
  3737.                 i = this.options;
  3738.             this.elementOffset = t.offset(), this._helper ? (this.helper = this.helper || e("<div style='overflow:hidden;'></div>"), this.helper.addClass(this._helper).css({
  3739.                 width: this.element.outerWidth() - 1,
  3740.                 height: this.element.outerHeight() - 1,
  3741.                 position: "absolute",
  3742.                 left: this.elementOffset.left + "px",
  3743.                 top: this.elementOffset.top + "px",
  3744.                 zIndex: ++i.zIndex
  3745.             }), this.helper.appendTo("body").disableSelection()) : this.helper = this.element
  3746.         },
  3747.         _change: {
  3748.             e: function(e, t) {
  3749.                 return {
  3750.                     width: this.originalSize.width + t
  3751.                 }
  3752.             },
  3753.             w: function(e, t) {
  3754.                 var i = this.originalSize,
  3755.                     s = this.originalPosition;
  3756.                 return {
  3757.                     left: s.left + t,
  3758.                     width: i.width - t
  3759.                 }
  3760.             },
  3761.             n: function(e, t, i) {
  3762.                 var s = this.originalSize,
  3763.                     a = this.originalPosition;
  3764.                 return {
  3765.                     top: a.top + i,
  3766.                     height: s.height - i
  3767.                 }
  3768.             },
  3769.             s: function(e, t, i) {
  3770.                 return {
  3771.                     height: this.originalSize.height + i
  3772.                 }
  3773.             },
  3774.             se: function(t, i, s) {
  3775.                 return e.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [t, i, s]))
  3776.             },
  3777.             sw: function(t, i, s) {
  3778.                 return e.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [t, i, s]))
  3779.             },
  3780.             ne: function(t, i, s) {
  3781.                 return e.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [t, i, s]))
  3782.             },
  3783.             nw: function(t, i, s) {
  3784.                 return e.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [t, i, s]))
  3785.             }
  3786.         },
  3787.         _propagate: function(t, i) {
  3788.             e.ui.plugin.call(this, t, [i, this.ui()]), "resize" !== t && this._trigger(t, i, this.ui())
  3789.         },
  3790.         plugins: {},
  3791.         ui: function() {
  3792.             return {
  3793.                 originalElement: this.originalElement,
  3794.                 element: this.element,
  3795.                 helper: this.helper,
  3796.                 position: this.position,
  3797.                 size: this.size,
  3798.                 originalSize: this.originalSize,
  3799.                 originalPosition: this.originalPosition
  3800.             }
  3801.         }
  3802.     }), e.ui.plugin.add("resizable", "animate", {
  3803.         stop: function(t) {
  3804.             var i = e(this).data("ui-resizable"),
  3805.                 s = i.options,
  3806.                 a = i._proportionallyResizeElements,
  3807.                 n = a.length && /textarea/i.test(a[0].nodeName),
  3808.                 r = n && e.ui.hasScroll(a[0], "left") ? 0 : i.sizeDiff.height,
  3809.                 o = n ? 0 : i.sizeDiff.width,
  3810.                 h = {
  3811.                     width: i.size.width - o,
  3812.                     height: i.size.height - r
  3813.                 },
  3814.                 l = parseInt(i.element.css("left"), 10) + (i.position.left - i.originalPosition.left) || null,
  3815.                 u = parseInt(i.element.css("top"), 10) + (i.position.top - i.originalPosition.top) || null;
  3816.             i.element.animate(e.extend(h, u && l ? {
  3817.                 top: u,
  3818.                 left: l
  3819.             } : {}), {
  3820.                 duration: s.animateDuration,
  3821.                 easing: s.animateEasing,
  3822.                 step: function() {
  3823.                     var s = {
  3824.                         width: parseInt(i.element.css("width"), 10),
  3825.                         height: parseInt(i.element.css("height"), 10),
  3826.                         top: parseInt(i.element.css("top"), 10),
  3827.                         left: parseInt(i.element.css("left"), 10)
  3828.                     };
  3829.                     a && a.length && e(a[0]).css({
  3830.                         width: s.width,
  3831.                         height: s.height
  3832.                     }), i._updateCache(s), i._propagate("resize", t)
  3833.                 }
  3834.             })
  3835.         }
  3836.     }), e.ui.plugin.add("resizable", "containment", {
  3837.         start: function() {
  3838.             var i, s, a, n, r, o, h, l = e(this).data("ui-resizable"),
  3839.                 u = l.options,
  3840.                 d = l.element,
  3841.                 c = u.containment,
  3842.                 p = c instanceof e ? c.get(0) : /parent/.test(c) ? d.parent().get(0) : c;
  3843.             p && (l.containerElement = e(p), /document/.test(c) || c === document ? (l.containerOffset = {
  3844.                 left: 0,
  3845.                 top: 0
  3846.             }, l.containerPosition = {
  3847.                 left: 0,
  3848.                 top: 0
  3849.             }, l.parentData = {
  3850.                 element: e(document),
  3851.                 left: 0,
  3852.                 top: 0,
  3853.                 width: e(document).width(),
  3854.                 height: e(document).height() || document.body.parentNode.scrollHeight
  3855.             }) : (i = e(p), s = [], e(["Top", "Right", "Left", "Bottom"]).each(function(e, a) {
  3856.                 s[e] = t(i.css("padding" + a))
  3857.             }), l.containerOffset = i.offset(), l.containerPosition = i.position(), l.containerSize = {
  3858.                 height: i.innerHeight() - s[3],
  3859.                 width: i.innerWidth() - s[1]
  3860.             }, a = l.containerOffset, n = l.containerSize.height, r = l.containerSize.width, o = e.ui.hasScroll(p, "left") ? p.scrollWidth : r, h = e.ui.hasScroll(p) ? p.scrollHeight : n, l.parentData = {
  3861.                 element: p,
  3862.                 left: a.left,
  3863.                 top: a.top,
  3864.                 width: o,
  3865.                 height: h
  3866.             }))
  3867.         },
  3868.         resize: function(t) {
  3869.             var i, s, a, n, r = e(this).data("ui-resizable"),
  3870.                 o = r.options,
  3871.                 h = r.containerOffset,
  3872.                 l = r.position,
  3873.                 u = r._aspectRatio || t.shiftKey,
  3874.                 d = {
  3875.                     top: 0,
  3876.                     left: 0
  3877.                 },
  3878.                 c = r.containerElement;
  3879.             c[0] !== document && /static/.test(c.css("position")) && (d = h), l.left < (r._helper ? h.left : 0) && (r.size.width = r.size.width + (r._helper ? r.position.left - h.left : r.position.left - d.left), u && (r.size.height = r.size.width / r.aspectRatio), r.position.left = o.helper ? h.left : 0), l.top < (r._helper ? h.top : 0) && (r.size.height = r.size.height + (r._helper ? r.position.top - h.top : r.position.top), u && (r.size.width = r.size.height * r.aspectRatio), r.position.top = r._helper ? h.top : 0), r.offset.left = r.parentData.left + r.position.left, r.offset.top = r.parentData.top + r.position.top, i = Math.abs((r._helper ? r.offset.left - d.left : r.offset.left - d.left) + r.sizeDiff.width), s = Math.abs((r._helper ? r.offset.top - d.top : r.offset.top - h.top) + r.sizeDiff.height), a = r.containerElement.get(0) === r.element.parent().get(0), n = /relative|absolute/.test(r.containerElement.css("position")), a && n && (i -= Math.abs(r.parentData.left)), i + r.size.width >= r.parentData.width && (r.size.width = r.parentData.width - i, u && (r.size.height = r.size.width / r.aspectRatio)), s + r.size.height >= r.parentData.height && (r.size.height = r.parentData.height - s, u && (r.size.width = r.size.height * r.aspectRatio))
  3880.         },
  3881.         stop: function() {
  3882.             var t = e(this).data("ui-resizable"),
  3883.                 i = t.options,
  3884.                 s = t.containerOffset,
  3885.                 a = t.containerPosition,
  3886.                 n = t.containerElement,
  3887.                 r = e(t.helper),
  3888.                 o = r.offset(),
  3889.                 h = r.outerWidth() - t.sizeDiff.width,
  3890.                 l = r.outerHeight() - t.sizeDiff.height;
  3891.             t._helper && !i.animate && /relative/.test(n.css("position")) && e(this).css({
  3892.                 left: o.left - a.left - s.left,
  3893.                 width: h,
  3894.                 height: l
  3895.             }), t._helper && !i.animate && /static/.test(n.css("position")) && e(this).css({
  3896.                 left: o.left - a.left - s.left,
  3897.                 width: h,
  3898.                 height: l
  3899.             })
  3900.         }
  3901.     }), e.ui.plugin.add("resizable", "alsoResize", {
  3902.         start: function() {
  3903.             var t = e(this).data("ui-resizable"),
  3904.                 i = t.options,
  3905.                 s = function(t) {
  3906.                     e(t).each(function() {
  3907.                         var t = e(this);
  3908.                         t.data("ui-resizable-alsoresize", {
  3909.                             width: parseInt(t.width(), 10),
  3910.                             height: parseInt(t.height(), 10),
  3911.                             left: parseInt(t.css("left"), 10),
  3912.                             top: parseInt(t.css("top"), 10)
  3913.                         })
  3914.                     })
  3915.                 };
  3916.             "object" != typeof i.alsoResize || i.alsoResize.parentNode ? s(i.alsoResize) : i.alsoResize.length ? (i.alsoResize = i.alsoResize[0], s(i.alsoResize)) : e.each(i.alsoResize, function(e) {
  3917.                 s(e)
  3918.             })
  3919.         },
  3920.         resize: function(t, i) {
  3921.             var s = e(this).data("ui-resizable"),
  3922.                 a = s.options,
  3923.                 n = s.originalSize,
  3924.                 r = s.originalPosition,
  3925.                 o = {
  3926.                     height: s.size.height - n.height || 0,
  3927.                     width: s.size.width - n.width || 0,
  3928.                     top: s.position.top - r.top || 0,
  3929.                     left: s.position.left - r.left || 0
  3930.                 },
  3931.                 h = function(t, s) {
  3932.                     e(t).each(function() {
  3933.                         var t = e(this),
  3934.                             a = e(this).data("ui-resizable-alsoresize"),
  3935.                             n = {},
  3936.                             r = s && s.length ? s : t.parents(i.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"];
  3937.                         e.each(r, function(e, t) {
  3938.                             var i = (a[t] || 0) + (o[t] || 0);
  3939.                             i && i >= 0 && (n[t] = i || null)
  3940.                         }), t.css(n)
  3941.                     })
  3942.                 };
  3943.             "object" != typeof a.alsoResize || a.alsoResize.nodeType ? h(a.alsoResize) : e.each(a.alsoResize, function(e, t) {
  3944.                 h(e, t)
  3945.             })
  3946.         },
  3947.         stop: function() {
  3948.             e(this).removeData("resizable-alsoresize")
  3949.         }
  3950.     }), e.ui.plugin.add("resizable", "ghost", {
  3951.         start: function() {
  3952.             var t = e(this).data("ui-resizable"),
  3953.                 i = t.options,
  3954.                 s = t.size;
  3955.             t.ghost = t.originalElement.clone(), t.ghost.css({
  3956.                 opacity: .25,
  3957.                 display: "block",
  3958.                 position: "relative",
  3959.                 height: s.height,
  3960.                 width: s.width,
  3961.                 margin: 0,
  3962.                 left: 0,
  3963.                 top: 0
  3964.             }).addClass("ui-resizable-ghost").addClass("string" == typeof i.ghost ? i.ghost : ""), t.ghost.appendTo(t.helper)
  3965.         },
  3966.         resize: function() {
  3967.             var t = e(this).data("ui-resizable");
  3968.             t.ghost && t.ghost.css({
  3969.                 position: "relative",
  3970.                 height: t.size.height,
  3971.                 width: t.size.width
  3972.             })
  3973.         },
  3974.         stop: function() {
  3975.             var t = e(this).data("ui-resizable");
  3976.             t.ghost && t.helper && t.helper.get(0).removeChild(t.ghost.get(0))
  3977.         }
  3978.     }), e.ui.plugin.add("resizable", "grid", {
  3979.         resize: function() {
  3980.             var t = e(this).data("ui-resizable"),
  3981.                 i = t.options,
  3982.                 s = t.size,
  3983.                 a = t.originalSize,
  3984.                 n = t.originalPosition,
  3985.                 r = t.axis,
  3986.                 o = "number" == typeof i.grid ? [i.grid, i.grid] : i.grid,
  3987.                 h = o[0] || 1,
  3988.                 l = o[1] || 1,
  3989.                 u = Math.round((s.width - a.width) / h) * h,
  3990.                 d = Math.round((s.height - a.height) / l) * l,
  3991.                 c = a.width + u,
  3992.                 p = a.height + d,
  3993.                 f = i.maxWidth && c > i.maxWidth,
  3994.                 m = i.maxHeight && p > i.maxHeight,
  3995.                 g = i.minWidth && i.minWidth > c,
  3996.                 v = i.minHeight && i.minHeight > p;
  3997.             i.grid = o, g && (c += h), v && (p += l), f && (c -= h), m && (p -= l), /^(se|s|e)$/.test(r) ? (t.size.width = c, t.size.height = p) : /^(ne)$/.test(r) ? (t.size.width = c, t.size.height = p, t.position.top = n.top - d) : /^(sw)$/.test(r) ? (t.size.width = c, t.size.height = p, t.position.left = n.left - u) : (p - l > 0 ? (t.size.height = p, t.position.top = n.top - d) : (t.size.height = l, t.position.top = n.top + a.height - l), c - h > 0 ? (t.size.width = c, t.position.left = n.left - u) : (t.size.width = h, t.position.left = n.left + a.width - h))
  3998.         }
  3999.     })
  4000. })(jQuery);
  4001. (function(e) {
  4002.     var t, i = "ui-button ui-widget ui-state-default ui-corner-all",
  4003.         s = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
  4004.         a = function() {
  4005.             var t = e(this);
  4006.             setTimeout(function() {
  4007.                 t.find(":ui-button").button("refresh")
  4008.             }, 1)
  4009.         },
  4010.         n = function(t) {
  4011.             var i = t.name,
  4012.                 s = t.form,
  4013.                 a = e([]);
  4014.             return i && (i = i.replace(/'/g, "\\'"), a = s ? e(s).find("[name='" + i + "']") : e("[name='" + i + "']", t.ownerDocument).filter(function() {
  4015.                 return !this.form
  4016.             })), a
  4017.         };
  4018.     e.widget("ui.button", {
  4019.         version: "1.10.4",
  4020.         defaultElement: "<button>",
  4021.         options: {
  4022.             disabled: null,
  4023.             text: !0,
  4024.             label: null,
  4025.             icons: {
  4026.                 primary: null,
  4027.                 secondary: null
  4028.             }
  4029.         },
  4030.         _create: function() {
  4031.             this.element.closest("form").unbind("reset" + this.eventNamespace).bind("reset" + this.eventNamespace, a), "boolean" != typeof this.options.disabled ? this.options.disabled = !!this.element.prop("disabled") : this.element.prop("disabled", this.options.disabled), this._determineButtonType(), this.hasTitle = !!this.buttonElement.attr("title");
  4032.             var s = this,
  4033.                 r = this.options,
  4034.                 o = "checkbox" === this.type || "radio" === this.type,
  4035.                 h = o ? "" : "ui-state-active";
  4036.             null === r.label && (r.label = "input" === this.type ? this.buttonElement.val() : this.buttonElement.html()), this._hoverable(this.buttonElement), this.buttonElement.addClass(i).attr("role", "button").bind("mouseenter" + this.eventNamespace, function() {
  4037.                 r.disabled || this === t && e(this).addClass("ui-state-active")
  4038.             }).bind("mouseleave" + this.eventNamespace, function() {
  4039.                 r.disabled || e(this).removeClass(h)
  4040.             }).bind("click" + this.eventNamespace, function(e) {
  4041.                 r.disabled && (e.preventDefault(), e.stopImmediatePropagation())
  4042.             }), this._on({
  4043.                 focus: function() {
  4044.                     this.buttonElement.addClass("ui-state-focus")
  4045.                 },
  4046.                 blur: function() {
  4047.                     this.buttonElement.removeClass("ui-state-focus")
  4048.                 }
  4049.             }), o && this.element.bind("change" + this.eventNamespace, function() {
  4050.                 s.refresh()
  4051.             }), "checkbox" === this.type ? this.buttonElement.bind("click" + this.eventNamespace, function() {
  4052.                 return r.disabled ? !1 : undefined
  4053.             }) : "radio" === this.type ? this.buttonElement.bind("click" + this.eventNamespace, function() {
  4054.                 if (r.disabled) return !1;
  4055.                 e(this).addClass("ui-state-active"), s.buttonElement.attr("aria-pressed", "true");
  4056.                 var t = s.element[0];
  4057.                 n(t).not(t).map(function() {
  4058.                     return e(this).button("widget")[0]
  4059.                 }).removeClass("ui-state-active").attr("aria-pressed", "false")
  4060.             }) : (this.buttonElement.bind("mousedown" + this.eventNamespace, function() {
  4061.                 return r.disabled ? !1 : (e(this).addClass("ui-state-active"), t = this, s.document.one("mouseup", function() {
  4062.                     t = null
  4063.                 }), undefined)
  4064.             }).bind("mouseup" + this.eventNamespace, function() {
  4065.                 return r.disabled ? !1 : (e(this).removeClass("ui-state-active"), undefined)
  4066.             }).bind("keydown" + this.eventNamespace, function(t) {
  4067.                 return r.disabled ? !1 : ((t.keyCode === e.ui.keyCode.SPACE || t.keyCode === e.ui.keyCode.ENTER) && e(this).addClass("ui-state-active"), undefined)
  4068.             }).bind("keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() {
  4069.                 e(this).removeClass("ui-state-active")
  4070.             }), this.buttonElement.is("a") && this.buttonElement.keyup(function(t) {
  4071.                 t.keyCode === e.ui.keyCode.SPACE && e(this).click()
  4072.             })), this._setOption("disabled", r.disabled), this._resetButton()
  4073.         },
  4074.         _determineButtonType: function() {
  4075.             var e, t, i;
  4076.             this.type = this.element.is("[type=checkbox]") ? "checkbox" : this.element.is("[type=radio]") ? "radio" : this.element.is("input") ? "input" : "button", "checkbox" === this.type || "radio" === this.type ? (e = this.element.parents().last(), t = "label[for='" + this.element.attr("id") + "']", this.buttonElement = e.find(t), this.buttonElement.length || (e = e.length ? e.siblings() : this.element.siblings(), this.buttonElement = e.filter(t), this.buttonElement.length || (this.buttonElement = e.find(t))), this.element.addClass("ui-helper-hidden-accessible"), i = this.element.is(":checked"), i && this.buttonElement.addClass("ui-state-active"), this.buttonElement.prop("aria-pressed", i)) : this.buttonElement = this.element
  4077.         },
  4078.         widget: function() {
  4079.             return this.buttonElement
  4080.         },
  4081.         _destroy: function() {
  4082.             this.element.removeClass("ui-helper-hidden-accessible"), this.buttonElement.removeClass(i + " ui-state-active " + s).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()), this.hasTitle || this.buttonElement.removeAttr("title")
  4083.         },
  4084.         _setOption: function(e, t) {
  4085.             return this._super(e, t), "disabled" === e ? (this.element.prop("disabled", !!t), t && this.buttonElement.removeClass("ui-state-focus"), undefined) : (this._resetButton(), undefined)
  4086.         },
  4087.         refresh: function() {
  4088.             var t = this.element.is("input, button") ? this.element.is(":disabled") : this.element.hasClass("ui-button-disabled");
  4089.             t !== this.options.disabled && this._setOption("disabled", t), "radio" === this.type ? n(this.element[0]).each(function() {
  4090.                 e(this).is(":checked") ? e(this).button("widget").addClass("ui-state-active").attr("aria-pressed", "true") : e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed", "false")
  4091.             }) : "checkbox" === this.type && (this.element.is(":checked") ? this.buttonElement.addClass("ui-state-active").attr("aria-pressed", "true") : this.buttonElement.removeClass("ui-state-active").attr("aria-pressed", "false"))
  4092.         },
  4093.         _resetButton: function() {
  4094.             if ("input" === this.type) return this.options.label && this.element.val(this.options.label), undefined;
  4095.             var t = this.buttonElement.removeClass(s),
  4096.                 i = e("<span></span>", this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),
  4097.                 a = this.options.icons,
  4098.                 n = a.primary && a.secondary,
  4099.                 r = [];
  4100.             a.primary || a.secondary ? (this.options.text && r.push("ui-button-text-icon" + (n ? "s" : a.primary ? "-primary" : "-secondary")), a.primary && t.prepend("<span class='ui-button-icon-primary ui-icon " + a.primary + "'></span>"), a.secondary && t.append("<span class='ui-button-icon-secondary ui-icon " + a.secondary + "'></span>"), this.options.text || (r.push(n ? "ui-button-icons-only" : "ui-button-icon-only"), this.hasTitle || t.attr("title", e.trim(i)))) : r.push("ui-button-text-only"), t.addClass(r.join(" "))
  4101.         }
  4102.     }), e.widget("ui.buttonset", {
  4103.         version: "1.10.4",
  4104.         options: {
  4105.             items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
  4106.         },
  4107.         _create: function() {
  4108.             this.element.addClass("ui-buttonset")
  4109.         },
  4110.         _init: function() {
  4111.             this.refresh()
  4112.         },
  4113.         _setOption: function(e, t) {
  4114.             "disabled" === e && this.buttons.button("option", e, t), this._super(e, t)
  4115.         },
  4116.         refresh: function() {
  4117.             var t = "rtl" === this.element.css("direction");
  4118.             this.buttons = this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function() {
  4119.                 return e(this).button("widget")[0]
  4120.             }).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t ? "ui-corner-right" : "ui-corner-left").end().filter(":last").addClass(t ? "ui-corner-left" : "ui-corner-right").end().end()
  4121.         },
  4122.         _destroy: function() {
  4123.             this.element.removeClass("ui-buttonset"), this.buttons.map(function() {
  4124.                 return e(this).button("widget")[0]
  4125.             }).removeClass("ui-corner-left ui-corner-right").end().button("destroy")
  4126.         }
  4127.     })
  4128. })(jQuery);
  4129. (function(e, t) {
  4130.     function i() {
  4131.         this._curInst = null, this._keyEvent = !1, this._disabledInputs = [], this._datepickerShowing = !1, this._inDialog = !1, this._mainDivId = "ui-datepicker-div", this._inlineClass = "ui-datepicker-inline", this._appendClass = "ui-datepicker-append", this._triggerClass = "ui-datepicker-trigger", this._dialogClass = "ui-datepicker-dialog", this._disableClass = "ui-datepicker-disabled", this._unselectableClass = "ui-datepicker-unselectable", this._currentClass = "ui-datepicker-current-day", this._dayOverClass = "ui-datepicker-days-cell-over", this.regional = [], this.regional[""] = {
  4132.             closeText: "Done",
  4133.             prevText: "Prev",
  4134.             nextText: "Next",
  4135.             currentText: "Today",
  4136.             monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
  4137.             monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
  4138.             dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
  4139.             dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
  4140.             dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
  4141.             weekHeader: "Wk",
  4142.             dateFormat: "mm/dd/yy",
  4143.             firstDay: 0,
  4144.             isRTL: !1,
  4145.             showMonthAfterYear: !1,
  4146.             yearSuffix: ""
  4147.         }, this._defaults = {
  4148.             showOn: "focus",
  4149.             showAnim: "fadeIn",
  4150.             showOptions: {},
  4151.             defaultDate: null,
  4152.             appendText: "",
  4153.             buttonText: "...",
  4154.             buttonImage: "",
  4155.             buttonImageOnly: !1,
  4156.             hideIfNoPrevNext: !1,
  4157.             navigationAsDateFormat: !1,
  4158.             gotoCurrent: !1,
  4159.             changeMonth: !1,
  4160.             changeYear: !1,
  4161.             yearRange: "c-10:c+10",
  4162.             showOtherMonths: !1,
  4163.             selectOtherMonths: !1,
  4164.             showWeek: !1,
  4165.             calculateWeek: this.iso8601Week,
  4166.             shortYearCutoff: "+10",
  4167.             minDate: null,
  4168.             maxDate: null,
  4169.             duration: "fast",
  4170.             beforeShowDay: null,
  4171.             beforeShow: null,
  4172.             onSelect: null,
  4173.             onChangeMonthYear: null,
  4174.             onClose: null,
  4175.             numberOfMonths: 1,
  4176.             showCurrentAtPos: 0,
  4177.             stepMonths: 1,
  4178.             stepBigMonths: 12,
  4179.             altField: "",
  4180.             altFormat: "",
  4181.             constrainInput: !0,
  4182.             showButtonPanel: !1,
  4183.             autoSize: !1,
  4184.             disabled: !1
  4185.         }, e.extend(this._defaults, this.regional[""]), this.dpDiv = s(e("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))
  4186.     }
  4187.  
  4188.     function s(t) {
  4189.         var i = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
  4190.         return t.delegate(i, "mouseout", function() {
  4191.             e(this).removeClass("ui-state-hover"), -1 !== this.className.indexOf("ui-datepicker-prev") && e(this).removeClass("ui-datepicker-prev-hover"), -1 !== this.className.indexOf("ui-datepicker-next") && e(this).removeClass("ui-datepicker-next-hover")
  4192.         }).delegate(i, "mouseover", function() {
  4193.             e.datepicker._isDisabledDatepicker(n.inline ? t.parent()[0] : n.input[0]) || (e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"), e(this).addClass("ui-state-hover"), -1 !== this.className.indexOf("ui-datepicker-prev") && e(this).addClass("ui-datepicker-prev-hover"), -1 !== this.className.indexOf("ui-datepicker-next") && e(this).addClass("ui-datepicker-next-hover"))
  4194.         })
  4195.     }
  4196.  
  4197.     function a(t, i) {
  4198.         e.extend(t, i);
  4199.         for (var s in i) null == i[s] && (t[s] = i[s]);
  4200.         return t
  4201.     }
  4202.     e.extend(e.ui, {
  4203.         datepicker: {
  4204.             version: "1.10.4"
  4205.         }
  4206.     });
  4207.     var n, r = "datepicker";
  4208.     e.extend(i.prototype, {
  4209.         markerClassName: "hasDatepicker",
  4210.         maxRows: 4,
  4211.         _widgetDatepicker: function() {
  4212.             return this.dpDiv
  4213.         },
  4214.         setDefaults: function(e) {
  4215.             return a(this._defaults, e || {}), this
  4216.         },
  4217.         _attachDatepicker: function(t, i) {
  4218.             var s, a, n;
  4219.             s = t.nodeName.toLowerCase(), a = "div" === s || "span" === s, t.id || (this.uuid += 1, t.id = "dp" + this.uuid), n = this._newInst(e(t), a), n.settings = e.extend({}, i || {}), "input" === s ? this._connectDatepicker(t, n) : a && this._inlineDatepicker(t, n)
  4220.         },
  4221.         _newInst: function(t, i) {
  4222.             var a = t[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1");
  4223.             return {
  4224.                 id: a,
  4225.                 input: t,
  4226.                 selectedDay: 0,
  4227.                 selectedMonth: 0,
  4228.                 selectedYear: 0,
  4229.                 drawMonth: 0,
  4230.                 drawYear: 0,
  4231.                 inline: i,
  4232.                 dpDiv: i ? s(e("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")) : this.dpDiv
  4233.             }
  4234.         },
  4235.         _connectDatepicker: function(t, i) {
  4236.             var s = e(t);
  4237.             i.append = e([]), i.trigger = e([]), s.hasClass(this.markerClassName) || (this._attachments(s, i), s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp), this._autoSize(i), e.data(t, r, i), i.settings.disabled && this._disableDatepicker(t))
  4238.         },
  4239.         _attachments: function(t, i) {
  4240.             var s, a, n, r = this._get(i, "appendText"),
  4241.                 o = this._get(i, "isRTL");
  4242.             i.append && i.append.remove(), r && (i.append = e("<span class='" + this._appendClass + "'>" + r + "</span>"), t[o ? "before" : "after"](i.append)), t.unbind("focus", this._showDatepicker), i.trigger && i.trigger.remove(), s = this._get(i, "showOn"), ("focus" === s || "both" === s) && t.focus(this._showDatepicker), ("button" === s || "both" === s) && (a = this._get(i, "buttonText"), n = this._get(i, "buttonImage"), i.trigger = e(this._get(i, "buttonImageOnly") ? e("<img/>").addClass(this._triggerClass).attr({
  4243.                 src: n,
  4244.                 alt: a,
  4245.                 title: a
  4246.             }) : e("<button type='button'></button>").addClass(this._triggerClass).html(n ? e("<img/>").attr({
  4247.                 src: n,
  4248.                 alt: a,
  4249.                 title: a
  4250.             }) : a)), t[o ? "before" : "after"](i.trigger), i.trigger.click(function() {
  4251.                 return e.datepicker._datepickerShowing && e.datepicker._lastInput === t[0] ? e.datepicker._hideDatepicker() : e.datepicker._datepickerShowing && e.datepicker._lastInput !== t[0] ? (e.datepicker._hideDatepicker(), e.datepicker._showDatepicker(t[0])) : e.datepicker._showDatepicker(t[0]), !1
  4252.             }))
  4253.         },
  4254.         _autoSize: function(e) {
  4255.             if (this._get(e, "autoSize") && !e.inline) {
  4256.                 var t, i, s, a, n = new Date(2009, 11, 20),
  4257.                     r = this._get(e, "dateFormat");
  4258.                 r.match(/[DM]/) && (t = function(e) {
  4259.                     for (i = 0, s = 0, a = 0; e.length > a; a++) e[a].length > i && (i = e[a].length, s = a);
  4260.                     return s
  4261.                 }, n.setMonth(t(this._get(e, r.match(/MM/) ? "monthNames" : "monthNamesShort"))), n.setDate(t(this._get(e, r.match(/DD/) ? "dayNames" : "dayNamesShort")) + 20 - n.getDay())), e.input.attr("size", this._formatDate(e, n).length)
  4262.             }
  4263.         },
  4264.         _inlineDatepicker: function(t, i) {
  4265.             var s = e(t);
  4266.             s.hasClass(this.markerClassName) || (s.addClass(this.markerClassName).append(i.dpDiv), e.data(t, r, i), this._setDate(i, this._getDefaultDate(i), !0), this._updateDatepicker(i), this._updateAlternate(i), i.settings.disabled && this._disableDatepicker(t), i.dpDiv.css("display", "block"))
  4267.         },
  4268.         _dialogDatepicker: function(t, i, s, n, o) {
  4269.             var h, l, u, d, c, p = this._dialogInst;
  4270.             return p || (this.uuid += 1, h = "dp" + this.uuid, this._dialogInput = e("<input type='text' id='" + h + "' style='position: absolute; top: -100px; width: 0px;'/>"), this._dialogInput.keydown(this._doKeyDown), e("body").append(this._dialogInput), p = this._dialogInst = this._newInst(this._dialogInput, !1), p.settings = {}, e.data(this._dialogInput[0], r, p)), a(p.settings, n || {}), i = i && i.constructor === Date ? this._formatDate(p, i) : i, this._dialogInput.val(i), this._pos = o ? o.length ? o : [o.pageX, o.pageY] : null, this._pos || (l = document.documentElement.clientWidth, u = document.documentElement.clientHeight, d = document.documentElement.scrollLeft || document.body.scrollLeft, c = document.documentElement.scrollTop || document.body.scrollTop, this._pos = [l / 2 - 100 + d, u / 2 - 150 + c]), this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"), p.settings.onSelect = s, this._inDialog = !0, this.dpDiv.addClass(this._dialogClass), this._showDatepicker(this._dialogInput[0]), e.blockUI && e.blockUI(this.dpDiv), e.data(this._dialogInput[0], r, p), this
  4271.         },
  4272.         _destroyDatepicker: function(t) {
  4273.             var i, s = e(t),
  4274.                 a = e.data(t, r);
  4275.             s.hasClass(this.markerClassName) && (i = t.nodeName.toLowerCase(), e.removeData(t, r), "input" === i ? (a.append.remove(), a.trigger.remove(), s.removeClass(this.markerClassName).unbind("focus", this._showDatepicker).unbind("keydown", this._doKeyDown).unbind("keypress", this._doKeyPress).unbind("keyup", this._doKeyUp)) : ("div" === i || "span" === i) && s.removeClass(this.markerClassName).empty())
  4276.         },
  4277.         _enableDatepicker: function(t) {
  4278.             var i, s, a = e(t),
  4279.                 n = e.data(t, r);
  4280.             a.hasClass(this.markerClassName) && (i = t.nodeName.toLowerCase(), "input" === i ? (t.disabled = !1, n.trigger.filter("button").each(function() {
  4281.                 this.disabled = !1
  4282.             }).end().filter("img").css({
  4283.                 opacity: "1.0",
  4284.                 cursor: ""
  4285.             })) : ("div" === i || "span" === i) && (s = a.children("." + this._inlineClass), s.children().removeClass("ui-state-disabled"), s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !1)), this._disabledInputs = e.map(this._disabledInputs, function(e) {
  4286.                 return e === t ? null : e
  4287.             }))
  4288.         },
  4289.         _disableDatepicker: function(t) {
  4290.             var i, s, a = e(t),
  4291.                 n = e.data(t, r);
  4292.             a.hasClass(this.markerClassName) && (i = t.nodeName.toLowerCase(), "input" === i ? (t.disabled = !0, n.trigger.filter("button").each(function() {
  4293.                 this.disabled = !0
  4294.             }).end().filter("img").css({
  4295.                 opacity: "0.5",
  4296.                 cursor: "default"
  4297.             })) : ("div" === i || "span" === i) && (s = a.children("." + this._inlineClass), s.children().addClass("ui-state-disabled"), s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !0)), this._disabledInputs = e.map(this._disabledInputs, function(e) {
  4298.                 return e === t ? null : e
  4299.             }), this._disabledInputs[this._disabledInputs.length] = t)
  4300.         },
  4301.         _isDisabledDatepicker: function(e) {
  4302.             if (!e) return !1;
  4303.             for (var t = 0; this._disabledInputs.length > t; t++)
  4304.                 if (this._disabledInputs[t] === e) return !0;
  4305.             return !1
  4306.         },
  4307.         _getInst: function(t) {
  4308.             try {
  4309.                 return e.data(t, r)
  4310.             } catch (i) {
  4311.                 throw "Missing instance data for this datepicker"
  4312.             }
  4313.         },
  4314.         _optionDatepicker: function(i, s, n) {
  4315.             var r, o, h, l, u = this._getInst(i);
  4316.             return 2 === arguments.length && "string" == typeof s ? "defaults" === s ? e.extend({}, e.datepicker._defaults) : u ? "all" === s ? e.extend({}, u.settings) : this._get(u, s) : null : (r = s || {}, "string" == typeof s && (r = {}, r[s] = n), u && (this._curInst === u && this._hideDatepicker(), o = this._getDateDatepicker(i, !0), h = this._getMinMaxDate(u, "min"), l = this._getMinMaxDate(u, "max"), a(u.settings, r), null !== h && r.dateFormat !== t && r.minDate === t && (u.settings.minDate = this._formatDate(u, h)), null !== l && r.dateFormat !== t && r.maxDate === t && (u.settings.maxDate = this._formatDate(u, l)), "disabled" in r && (r.disabled ? this._disableDatepicker(i) : this._enableDatepicker(i)), this._attachments(e(i), u), this._autoSize(u), this._setDate(u, o), this._updateAlternate(u), this._updateDatepicker(u)), t)
  4317.         },
  4318.         _changeDatepicker: function(e, t, i) {
  4319.             this._optionDatepicker(e, t, i)
  4320.         },
  4321.         _refreshDatepicker: function(e) {
  4322.             var t = this._getInst(e);
  4323.             t && this._updateDatepicker(t)
  4324.         },
  4325.         _setDateDatepicker: function(e, t) {
  4326.             var i = this._getInst(e);
  4327.             i && (this._setDate(i, t), this._updateDatepicker(i), this._updateAlternate(i))
  4328.         },
  4329.         _getDateDatepicker: function(e, t) {
  4330.             var i = this._getInst(e);
  4331.             return i && !i.inline && this._setDateFromField(i, t), i ? this._getDate(i) : null
  4332.         },
  4333.         _doKeyDown: function(t) {
  4334.             var i, s, a, n = e.datepicker._getInst(t.target),
  4335.                 r = !0,
  4336.                 o = n.dpDiv.is(".ui-datepicker-rtl");
  4337.             if (n._keyEvent = !0, e.datepicker._datepickerShowing) switch (t.keyCode) {
  4338.                 case 9:
  4339.                     e.datepicker._hideDatepicker(), r = !1;
  4340.                     break;
  4341.                 case 13:
  4342.                     return a = e("td." + e.datepicker._dayOverClass + ":not(." + e.datepicker._currentClass + ")", n.dpDiv), a[0] && e.datepicker._selectDay(t.target, n.selectedMonth, n.selectedYear, a[0]), i = e.datepicker._get(n, "onSelect"), i ? (s = e.datepicker._formatDate(n), i.apply(n.input ? n.input[0] : null, [s, n])) : e.datepicker._hideDatepicker(), !1;
  4343.                 case 27:
  4344.                     e.datepicker._hideDatepicker();
  4345.                     break;
  4346.                 case 33:
  4347.                     e.datepicker._adjustDate(t.target, t.ctrlKey ? -e.datepicker._get(n, "stepBigMonths") : -e.datepicker._get(n, "stepMonths"), "M");
  4348.                     break;
  4349.                 case 34:
  4350.                     e.datepicker._adjustDate(t.target, t.ctrlKey ? +e.datepicker._get(n, "stepBigMonths") : +e.datepicker._get(n, "stepMonths"), "M");
  4351.                     break;
  4352.                 case 35:
  4353.                     (t.ctrlKey || t.metaKey) && e.datepicker._clearDate(t.target), r = t.ctrlKey || t.metaKey;
  4354.                     break;
  4355.                 case 36:
  4356.                     (t.ctrlKey || t.metaKey) && e.datepicker._gotoToday(t.target), r = t.ctrlKey || t.metaKey;
  4357.                     break;
  4358.                 case 37:
  4359.                     (t.ctrlKey || t.metaKey) && e.datepicker._adjustDate(t.target, o ? 1 : -1, "D"), r = t.ctrlKey || t.metaKey, t.originalEvent.altKey && e.datepicker._adjustDate(t.target, t.ctrlKey ? -e.datepicker._get(n, "stepBigMonths") : -e.datepicker._get(n, "stepMonths"), "M");
  4360.                     break;
  4361.                 case 38:
  4362.                     (t.ctrlKey || t.metaKey) && e.datepicker._adjustDate(t.target, -7, "D"), r = t.ctrlKey || t.metaKey;
  4363.                     break;
  4364.                 case 39:
  4365.                     (t.ctrlKey || t.metaKey) && e.datepicker._adjustDate(t.target, o ? -1 : 1, "D"), r = t.ctrlKey || t.metaKey, t.originalEvent.altKey && e.datepicker._adjustDate(t.target, t.ctrlKey ? +e.datepicker._get(n, "stepBigMonths") : +e.datepicker._get(n, "stepMonths"), "M");
  4366.                     break;
  4367.                 case 40:
  4368.                     (t.ctrlKey || t.metaKey) && e.datepicker._adjustDate(t.target, 7, "D"), r = t.ctrlKey || t.metaKey;
  4369.                     break;
  4370.                 default:
  4371.                     r = !1
  4372.             } else 36 === t.keyCode && t.ctrlKey ? e.datepicker._showDatepicker(this) : r = !1;
  4373.             r && (t.preventDefault(), t.stopPropagation())
  4374.         },
  4375.         _doKeyPress: function(i) {
  4376.             var s, a, n = e.datepicker._getInst(i.target);
  4377.             return e.datepicker._get(n, "constrainInput") ? (s = e.datepicker._possibleChars(e.datepicker._get(n, "dateFormat")), a = String.fromCharCode(null == i.charCode ? i.keyCode : i.charCode), i.ctrlKey || i.metaKey || " " > a || !s || s.indexOf(a) > -1) : t
  4378.         },
  4379.         _doKeyUp: function(t) {
  4380.             var i, s = e.datepicker._getInst(t.target);
  4381.             if (s.input.val() !== s.lastVal) try {
  4382.                 i = e.datepicker.parseDate(e.datepicker._get(s, "dateFormat"), s.input ? s.input.val() : null, e.datepicker._getFormatConfig(s)), i && (e.datepicker._setDateFromField(s), e.datepicker._updateAlternate(s), e.datepicker._updateDatepicker(s))
  4383.             } catch (a) {}
  4384.             return !0
  4385.         },
  4386.         _showDatepicker: function(t) {
  4387.             if (t = t.target || t, "input" !== t.nodeName.toLowerCase() && (t = e("input", t.parentNode)[0]), !e.datepicker._isDisabledDatepicker(t) && e.datepicker._lastInput !== t) {
  4388.                 var i, s, n, r, o, h, l;
  4389.                 i = e.datepicker._getInst(t), e.datepicker._curInst && e.datepicker._curInst !== i && (e.datepicker._curInst.dpDiv.stop(!0, !0), i && e.datepicker._datepickerShowing && e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])), s = e.datepicker._get(i, "beforeShow"), n = s ? s.apply(t, [t, i]) : {}, n !== !1 && (a(i.settings, n), i.lastVal = null, e.datepicker._lastInput = t, e.datepicker._setDateFromField(i), e.datepicker._inDialog && (t.value = ""), e.datepicker._pos || (e.datepicker._pos = e.datepicker._findPos(t), e.datepicker._pos[1] += t.offsetHeight), r = !1, e(t).parents().each(function() {
  4390.                     return r |= "fixed" === e(this).css("position"), !r
  4391.                 }), o = {
  4392.                     left: e.datepicker._pos[0],
  4393.                     top: e.datepicker._pos[1]
  4394.                 }, e.datepicker._pos = null, i.dpDiv.empty(), i.dpDiv.css({
  4395.                     position: "absolute",
  4396.                     display: "block",
  4397.                     top: "-1000px"
  4398.                 }), e.datepicker._updateDatepicker(i), o = e.datepicker._checkOffset(i, o, r), i.dpDiv.css({
  4399.                     position: e.datepicker._inDialog && e.blockUI ? "static" : r ? "fixed" : "absolute",
  4400.                     display: "none",
  4401.                     left: o.left + "px",
  4402.                     top: o.top + "px"
  4403.                 }), i.inline || (h = e.datepicker._get(i, "showAnim"), l = e.datepicker._get(i, "duration"), i.dpDiv.zIndex(e(t).zIndex() + 1), e.datepicker._datepickerShowing = !0, e.effects && e.effects.effect[h] ? i.dpDiv.show(h, e.datepicker._get(i, "showOptions"), l) : i.dpDiv[h || "show"](h ? l : null), e.datepicker._shouldFocusInput(i) && i.input.focus(), e.datepicker._curInst = i))
  4404.             }
  4405.         },
  4406.         _updateDatepicker: function(t) {
  4407.             this.maxRows = 4, n = t, t.dpDiv.empty().append(this._generateHTML(t)), this._attachHandlers(t), t.dpDiv.find("." + this._dayOverClass + " a").mouseover();
  4408.             var i, s = this._getNumberOfMonths(t),
  4409.                 a = s[1],
  4410.                 r = 17;
  4411.             t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""), a > 1 && t.dpDiv.addClass("ui-datepicker-multi-" + a).css("width", r * a + "em"), t.dpDiv[(1 !== s[0] || 1 !== s[1] ? "add" : "remove") + "Class"]("ui-datepicker-multi"), t.dpDiv[(this._get(t, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl"), t === e.datepicker._curInst && e.datepicker._datepickerShowing && e.datepicker._shouldFocusInput(t) && t.input.focus(), t.yearshtml && (i = t.yearshtml, setTimeout(function() {
  4412.                 i === t.yearshtml && t.yearshtml && t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml), i = t.yearshtml = null
  4413.             }, 0))
  4414.         },
  4415.         _shouldFocusInput: function(e) {
  4416.             return e.input && e.input.is(":visible") && !e.input.is(":disabled") && !e.input.is(":focus")
  4417.         },
  4418.         _checkOffset: function(t, i, s) {
  4419.             var a = t.dpDiv.outerWidth(),
  4420.                 n = t.dpDiv.outerHeight(),
  4421.                 r = t.input ? t.input.outerWidth() : 0,
  4422.                 o = t.input ? t.input.outerHeight() : 0,
  4423.                 h = document.documentElement.clientWidth + (s ? 0 : e(document).scrollLeft()),
  4424.                 l = document.documentElement.clientHeight + (s ? 0 : e(document).scrollTop());
  4425.             return i.left -= this._get(t, "isRTL") ? a - r : 0, i.left -= s && i.left === t.input.offset().left ? e(document).scrollLeft() : 0, i.top -= s && i.top === t.input.offset().top + o ? e(document).scrollTop() : 0, i.left -= Math.min(i.left, i.left + a > h && h > a ? Math.abs(i.left + a - h) : 0), i.top -= Math.min(i.top, i.top + n > l && l > n ? Math.abs(n + o) : 0), i
  4426.         },
  4427.         _findPos: function(t) {
  4428.             for (var i, s = this._getInst(t), a = this._get(s, "isRTL"); t && ("hidden" === t.type || 1 !== t.nodeType || e.expr.filters.hidden(t));) t = t[a ? "previousSibling" : "nextSibling"];
  4429.             return i = e(t).offset(), [i.left, i.top]
  4430.         },
  4431.         _hideDatepicker: function(t) {
  4432.             var i, s, a, n, o = this._curInst;
  4433.             !o || t && o !== e.data(t, r) || this._datepickerShowing && (i = this._get(o, "showAnim"), s = this._get(o, "duration"), a = function() {
  4434.                 e.datepicker._tidyDialog(o)
  4435.             }, e.effects && (e.effects.effect[i] || e.effects[i]) ? o.dpDiv.hide(i, e.datepicker._get(o, "showOptions"), s, a) : o.dpDiv["slideDown" === i ? "slideUp" : "fadeIn" === i ? "fadeOut" : "hide"](i ? s : null, a), i || a(), this._datepickerShowing = !1, n = this._get(o, "onClose"), n && n.apply(o.input ? o.input[0] : null, [o.input ? o.input.val() : "", o]), this._lastInput = null, this._inDialog && (this._dialogInput.css({
  4436.                 position: "absolute",
  4437.                 left: "0",
  4438.                 top: "-100px"
  4439.             }), e.blockUI && (e.unblockUI(), e("body").append(this.dpDiv))), this._inDialog = !1)
  4440.         },
  4441.         _tidyDialog: function(e) {
  4442.             e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")
  4443.         },
  4444.         _checkExternalClick: function(t) {
  4445.             if (e.datepicker._curInst) {
  4446.                 var i = e(t.target),
  4447.                     s = e.datepicker._getInst(i[0]);
  4448.                 (i[0].id !== e.datepicker._mainDivId && 0 === i.parents("#" + e.datepicker._mainDivId).length && !i.hasClass(e.datepicker.markerClassName) && !i.closest("." + e.datepicker._triggerClass).length && e.datepicker._datepickerShowing && (!e.datepicker._inDialog || !e.blockUI) || i.hasClass(e.datepicker.markerClassName) && e.datepicker._curInst !== s) && e.datepicker._hideDatepicker()
  4449.             }
  4450.         },
  4451.         _adjustDate: function(t, i, s) {
  4452.             var a = e(t),
  4453.                 n = this._getInst(a[0]);
  4454.             this._isDisabledDatepicker(a[0]) || (this._adjustInstDate(n, i + ("M" === s ? this._get(n, "showCurrentAtPos") : 0), s), this._updateDatepicker(n))
  4455.         },
  4456.         _gotoToday: function(t) {
  4457.             var i, s = e(t),
  4458.                 a = this._getInst(s[0]);
  4459.             this._get(a, "gotoCurrent") && a.currentDay ? (a.selectedDay = a.currentDay, a.drawMonth = a.selectedMonth = a.currentMonth, a.drawYear = a.selectedYear = a.currentYear) : (i = new Date, a.selectedDay = i.getDate(), a.drawMonth = a.selectedMonth = i.getMonth(), a.drawYear = a.selectedYear = i.getFullYear()), this._notifyChange(a), this._adjustDate(s)
  4460.         },
  4461.         _selectMonthYear: function(t, i, s) {
  4462.             var a = e(t),
  4463.                 n = this._getInst(a[0]);
  4464.             n["selected" + ("M" === s ? "Month" : "Year")] = n["draw" + ("M" === s ? "Month" : "Year")] = parseInt(i.options[i.selectedIndex].value, 10), this._notifyChange(n), this._adjustDate(a)
  4465.         },
  4466.         _selectDay: function(t, i, s, a) {
  4467.             var n, r = e(t);
  4468.             e(a).hasClass(this._unselectableClass) || this._isDisabledDatepicker(r[0]) || (n = this._getInst(r[0]), n.selectedDay = n.currentDay = e("a", a).html(), n.selectedMonth = n.currentMonth = i, n.selectedYear = n.currentYear = s, this._selectDate(t, this._formatDate(n, n.currentDay, n.currentMonth, n.currentYear)))
  4469.         },
  4470.         _clearDate: function(t) {
  4471.             var i = e(t);
  4472.             this._selectDate(i, "")
  4473.         },
  4474.         _selectDate: function(t, i) {
  4475.             var s, a = e(t),
  4476.                 n = this._getInst(a[0]);
  4477.             i = null != i ? i : this._formatDate(n), n.input && n.input.val(i), this._updateAlternate(n), s = this._get(n, "onSelect"), s ? s.apply(n.input ? n.input[0] : null, [i, n]) : n.input && n.input.trigger("change"), n.inline ? this._updateDatepicker(n) : (this._hideDatepicker(), this._lastInput = n.input[0], "object" != typeof n.input[0] && n.input.focus(), this._lastInput = null)
  4478.         },
  4479.         _updateAlternate: function(t) {
  4480.             var i, s, a, n = this._get(t, "altField");
  4481.             n && (i = this._get(t, "altFormat") || this._get(t, "dateFormat"), s = this._getDate(t), a = this.formatDate(i, s, this._getFormatConfig(t)), e(n).each(function() {
  4482.                 e(this).val(a)
  4483.             }))
  4484.         },
  4485.         noWeekends: function(e) {
  4486.             var t = e.getDay();
  4487.             return [t > 0 && 6 > t, ""]
  4488.         },
  4489.         iso8601Week: function(e) {
  4490.             var t, i = new Date(e.getTime());
  4491.             return i.setDate(i.getDate() + 4 - (i.getDay() || 7)), t = i.getTime(), i.setMonth(0), i.setDate(1), Math.floor(Math.round((t - i) / 864e5) / 7) + 1
  4492.         },
  4493.         parseDate: function(i, s, a) {
  4494.             if (null == i || null == s) throw "Invalid arguments";
  4495.             if (s = "object" == typeof s ? "" + s : s + "", "" === s) return null;
  4496.             var n, r, o, h, l = 0,
  4497.                 u = (a ? a.shortYearCutoff : null) || this._defaults.shortYearCutoff,
  4498.                 d = "string" != typeof u ? u : (new Date).getFullYear() % 100 + parseInt(u, 10),
  4499.                 c = (a ? a.dayNamesShort : null) || this._defaults.dayNamesShort,
  4500.                 p = (a ? a.dayNames : null) || this._defaults.dayNames,
  4501.                 m = (a ? a.monthNamesShort : null) || this._defaults.monthNamesShort,
  4502.                 f = (a ? a.monthNames : null) || this._defaults.monthNames,
  4503.                 g = -1,
  4504.                 v = -1,
  4505.                 y = -1,
  4506.                 b = -1,
  4507.                 _ = !1,
  4508.                 x = function(e) {
  4509.                     var t = i.length > n + 1 && i.charAt(n + 1) === e;
  4510.                     return t && n++, t
  4511.                 },
  4512.                 k = function(e) {
  4513.                     var t = x(e),
  4514.                         i = "@" === e ? 14 : "!" === e ? 20 : "y" === e && t ? 4 : "o" === e ? 3 : 2,
  4515.                         a = RegExp("^\\d{1," + i + "}"),
  4516.                         n = s.substring(l).match(a);
  4517.                     if (!n) throw "Missing number at position " + l;
  4518.                     return l += n[0].length, parseInt(n[0], 10)
  4519.                 },
  4520.                 w = function(i, a, n) {
  4521.                     var r = -1,
  4522.                         o = e.map(x(i) ? n : a, function(e, t) {
  4523.                             return [
  4524.                                 [t, e]
  4525.                             ]
  4526.                         }).sort(function(e, t) {
  4527.                             return -(e[1].length - t[1].length)
  4528.                         });
  4529.                     if (e.each(o, function(e, i) {
  4530.                             var a = i[1];
  4531.                             return s.substr(l, a.length).toLowerCase() === a.toLowerCase() ? (r = i[0], l += a.length, !1) : t
  4532.                         }), -1 !== r) return r + 1;
  4533.                     throw "Unknown name at position " + l
  4534.                 },
  4535.                 D = function() {
  4536.                     if (s.charAt(l) !== i.charAt(n)) throw "Unexpected literal at position " + l;
  4537.                     l++
  4538.                 };
  4539.             for (n = 0; i.length > n; n++)
  4540.                 if (_) "'" !== i.charAt(n) || x("'") ? D() : _ = !1;
  4541.                 else switch (i.charAt(n)) {
  4542.                     case "d":
  4543.                         y = k("d");
  4544.                         break;
  4545.                     case "D":
  4546.                         w("D", c, p);
  4547.                         break;
  4548.                     case "o":
  4549.                         b = k("o");
  4550.                         break;
  4551.                     case "m":
  4552.                         v = k("m");
  4553.                         break;
  4554.                     case "M":
  4555.                         v = w("M", m, f);
  4556.                         break;
  4557.                     case "y":
  4558.                         g = k("y");
  4559.                         break;
  4560.                     case "@":
  4561.                         h = new Date(k("@")), g = h.getFullYear(), v = h.getMonth() + 1, y = h.getDate();
  4562.                         break;
  4563.                     case "!":
  4564.                         h = new Date((k("!") - this._ticksTo1970) / 1e4), g = h.getFullYear(), v = h.getMonth() + 1, y = h.getDate();
  4565.                         break;
  4566.                     case "'":
  4567.                         x("'") ? D() : _ = !0;
  4568.                         break;
  4569.                     default:
  4570.                         D()
  4571.                 }
  4572.                 if (s.length > l && (o = s.substr(l), !/^\s+/.test(o))) throw "Extra/unparsed characters found in date: " + o;
  4573.             if (-1 === g ? g = (new Date).getFullYear() : 100 > g && (g += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (d >= g ? 0 : -100)), b > -1)
  4574.                 for (v = 1, y = b;;) {
  4575.                     if (r = this._getDaysInMonth(g, v - 1), r >= y) break;
  4576.                     v++, y -= r
  4577.                 }
  4578.             if (h = this._daylightSavingAdjust(new Date(g, v - 1, y)), h.getFullYear() !== g || h.getMonth() + 1 !== v || h.getDate() !== y) throw "Invalid date";
  4579.             return h
  4580.         },
  4581.         ATOM: "yy-mm-dd",
  4582.         COOKIE: "D, dd M yy",
  4583.         ISO_8601: "yy-mm-dd",
  4584.         RFC_822: "D, d M y",
  4585.         RFC_850: "DD, dd-M-y",
  4586.         RFC_1036: "D, d M y",
  4587.         RFC_1123: "D, d M yy",
  4588.         RFC_2822: "D, d M yy",
  4589.         RSS: "D, d M y",
  4590.         TICKS: "!",
  4591.         TIMESTAMP: "@",
  4592.         W3C: "yy-mm-dd",
  4593.         _ticksTo1970: 1e7 * 60 * 60 * 24 * (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)),
  4594.         formatDate: function(e, t, i) {
  4595.             if (!t) return "";
  4596.             var s, a = (i ? i.dayNamesShort : null) || this._defaults.dayNamesShort,
  4597.                 n = (i ? i.dayNames : null) || this._defaults.dayNames,
  4598.                 r = (i ? i.monthNamesShort : null) || this._defaults.monthNamesShort,
  4599.                 o = (i ? i.monthNames : null) || this._defaults.monthNames,
  4600.                 h = function(t) {
  4601.                     var i = e.length > s + 1 && e.charAt(s + 1) === t;
  4602.                     return i && s++, i
  4603.                 },
  4604.                 l = function(e, t, i) {
  4605.                     var s = "" + t;
  4606.                     if (h(e))
  4607.                         for (; i > s.length;) s = "0" + s;
  4608.                     return s
  4609.                 },
  4610.                 u = function(e, t, i, s) {
  4611.                     return h(e) ? s[t] : i[t]
  4612.                 },
  4613.                 d = "",
  4614.                 c = !1;
  4615.             if (t)
  4616.                 for (s = 0; e.length > s; s++)
  4617.                     if (c) "'" !== e.charAt(s) || h("'") ? d += e.charAt(s) : c = !1;
  4618.                     else switch (e.charAt(s)) {
  4619.                         case "d":
  4620.                             d += l("d", t.getDate(), 2);
  4621.                             break;
  4622.                         case "D":
  4623.                             d += u("D", t.getDay(), a, n);
  4624.                             break;
  4625.                         case "o":
  4626.                             d += l("o", Math.round((new Date(t.getFullYear(), t.getMonth(), t.getDate()).getTime() - new Date(t.getFullYear(), 0, 0).getTime()) / 864e5), 3);
  4627.                             break;
  4628.                         case "m":
  4629.                             d += l("m", t.getMonth() + 1, 2);
  4630.                             break;
  4631.                         case "M":
  4632.                             d += u("M", t.getMonth(), r, o);
  4633.                             break;
  4634.                         case "y":
  4635.                             d += h("y") ? t.getFullYear() : (10 > t.getYear() % 100 ? "0" : "") + t.getYear() % 100;
  4636.                             break;
  4637.                         case "@":
  4638.                             d += t.getTime();
  4639.                             break;
  4640.                         case "!":
  4641.                             d += 1e4 * t.getTime() + this._ticksTo1970;
  4642.                             break;
  4643.                         case "'":
  4644.                             h("'") ? d += "'" : c = !0;
  4645.                             break;
  4646.                         default:
  4647.                             d += e.charAt(s)
  4648.                     }
  4649.                     return d
  4650.         },
  4651.         _possibleChars: function(e) {
  4652.             var t, i = "",
  4653.                 s = !1,
  4654.                 a = function(i) {
  4655.                     var s = e.length > t + 1 && e.charAt(t + 1) === i;
  4656.                     return s && t++, s
  4657.                 };
  4658.             for (t = 0; e.length > t; t++)
  4659.                 if (s) "'" !== e.charAt(t) || a("'") ? i += e.charAt(t) : s = !1;
  4660.                 else switch (e.charAt(t)) {
  4661.                     case "d":
  4662.                     case "m":
  4663.                     case "y":
  4664.                     case "@":
  4665.                         i += "0123456789";
  4666.                         break;
  4667.                     case "D":
  4668.                     case "M":
  4669.                         return null;
  4670.                     case "'":
  4671.                         a("'") ? i += "'" : s = !0;
  4672.                         break;
  4673.                     default:
  4674.                         i += e.charAt(t)
  4675.                 }
  4676.                 return i
  4677.         },
  4678.         _get: function(e, i) {
  4679.             return e.settings[i] !== t ? e.settings[i] : this._defaults[i]
  4680.         },
  4681.         _setDateFromField: function(e, t) {
  4682.             if (e.input.val() !== e.lastVal) {
  4683.                 var i = this._get(e, "dateFormat"),
  4684.                     s = e.lastVal = e.input ? e.input.val() : null,
  4685.                     a = this._getDefaultDate(e),
  4686.                     n = a,
  4687.                     r = this._getFormatConfig(e);
  4688.                 try {
  4689.                     n = this.parseDate(i, s, r) || a
  4690.                 } catch (o) {
  4691.                     s = t ? "" : s
  4692.                 }
  4693.                 e.selectedDay = n.getDate(), e.drawMonth = e.selectedMonth = n.getMonth(), e.drawYear = e.selectedYear = n.getFullYear(), e.currentDay = s ? n.getDate() : 0, e.currentMonth = s ? n.getMonth() : 0, e.currentYear = s ? n.getFullYear() : 0, this._adjustInstDate(e)
  4694.             }
  4695.         },
  4696.         _getDefaultDate: function(e) {
  4697.             return this._restrictMinMax(e, this._determineDate(e, this._get(e, "defaultDate"), new Date))
  4698.         },
  4699.         _determineDate: function(t, i, s) {
  4700.             var a = function(e) {
  4701.                     var t = new Date;
  4702.                     return t.setDate(t.getDate() + e), t
  4703.                 },
  4704.                 n = function(i) {
  4705.                     try {
  4706.                         return e.datepicker.parseDate(e.datepicker._get(t, "dateFormat"), i, e.datepicker._getFormatConfig(t))
  4707.                     } catch (s) {}
  4708.                     for (var a = (i.toLowerCase().match(/^c/) ? e.datepicker._getDate(t) : null) || new Date, n = a.getFullYear(), r = a.getMonth(), o = a.getDate(), h = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, l = h.exec(i); l;) {
  4709.                         switch (l[2] || "d") {
  4710.                             case "d":
  4711.                             case "D":
  4712.                                 o += parseInt(l[1], 10);
  4713.                                 break;
  4714.                             case "w":
  4715.                             case "W":
  4716.                                 o += 7 * parseInt(l[1], 10);
  4717.                                 break;
  4718.                             case "m":
  4719.                             case "M":
  4720.                                 r += parseInt(l[1], 10), o = Math.min(o, e.datepicker._getDaysInMonth(n, r));
  4721.                                 break;
  4722.                             case "y":
  4723.                             case "Y":
  4724.                                 n += parseInt(l[1], 10), o = Math.min(o, e.datepicker._getDaysInMonth(n, r))
  4725.                         }
  4726.                         l = h.exec(i)
  4727.                     }
  4728.                     return new Date(n, r, o)
  4729.                 },
  4730.                 r = null == i || "" === i ? s : "string" == typeof i ? n(i) : "number" == typeof i ? isNaN(i) ? s : a(i) : new Date(i.getTime());
  4731.             return r = r && "Invalid Date" == "" + r ? s : r, r && (r.setHours(0), r.setMinutes(0), r.setSeconds(0), r.setMilliseconds(0)), this._daylightSavingAdjust(r)
  4732.         },
  4733.         _daylightSavingAdjust: function(e) {
  4734.             return e ? (e.setHours(e.getHours() > 12 ? e.getHours() + 2 : 0), e) : null
  4735.         },
  4736.         _setDate: function(e, t, i) {
  4737.             var s = !t,
  4738.                 a = e.selectedMonth,
  4739.                 n = e.selectedYear,
  4740.                 r = this._restrictMinMax(e, this._determineDate(e, t, new Date));
  4741.             e.selectedDay = e.currentDay = r.getDate(), e.drawMonth = e.selectedMonth = e.currentMonth = r.getMonth(), e.drawYear = e.selectedYear = e.currentYear = r.getFullYear(), a === e.selectedMonth && n === e.selectedYear || i || this._notifyChange(e), this._adjustInstDate(e), e.input && e.input.val(s ? "" : this._formatDate(e))
  4742.         },
  4743.         _getDate: function(e) {
  4744.             var t = !e.currentYear || e.input && "" === e.input.val() ? null : this._daylightSavingAdjust(new Date(e.currentYear, e.currentMonth, e.currentDay));
  4745.             return t
  4746.         },
  4747.         _attachHandlers: function(t) {
  4748.             var i = this._get(t, "stepMonths"),
  4749.                 s = "#" + t.id.replace(/\\\\/g, "\\");
  4750.             t.dpDiv.find("[data-handler]").map(function() {
  4751.                 var t = {
  4752.                     prev: function() {
  4753.                         e.datepicker._adjustDate(s, -i, "M")
  4754.                     },
  4755.                     next: function() {
  4756.                         e.datepicker._adjustDate(s, +i, "M")
  4757.                     },
  4758.                     hide: function() {
  4759.                         e.datepicker._hideDatepicker()
  4760.                     },
  4761.                     today: function() {
  4762.                         e.datepicker._gotoToday(s)
  4763.                     },
  4764.                     selectDay: function() {
  4765.                         return e.datepicker._selectDay(s, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this), !1
  4766.                     },
  4767.                     selectMonth: function() {
  4768.                         return e.datepicker._selectMonthYear(s, this, "M"), !1
  4769.                     },
  4770.                     selectYear: function() {
  4771.                         return e.datepicker._selectMonthYear(s, this, "Y"), !1
  4772.                     }
  4773.                 };
  4774.                 e(this).bind(this.getAttribute("data-event"), t[this.getAttribute("data-handler")])
  4775.             })
  4776.         },
  4777.         _generateHTML: function(e) {
  4778.             var t, i, s, a, n, r, o, h, l, u, d, c, p, m, f, g, v, y, b, _, x, k, w, D, T, S, M, N, C, A, P, I, F, H, z, E, j, L, O, W = new Date,
  4779.                 R = this._daylightSavingAdjust(new Date(W.getFullYear(), W.getMonth(), W.getDate())),
  4780.                 Y = this._get(e, "isRTL"),
  4781.                 J = this._get(e, "showButtonPanel"),
  4782.                 B = this._get(e, "hideIfNoPrevNext"),
  4783.                 K = this._get(e, "navigationAsDateFormat"),
  4784.                 V = this._getNumberOfMonths(e),
  4785.                 U = this._get(e, "showCurrentAtPos"),
  4786.                 q = this._get(e, "stepMonths"),
  4787.                 G = 1 !== V[0] || 1 !== V[1],
  4788.                 Q = this._daylightSavingAdjust(e.currentDay ? new Date(e.currentYear, e.currentMonth, e.currentDay) : new Date(9999, 9, 9)),
  4789.                 $ = this._getMinMaxDate(e, "min"),
  4790.                 X = this._getMinMaxDate(e, "max"),
  4791.                 Z = e.drawMonth - U,
  4792.                 et = e.drawYear;
  4793.             if (0 > Z && (Z += 12, et--), X)
  4794.                 for (t = this._daylightSavingAdjust(new Date(X.getFullYear(), X.getMonth() - V[0] * V[1] + 1, X.getDate())), t = $ && $ > t ? $ : t; this._daylightSavingAdjust(new Date(et, Z, 1)) > t;) Z--, 0 > Z && (Z = 11, et--);
  4795.             for (e.drawMonth = Z, e.drawYear = et, i = this._get(e, "prevText"), i = K ? this.formatDate(i, this._daylightSavingAdjust(new Date(et, Z - q, 1)), this._getFormatConfig(e)) : i, s = this._canAdjustMonth(e, -1, et, Z) ? "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='" + i + "'><span class='ui-icon ui-icon-circle-triangle-" + (Y ? "e" : "w") + "'>" + i + "</span></a>" : B ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='" + i + "'><span class='ui-icon ui-icon-circle-triangle-" + (Y ? "e" : "w") + "'>" + i + "</span></a>", a = this._get(e, "nextText"), a = K ? this.formatDate(a, this._daylightSavingAdjust(new Date(et, Z + q, 1)), this._getFormatConfig(e)) : a, n = this._canAdjustMonth(e, 1, et, Z) ? "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='" + a + "'><span class='ui-icon ui-icon-circle-triangle-" + (Y ? "w" : "e") + "'>" + a + "</span></a>" : B ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='" + a + "'><span class='ui-icon ui-icon-circle-triangle-" + (Y ? "w" : "e") + "'>" + a + "</span></a>", r = this._get(e, "currentText"), o = this._get(e, "gotoCurrent") && e.currentDay ? Q : R, r = K ? this.formatDate(r, o, this._getFormatConfig(e)) : r, h = e.inline ? "" : "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" + this._get(e, "closeText") + "</button>", l = J ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (Y ? h : "") + (this._isInRange(e, o) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>" + r + "</button>" : "") + (Y ? "" : h) + "</div>" : "", u = parseInt(this._get(e, "firstDay"), 10), u = isNaN(u) ? 0 : u, d = this._get(e, "showWeek"), c = this._get(e, "dayNames"), p = this._get(e, "dayNamesMin"), m = this._get(e, "monthNames"), f = this._get(e, "monthNamesShort"), g = this._get(e, "beforeShowDay"), v = this._get(e, "showOtherMonths"), y = this._get(e, "selectOtherMonths"), b = this._getDefaultDate(e), _ = "", k = 0; V[0] > k; k++) {
  4796.                 for (w = "", this.maxRows = 4, D = 0; V[1] > D; D++) {
  4797.                     if (T = this._daylightSavingAdjust(new Date(et, Z, e.selectedDay)), S = " ui-corner-all", M = "", G) {
  4798.                         if (M += "<div class='ui-datepicker-group", V[1] > 1) switch (D) {
  4799.                             case 0:
  4800.                                 M += " ui-datepicker-group-first", S = " ui-corner-" + (Y ? "right" : "left");
  4801.                                 break;
  4802.                             case V[1] - 1:
  4803.                                 M += " ui-datepicker-group-last", S = " ui-corner-" + (Y ? "left" : "right");
  4804.                                 break;
  4805.                             default:
  4806.                                 M += " ui-datepicker-group-middle", S = ""
  4807.                         }
  4808.                         M += "'>"
  4809.                     }
  4810.                     for (M += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + S + "'>" + (/all|left/.test(S) && 0 === k ? Y ? n : s : "") + (/all|right/.test(S) && 0 === k ? Y ? s : n : "") + this._generateMonthYearHeader(e, Z, et, $, X, k > 0 || D > 0, m, f) + "</div><table class='ui-datepicker-calendar'><thead>" + "<tr>", N = d ? "<th class='ui-datepicker-week-col'>" + this._get(e, "weekHeader") + "</th>" : "", x = 0; 7 > x; x++) C = (x + u) % 7, N += "<th" + ((x + u + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + ">" + "<span title='" + c[C] + "'>" + p[C] + "</span></th>";
  4811.                     for (M += N + "</tr></thead><tbody>", A = this._getDaysInMonth(et, Z), et === e.selectedYear && Z === e.selectedMonth && (e.selectedDay = Math.min(e.selectedDay, A)), P = (this._getFirstDayOfMonth(et, Z) - u + 7) % 7, I = Math.ceil((P + A) / 7), F = G ? this.maxRows > I ? this.maxRows : I : I, this.maxRows = F, H = this._daylightSavingAdjust(new Date(et, Z, 1 - P)), z = 0; F > z; z++) {
  4812.                         for (M += "<tr>", E = d ? "<td class='ui-datepicker-week-col'>" + this._get(e, "calculateWeek")(H) + "</td>" : "", x = 0; 7 > x; x++) j = g ? g.apply(e.input ? e.input[0] : null, [H]) : [!0, ""], L = H.getMonth() !== Z, O = L && !y || !j[0] || $ && $ > H || X && H > X, E += "<td class='" + ((x + u + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + (L ? " ui-datepicker-other-month" : "") + (H.getTime() === T.getTime() && Z === e.selectedMonth && e._keyEvent || b.getTime() === H.getTime() && b.getTime() === T.getTime() ? " " + this._dayOverClass : "") + (O ? " " + this._unselectableClass + " ui-state-disabled" : "") + (L && !v ? "" : " " + j[1] + (H.getTime() === Q.getTime() ? " " + this._currentClass : "") + (H.getTime() === R.getTime() ? " ui-datepicker-today" : "")) + "'" + (L && !v || !j[2] ? "" : " title='" + j[2].replace(/'/g, "&#39;") + "'") + (O ? "" : " data-handler='selectDay' data-event='click' data-month='" + H.getMonth() + "' data-year='" + H.getFullYear() + "'") + ">" + (L && !v ? "&#xa0;" : O ? "<span class='ui-state-default'>" + H.getDate() + "</span>" : "<a class='ui-state-default" + (H.getTime() === R.getTime() ? " ui-state-highlight" : "") + (H.getTime() === Q.getTime() ? " ui-state-active" : "") + (L ? " ui-priority-secondary" : "") + "' href='#'>" + H.getDate() + "</a>") + "</td>", H.setDate(H.getDate() + 1), H = this._daylightSavingAdjust(H);
  4813.                         M += E + "</tr>"
  4814.                     }
  4815.                     Z++, Z > 11 && (Z = 0, et++), M += "</tbody></table>" + (G ? "</div>" + (V[0] > 0 && D === V[1] - 1 ? "<div class='ui-datepicker-row-break'></div>" : "") : ""), w += M
  4816.                 }
  4817.                 _ += w
  4818.             }
  4819.             return _ += l, e._keyEvent = !1, _
  4820.         },
  4821.         _generateMonthYearHeader: function(e, t, i, s, a, n, r, o) {
  4822.             var h, l, u, d, c, p, m, f, g = this._get(e, "changeMonth"),
  4823.                 v = this._get(e, "changeYear"),
  4824.                 y = this._get(e, "showMonthAfterYear"),
  4825.                 b = "<div class='ui-datepicker-title'>",
  4826.                 _ = "";
  4827.             if (n || !g) _ += "<span class='ui-datepicker-month'>" + r[t] + "</span>";
  4828.             else {
  4829.                 for (h = s && s.getFullYear() === i, l = a && a.getFullYear() === i, _ += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>", u = 0; 12 > u; u++)(!h || u >= s.getMonth()) && (!l || a.getMonth() >= u) && (_ += "<option value='" + u + "'" + (u === t ? " selected='selected'" : "") + ">" + o[u] + "</option>");
  4830.                 _ += "</select>"
  4831.             }
  4832.             if (y || (b += _ + (!n && g && v ? "" : "&#xa0;")), !e.yearshtml)
  4833.                 if (e.yearshtml = "", n || !v) b += "<span class='ui-datepicker-year'>" + i + "</span>";
  4834.                 else {
  4835.                     for (d = this._get(e, "yearRange").split(":"), c = (new Date).getFullYear(), p = function(e) {
  4836.                             var t = e.match(/c[+\-].*/) ? i + parseInt(e.substring(1), 10) : e.match(/[+\-].*/) ? c + parseInt(e, 10) : parseInt(e, 10);
  4837.                             return isNaN(t) ? c : t
  4838.                         }, m = p(d[0]), f = Math.max(m, p(d[1] || "")), m = s ? Math.max(m, s.getFullYear()) : m, f = a ? Math.min(f, a.getFullYear()) : f, e.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>"; f >= m; m++) e.yearshtml += "<option value='" + m + "'" + (m === i ? " selected='selected'" : "") + ">" + m + "</option>";
  4839.                     e.yearshtml += "</select>", b += e.yearshtml, e.yearshtml = null
  4840.                 }
  4841.             return b += this._get(e, "yearSuffix"), y && (b += (!n && g && v ? "" : "&#xa0;") + _), b += "</div>"
  4842.         },
  4843.         _adjustInstDate: function(e, t, i) {
  4844.             var s = e.drawYear + ("Y" === i ? t : 0),
  4845.                 a = e.drawMonth + ("M" === i ? t : 0),
  4846.                 n = Math.min(e.selectedDay, this._getDaysInMonth(s, a)) + ("D" === i ? t : 0),
  4847.                 r = this._restrictMinMax(e, this._daylightSavingAdjust(new Date(s, a, n)));
  4848.             e.selectedDay = r.getDate(), e.drawMonth = e.selectedMonth = r.getMonth(), e.drawYear = e.selectedYear = r.getFullYear(), ("M" === i || "Y" === i) && this._notifyChange(e)
  4849.         },
  4850.         _restrictMinMax: function(e, t) {
  4851.             var i = this._getMinMaxDate(e, "min"),
  4852.                 s = this._getMinMaxDate(e, "max"),
  4853.                 a = i && i > t ? i : t;
  4854.             return s && a > s ? s : a
  4855.         },
  4856.         _notifyChange: function(e) {
  4857.             var t = this._get(e, "onChangeMonthYear");
  4858.             t && t.apply(e.input ? e.input[0] : null, [e.selectedYear, e.selectedMonth + 1, e])
  4859.         },
  4860.         _getNumberOfMonths: function(e) {
  4861.             var t = this._get(e, "numberOfMonths");
  4862.             return null == t ? [1, 1] : "number" == typeof t ? [1, t] : t
  4863.         },
  4864.         _getMinMaxDate: function(e, t) {
  4865.             return this._determineDate(e, this._get(e, t + "Date"), null)
  4866.         },
  4867.         _getDaysInMonth: function(e, t) {
  4868.             return 32 - this._daylightSavingAdjust(new Date(e, t, 32)).getDate()
  4869.         },
  4870.         _getFirstDayOfMonth: function(e, t) {
  4871.             return new Date(e, t, 1).getDay()
  4872.         },
  4873.         _canAdjustMonth: function(e, t, i, s) {
  4874.             var a = this._getNumberOfMonths(e),
  4875.                 n = this._daylightSavingAdjust(new Date(i, s + (0 > t ? t : a[0] * a[1]), 1));
  4876.             return 0 > t && n.setDate(this._getDaysInMonth(n.getFullYear(), n.getMonth())), this._isInRange(e, n)
  4877.         },
  4878.         _isInRange: function(e, t) {
  4879.             var i, s, a = this._getMinMaxDate(e, "min"),
  4880.                 n = this._getMinMaxDate(e, "max"),
  4881.                 r = null,
  4882.                 o = null,
  4883.                 h = this._get(e, "yearRange");
  4884.             return h && (i = h.split(":"), s = (new Date).getFullYear(), r = parseInt(i[0], 10), o = parseInt(i[1], 10), i[0].match(/[+\-].*/) && (r += s), i[1].match(/[+\-].*/) && (o += s)), (!a || t.getTime() >= a.getTime()) && (!n || t.getTime() <= n.getTime()) && (!r || t.getFullYear() >= r) && (!o || o >= t.getFullYear())
  4885.         },
  4886.         _getFormatConfig: function(e) {
  4887.             var t = this._get(e, "shortYearCutoff");
  4888.             return t = "string" != typeof t ? t : (new Date).getFullYear() % 100 + parseInt(t, 10), {
  4889.                 shortYearCutoff: t,
  4890.                 dayNamesShort: this._get(e, "dayNamesShort"),
  4891.                 dayNames: this._get(e, "dayNames"),
  4892.                 monthNamesShort: this._get(e, "monthNamesShort"),
  4893.                 monthNames: this._get(e, "monthNames")
  4894.             }
  4895.         },
  4896.         _formatDate: function(e, t, i, s) {
  4897.             t || (e.currentDay = e.selectedDay, e.currentMonth = e.selectedMonth, e.currentYear = e.selectedYear);
  4898.             var a = t ? "object" == typeof t ? t : this._daylightSavingAdjust(new Date(s, i, t)) : this._daylightSavingAdjust(new Date(e.currentYear, e.currentMonth, e.currentDay));
  4899.             return this.formatDate(this._get(e, "dateFormat"), a, this._getFormatConfig(e))
  4900.         }
  4901.     }), e.fn.datepicker = function(t) {
  4902.         if (!this.length) return this;
  4903.         e.datepicker.initialized || (e(document).mousedown(e.datepicker._checkExternalClick), e.datepicker.initialized = !0), 0 === e("#" + e.datepicker._mainDivId).length && e("body").append(e.datepicker.dpDiv);
  4904.         var i = Array.prototype.slice.call(arguments, 1);
  4905.         return "string" != typeof t || "isDisabled" !== t && "getDate" !== t && "widget" !== t ? "option" === t && 2 === arguments.length && "string" == typeof arguments[1] ? e.datepicker["_" + t + "Datepicker"].apply(e.datepicker, [this[0]].concat(i)) : this.each(function() {
  4906.             "string" == typeof t ? e.datepicker["_" + t + "Datepicker"].apply(e.datepicker, [this].concat(i)) : e.datepicker._attachDatepicker(this, t)
  4907.         }) : e.datepicker["_" + t + "Datepicker"].apply(e.datepicker, [this[0]].concat(i))
  4908.     }, e.datepicker = new i, e.datepicker.initialized = !1, e.datepicker.uuid = (new Date).getTime(), e.datepicker.version = "1.10.4"
  4909. })(jQuery);
  4910. (function(e) {
  4911.     var t = {
  4912.             buttons: !0,
  4913.             height: !0,
  4914.             maxHeight: !0,
  4915.             maxWidth: !0,
  4916.             minHeight: !0,
  4917.             minWidth: !0,
  4918.             width: !0
  4919.         },
  4920.         i = {
  4921.             maxHeight: !0,
  4922.             maxWidth: !0,
  4923.             minHeight: !0,
  4924.             minWidth: !0
  4925.         };
  4926.     e.widget("ui.dialog", {
  4927.         version: "1.10.4",
  4928.         options: {
  4929.             appendTo: "body",
  4930.             autoOpen: !0,
  4931.             buttons: [],
  4932.             closeOnEscape: !0,
  4933.             closeText: "close",
  4934.             dialogClass: "",
  4935.             draggable: !0,
  4936.             hide: null,
  4937.             height: "auto",
  4938.             maxHeight: null,
  4939.             maxWidth: null,
  4940.             minHeight: 150,
  4941.             minWidth: 150,
  4942.             modal: !1,
  4943.             position: {
  4944.                 my: "center",
  4945.                 at: "center",
  4946.                 of: window,
  4947.                 collision: "fit",
  4948.                 using: function(t) {
  4949.                     var i = e(this).css(t).offset().top;
  4950.                     0 > i && e(this).css("top", t.top - i)
  4951.                 }
  4952.             },
  4953.             resizable: !0,
  4954.             show: null,
  4955.             title: null,
  4956.             width: 300,
  4957.             beforeClose: null,
  4958.             close: null,
  4959.             drag: null,
  4960.             dragStart: null,
  4961.             dragStop: null,
  4962.             focus: null,
  4963.             open: null,
  4964.             resize: null,
  4965.             resizeStart: null,
  4966.             resizeStop: null
  4967.         },
  4968.         _create: function() {
  4969.             this.originalCss = {
  4970.                 display: this.element[0].style.display,
  4971.                 width: this.element[0].style.width,
  4972.                 minHeight: this.element[0].style.minHeight,
  4973.                 maxHeight: this.element[0].style.maxHeight,
  4974.                 height: this.element[0].style.height
  4975.             }, this.originalPosition = {
  4976.                 parent: this.element.parent(),
  4977.                 index: this.element.parent().children().index(this.element)
  4978.             }, this.originalTitle = this.element.attr("title"), this.options.title = this.options.title || this.originalTitle, this._createWrapper(), this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog), this._createTitlebar(), this._createButtonPane(), this.options.draggable && e.fn.draggable && this._makeDraggable(), this.options.resizable && e.fn.resizable && this._makeResizable(), this._isOpen = !1
  4979.         },
  4980.         _init: function() {
  4981.             this.options.autoOpen && this.open()
  4982.         },
  4983.         _appendTo: function() {
  4984.             var t = this.options.appendTo;
  4985.             return t && (t.jquery || t.nodeType) ? e(t) : this.document.find(t || "body").eq(0)
  4986.         },
  4987.         _destroy: function() {
  4988.             var e, t = this.originalPosition;
  4989.             this._destroyOverlay(), this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(), this.uiDialog.stop(!0, !0).remove(), this.originalTitle && this.element.attr("title", this.originalTitle), e = t.parent.children().eq(t.index), e.length && e[0] !== this.element[0] ? e.before(this.element) : t.parent.append(this.element)
  4990.         },
  4991.         widget: function() {
  4992.             return this.uiDialog
  4993.         },
  4994.         disable: e.noop,
  4995.         enable: e.noop,
  4996.         close: function(t) {
  4997.             var i, s = this;
  4998.             if (this._isOpen && this._trigger("beforeClose", t) !== !1) {
  4999.                 if (this._isOpen = !1, this._destroyOverlay(), !this.opener.filter(":focusable").focus().length) try {
  5000.                     i = this.document[0].activeElement, i && "body" !== i.nodeName.toLowerCase() && e(i).blur()
  5001.                 } catch (a) {}
  5002.                 this._hide(this.uiDialog, this.options.hide, function() {
  5003.                     s._trigger("close", t)
  5004.                 })
  5005.             }
  5006.         },
  5007.         isOpen: function() {
  5008.             return this._isOpen
  5009.         },
  5010.         moveToTop: function() {
  5011.             this._moveToTop()
  5012.         },
  5013.         _moveToTop: function(e, t) {
  5014.             var i = !!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;
  5015.             return i && !t && this._trigger("focus", e), i
  5016.         },
  5017.         open: function() {
  5018.             var t = this;
  5019.             return this._isOpen ? (this._moveToTop() && this._focusTabbable(), undefined) : (this._isOpen = !0, this.opener = e(this.document[0].activeElement), this._size(), this._position(), this._createOverlay(), this._moveToTop(null, !0), this._show(this.uiDialog, this.options.show, function() {
  5020.                 t._focusTabbable(), t._trigger("focus")
  5021.             }), this._trigger("open"), undefined)
  5022.         },
  5023.         _focusTabbable: function() {
  5024.             var e = this.element.find("[autofocus]");
  5025.             e.length || (e = this.element.find(":tabbable")), e.length || (e = this.uiDialogButtonPane.find(":tabbable")), e.length || (e = this.uiDialogTitlebarClose.filter(":tabbable")), e.length || (e = this.uiDialog), e.eq(0).focus()
  5026.         },
  5027.         _keepFocus: function(t) {
  5028.             function i() {
  5029.                 var t = this.document[0].activeElement,
  5030.                     i = this.uiDialog[0] === t || e.contains(this.uiDialog[0], t);
  5031.                 i || this._focusTabbable()
  5032.             }
  5033.             t.preventDefault(), i.call(this), this._delay(i)
  5034.         },
  5035.         _createWrapper: function() {
  5036.             this.uiDialog = e("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " + this.options.dialogClass).hide().attr({
  5037.                 tabIndex: -1,
  5038.                 role: "dialog"
  5039.             }).appendTo(this._appendTo()), this._on(this.uiDialog, {
  5040.                 keydown: function(t) {
  5041.                     if (this.options.closeOnEscape && !t.isDefaultPrevented() && t.keyCode && t.keyCode === e.ui.keyCode.ESCAPE) return t.preventDefault(), this.close(t), undefined;
  5042.                     if (t.keyCode === e.ui.keyCode.TAB) {
  5043.                         var i = this.uiDialog.find(":tabbable"),
  5044.                             s = i.filter(":first"),
  5045.                             a = i.filter(":last");
  5046.                         t.target !== a[0] && t.target !== this.uiDialog[0] || t.shiftKey ? t.target !== s[0] && t.target !== this.uiDialog[0] || !t.shiftKey || (a.focus(1), t.preventDefault()) : (s.focus(1), t.preventDefault())
  5047.                     }
  5048.                 },
  5049.                 mousedown: function(e) {
  5050.                     this._moveToTop(e) && this._focusTabbable()
  5051.                 }
  5052.             }), this.element.find("[aria-describedby]").length || this.uiDialog.attr({
  5053.                 "aria-describedby": this.element.uniqueId().attr("id")
  5054.             })
  5055.         },
  5056.         _createTitlebar: function() {
  5057.             var t;
  5058.             this.uiDialogTitlebar = e("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog), this._on(this.uiDialogTitlebar, {
  5059.                 mousedown: function(t) {
  5060.                     e(t.target).closest(".ui-dialog-titlebar-close") || this.uiDialog.focus()
  5061.                 }
  5062.             }), this.uiDialogTitlebarClose = e("<button type='button'></button>").button({
  5063.                 label: this.options.closeText,
  5064.                 icons: {
  5065.                     primary: "ui-icon-closethick"
  5066.                 },
  5067.                 text: !1
  5068.             }).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar), this._on(this.uiDialogTitlebarClose, {
  5069.                 click: function(e) {
  5070.                     e.preventDefault(), this.close(e)
  5071.                 }
  5072.             }), t = e("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar), this._title(t), this.uiDialog.attr({
  5073.                 "aria-labelledby": t.attr("id")
  5074.             })
  5075.         },
  5076.         _title: function(e) {
  5077.             this.options.title || e.html("&#160;"), e.text(this.options.title)
  5078.         },
  5079.         _createButtonPane: function() {
  5080.             this.uiDialogButtonPane = e("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"), this.uiButtonSet = e("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane), this._createButtons()
  5081.         },
  5082.         _createButtons: function() {
  5083.             var t = this,
  5084.                 i = this.options.buttons;
  5085.             return this.uiDialogButtonPane.remove(), this.uiButtonSet.empty(), e.isEmptyObject(i) || e.isArray(i) && !i.length ? (this.uiDialog.removeClass("ui-dialog-buttons"), undefined) : (e.each(i, function(i, s) {
  5086.                 var a, n;
  5087.                 s = e.isFunction(s) ? {
  5088.                     click: s,
  5089.                     text: i
  5090.                 } : s, s = e.extend({
  5091.                     type: "button"
  5092.                 }, s), a = s.click, s.click = function() {
  5093.                     a.apply(t.element[0], arguments)
  5094.                 }, n = {
  5095.                     icons: s.icons,
  5096.                     text: s.showText
  5097.                 }, delete s.icons, delete s.showText, e("<button></button>", s).button(n).appendTo(t.uiButtonSet)
  5098.             }), this.uiDialog.addClass("ui-dialog-buttons"), this.uiDialogButtonPane.appendTo(this.uiDialog), undefined)
  5099.         },
  5100.         _makeDraggable: function() {
  5101.             function t(e) {
  5102.                 return {
  5103.                     position: e.position,
  5104.                     offset: e.offset
  5105.                 }
  5106.             }
  5107.             var i = this,
  5108.                 s = this.options;
  5109.             this.uiDialog.draggable({
  5110.                 cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
  5111.                 handle: ".ui-dialog-titlebar",
  5112.                 containment: "document",
  5113.                 start: function(s, a) {
  5114.                     e(this).addClass("ui-dialog-dragging"), i._blockFrames(), i._trigger("dragStart", s, t(a))
  5115.                 },
  5116.                 drag: function(e, s) {
  5117.                     i._trigger("drag", e, t(s))
  5118.                 },
  5119.                 stop: function(a, n) {
  5120.                     s.position = [n.position.left - i.document.scrollLeft(), n.position.top - i.document.scrollTop()], e(this).removeClass("ui-dialog-dragging"), i._unblockFrames(), i._trigger("dragStop", a, t(n))
  5121.                 }
  5122.             })
  5123.         },
  5124.         _makeResizable: function() {
  5125.             function t(e) {
  5126.                 return {
  5127.                     originalPosition: e.originalPosition,
  5128.                     originalSize: e.originalSize,
  5129.                     position: e.position,
  5130.                     size: e.size
  5131.                 }
  5132.             }
  5133.             var i = this,
  5134.                 s = this.options,
  5135.                 a = s.resizable,
  5136.                 n = this.uiDialog.css("position"),
  5137.                 r = "string" == typeof a ? a : "n,e,s,w,se,sw,ne,nw";
  5138.             this.uiDialog.resizable({
  5139.                 cancel: ".ui-dialog-content",
  5140.                 containment: "document",
  5141.                 alsoResize: this.element,
  5142.                 maxWidth: s.maxWidth,
  5143.                 maxHeight: s.maxHeight,
  5144.                 minWidth: s.minWidth,
  5145.                 minHeight: this._minHeight(),
  5146.                 handles: r,
  5147.                 start: function(s, a) {
  5148.                     e(this).addClass("ui-dialog-resizing"), i._blockFrames(), i._trigger("resizeStart", s, t(a))
  5149.                 },
  5150.                 resize: function(e, s) {
  5151.                     i._trigger("resize", e, t(s))
  5152.                 },
  5153.                 stop: function(a, n) {
  5154.                     s.height = e(this).height(), s.width = e(this).width(), e(this).removeClass("ui-dialog-resizing"), i._unblockFrames(), i._trigger("resizeStop", a, t(n))
  5155.                 }
  5156.             }).css("position", n)
  5157.         },
  5158.         _minHeight: function() {
  5159.             var e = this.options;
  5160.             return "auto" === e.height ? e.minHeight : Math.min(e.minHeight, e.height)
  5161.         },
  5162.         _position: function() {
  5163.             var e = this.uiDialog.is(":visible");
  5164.             e || this.uiDialog.show(), this.uiDialog.position(this.options.position), e || this.uiDialog.hide()
  5165.         },
  5166.         _setOptions: function(s) {
  5167.             var a = this,
  5168.                 n = !1,
  5169.                 r = {};
  5170.             e.each(s, function(e, s) {
  5171.                 a._setOption(e, s), e in t && (n = !0), e in i && (r[e] = s)
  5172.             }), n && (this._size(), this._position()), this.uiDialog.is(":data(ui-resizable)") && this.uiDialog.resizable("option", r)
  5173.         },
  5174.         _setOption: function(e, t) {
  5175.             var i, s, a = this.uiDialog;
  5176.             "dialogClass" === e && a.removeClass(this.options.dialogClass).addClass(t), "disabled" !== e && (this._super(e, t), "appendTo" === e && this.uiDialog.appendTo(this._appendTo()), "buttons" === e && this._createButtons(), "closeText" === e && this.uiDialogTitlebarClose.button({
  5177.                 label: "" + t
  5178.             }), "draggable" === e && (i = a.is(":data(ui-draggable)"), i && !t && a.draggable("destroy"), !i && t && this._makeDraggable()), "position" === e && this._position(), "resizable" === e && (s = a.is(":data(ui-resizable)"), s && !t && a.resizable("destroy"), s && "string" == typeof t && a.resizable("option", "handles", t), s || t === !1 || this._makeResizable()), "title" === e && this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))
  5179.         },
  5180.         _size: function() {
  5181.             var e, t, i, s = this.options;
  5182.             this.element.show().css({
  5183.                 width: "auto",
  5184.                 minHeight: 0,
  5185.                 maxHeight: "none",
  5186.                 height: 0
  5187.             }), s.minWidth > s.width && (s.width = s.minWidth), e = this.uiDialog.css({
  5188.                 height: "auto",
  5189.                 width: s.width
  5190.             }).outerHeight(), t = Math.max(0, s.minHeight - e), i = "number" == typeof s.maxHeight ? Math.max(0, s.maxHeight - e) : "none", "auto" === s.height ? this.element.css({
  5191.                 minHeight: t,
  5192.                 maxHeight: i,
  5193.                 height: "auto"
  5194.             }) : this.element.height(Math.max(0, s.height - e)), this.uiDialog.is(":data(ui-resizable)") && this.uiDialog.resizable("option", "minHeight", this._minHeight())
  5195.         },
  5196.         _blockFrames: function() {
  5197.             this.iframeBlocks = this.document.find("iframe").map(function() {
  5198.                 var t = e(this);
  5199.                 return e("<div>").css({
  5200.                     position: "absolute",
  5201.                     width: t.outerWidth(),
  5202.                     height: t.outerHeight()
  5203.                 }).appendTo(t.parent()).offset(t.offset())[0]
  5204.             })
  5205.         },
  5206.         _unblockFrames: function() {
  5207.             this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks)
  5208.         },
  5209.         _allowInteraction: function(t) {
  5210.             return e(t.target).closest(".ui-dialog").length ? !0 : !!e(t.target).closest(".ui-datepicker").length
  5211.         },
  5212.         _createOverlay: function() {
  5213.             if (this.options.modal) {
  5214.                 var t = this,
  5215.                     i = this.widgetFullName;
  5216.                 e.ui.dialog.overlayInstances || this._delay(function() {
  5217.                     e.ui.dialog.overlayInstances && this.document.bind("focusin.dialog", function(s) {
  5218.                         t._allowInteraction(s) || (s.preventDefault(), e(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())
  5219.                     })
  5220.                 }), this.overlay = e("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()), this._on(this.overlay, {
  5221.                     mousedown: "_keepFocus"
  5222.                 }), e.ui.dialog.overlayInstances++
  5223.             }
  5224.         },
  5225.         _destroyOverlay: function() {
  5226.             this.options.modal && this.overlay && (e.ui.dialog.overlayInstances--, e.ui.dialog.overlayInstances || this.document.unbind("focusin.dialog"), this.overlay.remove(), this.overlay = null)
  5227.         }
  5228.     }), e.ui.dialog.overlayInstances = 0, e.uiBackCompat !== !1 && e.widget("ui.dialog", e.ui.dialog, {
  5229.         _position: function() {
  5230.             var t, i = this.options.position,
  5231.                 s = [],
  5232.                 a = [0, 0];
  5233.             i ? (("string" == typeof i || "object" == typeof i && "0" in i) && (s = i.split ? i.split(" ") : [i[0], i[1]], 1 === s.length && (s[1] = s[0]), e.each(["left", "top"], function(e, t) {
  5234.                 +s[e] === s[e] && (a[e] = s[e], s[e] = t)
  5235.             }), i = {
  5236.                 my: s[0] + (0 > a[0] ? a[0] : "+" + a[0]) + " " + s[1] + (0 > a[1] ? a[1] : "+" + a[1]),
  5237.                 at: s.join(" ")
  5238.             }), i = e.extend({}, e.ui.dialog.prototype.options.position, i)) : i = e.ui.dialog.prototype.options.position, t = this.uiDialog.is(":visible"), t || this.uiDialog.show(), this.uiDialog.position(i), t || this.uiDialog.hide()
  5239.         }
  5240.     })
  5241. })(jQuery);
  5242. (function(e) {
  5243.     function t(t, i) {
  5244.         var s = (t.attr("aria-describedby") || "").split(/\s+/);
  5245.         s.push(i), t.data("ui-tooltip-id", i).attr("aria-describedby", e.trim(s.join(" ")))
  5246.     }
  5247.  
  5248.     function i(t) {
  5249.         var i = t.data("ui-tooltip-id"),
  5250.             s = (t.attr("aria-describedby") || "").split(/\s+/),
  5251.             a = e.inArray(i, s); - 1 !== a && s.splice(a, 1), t.removeData("ui-tooltip-id"), s = e.trim(s.join(" ")), s ? t.attr("aria-describedby", s) : t.removeAttr("aria-describedby")
  5252.     }
  5253.     var s = 0;
  5254.     e.widget("ui.tooltip", {
  5255.         version: "1.10.4",
  5256.         options: {
  5257.             content: function() {
  5258.                 var t = e(this).attr("title") || "";
  5259.                 return e("<a>").text(t).html()
  5260.             },
  5261.             hide: !0,
  5262.             items: "[title]:not([disabled])",
  5263.             position: {
  5264.                 my: "left top+15",
  5265.                 at: "left bottom",
  5266.                 collision: "flipfit flip"
  5267.             },
  5268.             show: !0,
  5269.             tooltipClass: null,
  5270.             track: !1,
  5271.             close: null,
  5272.             open: null
  5273.         },
  5274.         _create: function() {
  5275.             this._on({
  5276.                 mouseover: "open",
  5277.                 focusin: "open"
  5278.             }), this.tooltips = {}, this.parents = {}, this.options.disabled && this._disable()
  5279.         },
  5280.         _setOption: function(t, i) {
  5281.             var s = this;
  5282.             return "disabled" === t ? (this[i ? "_disable" : "_enable"](), this.options[t] = i, void 0) : (this._super(t, i), "content" === t && e.each(this.tooltips, function(e, t) {
  5283.                 s._updateContent(t)
  5284.             }), void 0)
  5285.         },
  5286.         _disable: function() {
  5287.             var t = this;
  5288.             e.each(this.tooltips, function(i, s) {
  5289.                 var a = e.Event("blur");
  5290.                 a.target = a.currentTarget = s[0], t.close(a, !0)
  5291.             }), this.element.find(this.options.items).addBack().each(function() {
  5292.                 var t = e(this);
  5293.                 t.is("[title]") && t.data("ui-tooltip-title", t.attr("title")).attr("title", "")
  5294.             })
  5295.         },
  5296.         _enable: function() {
  5297.             this.element.find(this.options.items).addBack().each(function() {
  5298.                 var t = e(this);
  5299.                 t.data("ui-tooltip-title") && t.attr("title", t.data("ui-tooltip-title"))
  5300.             })
  5301.         },
  5302.         open: function(t) {
  5303.             var i = this,
  5304.                 s = e(t ? t.target : this.element).closest(this.options.items);
  5305.             s.length && !s.data("ui-tooltip-id") && (s.attr("title") && s.data("ui-tooltip-title", s.attr("title")), s.data("ui-tooltip-open", !0), t && "mouseover" === t.type && s.parents().each(function() {
  5306.                 var t, s = e(this);
  5307.                 s.data("ui-tooltip-open") && (t = e.Event("blur"), t.target = t.currentTarget = this, i.close(t, !0)), s.attr("title") && (s.uniqueId(), i.parents[this.id] = {
  5308.                     element: this,
  5309.                     title: s.attr("title")
  5310.                 }, s.attr("title", ""))
  5311.             }), this._updateContent(s, t))
  5312.         },
  5313.         _updateContent: function(e, t) {
  5314.             var i, s = this.options.content,
  5315.                 a = this,
  5316.                 n = t ? t.type : null;
  5317.             return "string" == typeof s ? this._open(t, e, s) : (i = s.call(e[0], function(i) {
  5318.                 e.data("ui-tooltip-open") && a._delay(function() {
  5319.                     t && (t.type = n), this._open(t, e, i)
  5320.                 })
  5321.             }), i && this._open(t, e, i), void 0)
  5322.         },
  5323.         _open: function(i, s, a) {
  5324.             function n(e) {
  5325.                 l.of = e, r.is(":hidden") || r.position(l)
  5326.             }
  5327.             var r, o, h, l = e.extend({}, this.options.position);
  5328.             if (a) {
  5329.                 if (r = this._find(s), r.length) return r.find(".ui-tooltip-content").html(a), void 0;
  5330.                 s.is("[title]") && (i && "mouseover" === i.type ? s.attr("title", "") : s.removeAttr("title")), r = this._tooltip(s), t(s, r.attr("id")), r.find(".ui-tooltip-content").html(a), this.options.track && i && /^mouse/.test(i.type) ? (this._on(this.document, {
  5331.                     mousemove: n
  5332.                 }), n(i)) : r.position(e.extend({
  5333.                     of: s
  5334.                 }, this.options.position)), r.hide(), this._show(r, this.options.show), this.options.show && this.options.show.delay && (h = this.delayedShow = setInterval(function() {
  5335.                     r.is(":visible") && (n(l.of), clearInterval(h))
  5336.                 }, e.fx.interval)), this._trigger("open", i, {
  5337.                     tooltip: r
  5338.                 }), o = {
  5339.                     keyup: function(t) {
  5340.                         if (t.keyCode === e.ui.keyCode.ESCAPE) {
  5341.                             var i = e.Event(t);
  5342.                             i.currentTarget = s[0], this.close(i, !0)
  5343.                         }
  5344.                     },
  5345.                     remove: function() {
  5346.                         this._removeTooltip(r)
  5347.                     }
  5348.                 }, i && "mouseover" !== i.type || (o.mouseleave = "close"), i && "focusin" !== i.type || (o.focusout = "close"), this._on(!0, s, o)
  5349.             }
  5350.         },
  5351.         close: function(t) {
  5352.             var s = this,
  5353.                 a = e(t ? t.currentTarget : this.element),
  5354.                 n = this._find(a);
  5355.             this.closing || (clearInterval(this.delayedShow), a.data("ui-tooltip-title") && a.attr("title", a.data("ui-tooltip-title")), i(a), n.stop(!0), this._hide(n, this.options.hide, function() {
  5356.                 s._removeTooltip(e(this))
  5357.             }), a.removeData("ui-tooltip-open"), this._off(a, "mouseleave focusout keyup"), a[0] !== this.element[0] && this._off(a, "remove"), this._off(this.document, "mousemove"), t && "mouseleave" === t.type && e.each(this.parents, function(t, i) {
  5358.                 e(i.element).attr("title", i.title), delete s.parents[t]
  5359.             }), this.closing = !0, this._trigger("close", t, {
  5360.                 tooltip: n
  5361.             }), this.closing = !1)
  5362.         },
  5363.         _tooltip: function(t) {
  5364.             var i = "ui-tooltip-" + s++,
  5365.                 a = e("<div>").attr({
  5366.                     id: i,
  5367.                     role: "tooltip"
  5368.                 }).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content " + (this.options.tooltipClass || ""));
  5369.             return e("<div>").addClass("ui-tooltip-content").appendTo(a), a.appendTo(this.document[0].body), this.tooltips[i] = t, a
  5370.         },
  5371.         _find: function(t) {
  5372.             var i = t.data("ui-tooltip-id");
  5373.             return i ? e("#" + i) : e()
  5374.         },
  5375.         _removeTooltip: function(e) {
  5376.             e.remove(), delete this.tooltips[e.attr("id")]
  5377.         },
  5378.         _destroy: function() {
  5379.             var t = this;
  5380.             e.each(this.tooltips, function(i, s) {
  5381.                 var a = e.Event("blur");
  5382.                 a.target = a.currentTarget = s[0], t.close(a, !0), e("#" + i).remove(), s.data("ui-tooltip-title") && (s.attr("title", s.data("ui-tooltip-title")), s.removeData("ui-tooltip-title"))
  5383.             })
  5384.         }
  5385.     })
  5386. })(jQuery);
  5387. (function(e, t) {
  5388.     var i = "ui-effects-";
  5389.     e.effects = {
  5390.             effect: {}
  5391.         },
  5392.         function(e, t) {
  5393.             function i(e, t, i) {
  5394.                 var s = d[t.type] || {};
  5395.                 return null == e ? i || !t.def ? null : t.def : (e = s.floor ? ~~e : parseFloat(e), isNaN(e) ? t.def : s.mod ? (e + s.mod) % s.mod : 0 > e ? 0 : e > s.max ? s.max : e)
  5396.             }
  5397.  
  5398.             function s(i) {
  5399.                 var s = l(),
  5400.                     a = s._rgba = [];
  5401.                 return i = i.toLowerCase(), f(h, function(e, n) {
  5402.                     var r, o = n.re.exec(i),
  5403.                         h = o && n.parse(o),
  5404.                         l = n.space || "rgba";
  5405.                     return h ? (r = s[l](h), s[u[l].cache] = r[u[l].cache], a = s._rgba = r._rgba, !1) : t
  5406.                 }), a.length ? ("0,0,0,0" === a.join() && e.extend(a, n.transparent), s) : n[i]
  5407.             }
  5408.  
  5409.             function a(e, t, i) {
  5410.                 return i = (i + 1) % 1, 1 > 6 * i ? e + 6 * (t - e) * i : 1 > 2 * i ? t : 2 > 3 * i ? e + 6 * (t - e) * (2 / 3 - i) : e
  5411.             }
  5412.             var n, r = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
  5413.                 o = /^([\-+])=\s*(\d+\.?\d*)/,
  5414.                 h = [{
  5415.                     re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
  5416.                     parse: function(e) {
  5417.                         return [e[1], e[2], e[3], e[4]]
  5418.                     }
  5419.                 }, {
  5420.                     re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
  5421.                     parse: function(e) {
  5422.                         return [2.55 * e[1], 2.55 * e[2], 2.55 * e[3], e[4]]
  5423.                     }
  5424.                 }, {
  5425.                     re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
  5426.                     parse: function(e) {
  5427.                         return [parseInt(e[1], 16), parseInt(e[2], 16), parseInt(e[3], 16)]
  5428.                     }
  5429.                 }, {
  5430.                     re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
  5431.                     parse: function(e) {
  5432.                         return [parseInt(e[1] + e[1], 16), parseInt(e[2] + e[2], 16), parseInt(e[3] + e[3], 16)]
  5433.                     }
  5434.                 }, {
  5435.                     re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
  5436.                     space: "hsla",
  5437.                     parse: function(e) {
  5438.                         return [e[1], e[2] / 100, e[3] / 100, e[4]]
  5439.                     }
  5440.                 }],
  5441.                 l = e.Color = function(t, i, s, a) {
  5442.                     return new e.Color.fn.parse(t, i, s, a)
  5443.                 },
  5444.                 u = {
  5445.                     rgba: {
  5446.                         props: {
  5447.                             red: {
  5448.                                 idx: 0,
  5449.                                 type: "byte"
  5450.                             },
  5451.                             green: {
  5452.                                 idx: 1,
  5453.                                 type: "byte"
  5454.                             },
  5455.                             blue: {
  5456.                                 idx: 2,
  5457.                                 type: "byte"
  5458.                             }
  5459.                         }
  5460.                     },
  5461.                     hsla: {
  5462.                         props: {
  5463.                             hue: {
  5464.                                 idx: 0,
  5465.                                 type: "degrees"
  5466.                             },
  5467.                             saturation: {
  5468.                                 idx: 1,
  5469.                                 type: "percent"
  5470.                             },
  5471.                             lightness: {
  5472.                                 idx: 2,
  5473.                                 type: "percent"
  5474.                             }
  5475.                         }
  5476.                     }
  5477.                 },
  5478.                 d = {
  5479.                     "byte": {
  5480.                         floor: !0,
  5481.                         max: 255
  5482.                     },
  5483.                     percent: {
  5484.                         max: 1
  5485.                     },
  5486.                     degrees: {
  5487.                         mod: 360,
  5488.                         floor: !0
  5489.                     }
  5490.                 },
  5491.                 c = l.support = {},
  5492.                 p = e("<p>")[0],
  5493.                 f = e.each;
  5494.             p.style.cssText = "background-color:rgba(1,1,1,.5)", c.rgba = p.style.backgroundColor.indexOf("rgba") > -1, f(u, function(e, t) {
  5495.                 t.cache = "_" + e, t.props.alpha = {
  5496.                     idx: 3,
  5497.                     type: "percent",
  5498.                     def: 1
  5499.                 }
  5500.             }), l.fn = e.extend(l.prototype, {
  5501.                 parse: function(a, r, o, h) {
  5502.                     if (a === t) return this._rgba = [null, null, null, null], this;
  5503.                     (a.jquery || a.nodeType) && (a = e(a).css(r), r = t);
  5504.                     var d = this,
  5505.                         c = e.type(a),
  5506.                         p = this._rgba = [];
  5507.                     return r !== t && (a = [a, r, o, h], c = "array"), "string" === c ? this.parse(s(a) || n._default) : "array" === c ? (f(u.rgba.props, function(e, t) {
  5508.                         p[t.idx] = i(a[t.idx], t)
  5509.                     }), this) : "object" === c ? (a instanceof l ? f(u, function(e, t) {
  5510.                         a[t.cache] && (d[t.cache] = a[t.cache].slice())
  5511.                     }) : f(u, function(t, s) {
  5512.                         var n = s.cache;
  5513.                         f(s.props, function(e, t) {
  5514.                             if (!d[n] && s.to) {
  5515.                                 if ("alpha" === e || null == a[e]) return;
  5516.                                 d[n] = s.to(d._rgba)
  5517.                             }
  5518.                             d[n][t.idx] = i(a[e], t, !0)
  5519.                         }), d[n] && 0 > e.inArray(null, d[n].slice(0, 3)) && (d[n][3] = 1, s.from && (d._rgba = s.from(d[n])))
  5520.                     }), this) : t
  5521.                 },
  5522.                 is: function(e) {
  5523.                     var i = l(e),
  5524.                         s = !0,
  5525.                         a = this;
  5526.                     return f(u, function(e, n) {
  5527.                         var r, o = i[n.cache];
  5528.                         return o && (r = a[n.cache] || n.to && n.to(a._rgba) || [], f(n.props, function(e, i) {
  5529.                             return null != o[i.idx] ? s = o[i.idx] === r[i.idx] : t
  5530.                         })), s
  5531.                     }), s
  5532.                 },
  5533.                 _space: function() {
  5534.                     var e = [],
  5535.                         t = this;
  5536.                     return f(u, function(i, s) {
  5537.                         t[s.cache] && e.push(i)
  5538.                     }), e.pop()
  5539.                 },
  5540.                 transition: function(e, t) {
  5541.                     var s = l(e),
  5542.                         a = s._space(),
  5543.                         n = u[a],
  5544.                         r = 0 === this.alpha() ? l("transparent") : this,
  5545.                         o = r[n.cache] || n.to(r._rgba),
  5546.                         h = o.slice();
  5547.                     return s = s[n.cache], f(n.props, function(e, a) {
  5548.                         var n = a.idx,
  5549.                             r = o[n],
  5550.                             l = s[n],
  5551.                             u = d[a.type] || {};
  5552.                         null !== l && (null === r ? h[n] = l : (u.mod && (l - r > u.mod / 2 ? r += u.mod : r - l > u.mod / 2 && (r -= u.mod)), h[n] = i((l - r) * t + r, a)))
  5553.                     }), this[a](h)
  5554.                 },
  5555.                 blend: function(t) {
  5556.                     if (1 === this._rgba[3]) return this;
  5557.                     var i = this._rgba.slice(),
  5558.                         s = i.pop(),
  5559.                         a = l(t)._rgba;
  5560.                     return l(e.map(i, function(e, t) {
  5561.                         return (1 - s) * a[t] + s * e
  5562.                     }))
  5563.                 },
  5564.                 toRgbaString: function() {
  5565.                     var t = "rgba(",
  5566.                         i = e.map(this._rgba, function(e, t) {
  5567.                             return null == e ? t > 2 ? 1 : 0 : e
  5568.                         });
  5569.                     return 1 === i[3] && (i.pop(), t = "rgb("), t + i.join() + ")"
  5570.                 },
  5571.                 toHslaString: function() {
  5572.                     var t = "hsla(",
  5573.                         i = e.map(this.hsla(), function(e, t) {
  5574.                             return null == e && (e = t > 2 ? 1 : 0), t && 3 > t && (e = Math.round(100 * e) + "%"), e
  5575.                         });
  5576.                     return 1 === i[3] && (i.pop(), t = "hsl("), t + i.join() + ")"
  5577.                 },
  5578.                 toHexString: function(t) {
  5579.                     var i = this._rgba.slice(),
  5580.                         s = i.pop();
  5581.                     return t && i.push(~~(255 * s)), "#" + e.map(i, function(e) {
  5582.                         return e = (e || 0).toString(16), 1 === e.length ? "0" + e : e
  5583.                     }).join("")
  5584.                 },
  5585.                 toString: function() {
  5586.                     return 0 === this._rgba[3] ? "transparent" : this.toRgbaString()
  5587.                 }
  5588.             }), l.fn.parse.prototype = l.fn, u.hsla.to = function(e) {
  5589.                 if (null == e[0] || null == e[1] || null == e[2]) return [null, null, null, e[3]];
  5590.                 var t, i, s = e[0] / 255,
  5591.                     a = e[1] / 255,
  5592.                     n = e[2] / 255,
  5593.                     r = e[3],
  5594.                     o = Math.max(s, a, n),
  5595.                     h = Math.min(s, a, n),
  5596.                     l = o - h,
  5597.                     u = o + h,
  5598.                     d = .5 * u;
  5599.                 return t = h === o ? 0 : s === o ? 60 * (a - n) / l + 360 : a === o ? 60 * (n - s) / l + 120 : 60 * (s - a) / l + 240, i = 0 === l ? 0 : .5 >= d ? l / u : l / (2 - u), [Math.round(t) % 360, i, d, null == r ? 1 : r]
  5600.             }, u.hsla.from = function(e) {
  5601.                 if (null == e[0] || null == e[1] || null == e[2]) return [null, null, null, e[3]];
  5602.                 var t = e[0] / 360,
  5603.                     i = e[1],
  5604.                     s = e[2],
  5605.                     n = e[3],
  5606.                     r = .5 >= s ? s * (1 + i) : s + i - s * i,
  5607.                     o = 2 * s - r;
  5608.                 return [Math.round(255 * a(o, r, t + 1 / 3)), Math.round(255 * a(o, r, t)), Math.round(255 * a(o, r, t - 1 / 3)), n]
  5609.             }, f(u, function(s, a) {
  5610.                 var n = a.props,
  5611.                     r = a.cache,
  5612.                     h = a.to,
  5613.                     u = a.from;
  5614.                 l.fn[s] = function(s) {
  5615.                     if (h && !this[r] && (this[r] = h(this._rgba)), s === t) return this[r].slice();
  5616.                     var a, o = e.type(s),
  5617.                         d = "array" === o || "object" === o ? s : arguments,
  5618.                         c = this[r].slice();
  5619.                     return f(n, function(e, t) {
  5620.                         var s = d["object" === o ? e : t.idx];
  5621.                         null == s && (s = c[t.idx]), c[t.idx] = i(s, t)
  5622.                     }), u ? (a = l(u(c)), a[r] = c, a) : l(c)
  5623.                 }, f(n, function(t, i) {
  5624.                     l.fn[t] || (l.fn[t] = function(a) {
  5625.                         var n, r = e.type(a),
  5626.                             h = "alpha" === t ? this._hsla ? "hsla" : "rgba" : s,
  5627.                             l = this[h](),
  5628.                             u = l[i.idx];
  5629.                         return "undefined" === r ? u : ("function" === r && (a = a.call(this, u), r = e.type(a)), null == a && i.empty ? this : ("string" === r && (n = o.exec(a), n && (a = u + parseFloat(n[2]) * ("+" === n[1] ? 1 : -1))), l[i.idx] = a, this[h](l)))
  5630.                     })
  5631.                 })
  5632.             }), l.hook = function(t) {
  5633.                 var i = t.split(" ");
  5634.                 f(i, function(t, i) {
  5635.                     e.cssHooks[i] = {
  5636.                         set: function(t, a) {
  5637.                             var n, r, o = "";
  5638.                             if ("transparent" !== a && ("string" !== e.type(a) || (n = s(a)))) {
  5639.                                 if (a = l(n || a), !c.rgba && 1 !== a._rgba[3]) {
  5640.                                     for (r = "backgroundColor" === i ? t.parentNode : t;
  5641.                                         ("" === o || "transparent" === o) && r && r.style;) try {
  5642.                                         o = e.css(r, "backgroundColor"), r = r.parentNode
  5643.                                     } catch (h) {}
  5644.                                     a = a.blend(o && "transparent" !== o ? o : "_default")
  5645.                                 }
  5646.                                 a = a.toRgbaString()
  5647.                             }
  5648.                             try {
  5649.                                 t.style[i] = a
  5650.                             } catch (h) {}
  5651.                         }
  5652.                     }, e.fx.step[i] = function(t) {
  5653.                         t.colorInit || (t.start = l(t.elem, i), t.end = l(t.end), t.colorInit = !0), e.cssHooks[i].set(t.elem, t.start.transition(t.end, t.pos))
  5654.                     }
  5655.                 })
  5656.             }, l.hook(r), e.cssHooks.borderColor = {
  5657.                 expand: function(e) {
  5658.                     var t = {};
  5659.                     return f(["Top", "Right", "Bottom", "Left"], function(i, s) {
  5660.                         t["border" + s + "Color"] = e
  5661.                     }), t
  5662.                 }
  5663.             }, n = e.Color.names = {
  5664.                 aqua: "#00ffff",
  5665.                 black: "#000000",
  5666.                 blue: "#0000ff",
  5667.                 fuchsia: "#ff00ff",
  5668.                 gray: "#808080",
  5669.                 green: "#008000",
  5670.                 lime: "#00ff00",
  5671.                 maroon: "#800000",
  5672.                 navy: "#000080",
  5673.                 olive: "#808000",
  5674.                 purple: "#800080",
  5675.                 red: "#ff0000",
  5676.                 silver: "#c0c0c0",
  5677.                 teal: "#008080",
  5678.                 white: "#ffffff",
  5679.                 yellow: "#ffff00",
  5680.                 transparent: [null, null, null, 0],
  5681.                 _default: "#ffffff"
  5682.             }
  5683.         }(jQuery),
  5684.         function() {
  5685.             function i(t) {
  5686.                 var i, s, a = t.ownerDocument.defaultView ? t.ownerDocument.defaultView.getComputedStyle(t, null) : t.currentStyle,
  5687.                     n = {};
  5688.                 if (a && a.length && a[0] && a[a[0]])
  5689.                     for (s = a.length; s--;) i = a[s], "string" == typeof a[i] && (n[e.camelCase(i)] = a[i]);
  5690.                 else
  5691.                     for (i in a) "string" == typeof a[i] && (n[i] = a[i]);
  5692.                 return n
  5693.             }
  5694.  
  5695.             function s(t, i) {
  5696.                 var s, a, r = {};
  5697.                 for (s in i) a = i[s], t[s] !== a && (n[s] || (e.fx.step[s] || !isNaN(parseFloat(a))) && (r[s] = a));
  5698.                 return r
  5699.             }
  5700.             var a = ["add", "remove", "toggle"],
  5701.                 n = {
  5702.                     border: 1,
  5703.                     borderBottom: 1,
  5704.                     borderColor: 1,
  5705.                     borderLeft: 1,
  5706.                     borderRight: 1,
  5707.                     borderTop: 1,
  5708.                     borderWidth: 1,
  5709.                     margin: 1,
  5710.                     padding: 1
  5711.                 };
  5712.             e.each(["borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle"], function(t, i) {
  5713.                 e.fx.step[i] = function(e) {
  5714.                     ("none" !== e.end && !e.setAttr || 1 === e.pos && !e.setAttr) && (jQuery.style(e.elem, i, e.end), e.setAttr = !0)
  5715.                 }
  5716.             }), e.fn.addBack || (e.fn.addBack = function(e) {
  5717.                 return this.add(null == e ? this.prevObject : this.prevObject.filter(e))
  5718.             }), e.effects.animateClass = function(t, n, r, o) {
  5719.                 var h = e.speed(n, r, o);
  5720.                 return this.queue(function() {
  5721.                     var n, r = e(this),
  5722.                         o = r.attr("class") || "",
  5723.                         l = h.children ? r.find("*").addBack() : r;
  5724.                     l = l.map(function() {
  5725.                         var t = e(this);
  5726.                         return {
  5727.                             el: t,
  5728.                             start: i(this)
  5729.                         }
  5730.                     }), n = function() {
  5731.                         e.each(a, function(e, i) {
  5732.                             t[i] && r[i + "Class"](t[i])
  5733.                         })
  5734.                     }, n(), l = l.map(function() {
  5735.                         return this.end = i(this.el[0]), this.diff = s(this.start, this.end), this
  5736.                     }), r.attr("class", o), l = l.map(function() {
  5737.                         var t = this,
  5738.                             i = e.Deferred(),
  5739.                             s = e.extend({}, h, {
  5740.                                 queue: !1,
  5741.                                 complete: function() {
  5742.                                     i.resolve(t)
  5743.                                 }
  5744.                             });
  5745.                         return this.el.animate(this.diff, s), i.promise()
  5746.                     }), e.when.apply(e, l.get()).done(function() {
  5747.                         n(), e.each(arguments, function() {
  5748.                             var t = this.el;
  5749.                             e.each(this.diff, function(e) {
  5750.                                 t.css(e, "")
  5751.                             })
  5752.                         }), h.complete.call(r[0])
  5753.                     })
  5754.                 })
  5755.             }, e.fn.extend({
  5756.                 addClass: function(t) {
  5757.                     return function(i, s, a, n) {
  5758.                         return s ? e.effects.animateClass.call(this, {
  5759.                             add: i
  5760.                         }, s, a, n) : t.apply(this, arguments)
  5761.                     }
  5762.                 }(e.fn.addClass),
  5763.                 removeClass: function(t) {
  5764.                     return function(i, s, a, n) {
  5765.                         return arguments.length > 1 ? e.effects.animateClass.call(this, {
  5766.                             remove: i
  5767.                         }, s, a, n) : t.apply(this, arguments)
  5768.                     }
  5769.                 }(e.fn.removeClass),
  5770.                 toggleClass: function(i) {
  5771.                     return function(s, a, n, r, o) {
  5772.                         return "boolean" == typeof a || a === t ? n ? e.effects.animateClass.call(this, a ? {
  5773.                             add: s
  5774.                         } : {
  5775.                             remove: s
  5776.                         }, n, r, o) : i.apply(this, arguments) : e.effects.animateClass.call(this, {
  5777.                             toggle: s
  5778.                         }, a, n, r)
  5779.                     }
  5780.                 }(e.fn.toggleClass),
  5781.                 switchClass: function(t, i, s, a, n) {
  5782.                     return e.effects.animateClass.call(this, {
  5783.                         add: i,
  5784.                         remove: t
  5785.                     }, s, a, n)
  5786.                 }
  5787.             })
  5788.         }(),
  5789.         function() {
  5790.             function s(t, i, s, a) {
  5791.                 return e.isPlainObject(t) && (i = t, t = t.effect), t = {
  5792.                     effect: t
  5793.                 }, null == i && (i = {}), e.isFunction(i) && (a = i, s = null, i = {}), ("number" == typeof i || e.fx.speeds[i]) && (a = s, s = i, i = {}), e.isFunction(s) && (a = s, s = null), i && e.extend(t, i), s = s || i.duration, t.duration = e.fx.off ? 0 : "number" == typeof s ? s : s in e.fx.speeds ? e.fx.speeds[s] : e.fx.speeds._default, t.complete = a || i.complete, t
  5794.             }
  5795.  
  5796.             function a(t) {
  5797.                 return !t || "number" == typeof t || e.fx.speeds[t] ? !0 : "string" != typeof t || e.effects.effect[t] ? e.isFunction(t) ? !0 : "object" != typeof t || t.effect ? !1 : !0 : !0
  5798.             }
  5799.             e.extend(e.effects, {
  5800.                 version: "1.10.4",
  5801.                 save: function(e, t) {
  5802.                     for (var s = 0; t.length > s; s++) null !== t[s] && e.data(i + t[s], e[0].style[t[s]])
  5803.                 },
  5804.                 restore: function(e, s) {
  5805.                     var a, n;
  5806.                     for (n = 0; s.length > n; n++) null !== s[n] && (a = e.data(i + s[n]), a === t && (a = ""), e.css(s[n], a))
  5807.                 },
  5808.                 setMode: function(e, t) {
  5809.                     return "toggle" === t && (t = e.is(":hidden") ? "show" : "hide"), t
  5810.                 },
  5811.                 getBaseline: function(e, t) {
  5812.                     var i, s;
  5813.                     switch (e[0]) {
  5814.                         case "top":
  5815.                             i = 0;
  5816.                             break;
  5817.                         case "middle":
  5818.                             i = .5;
  5819.                             break;
  5820.                         case "bottom":
  5821.                             i = 1;
  5822.                             break;
  5823.                         default:
  5824.                             i = e[0] / t.height
  5825.                     }
  5826.                     switch (e[1]) {
  5827.                         case "left":
  5828.                             s = 0;
  5829.                             break;
  5830.                         case "center":
  5831.                             s = .5;
  5832.                             break;
  5833.                         case "right":
  5834.                             s = 1;
  5835.                             break;
  5836.                         default:
  5837.                             s = e[1] / t.width
  5838.                     }
  5839.                     return {
  5840.                         x: s,
  5841.                         y: i
  5842.                     }
  5843.                 },
  5844.                 createWrapper: function(t) {
  5845.                     if (t.parent().is(".ui-effects-wrapper")) return t.parent();
  5846.                     var i = {
  5847.                             width: t.outerWidth(!0),
  5848.                             height: t.outerHeight(!0),
  5849.                             "float": t.css("float")
  5850.                         },
  5851.                         s = e("<div></div>").addClass("ui-effects-wrapper").css({
  5852.                             fontSize: "100%",
  5853.                             background: "transparent",
  5854.                             border: "none",
  5855.                             margin: 0,
  5856.                             padding: 0
  5857.                         }),
  5858.                         a = {
  5859.                             width: t.width(),
  5860.                             height: t.height()
  5861.                         },
  5862.                         n = document.activeElement;
  5863.                     try {
  5864.                         n.id
  5865.                     } catch (r) {
  5866.                         n = document.body
  5867.                     }
  5868.                     return t.wrap(s), (t[0] === n || e.contains(t[0], n)) && e(n).focus(), s = t.parent(), "static" === t.css("position") ? (s.css({
  5869.                         position: "relative"
  5870.                     }), t.css({
  5871.                         position: "relative"
  5872.                     })) : (e.extend(i, {
  5873.                         position: t.css("position"),
  5874.                         zIndex: t.css("z-index")
  5875.                     }), e.each(["top", "left", "bottom", "right"], function(e, s) {
  5876.                         i[s] = t.css(s), isNaN(parseInt(i[s], 10)) && (i[s] = "auto")
  5877.                     }), t.css({
  5878.                         position: "relative",
  5879.                         top: 0,
  5880.                         left: 0,
  5881.                         right: "auto",
  5882.                         bottom: "auto"
  5883.                     })), t.css(a), s.css(i).show()
  5884.                 },
  5885.                 removeWrapper: function(t) {
  5886.                     var i = document.activeElement;
  5887.                     return t.parent().is(".ui-effects-wrapper") && (t.parent().replaceWith(t), (t[0] === i || e.contains(t[0], i)) && e(i).focus()), t
  5888.                 },
  5889.                 setTransition: function(t, i, s, a) {
  5890.                     return a = a || {}, e.each(i, function(e, i) {
  5891.                         var n = t.cssUnit(i);
  5892.                         n[0] > 0 && (a[i] = n[0] * s + n[1])
  5893.                     }), a
  5894.                 }
  5895.             }), e.fn.extend({
  5896.                 effect: function() {
  5897.                     function t(t) {
  5898.                         function s() {
  5899.                             e.isFunction(n) && n.call(a[0]), e.isFunction(t) && t()
  5900.                         }
  5901.                         var a = e(this),
  5902.                             n = i.complete,
  5903.                             o = i.mode;
  5904.                         (a.is(":hidden") ? "hide" === o : "show" === o) ? (a[o](), s()) : r.call(a[0], i, s)
  5905.                     }
  5906.                     var i = s.apply(this, arguments),
  5907.                         a = i.mode,
  5908.                         n = i.queue,
  5909.                         r = e.effects.effect[i.effect];
  5910.                     return e.fx.off || !r ? a ? this[a](i.duration, i.complete) : this.each(function() {
  5911.                         i.complete && i.complete.call(this)
  5912.                     }) : n === !1 ? this.each(t) : this.queue(n || "fx", t)
  5913.                 },
  5914.                 show: function(e) {
  5915.                     return function(t) {
  5916.                         if (a(t)) return e.apply(this, arguments);
  5917.                         var i = s.apply(this, arguments);
  5918.                         return i.mode = "show", this.effect.call(this, i)
  5919.                     }
  5920.                 }(e.fn.show),
  5921.                 hide: function(e) {
  5922.                     return function(t) {
  5923.                         if (a(t)) return e.apply(this, arguments);
  5924.                         var i = s.apply(this, arguments);
  5925.                         return i.mode = "hide", this.effect.call(this, i)
  5926.                     }
  5927.                 }(e.fn.hide),
  5928.                 toggle: function(e) {
  5929.                     return function(t) {
  5930.                         if (a(t) || "boolean" == typeof t) return e.apply(this, arguments);
  5931.                         var i = s.apply(this, arguments);
  5932.                         return i.mode = "toggle", this.effect.call(this, i)
  5933.                     }
  5934.                 }(e.fn.toggle),
  5935.                 cssUnit: function(t) {
  5936.                     var i = this.css(t),
  5937.                         s = [];
  5938.                     return e.each(["em", "px", "%", "pt"], function(e, t) {
  5939.                         i.indexOf(t) > 0 && (s = [parseFloat(i), t])
  5940.                     }), s
  5941.                 }
  5942.             })
  5943.         }(),
  5944.         function() {
  5945.             var t = {};
  5946.             e.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function(e, i) {
  5947.                 t[i] = function(t) {
  5948.                     return Math.pow(t, e + 2)
  5949.                 }
  5950.             }), e.extend(t, {
  5951.                 Sine: function(e) {
  5952.                     return 1 - Math.cos(e * Math.PI / 2)
  5953.                 },
  5954.                 Circ: function(e) {
  5955.                     return 1 - Math.sqrt(1 - e * e)
  5956.                 },
  5957.                 Elastic: function(e) {
  5958.                     return 0 === e || 1 === e ? e : -Math.pow(2, 8 * (e - 1)) * Math.sin((80 * (e - 1) - 7.5) * Math.PI / 15)
  5959.                 },
  5960.                 Back: function(e) {
  5961.                     return e * e * (3 * e - 2)
  5962.                 },
  5963.                 Bounce: function(e) {
  5964.                     for (var t, i = 4;
  5965.                         ((t = Math.pow(2, --i)) - 1) / 11 > e;);
  5966.                     return 1 / Math.pow(4, 3 - i) - 7.5625 * Math.pow((3 * t - 2) / 22 - e, 2)
  5967.                 }
  5968.             }), e.each(t, function(t, i) {
  5969.                 e.easing["easeIn" + t] = i, e.easing["easeOut" + t] = function(e) {
  5970.                     return 1 - i(1 - e)
  5971.                 }, e.easing["easeInOut" + t] = function(e) {
  5972.                     return .5 > e ? i(2 * e) / 2 : 1 - i(-2 * e + 2) / 2
  5973.                 }
  5974.             })
  5975.         }()
  5976. })(jQuery);
  5977. (function(e) {
  5978.     e.effects.effect.drop = function(t, i) {
  5979.         var s, a = e(this),
  5980.             n = ["position", "top", "bottom", "left", "right", "opacity", "height", "width"],
  5981.             r = e.effects.setMode(a, t.mode || "hide"),
  5982.             o = "show" === r,
  5983.             h = t.direction || "left",
  5984.             l = "up" === h || "down" === h ? "top" : "left",
  5985.             u = "up" === h || "left" === h ? "pos" : "neg",
  5986.             d = {
  5987.                 opacity: o ? 1 : 0
  5988.             };
  5989.         e.effects.save(a, n), a.show(), e.effects.createWrapper(a), s = t.distance || a["top" === l ? "outerHeight" : "outerWidth"](!0) / 2, o && a.css("opacity", 0).css(l, "pos" === u ? -s : s), d[l] = (o ? "pos" === u ? "+=" : "-=" : "pos" === u ? "-=" : "+=") + s, a.animate(d, {
  5990.             queue: !1,
  5991.             duration: t.duration,
  5992.             easing: t.easing,
  5993.             complete: function() {
  5994.                 "hide" === r && a.hide(), e.effects.restore(a, n), e.effects.removeWrapper(a), i()
  5995.             }
  5996.         })
  5997.     }
  5998. })(jQuery);
  5999. ! function(widget, $, util) {
  6000.     widget.checkboxAndRadio = function(pSelector, pType, pOptions) {
  6001.         function _clear() {
  6002.             $.mobile ? gFieldset$.children("div.ui-controlgroup-controls").empty() : gFieldset$.children(":not(legend)").remove()
  6003.         }
  6004.  
  6005.         function _triggerRefresh() {
  6006.             gFieldset$.trigger("apexrefresh")
  6007.         }
  6008.  
  6009.         function _addResult(pData) {
  6010.             $.mobile ? ($("div.ui-controlgroup-controls", gFieldset$).append(pData.html), $(":" + pType, gFieldset$).checkboxradio(), gFieldset$.controlgroup()) : gFieldset$.append(pData.html), pData.hasOwnProperty("default") && $s(gFieldset$[0], pData["default"])
  6011.         }
  6012.  
  6013.         function refresh() {
  6014.             var lOptions = {
  6015.                 optimizeRefresh: gOptions.optimizeRefresh,
  6016.                 dependingOn: $(gOptions.dependingOnSelector, apex.gPageContext$),
  6017.                 success: _addResult,
  6018.                 clear: _clear
  6019.             };
  6020.             widget.util.cascadingLov(gFieldset$, gOptions.ajaxIdentifier, {
  6021.                 x01: gOptions.inputName,
  6022.                 pageItems: $(gOptions.pageItemsToSubmit, apex.gPageContext$)
  6023.             }, lOptions)
  6024.         }
  6025.         var gOptions = $.extend({
  6026.                 action: null,
  6027.                 nullValue: "",
  6028.                 inputName: null
  6029.             }, pOptions),
  6030.             gFieldset$ = $(pSelector, apex.gPageContext$);
  6031.         $(pSelector, apex.gPageContext$).each(function() {
  6032.             var lFieldset = this;
  6033.             widget.initPageItem(this.id, {
  6034.                 enable: function() {
  6035.                     $(":" + pType, lFieldset).prop("disabled", !1).removeClass("apex_disabled_multi")
  6036.                 },
  6037.                 disable: function() {
  6038.                     $(":" + pType, lFieldset).prop("disabled", !0).addClass("apex_disabled_multi")
  6039.                 },
  6040.                 setValue: function(pValue) {
  6041.                     var $lRadios = $(":" + pType, lFieldset),
  6042.                         lValueArray = [];
  6043.                     $lRadios.prop("checked", !1), "checkbox" === pType ? lValueArray = apex.util.toArray(pValue) : lValueArray[0] = pValue;
  6044.                     for (var i = 0; i < lValueArray.length; i++) $lRadios.filter("[value='" + util.escapeCSS(lValueArray[i]) + "']").prop("checked", !0)
  6045.                 },
  6046.                 getValue: function() {
  6047.                     var lReturn, $lRadio;
  6048.                     return "checkbox" === pType ? (lReturn = [], $(":checked", lFieldset).each(function() {
  6049.                         lReturn[lReturn.length] = this.value
  6050.                     })) : ($lRadio = $(pSelector + " :checked", apex.gPageContext$), lReturn = 0 === $lRadio.length ? "" : $lRadio.val()), lReturn
  6051.                 },
  6052.                 afterModify: function() {
  6053.                     $.mobile && $(":" + pType, lFieldset).checkboxradio("refresh")
  6054.                 },
  6055.                 nullValue: gOptions.nullValue,
  6056.                 setFocusTo: $(":" + pType, lFieldset).first(),
  6057.                 loadingIndicator: function(pLoadingIndicator$) {
  6058.                     var lLoadingIndicator$;
  6059.                     return lLoadingIndicator$ = $.mobile ? pLoadingIndicator$.appendTo($("div.ui-controlgroup-controls", gFieldset$)) : pLoadingIndicator$.appendTo(gFieldset$)
  6060.                 }
  6061.             })
  6062.         }), gOptions.dependingOnSelector && $(gOptions.dependingOnSelector, apex.gPageContext$).change(_triggerRefresh), gFieldset$.bind("apexrefresh", refresh), "REDIRECT_SET_VALUE" === gOptions.action ? gFieldset$.find("input").click(function() {
  6063.             location.href = "f?p=" + $v("pFlowId") + ":" + $v("pFlowStepId") + ":" + $v("pInstance") + "::" + $v("pdebug") + "::" + gFieldset$.attr("id") + ":" + $v(gFieldset$.attr("id"))
  6064.         }) : "SUBMIT" === gOptions.action && gFieldset$.find("input").click(function() {
  6065.             apex.submit(gFieldset$.attr("id"))
  6066.         })
  6067.     }
  6068. }(apex.widget, apex.jQuery, apex.util);
  6069. ! function(widget, $) {
  6070.     widget.datepicker = function(pSelector, pOptions, pFormat, pLocale) {
  6071.         var lOnSelectCallBack = null;
  6072.         (!pOptions.showTime || pOptions.showTime && "inline" == pOptions.showOn) && (lOnSelectCallBack = function(dateText, inst) {
  6073.             if (inst.inline) {
  6074.                 var altField = inst.settings.altField;
  6075.                 0 === altField.indexOf("#") && (altField = altField.substr(1, altField.length)), altField && $s(altField, dateText)
  6076.             } else $s(inst.id, dateText)
  6077.         });
  6078.         var lLang = pLocale,
  6079.             lOptions = $.extend({
  6080.                 dateFormat: pFormat,
  6081.                 duration: "",
  6082.                 constrainInput: !1,
  6083.                 onSelect: lOnSelectCallBack,
  6084.                 locale: lLang
  6085.             }, pOptions),
  6086.             lLocale = $.datepicker.regional[pLocale];
  6087.         delete lLocale.maxDate, delete lLocale.minDate, delete lLocale.defaultDate, delete lLocale.dateFormat, delete lLocale.yearRange, delete lLocale.numberOfMonths, delete lLocale.altField, lOptions = $.extend(lLocale, lOptions);
  6088.         $(pSelector, apex.gPageContext$).datepicker(lOptions);
  6089.         $(pSelector, apex.gPageContext$).each(function() {
  6090.             widget.initPageItem(this.id, {
  6091.                 enable: function() {
  6092.                     $("#" + this.id, apex.gPageContext$).datepicker("enable").removeClass("apex_disabled")
  6093.                 },
  6094.                 disable: function() {
  6095.                     $("#" + this.id, apex.gPageContext$).datepicker("disable").addClass("apex_disabled")
  6096.                 },
  6097.                 show: function() {
  6098.                     $("#" + this.id, apex.gPageContext$).parent().children().show()
  6099.                 },
  6100.                 hide: function() {
  6101.                     $("#" + this.id, apex.gPageContext$).parent().children().hide()
  6102.                 }
  6103.             })
  6104.         })
  6105.     }
  6106. }(apex.widget, apex.jQuery);
  6107. ! function(widget, $) {
  6108.     widget.popupLov = function(pSelector, pOptions) {
  6109.         function _triggerRefresh() {
  6110.             gPopupLov.trigger("apexrefresh")
  6111.         }
  6112.  
  6113.         function refresh() {
  6114.             gPopupLov.trigger("apexbeforerefresh"), $s(gPopupLov.attr("id"), gOptions.nullValue, gOptions.nullValue), gPopupLov.trigger("apexafterrefresh")
  6115.         }
  6116.  
  6117.         function _callPopup() {
  6118.             return widget.util.callPopupLov(gOptions.ajaxIdentifier, {
  6119.                 pageItems: $(gOptions.pageItemsToSubmit, apex.gPageContext$).add(gOptions.dependingOnSelector)
  6120.             }, {
  6121.                 filterOutput: gOptions.filterWithValue,
  6122.                 filterValue: gPopupLov.val(),
  6123.                 windowParameters: gOptions.windowParameters
  6124.             }), !1
  6125.         }
  6126.         var gOptions = $.extend({
  6127.                 dependingOnSelector: null,
  6128.                 optimizeRefresh: !0,
  6129.                 pageItemsToSubmit: null,
  6130.                 nullValue: "",
  6131.                 filterWithValue: !1,
  6132.                 windowParameters: null,
  6133.                 inputField: "NOT_ENTERABLE"
  6134.             }, pOptions),
  6135.             gPopupLov = $(pSelector, apex.gPageContext$),
  6136.             gEnterable = "ENTERABLE" == gOptions.inputField;
  6137.         $(pSelector, apex.gPageContext$).each(function() {
  6138.             widget.initPageItem(this.id, {
  6139.                 enable: function() {
  6140.                     widget.util.enableIcon($("#" + this.id + "_holder", apex.gPageContext$).find("a"), "#", _callPopup), gEnterable ? gPopupLov.prop("disabled", !1).removeClass("apex_disabled") : $("#" + this.id + "_HIDDENVALUE", apex.gPageContext$).prop("disabled", !1)
  6141.                 },
  6142.                 disable: function() {
  6143.                     widget.util.disableIcon($(gPopupLov).closest("tr")), gEnterable ? gPopupLov.prop("disabled", !0).addClass("apex_disabled") : $("#" + this.id + "_HIDDENVALUE", apex.gPageContext$).prop("disabled", !0)
  6144.                 },
  6145.                 show: function() {
  6146.                     $("#" + this.id, apex.gPageContext$).closest("tr").show()
  6147.                 },
  6148.                 hide: function() {
  6149.                     $("#" + this.id, apex.gPageContext$).closest("tr").hide()
  6150.                 },
  6151.                 setValue: function(pValue, pDisplayValue) {
  6152.                     gEnterable ? $("#" + this.id, apex.gPageContext$).val(pValue) : ($("#" + this.id + "_HIDDENVALUE", apex.gPageContext$).val(pValue), $("#" + this.id, apex.gPageContext$).val(pDisplayValue))
  6153.                 },
  6154.                 getValue: function() {
  6155.                     var lReturn;
  6156.                     return lReturn = gEnterable ? $("#" + this.id, apex.gPageContext$).val() : $("#" + this.id + "_HIDDENVALUE", apex.gPageContext$).val()
  6157.                 },
  6158.                 setFocusTo: function() {
  6159.                     return gEnterable ? $(pSelector, apex.gPageContext$) : $(pSelector + "_fieldset a", apex.gPageContext$)
  6160.                 },
  6161.                 nullValue: gOptions.nullValue
  6162.             })
  6163.         }), $(pSelector + "_fieldset a", apex.gPageContext$).click(_callPopup), gOptions.dependingOnSelector && $(gOptions.dependingOnSelector, apex.gPageContext$).change(_triggerRefresh), gPopupLov.bind("apexrefresh", refresh)
  6164.     }
  6165. }(apex.widget, apex.jQuery);
  6166. ! function(widget, $) {
  6167.     widget.selectList = function(pSelector, pOptions) {
  6168.         function _setValue(pValue) {
  6169.             gSelectList$.val(pValue), -1 === gSelectList$[0].selectedIndex && 1 === parseInt($nvl(gSelectList$.attr("size"), "1"), 10) && gSelectList$.children("option").first().prop("selected", !0)
  6170.         }
  6171.  
  6172.         function _clearList() {
  6173.             "nullValue" in pOptions ? $('option[value!="' + apex.util.escapeCSS(gOptions.nullValue) + '"]', gSelectList$).remove() : $("option", gSelectList$).remove(), $.mobile && gSelectList$.selectmenu("refresh", !0)
  6174.         }
  6175.  
  6176.         function _addResult(pData) {
  6177.             var lHtml = "";
  6178.             $.each(pData.values, function() {
  6179.                 lHtml = lHtml + '<option value="' + this.r + '" ' + gOptions.optionAttributes + ">" + this.d + "</option>"
  6180.             }), gSelectList$.append(lHtml), $.mobile && gSelectList$.selectmenu("refresh", !0), $s(gSelectList$[0], pData["default"])
  6181.         }
  6182.  
  6183.         function refresh() {
  6184.             widget.util.cascadingLov(gSelectList$, gOptions.ajaxIdentifier, {
  6185.                 pageItems: $(gOptions.pageItemsToSubmit, apex.gPageContext$)
  6186.             }, {
  6187.                 optimizeRefresh: gOptions.optimizeRefresh,
  6188.                 dependingOn: $(gOptions.dependingOnSelector, apex.gPageContext$),
  6189.                 success: _addResult,
  6190.                 clear: _clearList
  6191.             })
  6192.         }
  6193.         var gOptions = $.extend({
  6194.                 optionAttributes: null,
  6195.                 nullValue: ""
  6196.             }, pOptions),
  6197.             gSelectList$ = $(pSelector, apex.gPageContext$);
  6198.         gSelectList$.each(function() {
  6199.             $.mobile ? widget.initPageItem(this.id, {
  6200.                 setValue: _setValue,
  6201.                 enable: function() {
  6202.                     gSelectList$.selectmenu("enable")
  6203.                 },
  6204.                 disable: function() {
  6205.                     gSelectList$.selectmenu("disable")
  6206.                 },
  6207.                 afterModify: function() {
  6208.                     gSelectList$.selectmenu("refresh")
  6209.                 },
  6210.                 nullValue: gOptions.nullValue
  6211.             }) : widget.initPageItem(this.id, {
  6212.                 setValue: _setValue,
  6213.                 nullValue: gOptions.nullValue
  6214.             })
  6215.         }), gOptions.dependingOnSelector && $(gOptions.dependingOnSelector, apex.gPageContext$).bind("apexbeforerefresh", _clearList).change(refresh), gSelectList$.bind("apexrefresh", refresh)
  6216.     }
  6217. }(apex.widget, apex.jQuery);
  6218. ! function(widget, $, undefined) {
  6219.     widget.textarea = function(pId, pOptions) {
  6220.         function resizable() {
  6221.             function startResize(pEvent) {
  6222.                 return gOffsetX = gTextarea.width() - pEvent.pageX, gOffsetY = gTextarea.height() - pEvent.pageY, gTextarea.css("opacity", .25), $(document).bind("mousemove.apex_startResize", function(pE) {
  6223.                     return performResize(pE, "se-resize" === $(pEvent.currentTarget).css("cursor"))
  6224.                 }).bind("mouseup.apex_startResize", endResize), !1
  6225.             }
  6226.  
  6227.             function performResize(pEvent, pSetWidth) {
  6228.                 var lWidth;
  6229.                 return gTextarea.height(Math.max(gMinHeight, gOffsetY + pEvent.pageY) + "px"), pSetWidth && (lWidth = Math.max(gMinWidth, gOffsetX + pEvent.pageX), gTextarea.width(lWidth)), !1
  6230.             }
  6231.  
  6232.             function endResize(pEvent) {
  6233.                 $(document).unbind("mousemove.apex_startResize").unbind("mouseup.apex_startResize"), gTextarea.css("opacity", 1)
  6234.             }
  6235.             var gMinWidth, gMinHeight, gOffsetX = null,
  6236.                 gOffsetY = null;
  6237.             gMinWidth = parseInt(gTextarea.css("min-width"), 10) || 20, gMinHeight = parseInt(gTextarea.css("min-height"), 10) || 20, gTextarea.after('<div class="apex_size_bar"><div class="apex_size_grip"></div></div>'), $("div.apex_size_bar, div.apex_size_grip", gTextarea.parent()).mousedown(startResize), gTextarea.parent().css("display:inline-block")
  6238.         }
  6239.  
  6240.         function charCount() {
  6241.             var lLength = gTextarea.val().replace(/\n/g, "xx").length,
  6242.                 lPctFull = lLength / gOptions.maxChar * 100;
  6243.             lLength >= gOptions.maxChar ? (gTextarea.val(gTextarea.val().substr(0, gOptions.maxChar)), gTextarea.css("color", "red"), gCounter.html(gOptions.maxChar)) : (gTextarea.css("color", "black"), gCounter.html(lLength)), lLength > 0 ? gCountDiv.show() : gCountDiv.hide(), lPctFull > 95 ? gCountDiv.css("color", "red") : lPctFull >= 90 ? gCountDiv.css("color", "#EAA914") : gCountDiv.css("color", "black")
  6244.         }
  6245.         var gTextarea = $("#" + pId, apex.gPageContext$),
  6246.             gOptions = $.extend({
  6247.                 isResizable: !1,
  6248.                 hasCharCounter: !1,
  6249.                 maxChar: null
  6250.             }, pOptions);
  6251.         if (0 !== gTextarea.length) {
  6252.             if (gOptions.isResizable && ("string" == typeof document.documentElement.style.resize ? gTextarea.css("resize", "both") : resizable()), gOptions.hasCharCounter) {
  6253.                 var gCountDiv = $("#" + pId + "_CHAR_COUNT", apex.gPageContext$),
  6254.                     gCounter = $("#" + pId + "_CHAR_COUNTER", apex.gPageContext$);
  6255.                 gTextarea.change(charCount).keyup(charCount).focus(charCount), charCount()
  6256.             }
  6257.             apex.widget.initPageItem(pId, {
  6258.                 show: function() {
  6259.                     gTextarea.closest("fieldset").show()
  6260.                 },
  6261.                 hide: function() {
  6262.                     gTextarea.closest("fieldset").hide()
  6263.                 }
  6264.             })
  6265.         }
  6266.     }
  6267. }(apex.widget, apex.jQuery);
  6268. ! function(widget, $) {
  6269.     widget.yesNo = function(pPageItemId) {
  6270.         $.mobile && widget.initPageItem(pPageItemId, {
  6271.             enable: function() {
  6272.                 $(this.node).slider("enable")
  6273.             },
  6274.             disable: function() {
  6275.                 $(this.node).slider("disable")
  6276.             },
  6277.             afterModify: function() {
  6278.                 $(this.node).slider("refresh")
  6279.             }
  6280.         })
  6281.     }
  6282. }(apex.widget, apex.jQuery);
  6283. ! function(util, debug, lang, $, undefined) {
  6284.     "use strict";
  6285.  
  6286.     function renderIcon(out, iconType, iconName) {
  6287.         out.markup("<span").attr("class", iconType + " " + iconName).markup("></span>")
  6288.     }
  6289.  
  6290.     function menuResize() {
  6291.         var i, $menu, $item, x, y;
  6292.         for (menuLauncher ? (x = $(menuLauncher), y = null) : (x = originalX, y = originalY), placeMenu({
  6293.                 $menu: menuStack[0],
  6294.                 subMenu: !1,
  6295.                 x: x,
  6296.                 y: y,
  6297.                 slide: !1
  6298.             }), i = 1; i < menuStack.length; i++) $menu = menuStack[i], $item = $menu.parents(SEL_ITEM).eq(0), placeMenu({
  6299.             $menu: $menu,
  6300.             subMenu: !0,
  6301.             x: $item,
  6302.             slide: !1
  6303.         })
  6304.     }
  6305.  
  6306.     function menubarResize() {
  6307.         $(SEL_MENUBAR).each(function() {
  6308.             $(this).menu("resize")
  6309.         })
  6310.     }
  6311.  
  6312.     function startTrackingMenus() {
  6313.         isTracking || (isTracking = !0, $(window).on("blur.menuTracking", function() {
  6314.             menuManager.closeAll(!0)
  6315.         }), $("html").on("mousedown.menuTracking", function(e) {
  6316.             var $target = $(e.target);
  6317.             0 !== $target.closest(SEL_MENU).length || menuLauncher && 0 !== $target.closest(menuLauncher).length || menuManager.closeAll(!0)
  6318.         }).on("mousemove.menuTracking", function(e) {
  6319.             var $target, menu;
  6320.             (lastTrackingMouseX !== e.pageX || lastTrackingMouseY !== e.pageY) && (lastTrackingMouseX = e.pageX, lastTrackingMouseY = e.pageY, $target = $(e.target), menu = $target.parents(SEL_MENU)[0], !menu && currentMenuBar && (menu = $target.parent(SEL_MENUBAR)[0]), !menu && lastMenu && lastMenu !== menu && $(lastMenu).focus(), lastMenu = menu)
  6321.         }), apex.tooltipManager && apex.tooltipManager.disableTooltips())
  6322.     }
  6323.  
  6324.     function stopTrackingMenus() {
  6325.         $(window).off(".menuTracking"), $("html").off(".menuTracking"), isTracking = !1, apex.tooltipManager && apex.tooltipManager.enableTooltips()
  6326.     }
  6327.  
  6328.     function getMenuScrollParent($menu) {
  6329.         return $menu.children().children(SEL_MENU_SCROLL)
  6330.     }
  6331.  
  6332.     function focusMenuLauncher() {
  6333.         var $menuLauncher;
  6334.         menuLauncher && ($menuLauncher = $(menuLauncher), $menuLauncher.is(SEL_ITEM) ? $menuLauncher.find(SEL_FOCUSABLE).focus() : $menuLauncher.focus())
  6335.     }
  6336.  
  6337.     function placeMenu(o) {
  6338.         var out, menuh, maxMenuHeight, scale, itemHeight, $menu = o.$menu,
  6339.             posInfo = {},
  6340.             isVisible = "none" !== $menu.css("display");
  6341.         isVisible || $menu.css({
  6342.             display: "block",
  6343.             position: "absolute",
  6344.             top: -99999,
  6345.             left: 0
  6346.         }), o.minWidth && $menu.css("min-width", o.minWidth), "true" !== $menu.attr("data-custom") && (itemHeight = $menu.find("li").first().outerHeight(), maxMenuHeight = $(window).height(), scale = maxMenuHeight > 1e3 ? .6 : maxMenuHeight > 500 ? .75 : .9, maxMenuHeight = Math.floor(maxMenuHeight * scale / itemHeight) * itemHeight - itemHeight, menuh = $menu.height(), menuh > maxMenuHeight ? (0 === getMenuScrollParent($menu).length && (out = util.htmlBuilder(), out.markup("<div").attr("class", C_MENU_SCROLL_BTN + "  " + C_UP).markup(">"), renderIcon(out, C_DEFAULT_ICON_TYPE, C_ICON_SCROLL_UP), out.markup("</div>"), $menu.children().first().addClass(C_MENU_SCROLLABLE).prepend(out.toString()).append(out.toString().replace(C_ICON_SCROLL_UP, C_ICON_SCROLL_DOWN).replace(C_UP, C_DOWN)).children("ul").first().wrap("<div class='" + C_MENU_SCROLL + "'></div>")), getMenuScrollParent($menu).height(maxMenuHeight)[0].scrollTop = 0, $menu.find(SEL_MENU_SCROLL_BTN + "." + C_UP).addClass(C_DISABLED)) : getMenuScrollParent($menu).length > 0 && ($menu.children().first().removeClass(C_MENU_SCROLLABLE).children(SEL_MENU_SCROLL_BTN).remove(), $menu.find("ul").first().unwrap())), "number" == typeof o.x && "number" == typeof o.y ? (originalX = o.x, originalY = o.y, posInfo.of = $.Event("click", {
  6347.             pageX: originalX,
  6348.             pageY: originalY
  6349.         })) : (originalX = originalY = null, posInfo.of = o.x), currentIsRtl ? o.subMenu ? (posInfo.my = "right top", posInfo.at = "left top") : (posInfo.my = "right top", posInfo.at = "right bottom") : o.subMenu ? (posInfo.my = "left top", posInfo.at = "right top") : (posInfo.my = "left top", posInfo.at = "left bottom"), posInfo.collision = "flipfit flipfit", $menu.position(posInfo), $menu.css("display", isVisible ? "block" : "none"), isVisible || (o.slide ? $menu.slideDown(200) : $menu.show(), o.focus && $menu.focus())
  6350.     }
  6351.  
  6352.     function itemIsMenuBarItem($item) {
  6353.         return $item.parent().parent().hasClass(C_MENUBAR)
  6354.     }
  6355.  
  6356.     function findItemById(menu, id) {
  6357.         var theItem = null;
  6358.         return $.each(menu.items, function(i, item) {
  6359.             return item.id === id ? (theItem = item, !1) : "subMenu" === item.type && (theItem = findItemById(item.menu, id), null !== theItem) ? !1 : void 0
  6360.         }), theItem
  6361.     }
  6362.  
  6363.     function getChoiceFromId(id) {
  6364.         var choice = null,
  6365.             index = id.search(/_c[0-9]+$/);
  6366.         return index >= 0 && (choice = 1 * id.substring(index + 2)), choice
  6367.     }
  6368.  
  6369.     function invokeItem(item, choice, menuOptions, typeOverride, delay) {
  6370.         function doAction() {
  6371.             var menuOpened;
  6372.             $(document.body).on("dialogopen.menu", function(e) {
  6373.                 var dialog$ = $(e.target);
  6374.                 menuOpened = !0, dialog$.dialog("option", "modal") && dialog$.on("dialogclose.menu", function(e) {
  6375.                     dialog$.off("dialogclose.menu"), focusMenuLauncher()
  6376.                 })
  6377.             }), setTimeout(function() {
  6378.                 $(document.body).off("dialogopen.menu")
  6379.             }, 150), "string" == typeof item.action && apex.actions ? (debug.info("Invoke action menu item '" + (item.label || apex.actions.lookup(item.action).label) + "'"), actionTookFocus = apex.actions.invoke(item.action, {}, menuLauncher) || !1) : (debug.info("Invoke action menu item '" + item.label + "'"), item.action ? actionTookFocus = item.action(menuOptions, menuLauncher) || !1 : item.href && (apex.navigation.redirect(item.href), actionTookFocus = !0)), menuOpened && (actionTookFocus = !0)
  6380.         }
  6381.         var value, isAction = !1,
  6382.             type = typeOverride || item.type;
  6383.         try {
  6384.             if ("toggle" === type) "string" == typeof item.action && apex.actions && (item = apex.actions.lookup(item.action), isAction = !0), value = !item.get(), debug.info("Invoke toggle menu item '" + (item.label || (value ? item.onLabel : item.offLabel)) + "' value now " + value), item.set(value), isAction && apex.actions.update(item.name), actionTaken = !0;
  6385.             else if ("radioGroup" === type) value = item.choices[choice].value, debug.info("Invoke choice menu item '" + item.choices[choice].label + "' value now " + value), item.set(value), actionTaken = !0;
  6386.             else if ("action" === type) delay ? setTimeout(function() {
  6387.                 doAction()
  6388.             }, 210) : doAction(), actionTaken = !0;
  6389.             else if ("subMenu" === type) return !1
  6390.         } catch (ex) {
  6391.             debug.error("Error in menu action.", ex)
  6392.         }
  6393.         return !0
  6394.     }
  6395.  
  6396.     function descendentIsCurrent(item, clear) {
  6397.         var i, curItem;
  6398.         if (item.menu && item.menu.items)
  6399.             for (i = 0; i < item.menu.items.length; i++)
  6400.                 if (curItem = item.menu.items[i], curItem.current || descendentIsCurrent(curItem, clear)) return clear && curItem.current && delete curItem.current, !0;
  6401.         return !1
  6402.     }
  6403.  
  6404.     function getLabelFromMessage(item) {
  6405.         item.labelKey && (item.label = lang.getMessage(item.labelKey)), item.onLabelKey && (item.onLabel = lang.getMessage(item.onLabelKey)), item.offLabelKey && (item.offLabel = lang.getMessage(item.offLabelKey))
  6406.     }
  6407.  
  6408.     function setItemFocus(item$) {
  6409.         item$.is(SEL_FOCUSABLE) ? item$.focus() : item$.find(SEL_FOCUSABLE).first().focus()
  6410.     }
  6411.  
  6412.     function getItemsForMenu(menu$) {
  6413.         var parentItem, items$;
  6414.         return parentItem = menu$.closest(SEL_MENU_ITEM)[0], items$ = menu$.find(SEL_MENU_ITEM).not(function(index, element) {
  6415.             var p = $(element).parent().closest(SEL_MENU_ITEM)[0];
  6416.             return p !== parentItem
  6417.         })
  6418.     }
  6419.  
  6420.     function getItemLabel(item$) {
  6421.         var label$ = item$.children(SEL_MENUITEM_LABEL);
  6422.         return 0 === label$.length && (label$ = item$.children(SEL_ITEM_INNER).find(SEL_MENUITEM_LABEL)), label$
  6423.     }
  6424.     var currentMenu = null,
  6425.         currentMenuBar = null,
  6426.         currentIsRtl = !1,
  6427.         menuLauncher = null,
  6428.         actionTookFocus = !1,
  6429.         actionTaken = !1,
  6430.         menuStack = [],
  6431.         menuLayoutDone = [],
  6432.         isTracking = !1,
  6433.         keepTracking = !1,
  6434.         originalX = null,
  6435.         originalY = null,
  6436.         lastMouseX = 0,
  6437.         lastMouseY = 0,
  6438.         lastTrackingMouseX = 0,
  6439.         lastTrackingMouseY = 0,
  6440.         subMenuDelayID = null,
  6441.         subMenuCloseDelayID = null,
  6442.         closeDelayMenu = null,
  6443.         lastMenu = null,
  6444.         lastItem = null,
  6445.         C_MENUBAR = "a-MenuBar",
  6446.         SEL_MENUBAR = ".a-MenuBar",
  6447.         C_MENUBAR_TABS = "a-MenuBar--tabs",
  6448.         C_MENU = "a-Menu",
  6449.         SEL_MENU = ".a-Menu",
  6450.         C_MENU_TOP = "a-Menu--top",
  6451.         C_MENU_CONTENT = "a-Menu-content",
  6452.         SEL_MENU_CONTENT = "." + C_MENU_CONTENT,
  6453.         C_MENU_SCROLL = "a-Menu-scroll",
  6454.         SEL_MENU_SCROLL = ".a-Menu-scroll",
  6455.         C_MENU_SCROLL_BTN = "a-Menu-scrollBtn",
  6456.         SEL_MENU_SCROLL_BTN = ".a-Menu-scrollBtn",
  6457.         C_MENU_SCROLLABLE = "a-Menu--scrollable",
  6458.         C_UP = "a-Menu-scrollBtn--up",
  6459.         C_DOWN = "a-Menu-scrollBtn--down",
  6460.         C_ICON_SCROLL_UP = "icon-menu-scroll-up",
  6461.         C_ICON_SCROLL_DOWN = "icon-menu-scroll-down",
  6462.         C_ITEM = "a-Menu-item",
  6463.         SEL_MENU_ITEM = "." + C_ITEM,
  6464.         SEL_ITEM = ".a-Menu-item, .a-MenuBar-item",
  6465.         SEL_ITEM_INNER = ".a-Menu-inner",
  6466.         SEL_ITEM_IN_MENU = ".a-Menu-item, .a-MenuBar-item, .a-Menu-content",
  6467.         SEL_ITEM_OR_BTN = SEL_ITEM_IN_MENU + ", " + SEL_MENU_SCROLL_BTN,
  6468.         C_ITEM_DEFAULT = "a-Menu-item--default",
  6469.         C_BAR_ITEM = "a-MenuBar-item",
  6470.         C_BAR_OVERFLOW = "a-MenuBar-item--overflow",
  6471.         C_OVERFLOW = "a-MenuBar--overflow",
  6472.         C_STATUS_COL = "a-Menu-statusCol",
  6473.         C_LABEL = "a-Menu-label",
  6474.         C_ACCEL = "a-Menu-accel",
  6475.         C_BAR_LABEL = "a-MenuBar-label",
  6476.         SEL_LABEL = ".a-Menu-label",
  6477.         SEL_MENUITEM_LABEL = ".a-Menu-label,.a-MenuBar-label",
  6478.         C_SUBMENU_COL = "a-Menu-subMenuCol",
  6479.         SEL_SUBMENU_COL = ".a-Menu-subMenuCol",
  6480.         C_SPLIT_MENU = "a-Menu--split",
  6481.         C_CURRENT_MENU = "a-Menu--current",
  6482.         C_HSEP = "a-Menu-hSeparator",
  6483.         C_ITEM_SEP = "a-Menu-itemSep",
  6484.         SEL_ITEM_SEP = ".a-Menu-itemSep",
  6485.         C_DISABLED = "is-disabled",
  6486.         C_FOCUSED = "is-focused",
  6487.         C_ACTIVE = "is-active",
  6488.         SEL_FOCUSED = ".is-focused",
  6489.         SEL_FOCUSABLE = "a, button, .a-Menu-label, .a-MenuBar-label",
  6490.         C_EXPANDED = "is-expanded",
  6491.         SEL_EXPANDED = ".is-expanded",
  6492.         C_DEFAULT_ICON_TYPE = "a-Icon",
  6493.         SEL_MENUBUTTON = "button.js-menuButton",
  6494.         C_RTL = "u-RTL",
  6495.         A_EXPANDED = "aria-expanded",
  6496.         A_DISABLED = "aria-disabled",
  6497.         A_HASPOPUP = "aria-haspopup",
  6498.         A_CHECKED = "aria-checked",
  6499.         keys = $.ui.keyCode;
  6500.     $(document).ready(function() {
  6501.         $(window).on("apexwindowresized", function() {
  6502.             menubarResize(), isTracking && menuResize()
  6503.         })
  6504.     });
  6505.     var menuManager = {
  6506.         openMenu: function($menu, $menuBar, x, y, slide, focus) {
  6507.             var minWidth = 0;
  6508.             this.closeAll(), currentMenu = $menu[0], currentMenuBar = $menuBar ? $menuBar[0] : null, currentIsRtl = $(currentMenuBar || currentMenu).hasClass(C_RTL), menuLauncher = "object" == typeof x && x.get ? x[0] : null, actionTookFocus = !1, actionTaken = !1, keepTracking = !0, 0 === menuStack.length && startTrackingMenus(), menuStack.push($menu), keepTracking = !1, menuLayoutDone = [], $menuBar && (x.addClass(C_EXPANDED).children(SEL_MENUITEM_LABEL).attr(A_EXPANDED, "true"), minWidth = x.outerWidth()), placeMenu({
  6509.                 $menu: $menu,
  6510.                 subMenu: !1,
  6511.                 x: x,
  6512.                 y: y,
  6513.                 slide: slide,
  6514.                 focus: focus,
  6515.                 minWidth: minWidth
  6516.             })
  6517.         },
  6518.         isCurrentMenu: function(menu) {
  6519.             return currentMenu && currentMenu === menu
  6520.         },
  6521.         isCurrentMenuBar: function(menubar) {
  6522.             return currentMenuBar && currentMenuBar === menubar
  6523.         },
  6524.         isMenuOpen: function(menu) {
  6525.             var i;
  6526.             for (i = 0; i < menuStack.length; i++)
  6527.                 if (menuStack[i] === menu) return !0;
  6528.             return !1
  6529.         },
  6530.         openSubMenu: function($item, $menu, menuBarItem, slide, focus) {
  6531.             this.closeOpenSiblings($item, menuBarItem), menuStack.push($menu), placeMenu({
  6532.                 $menu: $menu,
  6533.                 subMenu: !0,
  6534.                 x: $item,
  6535.                 slide: slide,
  6536.                 focus: focus
  6537.             }), $item.addClass(C_EXPANDED).children(SEL_ITEM_INNER).find(SEL_MENUITEM_LABEL).attr(A_EXPANDED, "true")
  6538.         },
  6539.         closeOpenSiblings: function($item, menuBarItem) {
  6540.             var $openSubMenu = $item.parent().find(SEL_EXPANDED);
  6541.             for (menuBarItem && (keepTracking = !0); $openSubMenu.length > 0;) this.closeLast(!1), $openSubMenu = $item.parent().find(SEL_EXPANDED);
  6542.             keepTracking = !1
  6543.         },
  6544.         closeLast: function(focus) {
  6545.             var $menu, $item, $label;
  6546.             menuStack.length > 0 ? ($menu = menuStack.pop(), $item = $menu.parents(SEL_ITEM).eq(0), $item.length > 0 && ($label = getItemLabel($item), $item.removeClass(C_EXPANDED).children(SEL_ITEM_INNER), $label.attr(A_EXPANDED, "false"), focus && $item.find(SEL_FOCUSABLE).eq(0).focus()), $menu.hide(), 0 === menuStack.length && (!menuLauncher || actionTookFocus || keepTracking || setTimeout(function() {
  6547.                 focusMenuLauncher()
  6548.             }, 10), currentMenuBar && ($label = getItemLabel($(currentMenu).find(SEL_EXPANDED)), $(currentMenu).find(SEL_EXPANDED).removeClass(C_EXPANDED), $label.attr(A_EXPANDED, "false")), (currentMenuBar || currentMenu) && $(currentMenuBar || currentMenu).data("apex-menu")._trigger("afterClose", {}, {
  6549.                 actionTookFocus: actionTookFocus,
  6550.                 actionTaken: actionTaken,
  6551.                 launcher: menuLauncher
  6552.             }), currentMenu = null, keepTracking || (currentMenuBar = null, stopTrackingMenus()))) : (currentMenu = null, currentMenuBar = null, stopTrackingMenus())
  6553.         },
  6554.         closeAll: function(force) {
  6555.             for (; menuStack.length > 0;) this.closeLast(!1);
  6556.             force && (currentMenu = null, currentMenuBar = null, stopTrackingMenus())
  6557.         }
  6558.     };
  6559.     $.widget("apex.menu", {
  6560.         version: "5.0",
  6561.         widgetEventPrefix: "menu",
  6562.         options: {
  6563.             menubar: !1,
  6564.             menubarShowSubMenuIcon: null,
  6565.             menubarOverflow: !1,
  6566.             iconType: C_DEFAULT_ICON_TYPE,
  6567.             behaveLikeTabs: !1,
  6568.             tabBehavior: "EXIT",
  6569.             useLinks: !0,
  6570.             slide: !1,
  6571.             firstItemIsDefault: !1,
  6572.             items: null,
  6573.             idPrefix: null,
  6574.             customContent: !1,
  6575.             asyncFetchMenu: null,
  6576.             beforeOpen: null,
  6577.             afterClose: null
  6578.         },
  6579.         isActive: !1,
  6580.         scrollTimerId: null,
  6581.         forwardKey: keys.RIGHT,
  6582.         backwardKey: keys.LEFT,
  6583.         _create: function() {
  6584.             var i, wheelEvent, o = this.options,
  6585.                 $ctrl = this.element;
  6586.             if (o.menubar && o.customContent) throw "Menubar cannot have custom content";
  6587.             if (o.items || o.customContent === !0 || (o.items = this._parseMenuMarkup($ctrl, o.menubar).items), !o.menubar && (o.customContent || o.asyncFetchMenu) || o.items && 0 !== o.items.length || debug.error("Menu has no menu items"), "rtl" === $ctrl.css("direction") && ($ctrl.addClass(C_RTL), o.menubar || $ctrl.attr("dir", "rtl"), this.forwardKey = keys.LEFT, this.backwardKey = keys.RIGHT), $ctrl.attr("tabindex", -1).attr("role", o.menubar ? "menubar" : "menu").addClass(o.menubar ? C_MENUBAR : C_MENU), o.menubar) {
  6588.                 if (o.menubarOverflow && $ctrl.addClass(C_OVERFLOW), null === o.menubarShowSubMenuIcon)
  6589.                     for (o.menubarShowSubMenuIcon = !1, i = 0; i < o.items.length; i++)
  6590.                         if ("subMenu" !== o.items[i].type) {
  6591.                             o.menubarShowSubMenuIcon = !0;
  6592.                             break
  6593.                         }
  6594.                 this.refresh(), o.behaveLikeTabs && $ctrl.addClass(C_MENUBAR_TABS), o.firstItemIsDefault && debug.warn("Invalid options for menu bar ignored")
  6595.             } else $("body").append($ctrl), $ctrl.hide(), (o.menubarOverflow || o.menubarShowSubMenuIcon || o.behaveLikeTabs) && debug.warn("Invalid options for popup menu ignored");
  6596.             "onwheel" in $ctrl[0] || !this._eventHandlers.wheel || (wheelEvent = document.onmousewheel !== undefined ? "mousewheel" : "DOMMouseScroll", this._eventHandlers[wheelEvent] = this._eventHandlers.wheel, delete this._eventHandlers.wheel), this._on(this._eventHandlers)
  6597.         },
  6598.         _eventHandlers: {
  6599.             mousedown: function(e) {
  6600.                 var item, id, onDropDown, $target;
  6601.                 1 !== e.which || e.shiftKey || e.ctrlKey || ($target = $(e.target).closest(SEL_ITEM_OR_BTN), e.preventDefault(), $target.length > 0 && !$target.hasClass(C_MENU_CONTENT) && !$target.hasClass(C_DISABLED) && ($target.is(SEL_MENU_SCROLL_BTN) ? ($target.addClass(C_ACTIVE), this._startScrolling($target.closest(SEL_MENU), $target.hasClass(C_UP))) : itemIsMenuBarItem($target) && (id = $target[0].id, item = this._getMenuItemFromId(id), "subMenu" === item.type && (onDropDown = 0 !== $(e.target).closest(SEL_SUBMENU_COL).length, (onDropDown || !item.action && !item.href) && this.toggle($target)))))
  6602.             },
  6603.             mouseup: function(e) {
  6604.                 var item, choice, id, isMenuBarItem, type, onDropDown, $target;
  6605.                 1 !== e.which || e.shiftKey || e.ctrlKey || ($target = $(e.target).closest(SEL_ITEM_IN_MENU), e.preventDefault(), $target.length > 0 && !$target.hasClass(C_MENU_CONTENT) && (id = $target[0].id, item = this._getMenuItemFromId(id), type = item.type, isMenuBarItem = itemIsMenuBarItem($target), "subMenu" === type && isMenuBarItem && (onDropDown = 0 !== $(e.target).closest(SEL_SUBMENU_COL).length, onDropDown || !item.action && !item.href || (type = "action", menuManager.closeOpenSiblings($target, isMenuBarItem))), "subMenu" === type && isMenuBarItem || !$target.is(SEL_ITEM) || $target.hasClass(C_DISABLED) || "display" === type || (choice = getChoiceFromId(id), invokeItem(item, choice, this.options, type) && menuManager.closeAll())))
  6606.             },
  6607.             click: function(e) {
  6608.                 var $target, id, item, choice;
  6609.                 return "A" === e.target.nodeName && (1 !== e.which || e.shiftKey || e.ctrlKey) ? void(this.keyboardActivate = !1) : (e.preventDefault(), void(this.keyboardActivate && (this.keyboardActivate = !1, $target = $(e.target).closest(SEL_ITEM_IN_MENU), $target.length > 0 && !$target.hasClass(C_MENU_CONTENT) && (id = $target[0].id, item = this._getMenuItemFromId(id), $target.is(SEL_ITEM) && !$target.hasClass(C_DISABLED) && (choice = getChoiceFromId(id), invokeItem(item, choice, this.options, "subMenu" === item.type ? "action" : item.type) && menuManager.closeAll())))))
  6610.             },
  6611.             mousemove: function(e) {
  6612.                 function checkDelayClose() {
  6613.                     var $expanded = $item.parent().find(SEL_EXPANDED);
  6614.                     $expanded.length > 0 && !subMenuCloseDelayID && ($expanded.removeClass(C_EXPANDED), closeDelayMenu = $expanded.find(SEL_MENU)[0], subMenuCloseDelayID = setTimeout(function() {
  6615.                         $expanded.addClass(C_EXPANDED), subMenuCloseDelayID = null, closeDelayMenu = null, menuManager.closeOpenSiblings($item, isMenuBarItem)
  6616.                     }, 250))
  6617.                 }
  6618.                 var isMenuBarItem, $target, $item, $menu, self = this;
  6619.                 if (lastMouseX !== e.pageX || lastMouseY !== e.pageY) {
  6620.                     if (lastMouseX = e.pageX, lastMouseY = e.pageY, $target = $(e.target), subMenuCloseDelayID && $target.closest(SEL_MENU)[0] === closeDelayMenu && ($(closeDelayMenu).parent().addClass(C_EXPANDED), closeDelayMenu = null, clearTimeout(subMenuCloseDelayID), subMenuCloseDelayID = null), $item = $target.closest(SEL_ITEM_SEP), $item.length > 0 && $item[0] !== lastItem) return subMenuDelayID && (clearTimeout(subMenuDelayID), subMenuDelayID = null), isMenuBarItem = itemIsMenuBarItem($item), checkDelayClose(), lastItem = $item[0], $menu = $target.closest(SEL_MENU).eq(0), void($menu.length > 0 && !$menu.hasClass(C_FOCUSED) && $menu.focus());
  6621.                     if ($item = $target.closest(SEL_ITEM), $item.length > 0) {
  6622.                         if (!$item.hasClass(C_FOCUSED) && "true" !== getItemLabel($item).attr(A_EXPANDED)) {
  6623.                             if (subMenuDelayID && (clearTimeout(subMenuDelayID), subMenuDelayID = null), isMenuBarItem = itemIsMenuBarItem($item), isMenuBarItem && isTracking ? (clearTimeout(subMenuCloseDelayID), subMenuCloseDelayID = null, menuManager.closeOpenSiblings($item, isMenuBarItem)) : checkDelayClose(), this.options.menubar && !menuManager.isCurrentMenuBar(this.element[0]) && !this.isActive) return this.element.find(SEL_FOCUSED).removeClass(C_FOCUSED), void $item.addClass(C_FOCUSED);
  6624.                             setItemFocus($item), !$item.hasClass(C_DISABLED) && $item.find(SEL_MENU).length > 0 && "true" !== getItemLabel($item).attr(A_EXPANDED) && (isMenuBarItem ? menuManager.isCurrentMenuBar(this.element[0]) && this.open($item) : subMenuDelayID = setTimeout(function() {
  6625.                                 subMenuDelayID = null, menuManager.openSubMenu($item, $item.children(SEL_MENU).first(), isMenuBarItem, self.options.slide, !0)
  6626.                             }, 300))
  6627.                         }
  6628.                         lastItem = $item[0]
  6629.                     } else $target.closest(SEL_MENU).first().focus()
  6630.                 }
  6631.             },
  6632.             mouseleave: function(e) {
  6633.                 subMenuDelayID && (clearTimeout(subMenuDelayID), subMenuDelayID = null), this.options.menubar && (menuManager.isCurrentMenuBar(this.element[0]) || this.isActive || this.element.find(SEL_FOCUSED).removeClass(C_FOCUSED))
  6634.             },
  6635.             wheel: function(e) {
  6636.                 var sp, $menu = $(e.target).closest(SEL_MENU),
  6637.                     deltaY = e.originalEvent.deltaY || e.originalEvent.detail || -1 / 40 * e.originalEvent.wheelDelta;
  6638.                 if ($menu.length) {
  6639.                     if (e.preventDefault(), sp = getMenuScrollParent($menu)[0], !sp) return;
  6640.                     (e.originalEvent.deltaMode === undefined || 1 === e.originalEvent.deltaMode) && (deltaY = 30 * deltaY), sp.scrollTop += deltaY, this._checkScrollBounds($menu, sp)
  6641.                 }
  6642.             },
  6643.             keydown: function(e) {
  6644.                 function moveNext(noWrap) {
  6645.                     var i;
  6646.                     if (cur$.hasClass(C_MENU)) next$ = cur$.find(SEL_MENU_CONTENT).first().find(SEL_ITEM).first();
  6647.                     else {
  6648.                         if (i = items$.index(cur$), i += 1, i >= items$.length) {
  6649.                             if (noWrap) return !1;
  6650.                             i = 0
  6651.                         }
  6652.                         next$ = items$.eq(i)
  6653.                     }
  6654.                     return setItemFocus(next$), cur$ = next$, sp && self._checkScrollBounds(thisMenu$, sp), !0
  6655.                 }
  6656.  
  6657.                 function movePrev(noWrap) {
  6658.                     var i;
  6659.                     if (cur$.hasClass(C_MENU)) next$ = cur$.find(SEL_MENU_CONTENT).first().find(SEL_ITEM).last();
  6660.                     else {
  6661.                         if (i = items$.index(cur$), i -= 1, 0 > i) {
  6662.                             if (noWrap) return !1;
  6663.                             i = items$.length - 1
  6664.                         }
  6665.                         next$ = items$.eq(i)
  6666.                     }
  6667.                     return setItemFocus(next$), cur$ = next$, sp && self._checkScrollBounds(thisMenu$, sp), !0
  6668.                 }
  6669.  
  6670.                 function openMenu() {
  6671.                     self.toggle(cur$), cur$.hasClass(C_SPLIT_MENU) ? cur$.find(SEL_FOCUSABLE).eq(0).focus() : (next$ = cur$.find(SEL_MENU_CONTENT).first().find(SEL_ITEM).first(), setItemFocus(next$))
  6672.                 }
  6673.                 var cur$, items$, menu$, next$, $ctrl, isMenuBarItem, sp, thisMenu$, index, tabbable$, id, item, type, choice, tabBehavior, self = this,
  6674.                     kc = e.which;
  6675.                 if (!e.altKey)
  6676.                     if ($ctrl = this.element, this.keyboardActivate = !1, $ctrl.hasClass(C_FOCUSED) ? (cur$ = $ctrl, $ctrl.find(SEL_EXPANDED).first().each(function() {
  6677.                             cur$ = $(this)
  6678.                         })) : cur$ = $ctrl.find(SEL_FOCUSED), thisMenu$ = cur$.closest(SEL_MENU + "," + SEL_MENUBAR), sp = getMenuScrollParent(thisMenu$)[0], isMenuBarItem = cur$.is(SEL_MENUBAR) || itemIsMenuBarItem(cur$), items$ = isMenuBarItem ? $ctrl.find("." + C_BAR_ITEM) : getItemsForMenu(thisMenu$), kc === keys.UP || kc === keys.DOWN) isMenuBarItem ? cur$.children(SEL_MENU).length > 0 && !cur$.hasClass(C_DISABLED) && (cur$.hasClass(C_SPLIT_MENU) && menuManager.isCurrentMenu(cur$.children(SEL_MENU)[0]) ? (next$ = cur$.find("ul").first().children(SEL_ITEM).first(), next$.find(SEL_FOCUSABLE).focus()) : openMenu()) : kc === keys.UP ? movePrev() : moveNext(), e.preventDefault();
  6679.                     else if (kc === this.forwardKey) isMenuBarItem ? (moveNext(), menuManager.closeOpenSiblings(cur$, !0), menuManager.isCurrentMenuBar($ctrl[0]) && cur$.children(SEL_MENU).length > 0 && !cur$.hasClass(C_DISABLED) && openMenu()) : (next$ = cur$.children(SEL_MENU), next$.length > 0 && !cur$.hasClass(C_DISABLED) ? (menuManager.openSubMenu(cur$, next$, !1, this.options.slide, !1), next$ = next$.find("ul").first().children(SEL_ITEM).first(), setItemFocus(next$)) : this.options.menubar && (cur$ = $ctrl.find(SEL_EXPANDED).eq(0), items$ = $ctrl.find("." + C_BAR_ITEM), moveNext(), menuManager.closeOpenSiblings(cur$, itemIsMenuBarItem(cur$)), cur$.children(SEL_MENU).length > 0 && !cur$.hasClass(C_DISABLED) && openMenu())), e.preventDefault();
  6680.                 else if (kc === self.backwardKey) isMenuBarItem ? (movePrev(), menuManager.closeOpenSiblings(cur$, !0), menuManager.isCurrentMenuBar(self.element[0]) && cur$.children(SEL_MENU).length > 0 && !cur$.hasClass(C_DISABLED) && openMenu()) : (next$ = cur$.parents(SEL_ITEM).eq(0), next$.length > 0 && !itemIsMenuBarItem(next$) ? menuManager.closeLast(!0) : this.options.menubar && (cur$ = $ctrl.find(SEL_EXPANDED).eq(0), items$ = $ctrl.find("." + C_BAR_ITEM), movePrev(), menuManager.closeOpenSiblings(cur$, itemIsMenuBarItem(cur$)), cur$.children(SEL_MENU).length > 0 && !cur$.hasClass(C_DISABLED) && openMenu())), e.preventDefault();
  6681.                 else if (kc === keys.TAB) isMenuBarItem ? ("EXIT" === this.options.tabBehavior || e.shiftKey) && (actionTookFocus = !0, menuManager.closeAll()) : (tabBehavior = this.options.tabBehavior, "NEXT" === tabBehavior && (e.shiftKey ? movePrev(!0) || (tabBehavior = "EXIT") : moveNext(!0) || (tabBehavior = "EXIT")), "EXIT" === tabBehavior && menuLauncher && (actionTookFocus = !0, menuManager.closeAll(), tabbable$ = $(":tabbable"), this.options.menubar ? (index = tabbable$.index($(menuLauncher).find(":tabbable")), 0 > index && (index = tabbable$.index(this.element.find(":tabbable")))) : index = tabbable$.index(menuLauncher), index > 0 && index < tabbable$.length ? index += e.shiftKey ? -1 : 1 : tabbable$.length > 0 && (index = 0), index >= 0 && tabbable$[index].focus()), e.preventDefault());
  6682.                 else if (kc === keys.ESCAPE) menuManager.closeLast(!0), e.preventDefault();
  6683.                 else if (kc === keys.ENTER || kc === keys.SPACE) {
  6684.                     if (cur$ = $ctrl.hasClass(C_FOCUSED) ? $ctrl : $ctrl.find(SEL_FOCUSED), cur$.hasClass(C_DISABLED) || !cur$.is(SEL_ITEM)) return void e.preventDefault();
  6685.                     if (id = cur$[0].id, item = this._getMenuItemFromId(id), type = item.type, isMenuBarItem = itemIsMenuBarItem(cur$), "subMenu" === type && isMenuBarItem && (item.action || item.href) && (type = "action", menuManager.closeOpenSiblings(cur$, isMenuBarItem)), "subMenu" === type) isMenuBarItem ? (self.toggle(cur$), next$ = cur$.find(SEL_MENU_CONTENT).first().find(SEL_ITEM).first(), setItemFocus(next$)) : (menu$ = cur$.children(SEL_MENU), menu$.length > 0 && (menuManager.openSubMenu(cur$, menu$, !1, this.options.slide, !1), next$ = menu$.find("ul").first().children(SEL_ITEM).first(), setItemFocus(next$)));
  6686.                     else {
  6687.                         if (("A" !== e.target.nodeName || kc !== keys.SPACE) && ("action" === type || kc === keys.SPACE && "BUTTON" === e.target.nodeName)) return void(this.keyboardActivate = !0);
  6688.                         "display" !== type && (choice = getChoiceFromId(id), invokeItem(item, choice, this.options, type, kc === keys.SPACE) && (actionTookFocus = !0, menuManager.closeAll()))
  6689.                     }
  6690.                     e.preventDefault()
  6691.                 }
  6692.             },
  6693.             keypress: function(e) {
  6694.                 var ch, sp, next$, cur$, ctrl$, thisMenu$, items$, label$, index = -1;
  6695.                 if (0 !== e.which && (ctrl$ = this.element, ctrl$.hasClass(C_FOCUSED) ? (cur$ = ctrl$.find(SEL_MENU_CONTENT).first().find(SEL_ITEM).first(), index = 0) : cur$ = ctrl$.find(SEL_FOCUSED), thisMenu$ = cur$.closest(SEL_MENU), 0 !== thisMenu$.length))
  6696.                     for (items$ = getItemsForMenu(thisMenu$), 0 > index && (index = items$.index(cur$) + 1, index >= items$.length && (index = 0)), next$ = items$.eq(index), ch = String.fromCharCode(e.which).toLowerCase();;) {
  6697.                         if (label$ = next$.filter(".a-Menu-label"), 0 === label$.length && (label$ = next$.find(".a-Menu-label")), label$.text().charAt(0).toLowerCase() === ch) {
  6698.                             setItemFocus(next$), sp = getMenuScrollParent(thisMenu$)[0], sp && this._checkScrollBounds(thisMenu$, sp);
  6699.                             break
  6700.                         }
  6701.                         if (index += 1, index >= items$.length && (index = 0), next$ = items$.eq(index), next$[0] === cur$[0]) break
  6702.                     }
  6703.             },
  6704.             focusin: function(e) {
  6705.                 var $target = $(e.target);
  6706.                 this.isActive || this.element.find(SEL_FOCUSED).removeClass(C_FOCUSED), $target.is(SEL_MENU) ? $target.addClass(C_FOCUSED) : $target.closest(SEL_ITEM).addClass(C_FOCUSED), this.isActive = !0
  6707.             },
  6708.             focusout: function(e) {
  6709.                 var $target = $(e.target);
  6710.                 $target.is(SEL_MENU) ? $target.removeClass(C_FOCUSED) : $target.closest(SEL_ITEM).removeClass(C_FOCUSED), this.isActive = !1
  6711.             },
  6712.             focus: function() {
  6713.                 this.element.addClass(C_FOCUSED)
  6714.             },
  6715.             blur: function() {
  6716.                 this.element.removeClass(C_FOCUSED)
  6717.             }
  6718.         },
  6719.         _destroy: function() {
  6720.             var o = this.options,
  6721.                 $ctrl = this.element;
  6722.             isTracking && menuManager.isMenuOpen(this.element) && (debug.warn("Menu destroyed while still tracking menus."), menuManager.closeAll(!0)), $ctrl.empty().removeClass((o.menubar ? C_MENUBAR + " " + C_MENUBAR_TABS : C_MENU) + " " + C_RTL + " " + C_OVERFLOW).removeAttr("role")
  6723.         },
  6724.         _setOption: function(key, value) {
  6725.             var overflowItem, items, item, overflowList, o = this.options;
  6726.             if ("menubar" === key) throw "The menubar option cannot be set";
  6727.             if (o.menubar ? ("customContent" === key || "firstItemIsDefault" === key) && debug.warn("Option " + key + " ignored when menubar is true") : ("menubarOverflow" === key || "menubarShowSubMenuIcon" === key || "behaveLikeTabs" === key) && debug.warn("Option " + key + " ignored when menubar is false"), this._super(key, value), "menubarOverflow" === key && o.menubar && (this.element.toggleClass(C_OVERFLOW, value), !value && (items = o.items, overflowItem = items[items.length - 1], overflowItem && overflowItem._overflow))) {
  6728.                 for (overflowList = overflowItem.menu.items; overflowList.length > 0;) item = overflowList.shift(), "subMenu" === item.type && (item.action || item.href) && item.menu.items.shift(), items.splice(items.length - 1, 0, item);
  6729.                 items.pop()
  6730.             }
  6731.         },
  6732.         refresh: function() {
  6733.             var owns, $ctrl = this.element,
  6734.                 o = this.options,
  6735.                 idprefix = o.idPrefix || $ctrl[0].id || "menu",
  6736.                 out = util.htmlBuilder();
  6737.             return o.menubar && (owns = this._renderMenubar(out, idprefix, o), $ctrl.html(out.toString()), this._processMenuCustomMarkup(), this.resize()), this
  6738.         },
  6739.         resize: function() {
  6740.             var owns, $ctrl = this.element,
  6741.                 o = this.options,
  6742.                 idprefix = o.idPrefix || $ctrl[0].id || "menu",
  6743.                 out = util.htmlBuilder();
  6744.             return o.menubar && o.menubarOverflow && this._adjustMenubarForSize(idprefix, o) && (owns = this._renderMenubar(out, idprefix, o), $ctrl.html(out.toString()), this._processMenuCustomMarkup()), this
  6745.         },
  6746.         toggle: function(x, y) {
  6747.             var $menu = this.element;
  6748.             if (this.options.menubar && ($menu = null, "number" == typeof x ? (x = this.element.children("ul").children("li").eq(x), x.length > 0 && ($menu = x.children(SEL_MENU))) : x.is(SEL_ITEM) && ($menu = x.children(SEL_MENU)), !$menu || 1 !== $menu.length)) throw "Invalid menu bar menu";
  6749.             return menuManager.isCurrentMenu($menu[0]) ? menuManager.closeAll() : this.open(x, y), this
  6750.         },
  6751.         open: function(x, y) {
  6752.             function finish() {
  6753.                 var owns;
  6754.                 self._trigger("beforeOpen", {}, menuArg), menu.customContent ? ("string" == typeof menu.customContent && ($menu.empty().append($("#" + util.escapeCSS(menu.customContent)).show()), menu.customContent = !0), self._parseCustomMarkup($menu, idprefix, menu)) : (out.clear(), owns = self._renderMenu(out, idprefix, menu, isPopup), $menu.html(out.toString()))
  6755.             }
  6756.             var i, menu, $menu, $menubar, idprefix, menuArg, isPopup, isAsync = !1,
  6757.                 self = this,
  6758.                 o = this.options,
  6759.                 out = util.htmlBuilder();
  6760.             if (o.menubar) {
  6761.                 if ($menubar = this.element, $menu = null, "number" == typeof x ? (x = this.element.children("ul").children("li").eq(x), x.length > 0 && ($menu = x.children(SEL_MENU))) : x.is(SEL_ITEM) && ($menu = x.children(SEL_MENU)), !$menu || 1 !== $menu.length) throw "Invalid menu bar menu";
  6762.                 if (idprefix = x[0].id, menu = this._getMenuItemFromId(idprefix), !menu || "subMenu" !== menu.type || !menu.menu) throw "Can't open menu " + x;
  6763.                 menuArg = menu, menu = menu.menu, isPopup = !1
  6764.             } else $menubar = null, menu = o, menuArg = {
  6765.                 menu: menu
  6766.             }, $menu = this.element, idprefix = o.idPrefix || this.element[0].id || "menu", isPopup = !0;
  6767.             if ($.isFunction(o.asyncFetchMenu)) {
  6768.                 if (!isTracking && o.menubar)
  6769.                     for (i = 0; i < o.items.length; i++) o.items[i]._fetched = !1;
  6770.                 o.menubar && menuArg._fetched === !0 ? finish() : (self._renderMenu(out, idprefix, {
  6771.                     items: [{
  6772.                         type: "action",
  6773.                         disabled: !0,
  6774.                         label: apex.lang.getMessage("APEX.PROCESSING")
  6775.                     }]
  6776.                 }, isPopup), $menu.html(out.toString()), isAsync = !0, o.asyncFetchMenu(menu, function(status) {
  6777.                     var focusItem$;
  6778.                     if (menuManager.isCurrentMenu($menu[0])) {
  6779.                         if (status === !1) return void menuManager.closeAll(!0);
  6780.                         focusItem$ = $menu.find(SEL_FOCUSED).first(), finish(), menuResize(), focusItem$.length ? setItemFocus($menu.find(SEL_ITEM).first()) : $menu.focus()
  6781.                     }
  6782.                 }), o.menubar && (menuArg._fetched = !0))
  6783.             } else finish();
  6784.             return isAsync || 0 !== menu.items.length ? menuManager.openMenu($menu, $menubar, x, y, o.slide, o.menubar || y !== !1) : (debug.error("Menu has no items"), self._trigger("afterClose", {}, {
  6785.                 actionTookFocus: !1,
  6786.                 actionTaken: !1,
  6787.                 launcher: null
  6788.             })), this
  6789.         },
  6790.         find: function(id) {
  6791.             var o = this.options;
  6792.             return findItemById(o, id)
  6793.         },
  6794.         setCurrentMenuItem: function(item) {
  6795.             var curItem, prevItem, i = 0,
  6796.                 menuItems = this.options.items;
  6797.             if (!this.options.menubar || !this.options.behaveLikeTabs) return void debug.warn("setCurrentMenuItem ignored");
  6798.             if ("string" == typeof item && (item = this.find(item)), item) {
  6799.                 for (i = 0; i < menuItems.length; i++) curItem = menuItems[i], curItem.current && (prevItem = curItem, delete curItem.current), descendentIsCurrent(curItem, !0);
  6800.                 for (item.current = !0, i = 0; i < menuItems.length; i++)
  6801.                     if (curItem = menuItems[i], descendentIsCurrent(curItem)) {
  6802.                         curItem.current = !0, getLabelFromMessage(prevItem), this.element.find("." + C_CURRENT_MENU).removeClass(C_CURRENT_MENU).find(".a-MenuBar-label").text(prevItem.label), this.element.children("ul").children("li").eq(i).addClass(C_CURRENT_MENU).find(".a-MenuBar-label").append(" <span class='u-VisuallyHidden'>current</span>");
  6803.                         break
  6804.                     }
  6805.             }
  6806.         },
  6807.         _parseMenuMarkup: function($el, isMenubar) {
  6808.             var self = this,
  6809.                 menu = {
  6810.                     items: []
  6811.                 };
  6812.             return $el.children("ul").children("li").each(function(i) {
  6813.                 var item, icon, index, id, customId, customContent$, $item = $(this),
  6814.                     $a = $item.children("a").eq(0),
  6815.                     $span = $item.children("span").eq(0);
  6816.                 if (item = {
  6817.                         type: "action"
  6818.                     }, $a.length > 0 ? (item.label = $a.text(), item.href = $a.attr("href")) : $span.length > 0 ? item.label = $span.text() : item.type = "separator", "separator" === item.href && (item.type = "separator", delete item.href, delete item.label), id = $item.attr("data-id"), id && (item.id = id), "true" === $item.attr("data-hide") && (item.hide = !0), "true" === $item.attr("data-disabled") && (item.disabled = !0), "true" === $item.attr("data-current") && (item.current = !0), icon = $item.attr("data-icon"), icon && (index = icon.indexOf(" "), index >= 0 ? (item.iconType = icon.substring(0, index), item.icon = icon.substring(index + 1)) : item.icon = icon), "separator" !== item.type && ($item.children("ul").length > 0 || "true" === $item.attr("data-custom")))
  6819.                     if (item.type = "subMenu", "true" !== $item.attr("data-custom")) item.menu = self._parseMenuMarkup($item, !1);
  6820.                     else {
  6821.                         if (!isMenubar) throw "Attribute data-custom only allowed at menubar level";
  6822.                         customContent$ = $item.children(SEL_MENU_CONTENT).eq(0), customId = customContent$[0].id, customId || (customId = customContent$[0].id = (self.options.idPrefix || self.element[0].id || "menu") + "_cm_" + i), $(document.body).append(customContent$), customContent$.hide(), item.menu = {
  6823.                             customContent: customId
  6824.                         }
  6825.                     }
  6826.                     "action" === item.type && id && apex.actions && apex.actions.lookup(id) && (item.action = id, delete item.href, delete item.label, delete item.disabled, delete item.icon, delete item.iconType), menu.items.push(item)
  6827.             }), menu
  6828.         },
  6829.         _parseCustomMarkup: function($menu, idprefix, menu) {
  6830.             menu.items || (menu.items = []), $menu.attr("data-custom", "true"), 0 === $menu.find(SEL_MENU_CONTENT).length && $menu.children().first().addClass(C_MENU_CONTENT), $menu.find(SEL_FOCUSABLE).each(function(index) {
  6831.                 var menuId, item, item$, f$;
  6832.                 f$ = $(this), item$ = f$.closest(SEL_MENU_ITEM), f$.attr("role", "menuitem"), 0 === item$.length && (item$ = $(this), item$.addClass(C_ITEM)), item$.hasClass(C_LABEL) || 0 !== item$.find(SEL_LABEL).length || f$.addClass(C_LABEL), item$[0].id = idprefix + "_" + index, "A" === this.nodeName && this.href ? (item = {
  6833.                     type: "action",
  6834.                     label: f$.text(),
  6835.                     href: this.href
  6836.                 }, menu.items[index] = item) : "BUTTON" === this.nodeName ? (item = {
  6837.                     type: "action",
  6838.                     label: f$.text(),
  6839.                     action: function() {}
  6840.                 }, menu.items[index] = item) : (f$.attr("tabindex", "-1"), menu.items[index] || (item = {
  6841.                     type: "display",
  6842.                     label: f$.text(),
  6843.                     disabled: !0
  6844.                 }, menu.items[index] = item)), menuId = item$.attr("data-id"), menuId && (item.id = menuId, "action" === item.type && menuId && apex.actions && apex.actions.lookup(menuId) && (item.action = menuId, delete item.href, delete item.label, delete item.disabled, delete item.icon, delete item.iconType))
  6845.             })
  6846.         },
  6847.         _processMenuCustomMarkup: function() {
  6848.             var self = this;
  6849.             this.element.find("." + C_BAR_ITEM).each(function() {
  6850.                 var menu$ = $(this).children(SEL_MENU),
  6851.                     idprefix = this.id,
  6852.                     menu = self._getMenuItemFromId(idprefix).menu;
  6853.                 menu && menu.customContent && ("string" == typeof menu.customContent && (menu$.empty().append($("#" + util.escapeCSS(menu.customContent)).show()), menu.customContent = !0), self._parseCustomMarkup(menu$, idprefix, menu))
  6854.             })
  6855.         },
  6856.         _getMenuItemFromId: function(id) {
  6857.             var i, mi, o = this.options,
  6858.                 idParts = id.split("_"),
  6859.                 path = [],
  6860.                 item = null;
  6861.             for (i = idParts.length - 1, idParts[i].match(/^c[0-9]+$/) && (i -= 1); i > 0 && idParts[i].match(/^[0-9]+$/); i--) path.unshift(1 * idParts[i]);
  6862.             for (mi = o.items,
  6863.                 i = 0; i < path.length; i++) {
  6864.                 if (item = mi[path[i]], !item || i < path.length - 1 && !item.menu) return null;
  6865.                 item.menu && (mi = item.menu.items)
  6866.             }
  6867.             return item
  6868.         },
  6869.         _itemIsHidden: function(item) {
  6870.             var hide = item.hide,
  6871.                 o = this.options;
  6872.             return $.isFunction(hide) && (hide = item.hide(o)), hide
  6873.         },
  6874.         _itemIsDisabled: function(item) {
  6875.             var disabled = item.disabled,
  6876.                 o = this.options;
  6877.             return $.isFunction(disabled) && (disabled = item.disabled(o)), disabled
  6878.         },
  6879.         _renderMenubar: function(out, idprefix, menubar) {
  6880.             var owns = "",
  6881.                 self = this,
  6882.                 focusItem = 0,
  6883.                 o = this.options,
  6884.                 tabAll = "NEXT" === o.tabBehavior;
  6885.             return o.behaveLikeTabs && $.each(menubar.items, function(i, item) {
  6886.                 return descendentIsCurrent(item) && (item.current = !0), item.current ? (focusItem = i, !1) : void 0
  6887.             }), this.element.find("." + C_MENU_TOP).filter("[data-custom]").each(function() {
  6888.                 var save$ = $(this).children().eq(0),
  6889.                     item = self._getMenuItemFromId(save$.closest(SEL_ITEM)[0].id);
  6890.                 item.menu.customContent = save$[0].id, $(document.body).append(save$)
  6891.             }), out.markup("<ul>"), $.each(menubar.items, function(i, item) {
  6892.                 var label, itemClass, disabled, action, type = item.type,
  6893.                     id = idprefix + "_" + i;
  6894.                 if ("action" === item.type && "string" == typeof item.action) {
  6895.                     if (!apex.actions) throw "Action name requires apex.actions";
  6896.                     action = apex.actions.lookup(item.action), action ? (item.hide = !1, action.label && !item.label && (item.label = action.label), action.disabled !== undefined && (item.disabled = action.disabled), action.href && !item.href && (item.href = action.href)) : (debug.warn("Unknown action name " + item.action + " (item hidden)."), item.hide = !0)
  6897.                 }
  6898.                 if (!self._itemIsHidden(item)) {
  6899.                     if (itemClass = C_BAR_ITEM, disabled = self._itemIsDisabled(item), disabled && (itemClass += " " + C_DISABLED), "subMenu" === item.type && (item.action || item.href) && (itemClass += " " + C_SPLIT_MENU), o.behaveLikeTabs && item.current && (itemClass += " " + C_CURRENT_MENU), item._overflow && (itemClass += " " + C_BAR_OVERFLOW), "action" !== type && "subMenu" !== type) throw "Menu item type not supported in menubar: " + type;
  6900.                     out.markup("<li").attr("id", id).attr("class", itemClass).markup(">"), owns += " " + id + "i", getLabelFromMessage(item), label = item.label, (item.icon || item.iconType) && debug.warn("Menu bar items cannot have icons."), item.accelerator && debug.warn("Menu bar items cannot have accelerators."), disabled ? out.markup("<span role='menuitem'").attr("class", C_BAR_LABEL).attr("tabindex", tabAll || i === focusItem ? "0" : "-1").attr("id", id + "i").optionalAttr(A_DISABLED, disabled ? "true" : null).optionalAttr(A_HASPOPUP, "subMenu" === type ? "true" : null).markup(">").content(label).markup("</span>") : item.href && o.useLinks ? (out.markup("<a role='menuitem'").attr("class", C_BAR_LABEL).attr("id", id + "i").attr("href", item.href).optionalAttr("tabindex", tabAll || i === focusItem ? null : "-1").optionalAttr(A_HASPOPUP, "subMenu" === type ? "true" : null).markup(">").content(label), o.behaveLikeTabs && item.current && out.markup(" <span class='u-VisuallyHidden'>current</span>"), out.markup("</a>")) : (out.markup("<button type='button' role='menuitem'").attr("class", C_BAR_LABEL).attr("id", id + "i").optionalAttr("tabindex", tabAll || i === focusItem ? null : "-1").optionalAttr(A_HASPOPUP, "subMenu" === type ? "true" : null), item._overflow ? out.attr("title", label).markup("><span class='a-Icon icon-down-chevron'></span>") : (out.markup(">").content(label), o.behaveLikeTabs && item.current && out.markup(" <span class='u-VisuallyHidden'>current</span>")), out.markup("</button>")), "subMenu" === type && ((item.action || item.href || o.menubarShowSubMenuIcon) && !item._overflow && (out.markup("<span class='" + C_SUBMENU_COL + "'>"), renderIcon(out, C_DEFAULT_ICON_TYPE, !o.menubarShowSubMenuIcon || item.action || item.href ? "icon-menu-split-drop-down" : "icon-menu-drop-down"), out.markup("</span>")), out.markup("<div").attr("id", id + "m").markup(" class='" + C_MENU + " " + C_MENU_TOP + "' role='menu' tabindex='-1' style='display:none;'></div>")), out.markup("</li>")
  6901.                 }
  6902.             }), out.markup("</ul>"), $.trim(owns)
  6903.         },
  6904.         _renderMenu: function(out, idprefix, menu, isPopup) {
  6905.             function separator() {
  6906.                 delayAddSeparator = !1, itemCount > 0 && (out.markup("<li class='").markup(C_ITEM_SEP).markup("' role='separator'><div class='a-Menu-inner'><span class='a-Menu-labelContainer'><span class='").markup(C_STATUS_COL).markup("'></span><span class='").markup(C_HSEP).markup("'></span></span><span class='a-Menu-accelContainer'></span></div></li>"), itemCount += 1)
  6907.             }
  6908.  
  6909.             function statusColumn(type, icon) {
  6910.                 out.markup("<span class='" + C_STATUS_COL + "'>"), (icon || "" === icon) && renderIcon(out, type, icon), out.markup("</span>")
  6911.             }
  6912.  
  6913.             function labelAccel(accelerator) {
  6914.                 out.markup("<span").attr("class", C_ACCEL).markup("> ").content(accelerator).markup("</span>")
  6915.             }
  6916.  
  6917.             function labelColumn(id, disabled, label, accelerator, href, role, checked, submenu) {
  6918.                 var closeTag;
  6919.                 disabled ? (out.markup("<span tabindex='-1'").optionalAttr(A_DISABLED, disabled ? "true" : null), closeTag = "</span>") : href && o.useLinks ? (out.markup("<a").attr("href", href), closeTag = "</a>") : (out.markup("<button type='button'"), closeTag = "</button>"), out.attr("id", id).attr("role", role).attr("class", C_LABEL).optionalAttr(A_HASPOPUP, submenu ? "true" : null).optionalAttr(A_CHECKED, null !== checked && checked ? "true" : null).markup(">"), out.content(label), accelerator && out.markup(" <span class='u-VisuallyHidden'>").content(accelerator).markup("</span>"), out.markup(closeTag).markup("</span><span class='a-Menu-accelContainer'>"), accelerator && labelAccel(accelerator)
  6920.             }
  6921.  
  6922.             function noSubMenu() {
  6923.                 out.markup("<span class='" + C_SUBMENU_COL + "'></span>")
  6924.             }
  6925.             var owns = "",
  6926.                 o = this.options,
  6927.                 self = this,
  6928.                 isRtl = this.element.hasClass(C_RTL),
  6929.                 delayAddSeparator = !1,
  6930.                 itemCount = 0,
  6931.                 subMenuIcon = "icon-menu-sub";
  6932.             return isRtl && (subMenuIcon = "icon-menu-sub-rtl"), out.markup("<div class='" + C_MENU_CONTENT + "'><ul>"), $.each(menu.items, function(i, item) {
  6933.                 var state, label, itemClass, icon, iconType, disabled, role, accelerator, labelId, subOut, subOwns, href, action = null,
  6934.                     type = item.type,
  6935.                     id = idprefix + "_" + i;
  6936.                 if (getLabelFromMessage(item), icon = item.icon, iconType = item.iconType, label = item.label, href = item.href, accelerator = item.accelerator, ("action" === item.type || "toggle" === item.type) && "string" == typeof item.action) {
  6937.                     if (!apex.actions) throw "Action name requires apex.actions";
  6938.                     action = apex.actions.lookup(item.action), action ? (item.hide = !1, action.icon && !item.icon && (icon = action.icon), action.iconType && !item.iconType && (iconType = action.iconType), action.label && !item.label && (label = action.label), action.shortcut && !item.accelerator && (accelerator = action.shortcut), action.disabled !== undefined && (item.disabled = action.disabled), action.href !== undefined && (href = action.href)) : (debug.warn("Unknown action name " + item.action + " (item hidden)."), item.hide = !0)
  6939.                 }
  6940.                 self._itemIsHidden(item) || (itemClass = "separator" === type ? C_ITEM_SEP : C_ITEM, disabled = self._itemIsDisabled(item), disabled && (itemClass += " " + C_DISABLED), 0 === i && isPopup && o.firstItemIsDefault && (itemClass += " " + C_ITEM_DEFAULT), "radioGroup" === type ? (delayAddSeparator = !0, state = item.get(), $.each(item.choices, function(j, choice) {
  6941.                     var rid = id + "_c" + j,
  6942.                         checked = state === choice.value;
  6943.                     itemClass = C_ITEM, disabled = choice.disabled, $.isFunction(disabled) && (disabled = choice.disabled(o)), disabled && (itemClass += " " + C_DISABLED), choice.icon && debug.warn("Radio menu items cannot have icons."), delayAddSeparator && separator(), out.markup("<li").attr("id", rid).attr("class", itemClass).markup("><div class='a-Menu-inner'><span class='a-Menu-labelContainer'>"), statusColumn(C_DEFAULT_ICON_TYPE, checked ? "icon-menu-radio" : ""), getLabelFromMessage(choice), labelId = rid + "i", owns += " " + labelId, labelColumn(labelId, disabled, choice.label, null, null, "menuitemradio", checked), noSubMenu(), out.markup("</span></div></li>"), itemCount += 1
  6944.                 }), delayAddSeparator = !0) : "separator" === type ? delayAddSeparator = !0 : (role = "toggle" === type ? "menuitemcheckbox" : "menuitem", delayAddSeparator && separator(), labelId = id + "i", out.markup("<li id='").attr(id).markup("' class='").attr(itemClass).markup("'><div class='a-Menu-inner'><span class='a-Menu-labelContainer'>"), "action" === type || "display" === type ? (statusColumn(iconType || o.iconType, icon), labelColumn(labelId, disabled, label, accelerator, href || "", role, null), noSubMenu(), out.markup("</span></div>")) : "toggle" === type ? (action && (item = action), state = item.get(), item.icon && !action && debug.warn("Toggle menu items cannot have icons."), item.label && (item.onLabel || item.offLabel) && debug.warn("Toggle menu items should not have both label and on/offLabel properties."), label = item.label, icon = state ? "icon-menu-check" : "", label || (icon = null, label = state ? item.onLabel : item.offLabel, role = "menuitem", state = null), statusColumn(C_DEFAULT_ICON_TYPE, icon), labelColumn(labelId, disabled, label, accelerator, null, role, state), noSubMenu(), out.markup("</span></div>")) : "subMenu" === type && (statusColumn(item.iconType || o.iconType, item.icon), labelColumn(labelId, disabled, item.label, null, "", role, null, !0), item.accelerator && debug.warn("Sub menu items cannot have accelerators."), out.markup("<span class='" + C_SUBMENU_COL + "'>"), renderIcon(out, C_DEFAULT_ICON_TYPE, subMenuIcon), out.markup("</span></span></div>"), subOut = util.htmlBuilder(), subOwns = self._renderMenu(subOut, id, item.menu, !1), out.markup("<div class='" + C_MENU + "' role='menu' tabindex='-1'").attr("id", labelId + "m").markup(">" + subOut.toString()), out.markup("</div>")), owns += " " + labelId, out.markup("</li>"), itemCount += 1))
  6945.             }), out.markup("</ul></div>"), $.trim(owns)
  6946.         },
  6947.         _checkScrollBounds: function($menu, sp) {
  6948.             return $menu.find(SEL_MENU_SCROLL_BTN).removeClass(C_DISABLED), sp.scrollTop <= 0 ? ($menu.find(SEL_MENU_SCROLL_BTN + "." + C_UP).addClass(C_DISABLED), sp.scrollTop = 0, !0) : sp.scrollTop >= sp.scrollHeight - sp.clientHeight ? ($menu.find(SEL_MENU_SCROLL_BTN + "." + C_DOWN).addClass(C_DISABLED), sp.scrollTop = sp.scrollHeight - sp.clientHeight, !0) : !1
  6949.         },
  6950.         _startScrolling: function($menu, up) {
  6951.             function scroll() {
  6952.                 return sp.scrollTop += up ? -10 : 10, self._checkScrollBounds($menu, sp) ? void self._stopScrolling() : (self.scrollTimerId = setTimeout(function() {
  6953.                     scroll()
  6954.                 }, times[timeIndex]), void(timeIndex < times.length - 1 && (timeIndex += 1)))
  6955.             }
  6956.             var self = this,
  6957.                 timeIndex = 0,
  6958.                 times = [100, 99, 96, 91, 84, 75, 64, 51, 36, 19],
  6959.                 sp = getMenuScrollParent($menu)[0];
  6960.             this.scrollTimerId && this._stopScrolling(), $(document).on("mouseup.menuScrolling", function() {
  6961.                 self._stopScrolling()
  6962.             }).on("mousemove.menuScrolling", function(event) {
  6963.                 0 === $(event.target).closest(SEL_MENU_SCROLL_BTN).length && self._stopScrolling()
  6964.             }), scroll()
  6965.         },
  6966.         _stopScrolling: function() {
  6967.             clearTimeout(this.scrollTimerId), this.scrollTimerId = null, this.element.find(SEL_MENU_SCROLL_BTN).removeClass(C_ACTIVE), $(document).off(".menuScrolling")
  6968.         },
  6969.         _adjustMenubarForSize: function(idprefix, menubar) {
  6970.             var i, overflowList, item, count, overflowItem, save$, item$, adjusted = !1,
  6971.                 itemsWidth = 0,
  6972.                 barWidth = this.element.width() - 2,
  6973.                 items = menubar.items;
  6974.             for (overflowItem = items[items.length - 1], overflowItem && overflowItem._overflow || (overflowItem = null), i = 0; i < items.length; i++) item = items[i], item.hide ? item._width = 0 : item._width = $("#" + util.escapeCSS(idprefix + "_" + i)).outerWidth(!0), itemsWidth += item._width;
  6975.             if (itemsWidth > barWidth)
  6976.                 for (overflowItem || (overflowItem = {
  6977.                         type: "subMenu",
  6978.                         _overflow: !0,
  6979.                         label: lang.getMessage("APEX.MENU.OVERFLOW_LABEL"),
  6980.                         menu: {
  6981.                             items: []
  6982.                         }
  6983.                     }, items.push(overflowItem)), overflowList = overflowItem.menu.items, i = items.length - 2; i >= 0 && itemsWidth > barWidth;) item = items[i], items.splice(i, 1), "subMenu" === item.type && (item.action || item.href) && item.menu.items.unshift({
  6984.                     type: "action",
  6985.                     label: item.label,
  6986.                     labelKey: item.labelKey,
  6987.                     href: item.href,
  6988.                     action: item.action,
  6989.                     disabled: item.disabled
  6990.                 }), "subMenu" === item.type && item.menu.customContent && (item$ = $("#" + util.escapeCSS(idprefix + "_" + i)), save$ = item$.children(SEL_MENU).children().eq(0), save$.hide(), item.menu.customContent = save$[0].id, $(document.body).append(save$), item$.children(SEL_MENU).attr("data-custom", null)), overflowList.unshift(item), itemsWidth -= item._width !== undefined ? item._width : 0, adjusted = !0, i -= 1;
  6991.             else if (overflowItem) {
  6992.                 for (overflowList = overflowItem.menu.items, count = 0, i = 0; i < overflowList.length && 3 > count; i++) overflowList[i]._width > 0 && (count += 1);
  6993.                 for (1 === count && (itemsWidth -= this.element.find("." + C_BAR_OVERFLOW).outerWidth(!0)), delete overflowItem.current; overflowList.length > 0 && (item = overflowList[0], itemsWidth += item._width !== undefined ? item._width : 0, !(itemsWidth > barWidth));) overflowList.shift(), "subMenu" === item.type && (item.action || item.href) && item.menu.items.shift(), items.splice(items.length - 1, 0, item), adjusted = !0;
  6994.                 0 === overflowList.length && items.pop()
  6995.             }
  6996.             return adjusted
  6997.         }
  6998.     }), $.ui.dialog && $.widget("ui.dialog", $.ui.dialog, {
  6999.         _allowInteraction: function(event) {
  7000.             return $(event.target).closest(SEL_MENU).length > 0 || this._super(event)
  7001.         }
  7002.     }), $(document).ready(function() {
  7003.         function toggleMenu(btn$, focus, openOnly) {
  7004.             var $menu, menuId = btn$.attr("data-menu");
  7005.             menuId && (btn$.addClass(C_ACTIVE).attr(A_EXPANDED, "true"), $menu = $("#" + util.escapeCSS(menuId)), openOnly && menuManager.isCurrentMenu($menu[0]) || $menu.menu("toggle", btn$, !1).on("menuafterclose.menubutton", function(event, result) {
  7006.                 $(this).off(".menubutton"), btn$.removeClass(C_ACTIVE).attr(A_EXPANDED, "false")
  7007.             }), focus && setItemFocus($menu.find(SEL_ITEM).first()))
  7008.         }
  7009.         $("body").on("click", SEL_MENUBUTTON, function(e) {
  7010.             toggleMenu($(this), !0, !1)
  7011.         }).on("keydown", SEL_MENUBUTTON, function(e) {
  7012.             e.which === keys.DOWN ? (e.preventDefault(), toggleMenu($(this), !0, !0)) : e.which === keys.TAB && (actionTookFocus = !0, menuManager.closeAll())
  7013.         }), $(SEL_MENUBUTTON).attr(A_HASPOPUP, "true").attr(A_EXPANDED, "false"), $("body").on("apexafterrefresh", function(event) {
  7014.             $(event.target).find(SEL_MENUBUTTON).attr(A_HASPOPUP, "true").attr(A_EXPANDED, "false")
  7015.         })
  7016.     })
  7017. }(apex.util, apex.debug, apex.lang, apex.jQuery);
  7018. var ToggleCore = function(pOptions) {
  7019.     return function() {
  7020.         pOptions = jQuery.extend({}, {
  7021.             useSessionStorage: !0,
  7022.             defaultExpandedPreference: !1,
  7023.             onClick: function() {},
  7024.             onResize: function() {},
  7025.             onInitialize: function() {
  7026.                 userPreference ? forceExpand() : forceCollapse()
  7027.             },
  7028.             onCollapse: function() {},
  7029.             onExpand: function() {}
  7030.         }, pOptions);
  7031.         var key = pOptions.key,
  7032.             defaultExpandedPreference = pOptions.defaultExpandedPreference,
  7033.             onExpand = pOptions.onExpand,
  7034.             onCollapse = pOptions.onCollapse,
  7035.             onResize = pOptions.onResize,
  7036.             onClick = pOptions.onClick,
  7037.             onInitialize = pOptions.onInitialize,
  7038.             content = pOptions.content,
  7039.             contentClassExpanded = pOptions.contentClassExpanded,
  7040.             contentClassCollapsed = pOptions.contentClassCollapsed,
  7041.             controllingElement$ = pOptions.controllingElement,
  7042.             controllingElementSelector = pOptions.controllingElementSelector,
  7043.             useSessionStorage = pOptions.useSessionStorage,
  7044.             sessionStorage = apex.storage.getScopedSessionStorage({
  7045.                 prefix: key,
  7046.                 usePageId: !0,
  7047.                 useAppId: !0
  7048.             }),
  7049.             expanded = !1,
  7050.             userPreference = defaultExpandedPreference;
  7051.         if (useSessionStorage) {
  7052.             var storedContractedPreference = sessionStorage.getItem("preferenceForExpanded");
  7053.             storedContractedPreference && (userPreference = "true" == storedContractedPreference)
  7054.         }(!controllingElement$ || controllingElement$.length < 1) && (controllingElement$ = $(controllingElementSelector)), controllingElement$ && controllingElement$.click(function(pEvent) {
  7055.             onClick.call(toggleCore), toggle(), controllingElement$.focus(), pEvent.preventDefault()
  7056.         });
  7057.         var setUserPreference = function(pUserPreference) {
  7058.                 userPreference = pUserPreference, useSessionStorage && sessionStorage.setItem("preferenceForExpanded", userPreference)
  7059.             },
  7060.             forceExpand = function() {
  7061.                 expanded = !1, expand.call(toggleCore)
  7062.             },
  7063.             forceCollapse = function() {
  7064.                 expanded = !0, collapse.call(toggleCore)
  7065.             },
  7066.             expand = function(pUserWantsToSetPreference) {
  7067.                 expanded || (expanded = !0, pUserWantsToSetPreference && setUserPreference(expanded), content.removeClass(contentClassCollapsed).addClass(contentClassExpanded), onExpand())
  7068.             },
  7069.             collapse = function(pUserWantsToSetPreference) {
  7070.                 expanded && (expanded = !1, pUserWantsToSetPreference && setUserPreference(expanded), content.addClass(contentClassCollapsed).removeClass(contentClassExpanded), onCollapse())
  7071.             },
  7072.             toggle = function() {
  7073.                 expanded ? collapse.call(toggleCore, !0) : expand.call(toggleCore, !0)
  7074.             },
  7075.             toggleCore = {
  7076.                 key: key,
  7077.                 setUserPreference: setUserPreference,
  7078.                 doesUserPreferExpanded: function() {
  7079.                     return userPreference
  7080.                 },
  7081.                 isExpanded: function() {
  7082.                     return expanded
  7083.                 },
  7084.                 toggle: function() {
  7085.                     toggle.call(toggleCore)
  7086.                 },
  7087.                 expand: function() {
  7088.                     expand.call(toggleCore)
  7089.                 },
  7090.                 collapse: function() {
  7091.                     collapse.call(toggleCore)
  7092.                 },
  7093.                 forceExpand: forceExpand,
  7094.                 forceCollapse: forceCollapse,
  7095.                 resize: function() {
  7096.                     onResize.call(toggleCore)
  7097.                 },
  7098.                 initialize: function() {
  7099.                     onInitialize.call(toggleCore)
  7100.                 }
  7101.             };
  7102.         return toggleCore
  7103.     }()
  7104. };
  7105. ! function($, lang, util, undefined) {
  7106.     "use strict";
  7107.     var C_COLLAPSIBLE = "a-Collapsible",
  7108.         C_COLLAPSIBLE_CONTENT = C_COLLAPSIBLE + "-content",
  7109.         C_COLLAPSIBLE_HEADING = C_COLLAPSIBLE + "-heading",
  7110.         C_IS_EXPANDED = "is-expanded",
  7111.         C_IS_COLLAPSED = "is-collapsed",
  7112.         C_ICON = "a-Icon",
  7113.         C_ICON_COLLAPSIBLE = C_ICON + " " + C_COLLAPSIBLE + "-icon",
  7114.         SEL_C = ".",
  7115.         SEL_COLLAPSIBLE = SEL_C + C_COLLAPSIBLE,
  7116.         A_CONTROLS = "aria-controls",
  7117.         A_EXPANDED = "aria-expanded",
  7118.         A_HIDDEN = "aria-hidden";
  7119.     $.widget("apex.collapsible", {
  7120.         version: "5.0",
  7121.         widgetEventPrefix: "collapsible",
  7122.         baseId: null,
  7123.         heading$: null,
  7124.         controllingElement$: null,
  7125.         content$: null,
  7126.         isContentIdSetByWidget: !1,
  7127.         isHeadingIdSetByWidget: !1,
  7128.         isControllingElementALink: !1,
  7129.         core: null,
  7130.         expandedClass: C_IS_EXPANDED,
  7131.         collapsedClass: C_IS_COLLAPSED,
  7132.         options: {
  7133.             heading: "h1,h2,h3,h4,h5,h6",
  7134.             controllingElement: "button,a",
  7135.             content: null,
  7136.             collapsed: !0,
  7137.             doCollapse: !0,
  7138.             universalTheme: !1,
  7139.             expandedClass: null,
  7140.             collapsedClass: null
  7141.         },
  7142.         _create: function() {
  7143.             var lContentId, lHeadingId, me = this,
  7144.                 out = util.htmlBuilder(),
  7145.                 o = this.options,
  7146.                 lCollapsibleCount = $(SEL_COLLAPSIBLE).length;
  7147.             this.baseId = this.element.id || "a_Collapsible" + (lCollapsibleCount + 1), this.element.addClass(C_COLLAPSIBLE), o.expandedClass && (this.expandedClass += " " + o.expandedClass), o.collapsedClass && (this.collapsedClass += " " + o.collapsedClass), this.heading$ = this.element.find(o.heading).first(), this.heading$.addClass(C_COLLAPSIBLE_HEADING), this.controllingElement$ = this.element.find(o.controllingElement).first(), this.controllingElement$.text() || (lHeadingId = this.heading$[0].id, lHeadingId || (lHeadingId = this.baseId + "_heading", this.heading$[0].id = lHeadingId, this.isHeadingIdSetByWidget = !0), this.controllingElement$.attr("aria-labelledby", lHeadingId)), o.universalTheme ? this.content$ = o.content : o.content ? this.content$ = this.element.find(o.content).first() : this.content$ = this.heading$.next(), this.content$.addClass(C_COLLAPSIBLE_CONTENT), lContentId = this.content$[0].id, lContentId || (lContentId = this.baseId + "_content", this.content$[0].id = lContentId, this.isContentIdSetByWidget = !0), this.controllingElement$.attr(A_CONTROLS, lContentId).attr(A_EXPANDED, !o.collapsed), this.controllingElement$.is("a") && (this.isControllingElementALink = !0), out.markup("<span").attr("class", C_ICON_COLLAPSIBLE).attr("aria-hidden", !0).markup(">").markup("</span>"), this.controllingElement$.prepend(out.toString()), this.isControllingElementALink && (this.controllingElement$.attr("role", "button"), this._on(this.controllingElement$, {
  7148.                 keypress: function(pEvent) {
  7149.                     pEvent.which === $.ui.keyCode.SPACE && (me.core.toggle(), pEvent.preventDefault())
  7150.                 }
  7151.             })), this.core = ToggleCore({
  7152.                 key: me.baseId,
  7153.                 controllingElement: this.controllingElement$,
  7154.                 content: me.element,
  7155.                 contentClassExpanded: this.expandedClass,
  7156.                 contentClassCollapsed: this.collapsedClass,
  7157.                 defaultExpandedPreference: !o.collapsed,
  7158.                 useSessionStorage: !1,
  7159.                 onExpand: function() {
  7160.                     me.content$.attr(A_HIDDEN, "false"), o.doCollapse && me.content$.show(), me.controllingElement$.attr(A_EXPANDED, "true"), me._trigger("expand")
  7161.                 },
  7162.                 onCollapse: function() {
  7163.                     me.content$.attr(A_HIDDEN, "true"), o.doCollapse && me.content$.hide(), me.controllingElement$.attr(A_EXPANDED, "false"), me._trigger("collapse")
  7164.                 }
  7165.             }), this.core.initialize()
  7166.         },
  7167.         _destroy: function() {
  7168.             this.element.removeClass(C_COLLAPSIBLE + " " + this.collapsedClass + " " + this.expandedClass), this.controllingElement$.removeAttr(A_EXPANDED).removeAttr(A_CONTROLS), this._off(this.controllingElement$), this.isContentIdSetByWidget && this.content$.removeAttr("id"), this.isHeadingIdSetByWidget && this.heading$.removeAttr("id"), this.heading$.removeClass(C_COLLAPSIBLE_HEADING), this.content$.removeAttr(A_HIDDEN).removeClass(C_COLLAPSIBLE_CONTENT), this.options.doCollapse && this.content$.show()
  7169.         },
  7170.         expand: function() {
  7171.             this.core.expand()
  7172.         },
  7173.         collapse: function() {
  7174.             this.core.collapse()
  7175.         },
  7176.         toggle: function() {
  7177.             this.core.toggle()
  7178.         },
  7179.         getCore: function() {
  7180.             return this.core
  7181.         }
  7182.     })
  7183. }(apex.jQuery, apex.lang, apex.util);
  7184. apex.theme = {},
  7185.     function(theme, navigation, $, lang, util, undefined) {
  7186.         "use strict";
  7187.         var C_HELP_DLG = "apex_popup_field_help",
  7188.             SEL_HELP_DLG = "#" + C_HELP_DLG,
  7189.             C_HELP_AREA = "apex_popup_help_area",
  7190.             SEL_HELP_AREA = "#" + C_HELP_AREA,
  7191.             gFieldHelpReturnFocusTo = null;
  7192.         theme.popupFieldHelpClassic = function(pItemId, pSessionId, pUrl) {
  7193.             var url;
  7194.             url = pUrl ? pUrl : "wwv_flow_item_help.show_help?p_item_id=" + pItemId + "&p_session=" + pSessionId, navigation.popup({
  7195.                 url: url + "&p_output_format=HTML",
  7196.                 name: "Help",
  7197.                 width: 500,
  7198.                 height: 350
  7199.             })
  7200.         }, theme.popupFieldHelp = function(pItemId, pSessionId, pUrl) {
  7201.             function cleanTitle(title) {
  7202.                 var result, t$ = $("<span></span>");
  7203.                 return result = title.replace(/&#?\w+;/g, function(m) {
  7204.                     return t$.html(m), t$.text()
  7205.                 })
  7206.             }
  7207.             var url;
  7208.             gFieldHelpReturnFocusTo = document.activeElement || null, url = pUrl ? pUrl : "wwv_flow_item_help.show_help?p_item_id=" + pItemId + "&p_session=" + pSessionId, $x("pScreenReaderMode") ? theme.popupFieldHelpClassic(pItemId, pSessionId, pUrl) : $.getJSON(url + "&p_output_format=JSON", function(pData) {
  7209.                 var lDialog$ = util.getTopApex().jQuery(SEL_HELP_DLG),
  7210.                     lDialogArea$ = util.getTopApex().jQuery(SEL_HELP_AREA);
  7211.                 0 === lDialog$.length ? (0 === lDialogArea$.length && util.getTopApex().jQuery("#wwvFlowForm").after("<div id='" + C_HELP_AREA + "'></div>"), lDialog$ = util.getTopApex().jQuery("<div id='" + C_HELP_DLG + "' tabindex='0'>" + pData.helpText + "</div>"), lDialog$.dialog({
  7212.                     title: cleanTitle(pData.title),
  7213.                     appendTo: SEL_HELP_AREA,
  7214.                     dialogClass: "ui-dialog--helpDialog",
  7215.                     width: 500,
  7216.                     height: 350,
  7217.                     create: function() {
  7218.                         lDialog$.closest(".ui-dialog").css("position", "fixed")
  7219.                     },
  7220.                     resize: function() {
  7221.                         lDialog$.closest(".ui-dialog").css("position", "fixed")
  7222.                     },
  7223.                     close: function() {
  7224.                         gFieldHelpReturnFocusTo && $(gFieldHelpReturnFocusTo).focus()
  7225.                     }
  7226.                 }).keydown(function(event) {
  7227.                     117 === event.which && event.altKey && gFieldHelpReturnFocusTo && $(gFieldHelpReturnFocusTo).focus()
  7228.                 })) : lDialog$.html(pData.helpText).dialog("option", "title", cleanTitle(pData.title)).dialog("open"), lDialog$.focus()
  7229.             })
  7230.         }, $(document).ready(function() {
  7231.             $(document.body).on("click", ".js-itemHelp", function() {
  7232.                 var itemId = $(this).attr("data-itemhelp");
  7233.                 itemId && theme.popupFieldHelp(itemId, $v("pInstance"))
  7234.             }).on("keydown", function(event) {
  7235.                 112 === event.which && event.altKey && $(event.target).parents().each(function() {
  7236.                     var helpElement$, itemId;
  7237.                     if (this.id && /_CONTAINER$/.test(this.id) || "TD" === this.nodeName) {
  7238.                         if (helpElement$ = $(this).find(".js-itemHelp"), helpElement$.length && (itemId = helpElement$.attr("data-itemhelp"))) return theme.popupFieldHelp(itemId, $v("pInstance")), !1;
  7239.                         if ("TD" !== this.nodeName) return !1
  7240.                     }
  7241.                 })
  7242.             }), $(document.body).on("dialogopen dialogclose", function(event) {
  7243.                 var dlg$ = $(event.target);
  7244.                 !dlg$.is(SEL_HELP_DLG) && dlg$.dialog("option", "modal") && $(SEL_HELP_DLG).dialog("close")
  7245.             }), $(document.body).on("click", "label", function(pEvent) {
  7246.                 var lItem$, lLabelFor = $(this).attr("for");
  7247.                 lLabelFor && (lItem$ = $("#" + util.escapeCSS(lLabelFor)), lItem$.is("input,textarea,select") && !lItem$.prop("disabled") && lItem$.is(":visible") || 0 !== $(this).find("a").length || (apex.item(lLabelFor).setFocus(), pEvent.preventDefault()))
  7248.             }), $(".js-regionDialog").each(function() {
  7249.                 var inst$ = $(this),
  7250.                     size = /js-dialog-size(\d+)x(\d+)/.exec(this.className),
  7251.                     options = {
  7252.                         autoOpen: !1,
  7253.                         closeText: apex.lang.getMessage("APEX.DIALOG.CLOSE"),
  7254.                         modal: inst$.hasClass("js-modal"),
  7255.                         resizable: inst$.hasClass("js-resizable"),
  7256.                         draggable: inst$.hasClass("js-draggable"),
  7257.                         create: function() {
  7258.                             $(this).closest(".ui-dialog").css("position", "fixed")
  7259.                         }
  7260.                     },
  7261.                     placeholder$ = $("<div style='display:none'></div>");
  7262.                 size && (options.width = size[1], options.height = size[2]), $.each(["width", "height", "minWidth", "minHeight", "maxWidth", "maxHeight"], function(i, prop) {
  7263.                     var attrValue = parseInt(inst$.attr("data-" + prop.toLowerCase()), 10);
  7264.                     isNaN(attrValue) || (options[prop] = attrValue)
  7265.                 }), $.each(["appendTo", "dialogClass"], function(i, prop) {
  7266.                     var attrValue = inst$.attr("data-" + prop.toLowerCase());
  7267.                     attrValue && (options[prop] = attrValue)
  7268.                 }), options.appendTo && "#" === options.appendTo.substring(0, 1) && 0 === $(options.appendTo).length && $("#wwvFlowForm").after('<div id="' + util.escapeHTML(options.appendTo.substring(1)) + '"></div>'), inst$.before(placeholder$), inst$.dialog(options).on("dialogopen", function() {
  7269.                     options.modal && apex.navigation.beginFreezeScroll()
  7270.                 }).on("dialogresize", function() {
  7271.                     $(this).closest(".ui-dialog").css("position", "fixed")
  7272.                 }).on("dialogclose", function() {
  7273.                     options.modal && apex.navigation.endFreezeScroll()
  7274.                 }), $(apex.gPageContext$).on("apexpagesubmit", function() {
  7275.                     inst$.dialog("close").css("display", "none"), placeholder$.replaceWith(inst$)
  7276.                 })
  7277.             })
  7278.         }), theme.pageResizeInit = function() {
  7279.             $("#wwvFlowForm").addClass("resize"), $("body > link").hide(), $("body").css("overflow", "hidden"), $(".resize").each(function() {
  7280.                 "flex" === $(this).css("display") && $(this).css("display", "block")
  7281.             }), $("body").on("resize", function(event) {
  7282.                 var h, w, resize$, pos, parent$ = $(event.target);
  7283.                 "BODY" === event.target.nodeName ? (h = document.documentElement.clientHeight, w = document.documentElement.clientWidth) : (h = parent$.height(), w = parent$.width()), resize$ = parent$.children(".resize").filter(":visible"), resize$.length > 0 && (parent$.children(":not(.resize)").filter(":visible").each(function() {
  7284.                     pos = $(this).css("position"), "fixed" !== pos && "absolute" !== pos && (h -= $(this).outerHeight(!0))
  7285.                 }), h = Math.floor(h / resize$.length), resize$.each(function() {
  7286.                     var el$ = $(this);
  7287.                     util.setOuterHeight(el$, h), util.setOuterWidth(el$, w), el$.filter(":visible").trigger("resize")
  7288.                 })), event.stopPropagation()
  7289.             }), $(".ui-accordion.resize").on("resize", function(event) {
  7290.                 event.target === this && ($(this).accordion("refresh"), event.stopPropagation())
  7291.             }), $(".ui-tabs.resize").on("resize", function(event) {
  7292.                 event.target === this && ($(this).tabs("refresh").children(".ui-tabs-panel.resize").trigger("resize"), event.stopPropagation())
  7293.             }), $(window).on("apexwindowresized", function() {
  7294.                 $("body").trigger("resize")
  7295.             }), $("body").trigger("resize")
  7296.         }, theme.defaultStickyTop = function() {
  7297.             return 0
  7298.         }, theme.initWizardProgressBar = function(pBaseClass) {
  7299.             var lBaseClass = pBaseClass ? pBaseClass : "t-WizardSteps",
  7300.                 lBaseClassSelector = "." + lBaseClass;
  7301.             $(lBaseClassSelector).find(lBaseClassSelector + "-step.is-active").find("span" + lBaseClassSelector + "-labelState").text(lang.getMessage("APEX.ACTIVE_STATE")).end().prevAll(lBaseClassSelector + "-step").addClass("is-complete").find("span" + lBaseClassSelector + "-labelState").text(lang.getMessage("APEX.COMPLETED_STATE"))
  7302.         }, theme.initResponsiveDialogs = function() {
  7303.             $("body").on("dialogopen", ".ui-dialog-content", function() {
  7304.                 var uiDialogContent$ = $(this),
  7305.                     uiDialog$ = uiDialogContent$.closest(".ui-dialog");
  7306.                 if (!(uiDialog$.find(".utr-container").length > 0)) {
  7307.                     uiDialog$.css("maxWidth", "100%");
  7308.                     var uiButtonPane$ = uiDialog$.find(".ui-dialog-buttonpane"),
  7309.                         uiButtonPaneHeight = 0;
  7310.                     uiButtonPane$.length > 0 && (uiButtonPaneHeight = uiButtonPane$.outerHeight() + 20);
  7311.                     var initialHeight = uiDialogContent$.height();
  7312.                     uiDialogContent$.dialog("option", "show") && (initialHeight = parseInt(uiDialogContent$.dialog("option", "height"), 10));
  7313.                     var minHeight = parseInt(uiDialogContent$.dialog("option", "minHeight"), 10);
  7314.                     minHeight || (minHeight = 0);
  7315.                     var onPageResize = function() {
  7316.                         var offset = uiDialog$.offset(),
  7317.                             window$ = $(window);
  7318.                         offset.top -= window$.scrollTop(), offset.left -= window$.scrollLeft();
  7319.                         var windowWidth = window$.width(),
  7320.                             dialogWidth = uiDialog$.outerWidth();
  7321.                         offset.left + dialogWidth > windowWidth && uiDialog$.css("left", windowWidth - dialogWidth);
  7322.                         var windowHeight = $(window).height(),
  7323.                             dialogHeight = uiDialog$.height();
  7324.                         if (initialHeight + uiButtonPaneHeight > windowHeight) {
  7325.                             var newHeight = windowHeight - uiDialog$.find(".ui-dialog-titlebar").outerHeight() - uiButtonPaneHeight;
  7326.                             uiDialogContent$.height(Math.max(newHeight, minHeight)), dialogHeight = uiDialog$.height()
  7327.                         } else windowHeight > initialHeight + uiButtonPaneHeight && uiDialogContent$.height(initialHeight);
  7328.                         if (offset.top + dialogHeight > windowHeight) {
  7329.                             var scrollOffset = 0;
  7330.                             "absolute" === uiDialog$.css("position") && (scrollOffset = window$.scrollTop()), uiDialog$.css("top", Math.max(windowHeight - dialogHeight + scrollOffset, 0))
  7331.                         }
  7332.                     };
  7333.                     $(window).on("apexwindowresized", onPageResize), setTimeout(function() {
  7334.                         onPageResize()
  7335.                     }, 250), uiDialogContent$.on("dialogclose", function() {
  7336.                         $(window).off("apexwindowresized", onPageResize)
  7337.                     })
  7338.                 }
  7339.             })
  7340.         }
  7341.     }(apex.theme, apex.navigation, apex.jQuery, apex.lang, apex.util);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement