text: function isMacOS(){return isOS("mac")}function isWindowsOS(){return isOS("win")}function isLinuxOS(){return isOS("linux")}function isOS(e){return navigator.appVersion.toLowerCase().include(e)}function isSupportsTouch(){return isIPad()||isAndroid()}function isMozilla(){return"Netscape"===navigator.appName}function isFirefox(){return navigator.userAgent.toLowerCase().include("firefox")}function isWebKitEngine(){return Prototype.Browser.WebKit}function isChrome(){return navigator.userAgent.toLowerCase().include("chrome")}function isIPad(){return"iPad"==navigator.platform}function isAndroid(){return navigator.userAgent.toLowerCase().include("android")}function isIE(){return"Microsoft Internet Explorer"===navigator.appName||navigator.userAgent.indexOf("Trident/")>=0}function isIE6(){return isIEVersion(6)}function isIE7(){return isIEVersion(7)}function isIE8(){return isIEVersion(8)}function isIE9(){return isIEVersion(9)}function isIE10(){return isIEVersion(10)}function isIE11(){return isIEVersion(11)}function isIEVersion7Upwards(){return getIEVersion()>=7}function isIEVersion(e){return getIEVersion()===e}function getIEVersion(){var e=0;if(getIEVersion.version>=0)return getIEVersion.version;if(isIE())if("Netscape"===navigator.appName){var t=navigator.userAgent,i=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})");null!=i.exec(t)&&(e=parseFloat(RegExp.$1))}else{var n=navigator.appVersion.split("MSIE")[1];e=parseFloat(n)}return getIEVersion.version=e,e}function doNothing(){}function addDataToForm(e,t){var i=function(t,i){var n=jQuery("<input>").attr("type","hidden").attr("name",t).val(i);jQuery(e).append(jQuery(n))};_.each(t,function(e,t){_.isArray(e)?_.each(e,function(e){i(t,e)}):i(t,e)})}function updateYearMonth(e,t,i){return e&&(e.setFullYear(t),e.setMonth(i),e.getMonth()!==i&&e.setMonth(i)),e}function getTZOffset(e,t){if(!e)return 0;var i,n={"africa/abidjan":{utc:0,utc_dst:0},"africa/accra":{utc:0,utc_dst:0},"africa/addis_ababa":{utc:3,utc_dst:3},"africa/algiers":{utc:1,utc_dst:1},"africa/asmara":{utc:3,utc_dst:3},"africa/asmera":{utc:3,utc_dst:3},"africa/bamako":{utc:0,utc_dst:0},"africa/bangui":{utc:1,utc_dst:1},"africa/banjul":{utc:0,utc_dst:0},"africa/bissau":{utc:0,utc_dst:0},"africa/blantyre":{utc:2,utc_dst:2},"africa/brazzaville":{utc:1,utc_dst:1},"africa/bujumbura":{utc:2,utc_dst:2},"africa/cairo":{utc:2,utc_dst:2},"africa/casablanca":{utc:0,utc_dst:1},"africa/ceuta":{utc:1,utc_dst:2},"africa/conakry":{utc:0,utc_dst:0},"africa/dakar":{utc:0,utc_dst:0},"africa/dar_es_salaam":{utc:3,utc_dst:3},"africa/djibouti":{utc:3,utc_dst:3},"africa/douala":{utc:1,utc_dst:1},"africa/el_aaiun":{utc:0,utc_dst:0},"africa/freetown":{utc:0,utc_dst:0},"africa/gaborone":{utc:2,utc_dst:2},"africa/harare":{utc:2,utc_dst:2},"africa/johannesburg":{utc:2,utc_dst:2},"africa/juba":{utc:3,utc_dst:3},"africa/kampala":{utc:3,utc_dst:3},"africa/khartoum":{utc:3,utc_dst:3},"africa/kigali":{utc:2,utc_dst:2},"africa/kinshasa":{utc:1,utc_dst:1},"africa/lagos":{utc:1,utc_dst:1},"africa/libreville":{utc:1,utc_dst:1},"africa/lome":{utc:0,utc_dst:0},"africa/luanda":{utc:1,utc_dst:1},"africa/lubumbashi":{utc:2,utc_dst:2},"africa/lusaka":{utc:2,utc_dst:2},"africa/malabo":{utc:1,utc_dst:1},"africa/maputo":{utc:2,utc_dst:2},"africa/maseru":{utc:2,utc_dst:2},"africa/mbabane":{utc:2,utc_dst:2},"africa/mogadishu":{utc:3,utc_dst:3},"africa/monrovia":{utc:0,utc_dst:0},"africa/nairobi":{utc:3,utc_dst:3},"africa/ndjamena":{utc:1,utc_dst:1},"africa/niamey":{utc:1,utc_dst:1},"africa/nouakchott":{utc:0,utc_dst:0},"africa/ouagadougou":{utc:0,utc_dst:0},"africa/porto-novo":{utc:1,utc_dst:1},"africa/sao_tome":{utc:0,utc_dst:0},"africa/timbuktu":{utc:0,utc_dst:0},"africa/tripoli":{utc:2,utc_dst:2},"africa/tunis":{utc:1,utc_dst:1},"africa/windhoek":{utc:1,utc_dst:2},akst9akdt:{utc:-9,utc_dst:-8},"america/adak":{utc:-10,utc_dst:-9},"america/anchorage":{utc:-9,utc_dst:-8},"america/anguilla":{utc:-4,utc_dst:-4},"america/antigua":{utc:-4,utc_dst:-4},"america/araguaina":{utc:-3,utc_dst:-3},"america/argentina/buenos_aires":{utc:-3,utc_dst:-3},"america/argentina/catamarca":{utc:-3,utc_dst:-3},"america/argentina/comodrivadavia":{utc:-3,utc_dst:-3},"america/argentina/cordoba":{utc:-3,utc_dst:-3},"america/argentina/jujuy":{utc:-3,utc_dst:-3},"america/argentina/la_rioja":{utc:-3,utc_dst:-3},"america/argentina/mendoza":{utc:-3,utc_dst:-3},"america/argentina/rio_gallegos":{utc:-3,utc_dst:-3},"america/argentina/salta":{utc:-3,utc_dst:-3},"america/argentina/san_juan":{utc:-3,utc_dst:-3},"america/argentina/san_luis":{utc:-3,utc_dst:-3},"america/argentina/tucuman":{utc:-3,utc_dst:-3},"america/argentina/ushuaia":{utc:-3,utc_dst:-3},"america/aruba":{utc:-4,utc_dst:-4},"america/asuncion":{utc:-4,utc_dst:-3},"america/atikokan":{utc:-5,utc_dst:-5},"america/atka":{utc:-10,utc_dst:-9},"america/bahia":{utc:-3,utc_dst:-2},"america/bahia_banderas":{utc:-6,utc_dst:-5},"america/barbados":{utc:-4,utc_dst:-4},"america/belem":{utc:-3,utc_dst:-3},"america/belize":{utc:-6,utc_dst:-6},"america/blanc-sablon":{utc:-4,utc_dst:-4},"america/boa_vista":{utc:-4,utc_dst:-4},"america/bogota":{utc:-5,utc_dst:-5},"america/boise":{utc:-7,utc_dst:-6},"america/buenos_aires":{utc:-3,utc_dst:-3},"america/cambridge_bay":{utc:-7,utc_dst:-6},"america/campo_grande":{utc:-4,utc_dst:-3},"america/cancun":{utc:-6,utc_dst:-5},"america/caracas":{utc:-4,utc_dst:-4},"america/catamarca":{utc:-3,utc_dst:-3},"america/cayenne":{utc:-3,utc_dst:-3},"america/cayman":{utc:-5,utc_dst:-5},"america/chicago":{utc:-6,utc_dst:-5},"america/chihuahua":{utc:-7,utc_dst:-6},"america/coral_harbour":{utc:-5,utc_dst:-5},"america/cordoba":{utc:-3,utc_dst:-3},"america/costa_rica":{utc:-6,utc_dst:-6},"america/creston":{utc:-7,utc_dst:-7},"america/cuiaba":{utc:-4,utc_dst:-3},"america/curacao":{utc:-4,utc_dst:-4},"america/danmarkshavn":{utc:0,utc_dst:0},"america/dawson":{utc:-8,utc_dst:-7},"america/dawson_creek":{utc:-7,utc_dst:-7},"america/denver":{utc:-7,utc_dst:-6},"america/detroit":{utc:-5,utc_dst:-4},"america/dominica":{utc:-4,utc_dst:-4},"america/edmonton":{utc:-7,utc_dst:-6},"america/eirunepe":{utc:-4,utc_dst:-4},"america/el_salvador":{utc:-6,utc_dst:-6},"america/ensenada":{utc:-8,utc_dst:-7},"america/fort_wayne":{utc:-5,utc_dst:-4},"america/fortaleza":{utc:-3,utc_dst:-3},"america/glace_bay":{utc:-4,utc_dst:-3},"america/godthab":{utc:-3,utc_dst:-2},"america/goose_bay":{utc:-4,utc_dst:-3},"america/grand_turk":{utc:-5,utc_dst:-4},"america/grenada":{utc:-4,utc_dst:-4},"america/guadeloupe":{utc:-4,utc_dst:-4},"america/guatemala":{utc:-6,utc_dst:-6},"america/guayaquil":{utc:-5,utc_dst:-5},"america/guyana":{utc:-4,utc_dst:-4},"america/halifax":{utc:-4,utc_dst:-3},"america/havana":{utc:-5,utc_dst:-4},"america/hermosillo":{utc:-7,utc_dst:-7},"america/indiana/indianapolis":{utc:-5,utc_dst:-4},"america/indiana/knox":{utc:-6,utc_dst:-5},"america/indiana/marengo":{utc:-5,utc_dst:-4},"america/indiana/petersburg":{utc:-5,utc_dst:-4},"america/indiana/tell_city":{utc:-6,utc_dst:-5},"america/indiana/vevay":{utc:-5,utc_dst:-4},"america/indiana/vincennes":{utc:-5,utc_dst:-4},"america/indiana/winamac":{utc:-5,utc_dst:-4},"america/indianapolis":{utc:-5,utc_dst:-4},"america/inuvik":{utc:-7,utc_dst:-6},"america/iqaluit":{utc:-5,utc_dst:-4},"america/jamaica":{utc:-5,utc_dst:-5},"america/jujuy":{utc:-3,utc_dst:-3},"america/juneau":{utc:-9,utc_dst:-8},"america/kentucky/louisville":{utc:-5,utc_dst:-4},"america/kentucky/monticello":{utc:-5,utc_dst:-4},"america/knox_in":{utc:-6,utc_dst:-5},"america/kralendijk":{utc:-4,utc_dst:-4},"america/la_paz":{utc:-4,utc_dst:-4},"america/lima":{utc:-5,utc_dst:-5},"america/los_angeles":{utc:-8,utc_dst:-7},"america/louisville":{utc:-5,utc_dst:-4},"america/lower_princes":{utc:-4,utc_dst:-4},"america/maceio":{utc:-3,utc_dst:-3},"america/managua":{utc:-6,utc_dst:-6},"america/manaus":{utc:-4,utc_dst:-4},"america/marigot":{utc:-4,utc_dst:-4},"america/martinique":{utc:-4,utc_dst:-4},"america/matamoros":{utc:-6,utc_dst:-5},"america/mazatlan":{utc:-7,utc_dst:-6},"america/mendoza":{utc:-3,utc_dst:-3},"america/menominee":{utc:-6,utc_dst:-5},"america/merida":{utc:-6,utc_dst:-5},"america/metlakatla":{utc:-8,utc_dst:-8},"america/mexico_city":{utc:-6,utc_dst:-5},"america/miquelon":{utc:-3,utc_dst:-2},"america/moncton":{utc:-4,utc_dst:-3},"america/monterrey":{utc:-6,utc_dst:-5},"america/montevideo":{utc:-3,utc_dst:-2},"america/montreal":{utc:-5,utc_dst:-4},"america/montserrat":{utc:-4,utc_dst:-4},"america/nassau":{utc:-5,utc_dst:-4},"america/new_york":{utc:-5,utc_dst:-4},"america/nipigon":{utc:-5,utc_dst:-4},"america/nome":{utc:-9,utc_dst:-8},"america/noronha":{utc:-2,utc_dst:-2},"america/north_dakota/beulah":{utc:-6,utc_dst:-5},"america/north_dakota/center":{utc:-6,utc_dst:-5},"america/north_dakota/new_salem":{utc:-6,utc_dst:-5},"america/ojinaga":{utc:-7,utc_dst:-6},"america/panama":{utc:-5,utc_dst:-5},"america/pangnirtung":{utc:-5,utc_dst:-4},"america/paramaribo":{utc:-3,utc_dst:-3},"america/phoenix":{utc:-7,utc_dst:-7},"america/port_of_spain":{utc:-4,utc_dst:-4},"america/port-au-prince":{utc:-5,utc_dst:-4},"america/porto_acre":{utc:-4,utc_dst:-4},"america/porto_velho":{utc:-4,utc_dst:-4},"america/puerto_rico":{utc:-4,utc_dst:-4},"america/rainy_river":{utc:-6,utc_dst:-5},"america/rankin_inlet":{utc:-6,utc_dst:-5},"america/recife":{utc:-3,utc_dst:-3},"america/regina":{utc:-6,utc_dst:-6},"america/resolute":{utc:-6,utc_dst:-5},"america/rio_branco":{utc:-4,utc_dst:-4},"america/rosario":{utc:-3,utc_dst:-3},"america/santa_isabel":{utc:-8,utc_dst:-7},"america/santarem":{utc:-3,utc_dst:-3},"america/santiago":{utc:-4,utc_dst:-3},"america/santo_domingo":{utc:-4,utc_dst:-4},"america/sao_paulo":{utc:-3,utc_dst:-2},"america/scoresbysund":{utc:-1,utc_dst:0},"america/shiprock":{utc:-7,utc_dst:-6},"america/sitka":{utc:-9,utc_dst:-8},"america/st_barthelemy":{utc:-4,utc_dst:-4},"america/st_johns":{utc:-3,utc_dst:-2},"america/st_kitts":{utc:-4,utc_dst:-4},"america/st_lucia":{utc:-4,utc_dst:-4},"america/st_thomas":{utc:-4,utc_dst:-4},"america/st_vincent":{utc:-4,utc_dst:-4},"america/swift_current":{utc:-6,utc_dst:-6},"america/tegucigalpa":{utc:-6,utc_dst:-6},"america/thule":{utc:-4,utc_dst:-3},"america/thunder_bay":{utc:-5,utc_dst:-4},"america/tijuana":{utc:-8,utc_dst:-7},"america/toronto":{utc:-5,utc_dst:-4},"america/tortola":{utc:-4,utc_dst:-4},"america/vancouver":{utc:-8,utc_dst:-7},"america/virgin":{utc:-4,utc_dst:-4},"america/whitehorse":{utc:-8,utc_dst:-7},"america/winnipeg":{utc:-6,utc_dst:-5},"america/yakutat":{utc:-9,utc_dst:-8},"america/yellowknife":{utc:-7,utc_dst:-6},"antarctica/casey":{utc:11,utc_dst:8},"antarctica/davis":{utc:5,utc_dst:7},"antarctica/dumontdurville":{utc:10,utc_dst:10},"antarctica/macquarie":{utc:11,utc_dst:11},"antarctica/mawson":{utc:5,utc_dst:5},"antarctica/mcmurdo":{utc:12,utc_dst:13},"antarctica/palmer":{utc:-4,utc_dst:-3},"antarctica/rothera":{utc:-3,utc_dst:-3},"antarctica/south_pole":{utc:12,utc_dst:13},"antarctica/syowa":{utc:3,utc_dst:3},"antarctica/vostok":{utc:6,utc_dst:6},"arctic/longyearbyen":{utc:1,utc_dst:2},"asia/aden":{utc:3,utc_dst:3},"asia/almaty":{utc:6,utc_dst:6},"asia/amman":{utc:2,utc_dst:3},"asia/anadyr":{utc:12,utc_dst:12},"asia/aqtau":{utc:5,utc_dst:5},"asia/aqtobe":{utc:5,utc_dst:5},"asia/ashgabat":{utc:5,utc_dst:5},"asia/ashkhabad":{utc:5,utc_dst:5},"asia/baghdad":{utc:3,utc_dst:3},"asia/bahrain":{utc:3,utc_dst:3},"asia/baku":{utc:4,utc_dst:5},"asia/bangkok":{utc:7,utc_dst:7},"asia/beirut":{utc:2,utc_dst:3},"asia/bishkek":{utc:6,utc_dst:6},"asia/brunei":{utc:8,utc_dst:8},"asia/calcutta":{utc:5,utc_dst:5},"asia/choibalsan":{utc:8,utc_dst:8},"asia/chongqing":{utc:8,utc_dst:8},"asia/chungking":{utc:8,utc_dst:8},"asia/colombo":{utc:5,utc_dst:5},"asia/dacca":{utc:6,utc_dst:6},"asia/damascus":{utc:2,utc_dst:3},"asia/dhaka":{utc:6,utc_dst:6},"asia/dili":{utc:9,utc_dst:9},"asia/dubai":{utc:4,utc_dst:4},"asia/dushanbe":{utc:5,utc_dst:5},"asia/gaza":{utc:2,utc_dst:3},"asia/harbin":{utc:8,utc_dst:8},"asia/hebron":{utc:2,utc_dst:3},"asia/ho_chi_minh":{utc:7,utc_dst:7},"asia/hong_kong":{utc:8,utc_dst:8},"asia/hovd":{utc:7,utc_dst:7},"asia/irkutsk":{utc:9,utc_dst:9},"asia/istanbul":{utc:2,utc_dst:3},"asia/jakarta":{utc:7,utc_dst:7},"asia/jayapura":{utc:9,utc_dst:9},"asia/jerusalem":{utc:2,utc_dst:3},"asia/kabul":{utc:4,utc_dst:4},"asia/kamchatka":{utc:12,utc_dst:12},"asia/karachi":{utc:5,utc_dst:5},"asia/kashgar":{utc:8,utc_dst:8},"asia/kathmandu":{utc:5,utc_dst:5},"asia/katmandu":{utc:5,utc_dst:5},"asia/kolkata":{utc:5,utc_dst:5},"asia/krasnoyarsk":{utc:8,utc_dst:8},"asia/kuala_lumpur":{utc:8,utc_dst:8},"asia/kuching":{utc:8,utc_dst:8},"asia/kuwait":{utc:3,utc_dst:3},"asia/macao":{utc:8,utc_dst:8},"asia/macau":{utc:8,utc_dst:8},"asia/magadan":{utc:12,utc_dst:12},"asia/makassar":{utc:8,utc_dst:8},"asia/manila":{utc:8,utc_dst:8},"asia/muscat":{utc:4,utc_dst:4},"asia/nicosia":{utc:2,utc_dst:3},"asia/novokuznetsk":{utc:7,utc_dst:7},"asia/novosibirsk":{utc:7,utc_dst:7},"asia/omsk":{utc:7,utc_dst:7},"asia/oral":{utc:5,utc_dst:5},"asia/phnom_penh":{utc:7,utc_dst:7},"asia/pontianak":{utc:7,utc_dst:7},"asia/pyongyang":{utc:9,utc_dst:9},"asia/qatar":{utc:3,utc_dst:3},"asia/qyzylorda":{utc:6,utc_dst:6},"asia/rangoon":{utc:6,utc_dst:6},"asia/riyadh":{utc:3,utc_dst:3},"asia/saigon":{utc:7,utc_dst:7},"asia/sakhalin":{utc:11,utc_dst:11},"asia/samarkand":{utc:5,utc_dst:5},"asia/seoul":{utc:9,utc_dst:9},"asia/shanghai":{utc:8,utc_dst:8},"asia/singapore":{utc:8,utc_dst:8},"asia/taipei":{utc:8,utc_dst:8},"asia/tashkent":{utc:5,utc_dst:5},"asia/tbilisi":{utc:4,utc_dst:4},"asia/tehran":{utc:3,utc_dst:4},"asia/tel_aviv":{utc:2,utc_dst:3},"asia/thimbu":{utc:6,utc_dst:6},"asia/thimphu":{utc:6,utc_dst:6},"asia/tokyo":{utc:9,utc_dst:9},"asia/ujung_pandang":{utc:8,utc_dst:8},"asia/ulaanbaatar":{utc:8,utc_dst:8},"asia/ulan_bator":{utc:8,utc_dst:8},"asia/urumqi":{utc:8,utc_dst:8},"asia/vientiane":{utc:7,utc_dst:7},"asia/vladivostok":{utc:11,utc_dst:11},"asia/yakutsk":{utc:10,utc_dst:10},"asia/yekaterinburg":{utc:6,utc_dst:6},"asia/yerevan":{utc:4,utc_dst:4},"atlantic/azores":{utc:-1,utc_dst:0},"atlantic/bermuda":{utc:-4,utc_dst:-3},"atlantic/canary":{utc:0,utc_dst:1},"atlantic/cape_verde":{utc:-1,utc_dst:-1},"atlantic/faeroe":{utc:0,utc_dst:1},"atlantic/faroe":{utc:0,utc_dst:1},"atlantic/jan_mayen":{utc:1,utc_dst:2},"atlantic/madeira":{utc:0,utc_dst:1},"atlantic/reykjavik":{utc:0,utc_dst:0},"atlantic/south_georgia":{utc:-2,utc_dst:-2},"atlantic/st_helena":{utc:0,utc_dst:0},"atlantic/stanley":{utc:-3,utc_dst:-3},"australia/act":{utc:10,utc_dst:11},"australia/adelaide":{utc:9,utc_dst:10},"australia/brisbane":{utc:10,utc_dst:10},"australia/broken_hill":{utc:9,utc_dst:10},"australia/canberra":{utc:10,utc_dst:11},"australia/currie":{utc:10,utc_dst:11},"australia/darwin":{utc:9,utc_dst:9},"australia/eucla":{utc:8,utc_dst:8},"australia/hobart":{utc:10,utc_dst:11},"australia/lhi":{utc:10,utc_dst:11},"australia/lindeman":{utc:10,utc_dst:10},"australia/lord_howe":{utc:10,utc_dst:11},"australia/melbourne":{utc:10,utc_dst:11},"australia/north":{utc:9,utc_dst:9},"australia/nsw":{utc:10,utc_dst:11},"australia/perth":{utc:8,utc_dst:8},"australia/queensland":{utc:10,utc_dst:10},"australia/south":{utc:9,utc_dst:10},"australia/sydney":{utc:10,utc_dst:11},"australia/tasmania":{utc:10,utc_dst:11},"australia/victoria":{utc:10,utc_dst:11},"australia/west":{utc:8,utc_dst:8},"australia/yancowinna":{utc:9,utc_dst:10},"brazil/acre":{utc:-4,utc_dst:-4},"brazil/denoronha":{utc:-2,utc_dst:-2},"brazil/east":{utc:-3,utc_dst:-2},"brazil/west":{utc:-4,utc_dst:-4},"canada/atlantic":{utc:-4,utc_dst:-3},"canada/central":{utc:-6,utc_dst:-5},"canada/eastern":{utc:-5,utc_dst:-4},"canada/east-saskatchewan":{utc:-6,utc_dst:-6},"canada/mountain":{utc:-7,utc_dst:-6},"canada/newfoundland":{utc:-3,utc_dst:-2},"canada/pacific":{utc:-8,utc_dst:-7},"canada/saskatchewan":{utc:-6,utc_dst:-6},"canada/yukon":{utc:-8,utc_dst:-7},cet:{utc:1,utc_dst:2},"chile/continental":{utc:-4,utc_dst:-3},"chile/easterisland":{utc:-6,utc_dst:-5},cst6cdt:{utc:-6,utc_dst:-5},cuba:{utc:-5,utc_dst:-4},eet:{utc:2,utc_dst:3},egypt:{utc:2,utc_dst:2},eire:{utc:0,utc_dst:1},est:{utc:-5,utc_dst:-5},est5edt:{utc:-5,utc_dst:-4},"etc/gmt":{utc:0,utc_dst:0},"etc/gmt+0":{utc:0,utc_dst:0},"etc/uct":{utc:0,utc_dst:0},"etc/universal":{utc:0,utc_dst:0},"etc/utc":{utc:0,utc_dst:0},"etc/zulu":{utc:0,utc_dst:0},"europe/amsterdam":{utc:1,utc_dst:2},"europe/andorra":{utc:1,utc_dst:2},"europe/athens":{utc:2,utc_dst:3},"europe/belfast":{utc:0,utc_dst:1},"europe/belgrade":{utc:1,utc_dst:2},"europe/berlin":{utc:1,utc_dst:2},"europe/bratislava":{utc:1,utc_dst:2},"europe/brussels":{utc:1,utc_dst:2},"europe/bucharest":{utc:2,utc_dst:3},"europe/budapest":{utc:1,utc_dst:2},"europe/chisinau":{utc:2,utc_dst:3},"europe/copenhagen":{utc:1,utc_dst:2},"europe/dublin":{utc:0,utc_dst:1},"europe/gibraltar":{utc:1,utc_dst:2},"europe/guernsey":{utc:0,utc_dst:1},"europe/helsinki":{utc:2,utc_dst:3},"europe/isle_of_man":{utc:0,utc_dst:1},"europe/istanbul":{utc:2,utc_dst:3},"europe/jersey":{utc:0,utc_dst:1},"europe/kaliningrad":{utc:3,utc_dst:3},"europe/kiev":{utc:2,utc_dst:3},"europe/lisbon":{utc:0,utc_dst:1},"europe/ljubljana":{utc:1,utc_dst:2},"europe/london":{utc:0,utc_dst:1},"europe/luxembourg":{utc:1,utc_dst:2},"europe/madrid":{utc:1,utc_dst:2},"europe/malta":{utc:1,utc_dst:2},"europe/mariehamn":{utc:2,utc_dst:3},"europe/minsk":{utc:3,utc_dst:3},"europe/monaco":{utc:1,utc_dst:2},"europe/moscow":{utc:4,utc_dst:4},"europe/nicosia":{utc:2,utc_dst:3},"europe/oslo":{utc:1,utc_dst:2},"europe/paris":{utc:1,utc_dst:2},"europe/podgorica":{utc:1,utc_dst:2},"europe/prague":{utc:1,utc_dst:2},"europe/riga":{utc:2,utc_dst:3},"europe/rome":{utc:1,utc_dst:2},"europe/samara":{utc:4,utc_dst:4},"europe/san_marino":{utc:1,utc_dst:2},"europe/sarajevo":{utc:1,utc_dst:2},"europe/simferopol":{utc:2,utc_dst:3},"europe/skopje":{utc:1,utc_dst:2},"europe/sofia":{utc:2,utc_dst:3},"europe/stockholm":{utc:1,utc_dst:2},"europe/tallinn":{utc:2,utc_dst:3},"europe/tirane":{utc:1,utc_dst:2},"europe/tiraspol":{utc:2,utc_dst:3},"europe/uzhgorod":{utc:2,utc_dst:3},"europe/vaduz":{utc:1,utc_dst:2},"europe/vatican":{utc:1,utc_dst:2},"europe/vienna":{utc:1,utc_dst:2},"europe/vilnius":{utc:2,utc_dst:3},"europe/volgograd":{utc:4,utc_dst:4},"europe/warsaw":{utc:1,utc_dst:2},"europe/zagreb":{utc:1,utc_dst:2},"europe/zaporozhye":{utc:2,utc_dst:3},"europe/zurich":{utc:1,utc_dst:2},gb:{utc:0,utc_dst:1},"gb-eire":{utc:0,utc_dst:1},gmt:{utc:0,utc_dst:0},"gmt+0":{utc:0,utc_dst:0},gmt0:{utc:0,utc_dst:0},"gmt-0":{utc:0,utc_dst:0},greenwich:{utc:0,utc_dst:0},hongkong:{utc:8,utc_dst:8},hst:{utc:-10,utc_dst:-10},iceland:{utc:0,utc_dst:0},"indian/antananarivo":{utc:3,utc_dst:3},"indian/chagos":{utc:6,utc_dst:6},"indian/christmas":{utc:7,utc_dst:7},"indian/cocos":{utc:6,utc_dst:6},"indian/comoro":{utc:3,utc_dst:3},"indian/kerguelen":{utc:5,utc_dst:5},"indian/mahe":{utc:4,utc_dst:4},"indian/maldives":{utc:5,utc_dst:5},"indian/mauritius":{utc:4,utc_dst:4},"indian/mayotte":{utc:3,utc_dst:3},"indian/reunion":{utc:4,utc_dst:4},iran:{utc:3,utc_dst:4},israel:{utc:2,utc_dst:3},jamaica:{utc:-5,utc_dst:-5},japan:{utc:9,utc_dst:9},"jst-9":{utc:9,utc_dst:9},kwajalein:{utc:12,utc_dst:12},libya:{utc:2,utc_dst:2},met:{utc:1,utc_dst:2},"mexico/bajanorte":{utc:-8,utc_dst:-7},"mexico/bajasur":{utc:-7,utc_dst:-6},"mexico/general":{utc:-6,utc_dst:-5},mst:{utc:-7,utc_dst:-7},mst7mdt:{utc:-7,utc_dst:-6},navajo:{utc:-7,utc_dst:-6},nz:{utc:12,utc_dst:13},"nz-chat":{utc:12,utc_dst:13},"pacific/apia":{utc:13,utc_dst:14},"pacific/auckland":{utc:12,utc_dst:13},"pacific/chatham":{utc:12,utc_dst:13},"pacific/chuuk":{utc:10,utc_dst:10},"pacific/easter":{utc:-6,utc_dst:-5},"pacific/efate":{utc:11,utc_dst:11},"pacific/enderbury":{utc:13,utc_dst:13},"pacific/fakaofo":{utc:13,utc_dst:13},"pacific/fiji":{utc:12,utc_dst:13},"pacific/funafuti":{utc:12,utc_dst:12},"pacific/galapagos":{utc:-6,utc_dst:-6},"pacific/gambier":{utc:-9,utc_dst:-9},"pacific/guadalcanal":{utc:11,utc_dst:11},"pacific/guam":{utc:10,utc_dst:10},"pacific/honolulu":{utc:-10,utc_dst:-10},"pacific/johnston":{utc:-10,utc_dst:-10},"pacific/kiritimati":{utc:14,utc_dst:14},"pacific/kosrae":{utc:11,utc_dst:11},"pacific/kwajalein":{utc:12,utc_dst:12},"pacific/majuro":{utc:12,utc_dst:12},"pacific/marquesas":{utc:-9,utc_dst:-9},"pacific/midway":{utc:-11,utc_dst:-11},"pacific/nauru":{utc:12,utc_dst:12},"pacific/niue":{utc:-11,utc_dst:-11},"pacific/norfolk":{utc:11,utc_dst:11},"pacific/noumea":{utc:11,utc_dst:11},"pacific/pago_pago":{utc:-11,utc_dst:-11},"pacific/palau":{utc:9,utc_dst:9},"pacific/pitcairn":{utc:-8,utc_dst:-8},"pacific/pohnpei":{utc:11,utc_dst:11},"pacific/ponape":{utc:11,utc_dst:11},"pacific/port_moresby":{utc:10,utc_dst:10},"pacific/rarotonga":{utc:-10,utc_dst:-10},"pacific/saipan":{utc:10,utc_dst:10},"pacific/samoa":{utc:-11,utc_dst:-11},"pacific/tahiti":{utc:-10,utc_dst:-10},"pacific/tarawa":{utc:12,utc_dst:12},"pacific/tongatapu":{utc:13,utc_dst:13},"pacific/truk":{utc:10,utc_dst:10},"pacific/wake":{utc:12,utc_dst:12},"pacific/wallis":{utc:12,utc_dst:12},"pacific/yap":{utc:10,utc_dst:10},poland:{utc:1,utc_dst:2},portugal:{utc:0,utc_dst:1},prc:{utc:8,utc_dst:8},pst8pdt:{utc:-8,utc_dst:-7},roc:{utc:8,utc_dst:8},rok:{utc:9,utc_dst:9},singapore:{utc:8,utc_dst:8},turkey:{utc:2,utc_dst:3},uct:{utc:0,utc_dst:0},universal:{utc:0,utc_dst:0},"us/alaska":{utc:-9,utc_dst:-8},"us/aleutian":{utc:-10,utc_dst:-9},"us/arizona":{utc:-7,utc_dst:-7},"us/central":{utc:-6,utc_dst:-5},"us/eastern":{utc:-5,utc_dst:-4},"us/east-indiana":{utc:-5,utc_dst:-4},"us/hawaii":{utc:-10,utc_dst:-10},"us/indiana-starke":{utc:-6,utc_dst:-5},"us/michigan":{utc:-5,utc_dst:-4},"us/mountain":{utc:-7,utc_dst:-6},"us/pacific":{utc:-8,utc_dst:-7},"us/pacific-new":{utc:-8,utc_dst:-7},"us/samoa":{utc:-11,utc_dst:-11},utc:{utc:0,utc_dst:0},wet:{utc:0,utc_dst:1},"w-su":{utc:4,utc_dst:4},zulu:{utc:0,utc_dst:0}};if(e=e.toLowerCase(),"undefined"==typeof n[e])return 0;i=n[e].utc;var s=require("moment");return s(t).isDST()&&(i=n[e].utc_dst),i}function exists(e){return!Object.isUndefined(e)}function isArray(e){return Object.isArray(e)}function isNumber(e){return Object.isNumber(e)}function isNotNullORUndefined(e){return"undefined"!=typeof e&&null!=e}function hasDisabledAttributeSet(e){var t=e.getAttribute("disabled");return isNotNullORUndefined(t)?"0"==t||"false"==t||""==t?!1:!0:!1}function getParentDiv(e){return e.up("div")}function getParentRow(){return elem.up("tr")}function getParentCell(){return elem.up("td")}function getParentTable(){return elem.up("table")}function getAbsoluteParent(e){for(var t=e;!t.style||"absolute"!==t.style.position;){if("body"===t.tagName.toLowerCase())return null;t=t.up()}return t}function getElementWithIdAndTagAndParent(e,t,i){for(var n=i.getElementsByTagName(t),s=0;s<n.length;s++)if(n[s].getAttribute("id")===e)return n[s];return null}function getClosestAncestor(e,t){for(var i;!i;)if(i=$(e).up(t),!i&&(e=e.parentNode,!e||"DIV"!==e.tagName))return null;return i}function isDescendantOf(e,t){for(;"BODY"!=e.tagName;){if(e==t)return!0;e=e.parentNode}return!1}function getCellIndex(e){return e.cellIndex}function getRowIndex(e){return e.rowIndex}function isDisabled(e){if(!e.readAttribute)return!1;if(Draggables&&Draggables.activeDraggable&&Draggables.activeDraggable.dragging&&matchAny(Draggables.activeDraggable.element,[".sizer.dragging"],!1))return!1;var t=!!e.readAttribute("disabled")||e.ancestors().any(function(e){return e.readAttribute("disabled")}),i=matchAny(e,[".disabled"],!0);return t||i}function matchAny(e,t,i){if(!e)return null;for(var n=0;n<t.length;++n)if(e.match&&e.match(t[n]))return e;if(i)for(var n=0;n<t.length;++n){var s=e.up&&e.up(t[n]);if(s)return s}return null}function matchMeOrUp(e,t){for(var i;e&&!i;)i=e.match&&e.match(t)&&e,e=e.parentNode;return i}function stylesMatch(e,t,i){return $(e).getStyle(i)===$(t).getStyle(i)}function getNextMatchingSibling(e,t){for(;e=e.nextSibling;)if(e.match&&e.match(t))return e;return null}function getNextNonMatchingSibling(e,t){for(;e=e.nextSibling;)if(e.match&&!e.match(t))return e;return null}function getPreviousMatchingSibling(e,t){for(;e=e.previousSibling;)if(e.match&&e.match(t))return e;return null}function getPreviousNonMatchingSibling(e,t){for(;e=e.previousSibling;)if(e.match&&!e.match(t))return e;return null}function getAbsoluteOffsets(e){for(var t=e.offsetLeft,i=e.offsetTop,n=e.offsetParent;"BODY"!=n.tagName.toUpperCase()&&"absolute"!=n.style.position;){var t=t+n.offsetLeft,i=i+n.offsetTop;n=n.offsetParent}return"absolute"==n.style.position&&(t+=n.offsetLeft,i+=n.offsetTop),isIE()&&(i+=1),new Array(t,i,t+e.offsetWidth,i+e.offsetHeight)}function getAbsoluteTopOffset(e){for(var t=e.offsetTop,i=e.offsetParent;"BODY"!=i.tagName.toUpperCase()&&"absolute"!=i.style.position;){var t=t+i.offsetTop;i=i.offsetParent}return"absolute"==i.style.position&&(t+=i.offsetTop),isIE()&&(t+=1),t}function getBoxOffsets(e,t){var i=$(e).cumulativeOffset(),n=i[0],s=i[1];if(t){var o=$(e).cumulativeScrollOffset();n-=o[0],s-=o[1]}return new Array(n,s)}function getInnerText(e){return isNotNullORUndefined(e.innerText)?e.innerText:e.textContent}function isPointOverlayingObject(e,t,i){return Position.within(i,e,t)}function boxesOverlap(e,t,i,n,s,o,r,a){return!(t>a||o>n||e>r||s>i)}function boxesOverlapVertically(e,t,i,n){return!(e>=n||i>=t)}function boxesOverlapHorizontally(e,t,i,n){return!(e>=n||i>=t)}function getOuterHeight(e){return e.clientHeight?new Number(e.getStyle("height").replace(/[^\d\.]/g,""))+getBufferHeight(e,!0):0}function getOuterWidth(e){return e.clientWidth?new Number(e.getStyle("width").replace(/[^\d\.]/g,""))+getBufferWidth(e,!0):0}function getBufferHeight(e,t){if(!e.visible())return 0;var i=0,n=/[^\d\.]/g;if(t){var s=e.getStyle("marginTop"),o=e.getStyle("marginBottom");s=null==s?"0px":s,o=null==o?"0px":o,s=s.replace(n,""),o=o.replace(n,""),i=new Number(s).ceil()+new Number(o).ceil()}return i+=new Number(e.getStyle("borderBottomWidth").replace(n,"")).ceil()+new Number(e.getStyle("borderTopWidth").replace(n,"")).ceil()+new Number(e.getStyle("paddingTop").replace(n,"")).ceil()+new Number(e.getStyle("paddingBottom").replace(n,"")).ceil()}function getBufferWidth(e,t){if(!e.visible())return 0;var i=0,n=/[^\d\.]/g;if(t){var s=e.getStyle("marginLeft"),o=e.getStyle("marginRight");s=null==s?"0px":s,o=null==o?"0px":o,s=s.replace(n,""),o=o.replace(n,""),i=new Number(s).ceil()+new Number(o).ceil()}return i+=new Number(e.getStyle("borderLeftWidth").replace(n,"")).ceil()+new Number(e.getStyle("borderRightWidth").replace(n,"")).ceil()+new Number(e.getStyle("paddingLeft").replace(n,"")).ceil()+new Number(e.getStyle("paddingRight").replace(n,"")).ceil()}function getDimensionInPx(e,t){var i={left:"width",right:"width",width:"width",top:"height",bottom:"height",height:"height"},n=e.getStyle(t);if(n.include("%")){var s=e.parentNode,o=s.getStyle(i[t]);if(!o.include("px"))throw"cannot convert to px , because parent dimension not measured in px";return parseInt(n)*parseInt(o)/100}if(n.include("px"))return parseInt(n);throw"cannot convert to px, because unit is neither px or %"}function getActualDimension(e,t){var i={width:"clientWidth",height:"clientHeight"};return e[i[t]]}function purgeChildElements(e){try{var t=e&&e.children;if(!t)return;for(var i=0,n=t.length;n>i;i++)purge(t[i]),purgeChildElements(t[i]),t[i]=null,t[i]=e.removeChild(t[i]);return 0==e.children.length}catch(s){}}function purge(e){var t,i,n,s=e.attributes;if(s)for(i=s.length,t=0;i>t;t+=1)n=s[t].name,"function"==typeof e[n]&&(e[n]=null);if(s=e.childNodes)for(i=s.length,t=0;i>t;t+=1)purge(e.childNodes[t])}function getCaret(e){if(!e)return 0;if(e.selectionStart)return e.selectionStart;if(document.selection){e.focus();var t=document.selection.createRange();if(null==t)return 0;var i=e.createTextRange(),n=i.duplicate();return i.moveToBookmark(t.getBookmark()),n.setEndPoint("EndToStart",i),n.text.length}return 0}function isAlmostInView(e,t){var i=parseInt(getBoxOffsets(e)[1]),n=$(e).cumulativeScrollOffset()[1],s=getWindowHeight();return n+s+t>i}function getTouchedElement(e){var t=e.changedTouches;return t&&t.length>0?$(document.elementFromPoint(t[0].clientX,t[0].clientY)):e.element()}function centerLayer(e){e.style.left=parseInt((getWindowWidth()-parseInt(e.clientWidth))/2+getScrollLeft())+"px",e.style.top=parseInt((getWindowHeight()-parseInt(e.clientHeight))/2+getScrollTop())+"px"}function centerElement(e,t){if(e){if(e.jquery&&(e=$(e.get(0))),t.horz){if(!e.hasClassName("centered_horz"))throw"Element's className "+e.className+" must include 'centered_horz' for function centerLayer to work with these arguments";var i=e.getWidth()||e.getStyle("min-width");if(i){var n=parseInt(i),s=n+getBufferWidth(e,!0),o=e.up().getWidth();o>s&&(e.style.marginLeft=-(n/2)+"px",e.style.left="50%")}}if(t.vert){if(!e.hasClassName("centered_vert"))throw"Element's className "+e.className+" must include 'centered_vert' for function centerLayer to work with these arguments";var r=e.getHeight()||e.getStyle("min-height");if(r){var a=parseInt(r),l=a+getBufferHeight(e,!0),c=e.up().getHeight();c>l&&(e.style.marginTop=-(a/2)+"px",e.style.top="50%")}}}}function parseFunc(e,t){var i=e.className,n=i.indexOf(t);if(n>-1){var s=i.substring(n).split(" ");if(s.length>0){var o=s[0].replace(t,"");return"function"==typeof window[o]?window[o]:null}}return null}function cascadeElement(e,t){var i=parseInt(e.getStyle("width")),n=i+getBufferWidth(e,!0),s=e.up().getWidth(),o=-(t.horzOffset*t.number/2)+t.position*t.horzOffset;s>n&&(e.style.left=(s-n)/2+o+"px");var r=parseInt(e.getStyle("height")),a=r+getBufferHeight(e,!0),l=e.up().getHeight(),c=-(t.vertOffset*t.number/2)+t.position*t.vertOffset;l>a&&(e.style.top=(l-a)/2+c+"px")}function fitObjectIntoScreen(e,t,i,n,s){var o=parseInt(t?t:e.offsetLeft),r=parseInt(i?i:e.offsetTop),a=parseInt(n?n:e.clientWidth),l=parseInt(s?s:e.clientHeight),c=getScrollLeft(),u=getScrollTop(),d=getWindowWidth(),h=getWindowHeight();a+=20,l+=20,r+l>u+h&&(r=u+h-l),u>r&&(r=u),o+a>c+d&&(o=c+d-a),c>o&&(o=c),e.style.left=o+"px",e.style.top=r+"px"}function setWidthStyleByReflection(e,t){e=t?$(e).select(t)[0]:e,e&&(e.style.width=(e.clientWidth||e.offsetWidth)+"px")}function focusOn(e){$(e).focus()}function selectAndFocusOn(e){var t=$(e);t.select(),t.focus()}function renderHazeLayer(e,t){var i=document.body;return renderOverlay(e,t,i.scrollWidth,i.scrollHeight,"haze")}function renderOverlay(e,t,i,n,s){var o=document.createElement("DIV");return o.className=s,o.style.position="absolute",o.style.left=e,o.style.top=t,o.style.width=i,o.style.height=n,document.body.appendChild(o),o}function removeOverlay(e){e&&e.parentNode&&e.parentNode.removeChild(e),e&&(e=null)}function reParent(e,t){e&&(e.parentNode&&e.parentNode==t||t.appendChild(e))}function getScrollLeftForAbsoluteParent(e){return isIE()?e.scrollLeft:0}function getScrollTopForAbsoluteParent(e){return isIE()?e.scrollTop:0}function renderTransparentIFrame(e,t,i,n){var s=5,o=document.createElement("IFRAME");return o.frameBorder=0,o.style.filter="alpha(opacity=0)",o.style.position="absolute",o.style.left=e-s,o.style.top=t-s,o.style.width=i-2*s,o.style.height=n-2*s,document.body.appendChild(o),o}function pushOverlayObject(e,t,i){var n=getAbsoluteOffsets($(e));pushOverlayObjectAtOffsets(n,t,i)}function pushTotalOverlayObject(e,t){var i=new Array(0,0,document.body.scrollWidth,document.body.scrollHeight);pushOverlayObjectAtOffsets(i,e,t)}function pushOverlayObjectAtOffsets(e,t,i){if(isIE()){var n=renderTransparentIFrame(e[0],e[1],e[2]-e[0],e[3]-e[1]);overlayObjectStack.push(n)}var s=renderOverlay(e[0],e[1],e[2]-e[0],e[3]-e[1],t);i&&(s.style.zIndex=i),overlayObjectStack.push(s)}function popOverlayObject(){if(overlayObjectStack.length>0){var e=overlayObjectStack.pop();removeOverlay(e),isIE()&&overlayObjectStack.length>0&&removeOverlay(overlayObjectStack.pop())}}function popAllOverlayObjects(){for(;overlayObjectStack.length>0;){var e=overlayObjectStack.pop();removeOverlay(e)}}function disableSelection(e){e&&("undefined"!=typeof e.style.KhtmlUserSelect?e.onselectstart=function(e){return e.stopPropagation(),!1
  }:"undefined"!=typeof e.onselectstart?e.onselectstart=function(e){return e=e?e:window.event,e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,!1}:"undefined"!=typeof e.style.MozUserSelect&&(e.style.MozUserSelect="-moz-none"),e.style.cursor="default")}function disableSelectionWithoutCursorStyle(e){e&&("undefined"!=typeof e.style.KhtmlUserSelect?e.onselectstart=function(e){return e.stopPropagation(),!1}:"undefined"!=typeof e.onselectstart?e.onselectstart=function(e){return e=e?e:window.event,e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,!1}:"undefined"!=typeof e.style.MozUserSelect&&(e.style.MozUserSelect="-moz-none"))}function enableSelection(e){e&&("undefined"!=typeof e.style.KhtmlUserSelect?e.onselectstart=function(e){return e.stopPropagation(),!0}:"undefined"!=typeof e.onselectstart?e.onselectstart=function(e){return e=e?e:window.event,e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,!0}:"undefined"!=typeof e.style.MozUserSelect&&(e.style.MozUserSelect="text"),e.style.cursor="default")}function setCursor(e){document.body.style.cursor=e}function cursorDefault(){setCursor("default")}function cursorPointer(){setCursor("pointer")}function cursorWait(){setCursor("wait")}function getCellAtColumn(e,t){for(columnCount=0,i=0;i<e.length;i++)if(columnCount+=e.colspan,columnCount>=t)return e[i];return null}function getCellAtRow(e,t,n){for(rowCount=0,i=0;i<e.length;i++){var s=e[i].cells[t];rowCount+=s.rowspan}return null}function copyTable(e,t,i,n){var s=n?e:$(e).select("tbody")[0],o=n?t:$(t).select("tbody.copyTo")[0];i&&clearTable(t);try{o.insert(s.innerHTML)}catch(r){}}function copyTableJquery(e,t,i,n){var s=n?e:e.find("tbody:first"),o=n?t:jQuery("tobody.copyTo:first",t);i&&clearTable(t);try{jQuery(o).append(s.html())}catch(r){}}function clearTable(e){if(document.all)for(;e.rows[0];)e.deleteRow(0);else e.innerHTML=""}function getWindowWidth(){var e=jQuery(window).width();return isIE9()&&(e+=17),e}function getWindowHeight(){var e=jQuery(window).height();return isIE9()&&(e+=17),e}function getScrollLeft(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft}function getScrollTop(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop}function scrollXToMiddle(e){var t=e.scrollWidth-getWindowWidth();t>0&&(e.scrollLeft=t/2)}function launchNewWindow(e){window.open(e)}function getIFrameDocument(e){var t=e.contentWindow||e.contentDocument;return t.document&&(t=t.document),t}function getEvent(e){return e?e:window.event}function popEvent(e){cancelEventBubbling(e?e:event)}function triggerNativeEvent(e,t){var i,n=isIE();t=t||(n?document.documentElement:window),document.createEvent?(i=document.createEvent("Event"),i.initEvent(e,!0,!0),t.dispatchEvent(i)):t.fireEvent("on"+e,document.createEventObject())}function relatedTargetInElementSubtree(e,t){return e.relatedTarget?t===e.relatedTarget?!0:e.relatedTarget.descendantOf(t):!1}function cancelEventBubbling(e){e=getEvent(e),e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}function cancelEventAndPreventDefault(e){e.preventDefault(),e.stop()}function enterKeyHit(e){var t=whichKeyHit(e);return 13==t||3==t}function whichKeyHit(e){e=getEvent(e);var t=e.charCode?e.charCode:e.which?e.which:e.keyCode;return t}function isCtrlHeld(e){return e=getEvent(e),!(!e||!e.ctrlKey)}function isShiftHeld(e){return e=getEvent(e),!(!e||!e.shiftKey)}function getEventTarget(e){return e=getEvent(e),e&&(e.target||e.srcElement)}function isNavigationInput(e){e=getEvent(e);var t=e.keyCode?e.keyCode:e.which;return t==Keys.DOM_VK_LEFT||t==Keys.DOM_VK_RIGHT||t==Keys.DOM_VK_TAB||t==Keys.DOM_VK_BACK_SPACE||t==Keys.DOM_VK_ENTER}function verifyIsDigitInput(e){e=getEvent(e);var t=e.keyCode?e.keyCode:e.which;return t>=Keys.DOM_VK_0&&t<=Keys.DOM_VK_9||isNavigationInput(e)}function verifyIsInputNumericGroupSeparator(e){e=getEvent(e);var t=e.keyCode?e.keyCode:e.which,i=String.fromCharCode(t);return i===groupingSeparator}function verifyIsInputNumericDecimalSeparator(e){e=getEvent(e);var t=e.keyCode?e.keyCode:e.which,i=String.fromCharCode(t);return i===decimalSeparator}function numberOfDecimals(e){for(var t=e.length,i=0,n=0;t>n;n++)e.charAt(n)===decimalSeparator&&i++;return i}function macOSKeyboardRightClick(e){var e=getEvent(e);return e.ctrlKey?0==e.button||1==e.button||2==e.button:!1}function macOSMouseRightClick(e){var e=getEvent(e),t=!1;return e=e||window.event,e.which?t=3==e.which:e.button&&(t=2==e.button),t}function isRightClick(e){if(isMacOS()){var t=macOSKeyboardRightClick(e),i=macOSMouseRightClick(e);return t||i}return Event.isRightClick(e)}function isLeftClick(e){return Event.isLeftClick(e)}function isMetaHeld(e,t){var e=getEvent(e);return getEvent(e)?isMacOS()?t?e.altKey:e.metaKey:isCtrlHeld(e):!1}function trim(e){return e.strip()}function startsWith(e,t){return e.startsWith(t)}function getTextAfterUnderscore(e){return getTextAfterSubstring(e,"_")}function getTextBeforeUnderscore(e){return getTextBeforeSubstring(e,"_")}function extractNumber(e){var t=e.match(/\d/g);return t=t.join("")}function getTextAfterSubstring(e,t){var i=e.toLowerCase().indexOf(t.toLowerCase());return-1==i?null:e.substring(i+t.length)}function getTextBeforeSubstring(e,t){var i=e.toLowerCase().indexOf(t.toLowerCase());return-1==i?e:e.substring(0,i)}function removeTrailingSlash(e){var t=e.substring(e.length-1);return"/"==t?e.substring(0,e.length-1):e}function removeTrailingPound(e){var t=e.substring(e.length-1);return"#"==t?e.substring(0,e.length-1):e}function removeChars(e,t){var i=0;for(i;i<t.length;i++)for(;e.indexOf(t[i])>-1;)e=e.replace(t[i],"");return e}function replaceAll(e,t,i){e.gsub(t,i)}function jsHash(){var e=new Array;e.clazz="Hash";for(var t=0;t<arguments.length;t+=2)"undefined"!=typeof arguments[t+1]&&(e[arguments[t]]=arguments[t+1],e.push(arguments[t]));return e}function textCounter(e,t){return e.value.length>t?(e.value=e.value.substring(0,t),!1):!0}function saveAndClear(e,t){e=t,t=""}function escapeString(e,t,i){if(!e||!t||void 0===i||null===i)return e;var n="string"==typeof i||Object.isArray(i)&&i.length<t.length,s=Object.isArray(i)?i.first():i;return Object.isArray(t)?(t.each(function(t,o){var r=n?s:i[o];e=e.replace(t,r)}),e):e.replace(t,s)}function formatString(e){var t,i,n,s=Array.prototype.slice.call(arguments,1),o=[];if(s.length<3){for(var r=0;r<s.length;r++)e=e.replace("{"+r+"}",s[r]);return e}if(t=(e||"").match(/[{]\d+[}]/g),!t)return e;i=e.split(/[{]\d+[}]/);for(var a=0;a<i.length;a+=1)n=a<t.length?s[t[a].slice(1,-1)]:"",o.push(i[a],n);return o.join("")}function removeWhitespacesFromTable(e){return e.replace(/>\s+<\/table/g,"></table").replace(/>\s+<thead/g,"><thead").replace(/>\s+<\/thead/g,"></thead").replace(/>\s+<tbody/g,"><tbody").replace(/>\s+<\/tbody/g,"></tbody").replace(/>\s+<caption/g,"><caption").replace(/>\s+<\/caption/g,"></caption").replace(/>\s+<tr/g,"><tr").replace(/>\s+<\/tr/g,"></tr").replace(/>\s+<th/g,"><th").replace(/>\s+<\/th/g,"></th").replace(/>\s+<td/g,"><td").replace(/>\s+<\/td/g,"></td")}function splitText(e,t){var i={left:"",right:e};return t=parseInt(t,10),_.isNaN(t)?i:0===t?i:(i.left=e.substr(0,t),i.right=e.substr(t),i)}function escapeTags(e){return e.replace(/</g,"&lt")}function redirectToUrl(e){if(isIE8()){var t=document.createElement("a");t.href=e,document.body.appendChild(t),t.click()}else window.location.href=e}function checkURLProtocol(e,t){if(!t)return e;if(startsWith(e,"/"))return e;for(var i=new Array("http://","https://","file://","mailto://","ftp://"),n=0;n<i.length;n++)if(startsWith(e,i[n]))return e;return i[0]+e}function getSymbolToAppendNextParam(e){var t=e.substring(e.length-1);return"?"==t||"&"==t?"":e.indexOf("?")>-1?"&":"?"}function showBusyCursor(){theBody.style.cursor="wait"}function restoreDefaultCursor(){theBody.style.cursor=""}function encodeText(e){return encodeURIComponent(encodeURIComponent(e))}function decodeText(e){return decodeURIComponent(e)}function constrain(e,t,i){return e>i?i:t>e?t:e}function deepClone(e){if(null==e)return null;if("object"!=typeof e)return e;var t=Object.isArray(e)?[]:{};for(var i in e)t[i]="object"==typeof e[i]?deepClone(e[i]):e[i];return t}function cloneCustomAttributes(e,t){var i=e?e.attributes:{};for(var n in i){var s=i[n]&&i[n].name;s&&s.startsWith("data")&&$(t).writeAttribute(s,$(e).readAttribute(s))}}function initLog(){log=""}function logIt(e){log=log+"||"+e+"-"+(new Date).getTime()}function debug(e){window.console&&window.console.debug(e)}function startTimer(e){window.console&&window.console.time?console.time(e):timer[e]=+new Date}function stopTimer(e){if(window.console&&window.console.timeEnd)console.timeEnd(e);else if(timer[e]){var t=e+": "+(+new Date-timer[e]);timer[e]=void 0,window.console?console.log(t):window.status=t}}function toBlockNotation(e){return e?e.split(".").map(function(e){return"['"+e+"']"}).join(""):""}function toFunction(theFunction){if("string"!=typeof theFunction)return theFunction;var blockReference=toBlockNotation(theFunction);return eval("window"+blockReference)}function BusyMonitor(e,t){this.waitTime=e,this.theFunction=t,this.timer=null}function InPlaceEditor(e){this.elem=$(e),this.id=e.identify(),this.editing=!1,this.value=getInnerText(e)}function evaluateScripts(e){var t;t=e?$(e):document;var i=t.getElementsByTagName("SCRIPT");if(null!=i)for(var n=0;n<i.length;n++){var s=i[n];s&&s.text&&globalEval(s.text)}}function evaluateScript(e){var t=$(e);t&&t.text&&globalEval(t.text)}function globalEval(e){window.eval.call(window,e)}function loadJSFiles(e){e&&Object.isArray(e)&&e.each(function(e){loadJSFile(e)})}function loadJSFile(e){$(e)&&$(e).parentNode.removeChild($(e));var t=new Element("script");t.setAttribute("id",e),t.setAttribute("type","text/javascript"),t.setAttribute("src",e),$$("head")[0].appendChild(t)}function unloadAllScripts(){var e=document.getElementsByTagName("SCRIPT");if(null!=e)for(var t=0;t<e.length;t++){var i=e[t];i.parentNode.removeChild(i)}}function loadCSSFiles(e,t){e&&Object.isArray(e)&&e.each(function(e){loadCSSFile(e,t)})}function loadCSSFile(e,t){unloadCSSFile(e);var i=new Element("link");i.setAttribute("id",escape(e)),i.setAttribute("rel","stylesheet"),i.setAttribute("type","text/css"),i.setAttribute("href",e),t&&document.body?document.body.appendChild(i):$$("head")[0].insert(i,"bottom")}function unloadCSSFiles(e){e&&Object.isArray(e)&&e.each(function(e){unloadCSSFile(e)})}function unloadCSSFile(e){if($(escape(e)))try{$(escape(e)).parentNode.removeChild($(escape(e)))}catch(t){alert(t)}}function createCSSRule(e){var t=document.createElement("style");t.type="text/css",t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}function getFirstMatch(e){return $$(e)[0]}function dialogOnMouseDown(e){var t=null!=e?e:window.event;cancelEventDragTarget&&cancelEventDragTarget==getEventTarget(t)||new Dragger(t,[getAbsoluteParent(window.event?t.srcElement:t.target)],!0,!0,2,new DragListener)}function cancelEventDrag(e){cancelEventDragTarget=getEventTarget(e)}function encodeUriParameter(e){return encodeURIComponent(encodeURIComponent(e))}function replaceHTML(e,t){if(isIE())return void(e.innerHTML=t);var e=$(e),i=e.nextSibling,n=e.parentNode;n.removeChild(e),e.innerHTML=t,i?n.insertBefore(e,i):n.appendChild(e)}function gotoDefaultLocation(e){window.location.href="flow.html?_flowId=searchFlow"+(e?"&"+e:"")}function gotoFolderExplorer(e){window.location.href="flow.html?_flowId=searchFlow",document.location="flow.html?_flowId=searchFlow&showFolder="+e}function switchDesign(e){var t=document.location.href,i=t.include("&decorator");"old"===e?i?t=t.replace("main","mainOld"):t+="&decorator=mainOld&confirm=true":i?t=t.replace("mainOld","main"):t+="&decorator=main&confirm=true",redirectToUrl(t)}function showDiv(e){var t=document.getElementById(e),i=(document.body.clientWidth,document.body.clientHeight,t.style.zIndex);t.style.zIndex=-100,t.style.display="block",centerLayer(t),t.style.zIndex=i}function hideDiv(e){var t=document.getElementById(e);return t.style.display="none",!0}function borderImage(e,t){(document.all||document.getElementById)&&(e.style.borderColor=t)}function resetRadio(e){var t=!1;if(e.length)for(var i=0;i<e.length;++i)e[i].checked&&(e[i].checked=!1,t=!0);else e.checked&&(e.checked=!1,t=!0);return t}function launchAboutDlg(){var e=document.getElementById("about");e.style.display="block",centerLayer(e)}function hideAboutDlg(){var e=document.getElementById("about");e.style.display="none"}function unescapeBackslash(e){return e?e.replace(/\\\\/g,"\\"):e}function ajaxIframeDownload(e,t){var i=$("ajax-download-iframe");t&&(i.onload=t.onload),i.src=e}function parseAsDate(e){var t=e.match(/(\d+)/g);return new Date(t[0],t[1]-1,t[2])}function parseAsDateTime(e){var t=e.match(/(\d+)/g);return new Date(t[0],t[1]-1,t[2],t[3],t[4],t[5])}function padNumber(e){var t=String(e);return 1===t.length&&(t="0"+t),t}function toTimestampString(e){return e.getUTCFullYear()+"-"+padNumber(e.getMonth()+1)+"-"+padNumber(e.getDate())+" "+padNumber(e.getHours())+":"+padNumber(e.getMinutes())+":"+padNumber(e.getSeconds())}function isProVersion(){return __jrsConfigs__.isProVersion}function AjaxRequester(e,t,i,n){this.url=e||document.location.toString(),this.params=t,this.xmlhttp=getXMLHTTP();var s=this.processResponse(this);this.xmlhttp.onreadystatechange=s,this.postData=i,this.async=!n,this.requestTime=+new Date}function handleResponse(e){checkForErrors(e)||e.responseHandler(e),ajaxRequestEnded(e),JRS&&JRS.vars&&(JRS.vars.ajax_in_progress=!1),document.getElementById("mainTableContainerOverlay")&&(document.getElementById("mainTableContainerOverlay").className="hidden")}function targettedResponseHandler(e){var t=e.xmlhttp,i=e.params[0],n=e.params[1],s=e.params[2],o=(e.params[3],$(i));n?(o.innerHTML="",updateUsingResponseSubset(t,n,o)):o.innerHTML=t.responseText,invokeCallbacks(s,o)}function cumulativeResponseHandler(e){var t=e.xmlhttp,i=e.params[0],n=e.params[1],s=e.params[2],o=$(i);n?updateUsingResponseSubset(t,n,o):o.insert(t.responseText,{position:"after"}),invokeCallbacks(s)}function rowCopyResponseHandler(e){var t=e.xmlhttp,i=e.params[0],n=e.params[2],s=$(i);if("TABLE"!==s.tagName)return void alert("Ajax Exception: rowCopyResponseHandler will not work for container "+s.tagName);var o=Builder.node("DIV");o.innerHTML=t.responseText,copyTable(o.getElementsByTagName("table")[0],s,!1,!1),invokeCallbacks(n)}function updateUsingResponseSubset(e,t,i){function n(){if(!(u>=c)){var e=jQuery(l.get(u));e.attr("src")?(u++,s(e.attr("data-custname"),e.attr("src"),n)):(u++,o(e.html(),n))}}function s(e,t,i){var n=i||!1,s=document.createElement("script");window.jr_scripts||(window.jr_scripts={}),window.jr_scripts[e]||"jr_jq_min"===e?n&&i():(s.setAttribute("type","text/javascript"),s.readyState?s.onreadystatechange=function(){("loaded"===s.readyState||"complete"===s.readyState)&&(s.onreadystatechange=null,n&&i())}:s.onload=function(){n&&i()},s.src=t,document.getElementsByTagName("head")[0].appendChild(s),window.jr_scripts[e]=t)}function o(e,t){var i=t||!1;if(e){var n=e.match(/^.*((\r\n|\n|\r)|$)/gm);window.eval(n.join("\n")),i&&t()}}var r=jQuery(e.responseText),a=r.filter("#"+t);if("TABLE"==i.tagName&&"TABLE"==$(t).tagName?copyTableJquery(a,i,!0):jQuery(i).append(a.html()),"undefined"!=typeof jQuery){var l=r.filter("script.jasperreports"),c=l.size(),u=0;n()}}function invokeCallbacks(callback,customArg){callback&&("string"==typeof callback?eval(callback):callback(customArg))}function ajaxClobberredUpdate(e,t){t.responseHandler=clobberingResponseHandler,ajaxUpdate(e,t)}function ajaxTargettedUpdate(url,options){var responseHandler;responseHandler=options.mode==AjaxRequester.prototype.CUMULATIVE_UPDATE?cumulativeResponseHandler:options.mode==AjaxRequester.prototype.ROW_COPY_UPDATE?rowCopyResponseHandler:options.mode==AjaxRequester.prototype.EVAL_JSON?evalJSONResponseHandler:targettedResponseHandler,options.responseHandler=function(requester,params){options.preFillAction?"string"==typeof options.preFillAction?eval(options.preFillAction):options.preFillAction(responseHandler(requester,params)):responseHandler(requester,options.params)},ajaxUpdate(url,options)}function ajaxNonReturningUpdate(e,t){t.responseHandler=null,ajaxUpdate(e,t)}function ajaxClobberedFormSubmit(e,t,i){var n=getPostData(e,extraPostData);i.postData=appendPostData(n,extraPostData),i.responseHandler=clobberingResponseHandler,ajaxUpdate(t,i)}function ajaxTargettedFormSubmit(e,t,i){var n=getPostData(e,i.extraPostData);i.postData=appendPostData(n,i.extraPostData),i.responseHandler=targettedResponseHandler,ajaxUpdate(t,i)}function ajaxErrorHandler(){showMessageDialog(ajaxError,ajaxErrorHeader)}function doNothing(){}function ajaxUpdate(e,t){var i=!0,n=new AjaxRequester(e,[t.fillLocation,t.fromLocation,t.callback,t.isAutomaticRefresh],t.postData,t.synchronous);isIPad()&&"adhoc"==JRS.vars.current_flow&&(JRS.vars.ajax_in_progress||(JRS.vars.ajax_in_progress=!0)),i&&(n.busyCursor=!t.silent,n.showLoading=!t.silent&&!t.hideLoader,n.responseHandler=t.responseHandler||doNothing,n.responseHandler!=doNothing&&ajaxRequestStarted(n),t.errorHandler&&(n.errorHandler=t.errorHandler),n.xmlhttp&&(t.postData?n.doPost():n.doGet()))}function checkForErrors(e){var t=e.errorHandler;return t(e.xmlhttp)}function getPostData(e,t){"string"==typeof e&&(e=document.forms[e]);for(var i="",n=0;n<e.elements.length;++n){var s=e.elements[n];!s.name||t&&t[s.name]||(i=appendFormInput(i,s))}return i}function appendPostData(e,t){for(name in t)e=appendFormValue(e,name,t[name]);return e}function appendFormInput(e,t){if(t.name){var i,n=!1;switch(t.type){case"checkbox":case"radio":n=t.checked,i=t.value;break;case"hidden":case"password":case"text":case"Textarea":n=!0,i=t.value;break;case"select-one":case"select-multiple":i=new Array;for(var s=0;s<t.options.length;++s){var o=t.options[s];o.selected&&(n=!0,i.push(o.value))}}if(n)if(i.shift)for(;i.length>0;)e=appendFormValue(e,t.name,i.shift());else e=appendFormValue(e,t.name,i)}return e}function appendFormValue(e,t,i){return e.length>0&&(e+="&"),e+=t+"="+encodeURIComponent(i)}function baseErrorHandler(e){if(500==e.status)return showErrorPopup(e.responseText),!0;var t=e.getResponseHeader("LoginRequested");if(t){var i=".";return document.location=i,!0}var n=e.getResponseHeader("JasperServerError");if(n){var s=e.getResponseHeader("SuppressError");if(!s){var o=jQuery(".dashboardViewFrame");if(1==o.length){document.body.innerHTML=e.responseText;var r=jQuery("#"+JRS.fid,window.parent.document);r.removeClass("hidden").show()}else showErrorPopup(e.responseText)}return!0}return!1}function showErrorPopup(e,t){(e&&e.indexOf("sessionAttributeMissingException"))>-1?dialogs.clusterErrorPopup.show(e):dialogs.errorPopup.show(e,!1,t)}function hideErrorPopup(){popOverlayObject();var e=document.getElementById(ERROR_POPUP_DIV);e.style.display="none"}function ajaxRequestStarted(e){++ajax.ajaxRequestCount,e.busyCursor&&(document.body.style.cursor="wait"),!isIPad()&&e.showLoading&&e.startResponseTimer()}function ajaxRequestEnded(e){e.cancelResponseTimer(),ajax.ajaxRequestCount<=1?(document.body.style.cursor="auto",ajax.ajaxRequestCount=0,dialogs.popup.hide($(ajax.LOADING_ID))):ajax.ajaxRequestCount--}function isValidJsonResponse(e){var t=e.getResponseHeader("Content-Type");return 200==e.status&&null!=t&&t.indexOf("application/json")>=0}function getXMLHTTP(){var e,t;if(!t&&!e)try{t=new XMLHttpRequest}catch(i){alert("You need a browser which supports an XMLHttpRequest Object.\nMozilla build 0.9.5 has this Object and IE5 and above, others may do, I don't know, any info jim@jibbering.com")}return t}function moveTo(e,t,i,n){new Effect.Move($(e),{sync:!1,x:t,y:i,mode:"absolute",duration:n?n:.2})}function move(e,t,i,n){new Effect.Move($(e),{sync:!1,x:t,y:i,mode:"relative",duration:n?n:.2})}function moveMany(e,t,i,n){for(var s=[],o=0;o<e.length;++o)s[o]=new Effect.Move(e[o],{sync:!0,x:t,y:i,mode:"relative"});new Effect.Parallel(s,{duration:n?n:1})}function fade(e,t,i){$(e).fade({duration:t?t:1,from:1,to:i?i:0})}function fadeMany(e,t,i){for(var n=[],s=0;s<e.length;++s)n[s]=new Effect.Fade(e[s],{sync:!0,from:1,to:i?i:0});new Effect.Parallel(n,{duration:t?t:1})}function appear(e,t,i){$(e).appear({duration:t?t:1,from:0,to:i?i:1})}function appearMany(e,t,i){for(var n=[],s=0;s<e.length;++s)n[s]=new Effect.Appear(e[s],{sync:!0,from:0,to:i?i:1});new Effect.Parallel(n,{duration:t?t:1})}function pulsate(e,t,i){var n=$(e).identify();Effect.Pulsate(n,{pulses:t?t:5,duration:i?i:2})}function renderImageOverMousePointer(e,t){var e=$(e);return e.show(),e.style.left=t.clientX,e.style.top=t.clientY,e}function JSTooltip(e,t){if(e){if(this.srcElement=e,t&&(this.label=t.label,this.text=t.text,this.offsets=t.offsets,this.showBelow=!!t.showBelow,this.templateId=t.templateId,this.loadTextCallback=t.loadTextCallback,this.loadTextExecuted=!1),this.templateId)this._toAttribute(this.TOOLTIP_TEMPLATE,this.templateId);else{var i=this._fromAttribute(this.TOOLTIP_TEMPLATE);this.templateId=i&&i.length>0?i:this.TOOLTIP_TEMPLATE_ID}this.label?this._toAttribute(this.TOOLTIP_LABEL,this.label):this.label=this._fromAttribute(this.TOOLTIP_LABEL),this.text?this._toAttribute(this.TOOLTIP_TEXT,this.text):this.text=this._fromAttribute(this.TOOLTIP_TEXT),this.srcElement.jsTooltip=this,tooltipModule.tooltips.push(this)}}function replaceNbsps(e){var t=new RegExp("&nbsp;","g");return e.replace(t," ")}function fireMenuAction(e){var t=getAsFunction(e);t&&t()}function fireMenuActionWithEvent(e,t){var i,n=toFunction(t);n=n||(i=toFunction("localContext."+t)),n&&(e=_.isArray(e)?e:[e],n.apply(i?localContext:null,e))}function getMenuMouseupFunction(e,t,i,n,s){if(!e)return null;if(t){var o=resolveReservedStringsInArray(t,i,n,s);return function(){fireMenuActionWithEvent(o,e,s)}}return function(){fireMenuAction(e,s)}}function evaluateTest(e,t,i,n,s,o){var r=null!=o?o:!0,a=getAsFunction(e);return a&&(r=a.apply(this,resolveReservedStringsInArray(t,i,n,null)),s&&(r=!r)),r}function resolveReservedStringsInArray(e,t,i,n){return e?e.collect(function(e){return resolveReservedStrings(e,t,i,n)}):[]}function resolveReservedStrings(e,t,i,n){return e==actionModel.RES_SELECTED?actionModel.selObjects:e==actionModel.RES_LABEL?t:e==actionModel.RES_ID?i:e==actionModel.EVENT?n:e}function getRandomId(){var e=Math.round(50*Math.random(10));return"_"+e}function click(){for(i=0;i<document.forms.length;i++)for(nl=document.forms[i].getElementsByTagName("INPUT"),j=0;j<nl.length;j++)for(n=nl.item(j),al=n.attributes,k=0;k<al.length;k++)if(a=al.item(k),"name"==a.nodeName){if(a.nodeValue!=argv)break;for(al0=n.attributes,k0=0;k0<al0.length;k0++)a0=al0.item(k0),("onclick"==a0.nodeName||"ondblclick"==a0.nodeName)&&(a0.nodeValue=null);n.click()}}function dblClick(e){for(i=0;i<document.forms.length;i++)for(nl=document.forms[i].getElementsByTagName("INPUT"),j=0;j<nl.length;j++)for(n=nl.item(j),al=n.attributes,k=0;k<al.length;k++)if(a=al.item(k),"name"==a.nodeName){if(a.nodeValue!=e)break;for(n=nl.item(++j),al0=n.attributes,k0=0;k0<al0.length;k0++)if(a0=al0.item(k0),"disabled"==a0.nodeName){a0.nodeValue=!1;break}n.click(),document.forms[i].submit()}}function launch(e){null==childWin||childWin.closed?childWin=launchCenter(e,"center",700,1100):(childWin.close(),childWin=launchCenter(e,"center",700,1100)),childWin.focus()}function launchCenter(e,t,i,n){var s="height="+i+",innerHeight="+i;if(s+=",width="+n+",innerWidth="+n,window.screen){var o=screen.availHeight-30,r=screen.availWidth-10,a=(r-n)/2,l=(o-i)/2;s+=",left="+a+",screenX="+a,s+=",top="+l+",screenY="+l,s+=",channelmode=0,dependent=1,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=1,toolbar=0","drillThroughWindow"}return window.open(e,t,s)}function ld(e){return launch("../"+olapPage+"?name="+viewURI+"&"+e+"=x&d=x")}function lc(e){return location.replace("../"+olapPage+"?name="+viewURI+"&"+e+"=x&d=y")}function z(e){return location.replace("../"+olapPage+"?name="+viewURI+"&"+e+"=x&d=z")}function closeChildWin(){childWin&&!childWin.closed&&childWin.close()}function initialize(){bWidth=document.body.offsetWidth,bHeight=document.body.offsetHeight,subobj=document.getElementById("displayFormTable"),subobj&&(sWidth=subobj.offsetWidth,sHeight=subobj.offsetHeight,posX=(bWidth-sWidth)/2,posY=(bHeight-sHeight)/2),saveAsViewName=document.getElementById("viewName"),saveAsViewName&&""==saveAsViewName.value&&(saveAsViewName.value="${olapSession.olapUnit.label}_<%=copyString%>"),images=$$("img");for(var e=0;e<images.length;e++)images[e].onclick=function(){pageAlert=!1};links=$$("a");for(var e=0;e<links.length;e++)links[e].onclick=function(){pageAlert=!1};helpElement=$("help"),helpElement&&(helpElement.onclick=webHelpModule.displayWebHelp),inputs=$$("input.corner");for(var e=0;e<inputs.length;e++)inputs[e].onclick=function(){pageAlert=!1};inputs=$$("input.nav");for(var e=0;e<inputs.length;e++)inputs[e].onclick=function(){return pageAlert=!1,t=setTimeout("click()",250),argv=inputs[e].id,!1},inputs[e].ondblclick=function(){return clearTimeout(t),dblClick(inputs[e].id),!1}}define("domReady",[],function(){function e(e){var t;for(t=0;t<e.length;t+=1)e[t](c)}function t(){var t=u;l&&t.length&&(u=[],e(t))}function i(){l||(l=!0,r&&clearInterval(r),t())}function n(e){return l?e(c):u.push(e),n}var s,o,r,a="undefined"!=typeof window&&window.document,l=!a,c=a?document:null,u=[];if(a){if(document.addEventListener)document.addEventListener("DOMContentLoaded",i,!1),window.addEventListener("load",i,!1);else if(window.attachEvent){window.attachEvent("onload",i),o=document.createElement("div");try{s=null===window.frameElement}catch(d){}o.doScroll&&s&&window.external&&(r=setInterval(function(){try{o.doScroll(),i()}catch(e){}},30))}"complete"===document.readyState&&i()}return n.version="2.0.1",n.load=function(e,t,i,s){s.isBuild?i(null):n(i)},n}),function(){function e(t,n){function o(e){if(o[e]!==g)return o[e];var t;if("bug-string-char-index"==e)t="a"!="a"[0];else if("json"==e)t=o("json-stringify")&&o("json-parse");else{var i,s='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var l=n.stringify,u="function"==typeof l&&y;if(u){(i=function(){return 1}).toJSON=i;try{u="0"===l(0)&&"0"===l(new r)&&'""'==l(new a)&&l(_)===g&&l(g)===g&&l()===g&&"1"===l(i)&&"[1]"==l([i])&&"[null]"==l([g])&&"null"==l(null)&&"[null,null,null]"==l([g,_,null])&&l({a:[i,!0,!1,null,"\x00\b\n\f\r	"]})==s&&"1"===l(null,i)&&"[\n 1,\n 2\n]"==l([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==l(new c(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==l(new c(864e13))&&'"-000001-01-01T00:00:00.000Z"'==l(new c(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==l(new c(-1))}catch(d){u=!1}}t=u}if("json-parse"==e){var h=n.parse;if("function"==typeof h)try{if(0===h("0")&&!h(!1)){i=h(s);var p=5==i.a.length&&1===i.a[0];if(p){try{p=!h('"	"')}catch(d){}if(p)try{p=1!==h("01")}catch(d){}if(p)try{p=1!==h("1.")}catch(d){}}}}catch(d){p=!1}t=p}}return o[e]=!!t}t||(t=s.Object()),n||(n=s.Object());var r=t.Number||s.Number,a=t.String||s.String,l=t.Object||s.Object,c=t.Date||s.Date,u=t.SyntaxError||s.SyntaxError,d=t.TypeError||s.TypeError,h=t.Math||s.Math,p=t.JSON||s.JSON;"object"==typeof p&&p&&(n.stringify=p.stringify,n.parse=p.parse);var f,m,g,v=l.prototype,_=v.toString,y=new c(-0xc782b5b800cec);try{y=-109252==y.getUTCFullYear()&&0===y.getUTCMonth()&&1===y.getUTCDate()&&10==y.getUTCHours()&&37==y.getUTCMinutes()&&6==y.getUTCSeconds()&&708==y.getUTCMilliseconds()}catch(b){}if(!o("json")){var T="[object Function]",w="[object Date]",E="[object Number]",S="[object String]",M="[object Array]",x="[object Boolean]",I=o("bug-string-char-index");if(!y)var C=h.floor,D=[0,31,59,90,120,151,181,212,243,273,304,334],N=function(e,t){return D[t]+365*(e-1970)+C((e-1969+(t=+(t>1)))/4)-C((e-1901+t)/100)+C((e-1601+t)/400)};if((f=v.hasOwnProperty)||(f=function(e){var t,i={};return(i.__proto__=null,i.__proto__={toString:1},i).toString!=_?f=function(e){var t=this.__proto__,i=e in(this.__proto__=null,this);return this.__proto__=t,i}:(t=i.constructor,f=function(e){var i=(this.constructor||t).prototype;return e in this&&!(e in i&&this[e]===i[e])}),i=null,f.call(this,e)}),m=function(e,t){var n,s,o,r=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,s=new n;for(o in s)f.call(s,o)&&r++;return n=s=null,r?m=2==r?function(e,t){var i,n={},s=_.call(e)==T;for(i in e)s&&"prototype"==i||f.call(n,i)||!(n[i]=1)||!f.call(e,i)||t(i)}:function(e,t){var i,n,s=_.call(e)==T;for(i in e)s&&"prototype"==i||!f.call(e,i)||(n="constructor"===i)||t(i);(n||f.call(e,i="constructor"))&&t(i)}:(s=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],m=function(e,t){var n,o,r=_.call(e)==T,a=!r&&"function"!=typeof e.constructor&&i[typeof e.hasOwnProperty]&&e.hasOwnProperty||f;for(n in e)r&&"prototype"==n||!a.call(e,n)||t(n);for(o=s.length;n=s[--o];a.call(e,n)&&t(n));}),m(e,t)},!o("json-stringify")){var k={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},O="000000",A=function(e,t){return(O+(t||0)).slice(-e)},L="\\u00",P=function(e){for(var t='"',i=0,n=e.length,s=!I||n>10,o=s&&(I?e.split(""):e);n>i;i++){var r=e.charCodeAt(i);switch(r){case 8:case 9:case 10:case 12:case 13:case 34:case 92:t+=k[r];break;default:if(32>r){t+=L+A(2,r.toString(16));break}t+=s?o[i]:e.charAt(i)}}return t+'"'},R=function(e,t,i,n,s,o,r){var a,l,c,u,h,p,v,y,b,T,I,D,k,O,L,j;try{a=t[e]}catch(H){}if("object"==typeof a&&a)if(l=_.call(a),l!=w||f.call(a,"toJSON"))"function"==typeof a.toJSON&&(l!=E&&l!=S&&l!=M||f.call(a,"toJSON"))&&(a=a.toJSON(e));else if(a>-1/0&&1/0>a){if(N){for(h=C(a/864e5),c=C(h/365.2425)+1970-1;N(c+1,0)<=h;c++);for(u=C((h-N(c,0))/30.42);N(c,u+1)<=h;u++);h=1+h-N(c,u),p=(a%864e5+864e5)%864e5,v=C(p/36e5)%24,y=C(p/6e4)%60,b=C(p/1e3)%60,T=p%1e3}else c=a.getUTCFullYear(),u=a.getUTCMonth(),h=a.getUTCDate(),v=a.getUTCHours(),y=a.getUTCMinutes(),b=a.getUTCSeconds(),T=a.getUTCMilliseconds();a=(0>=c||c>=1e4?(0>c?"-":"+")+A(6,0>c?-c:c):A(4,c))+"-"+A(2,u+1)+"-"+A(2,h)+"T"+A(2,v)+":"+A(2,y)+":"+A(2,b)+"."+A(3,T)+"Z"}else a=null;if(i&&(a=i.call(t,e,a)),null===a)return"null";if(l=_.call(a),l==x)return""+a;if(l==E)return a>-1/0&&1/0>a?""+a:"null";if(l==S)return P(""+a);if("object"==typeof a){for(O=r.length;O--;)if(r[O]===a)throw d();if(r.push(a),I=[],L=o,o+=s,l==M){for(k=0,O=a.length;O>k;k++)D=R(k,a,i,n,s,o,r),I.push(D===g?"null":D);j=I.length?s?"[\n"+o+I.join(",\n"+o)+"\n"+L+"]":"["+I.join(",")+"]":"[]"}else m(n||a,function(e){var t=R(e,a,i,n,s,o,r);t!==g&&I.push(P(e)+":"+(s?" ":"")+t)}),j=I.length?s?"{\n"+o+I.join(",\n"+o)+"\n"+L+"}":"{"+I.join(",")+"}":"{}";return r.pop(),j}};n.stringify=function(e,t,n){var s,o,r,a;if(i[typeof t]&&t)if((a=_.call(t))==T)o=t;else if(a==M){r={};for(var l,c=0,u=t.length;u>c;l=t[c++],a=_.call(l),(a==S||a==E)&&(r[l]=1));}if(n)if((a=_.call(n))==E){if((n-=n%1)>0)for(s="",n>10&&(n=10);s.length<n;s+=" ");}else a==S&&(s=n.length<=10?n:n.slice(0,10));return R("",(l={},l[""]=e,l),o,r,s,"",[])}}if(!o("json-parse")){var j,H,z=a.fromCharCode,F={92:"\\",34:'"',47:"/",98:"\b",116:"	",110:"\n",102:"\f",114:"\r"},$=function(){throw j=H=null,u()},B=function(){for(var e,t,i,n,s,o=H,r=o.length;r>j;)switch(s=o.charCodeAt(j)){case 9:case 10:case 13:case 32:j++;break;case 123:case 125:case 91:case 93:case 58:case 44:return e=I?o.charAt(j):o[j],j++,e;case 34:for(e="@",j++;r>j;)if(s=o.charCodeAt(j),32>s)$();else if(92==s)switch(s=o.charCodeAt(++j)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:e+=F[s],j++;break;case 117:for(t=++j,i=j+4;i>j;j++)s=o.charCodeAt(j),s>=48&&57>=s||s>=97&&102>=s||s>=65&&70>=s||$();e+=z("0x"+o.slice(t,j));break;default:$()}else{if(34==s)break;for(s=o.charCodeAt(j),t=j;s>=32&&92!=s&&34!=s;)s=o.charCodeAt(++j);e+=o.slice(t,j)}if(34==o.charCodeAt(j))return j++,e;$();default:if(t=j,45==s&&(n=!0,s=o.charCodeAt(++j)),s>=48&&57>=s){for(48==s&&(s=o.charCodeAt(j+1),s>=48&&57>=s)&&$(),n=!1;r>j&&(s=o.charCodeAt(j),s>=48&&57>=s);j++);if(46==o.charCodeAt(j)){for(i=++j;r>i&&(s=o.charCodeAt(i),s>=48&&57>=s);i++);i==j&&$(),j=i}if(s=o.charCodeAt(j),101==s||69==s){for(s=o.charCodeAt(++j),(43==s||45==s)&&j++,i=j;r>i&&(s=o.charCodeAt(i),s>=48&&57>=s);i++);i==j&&$(),j=i
  }return+o.slice(t,j)}if(n&&$(),"true"==o.slice(j,j+4))return j+=4,!0;if("false"==o.slice(j,j+5))return j+=5,!1;if("null"==o.slice(j,j+4))return j+=4,null;$()}return"$"},U=function(e){var t,i;if("$"==e&&$(),"string"==typeof e){if("@"==(I?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];e=B(),"]"!=e;i||(i=!0))i&&(","==e?(e=B(),"]"==e&&$()):$()),","==e&&$(),t.push(U(e));return t}if("{"==e){for(t={};e=B(),"}"!=e;i||(i=!0))i&&(","==e?(e=B(),"}"==e&&$()):$()),(","==e||"string"!=typeof e||"@"!=(I?e.charAt(0):e[0])||":"!=B())&&$(),t[e.slice(1)]=U(B());return t}$()}return e},W=function(e,t,i){var n=V(e,t,i);n===g?delete e[t]:e[t]=n},V=function(e,t,i){var n,s=e[t];if("object"==typeof s&&s)if(_.call(s)==M)for(n=s.length;n--;)W(s,n,i);else m(s,function(e){W(s,e,i)});return i.call(e,t,s)};n.parse=function(e,t){var i,n;return j=0,H=""+e,i=U(B()),"$"!=B()&&$(),j=H=null,t&&_.call(t)==T?V((n={},n[""]=i,n),"",t):i}}}return n.runInContext=e,n}var t="function"==typeof define&&define.amd,i={"function":!0,object:!0},n=i[typeof exports]&&exports&&!exports.nodeType&&exports,s=i[typeof window]&&window||this,o=n&&i[typeof module]&&module&&!module.nodeType&&"object"==typeof global&&global;if(!o||o.global!==o&&o.window!==o&&o.self!==o||(s=o),n&&!t)e(s,n);else{var r=s.JSON,a=s.JSON3,l=!1,c=e(s,s.JSON3={noConflict:function(){return l||(l=!0,s.JSON=r,s.JSON3=a,r=a=null),c}});s.JSON={parse:c.parse,stringify:c.stringify}}t&&define("json3",[],function(){return c})}.call(this),define("commons.bare.main",["require","prototype","!domReady"],function(e){e("prototype"),e("!domReady")}),function(){function e(e,t,i){for(var n=(i||0)-1,s=e?e.length:0;++n<s;)if(e[n]===t)return n;return-1}function t(e,t){for(var i=e.criteria,n=t.criteria,s=-1,o=i.length;++s<o;){var r=i[s],a=n[s];if(r!==a){if(r>a||"undefined"==typeof r)return 1;if(a>r||"undefined"==typeof a)return-1}}return e.index-t.index}function i(e){return"\\"+Di[e]}function n(){return ci.pop()||[]}function s(e){e.length=0,ci.length<pi&&ci.push(e)}function o(e,t,i){t||(t=0),"undefined"==typeof i&&(i=e?e.length:0);for(var n=-1,s=i-t||0,o=Array(0>s?0:s);++n<s;)o[n]=e[t+n];return o}function r(e){return e instanceof r?e:new a(e)}function a(e,t){this.__chain__=!!t,this.__wrapped__=e}function l(e){function t(){if(n){var e=o(n);Ui.apply(e,arguments)}if(this instanceof t){var r=u(i.prototype),a=i.apply(r,e||arguments);return z(a)?a:r}return i.apply(s,e||arguments)}var i=e[0],n=e[2],s=e[4];return t}function c(e,t,i,r,a){if(i){var l=i(e);if("undefined"!=typeof l)return l}var u=z(e);if(!u)return e;var d=Hi.call(e);if(!Ii[d])return e;var h=Zi[d];switch(d){case bi:case Ti:return new h(+e);case Ei:case xi:return new h(e);case Mi:return l=h(e.source,fi.exec(e)),l.lastIndex=e.lastIndex,l}var p=tn(e);if(t){var f=!r;r||(r=n()),a||(a=n());for(var m=r.length;m--;)if(r[m]==e)return a[m];l=p?h(e.length):{}}else l=p?o(e):M({},e);return p&&(Bi.call(e,"index")&&(l.index=e.index),Bi.call(e,"input")&&(l.input=e.input)),t?(r.push(e),a.push(l),(p?tt:un)(e,function(e,n){l[n]=c(e,t,i,r,a)}),f&&(s(r),s(a)),l):l}function u(e){return z(e)?Vi(e):{}}function d(e,t,i){if("function"!=typeof e)return qt;if("undefined"==typeof t||!("prototype"in e))return e;switch(i){case 1:return function(i){return e.call(t,i)};case 2:return function(i,n){return e.call(t,i,n)};case 3:return function(i,n,s){return e.call(t,i,n,s)};case 4:return function(i,n,s,o){return e.call(t,i,n,s,o)}}return Pt(e,t)}function h(e){function t(){var e=c?a:this;if(s){var g=o(s);Ui.apply(g,arguments)}if((r||p)&&(g||(g=o(arguments)),r&&Ui.apply(g,r),p&&g.length<l))return n|=16,h([i,f?n:-4&n,g,null,a,l]);if(g||(g=arguments),d&&(i=e[m]),this instanceof t){e=u(i.prototype);var v=i.apply(e,g);return z(v)?v:e}return i.apply(e,g)}var i=e[0],n=e[1],s=e[2],r=e[3],a=e[4],l=e[5],c=1&n,d=2&n,p=4&n,f=8&n,m=i;return t}function p(e,t){for(var i=-1,n=T(),s=e?e.length:0,o=[];++i<s;){var r=e[i];n(t,r)<0&&o.push(r)}return o}function f(e,t,i,n){for(var s=(n||0)-1,o=e?e.length:0,r=[];++s<o;){var a=e[s];if(a&&"object"==typeof a&&"number"==typeof a.length&&(tn(a)||S(a))){t||(a=f(a,t,i));var l=-1,c=a.length,u=r.length;for(r.length+=c;++l<c;)r[u++]=a[l]}else i||r.push(a)}return r}function m(e,t,i,n){if(e===t)return 0!==e||1/e==1/t;var s=typeof e,o=typeof t;if(!(e!==e||e&&Ci[s]||t&&Ci[o]))return!1;if(null==e||null==t)return e===t;var a=Hi.call(e),l=Hi.call(t);if(a!=l)return!1;switch(a){case bi:case Ti:return+e==+t;case Ei:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case Mi:case xi:return e==String(t)}var c=a==yi;if(!c){var u=e instanceof r,d=t instanceof r;if(u||d)return m(u?e.__wrapped__:e,d?t.__wrapped__:t,i,n);if(a!=Si)return!1;var h=e.constructor,p=t.constructor;if(h!=p&&!(H(h)&&h instanceof h&&H(p)&&p instanceof p)&&"constructor"in e&&"constructor"in t)return!1}i||(i=[]),n||(n=[]);for(var f=i.length;f--;)if(i[f]==e)return n[f]==t;var g=!0,v=0;if(i.push(e),n.push(t),c){if(v=t.length,g=v==e.length)for(;v--&&(g=m(e[v],t[v],i,n)););}else cn(t,function(t,s,o){return Bi.call(o,s)?(v++,!(g=Bi.call(e,s)&&m(e[s],t,i,n))&&di):void 0}),g&&cn(e,function(e,t,i){return Bi.call(i,t)?!(g=--v>-1)&&di:void 0});return i.pop(),n.pop(),g}function g(e,t){return e+$i(Ji()*(t-e+1))}function v(e,t,i){for(var n=-1,s=T(),o=e?e.length:0,r=[],a=i?[]:r;++n<o;){var l=e[n],c=i?i(l,n,e):l;(t?!n||a[a.length-1]!==c:s(a,c)<0)&&(i&&a.push(c),r.push(l))}return r}function _(e){return function(t,i,n){var s={};i=Kt(i,n,3);var o=-1,r=t?t.length:0;if("number"==typeof r)for(;++o<r;){var a=t[o];e(s,a,i(a,o,t),t)}else un(t,function(t,n,o){e(s,t,i(t,n,o),o)});return s}}function y(e,t,i,n,s,o){var r=2&t,a=16&t,c=32&t;if(!r&&!H(e))throw new TypeError;a&&!i.length&&(t&=-17,a=i=!1),c&&!n.length&&(t&=-33,c=n=!1);var u=1==t||17===t?l:h;return u([e,t,i,n,s,o])}function b(e){return on[e]}function T(){var t=(t=r.indexOf)===Tt?e:t;return t}function w(e){return"function"==typeof e&&zi.test(e)}function E(e){return rn[e]}function S(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Hi.call(e)==_i||!1}function M(e){if(!e)return e;for(var t=1,i=arguments.length;i>t;t++){var n=arguments[t];if(n)for(var s in n)e[s]=n[s]}return e}function x(e,t,i,n){return"boolean"!=typeof t&&null!=t&&(n=i,i=t,t=!1),c(e,t,"function"==typeof i&&d(i,n,1))}function I(e,t,i){return c(e,!0,"function"==typeof t&&d(t,i,1))}function C(e){if(!e)return e;for(var t=1,i=arguments.length;i>t;t++){var n=arguments[t];if(n)for(var s in n)"undefined"==typeof e[s]&&(e[s]=n[s])}return e}function D(e){var t=[];return cn(e,function(e,i){H(e)&&t.push(i)}),t.sort()}function N(e,t){return e?Bi.call(e,t):!1}function k(e){for(var t=-1,i=sn(e),n=i.length,s={};++t<n;){var o=i[t];s[e[o]]=o}return s}function O(e){return e===!0||e===!1||e&&"object"==typeof e&&Hi.call(e)==bi||!1}function A(e){return e&&"object"==typeof e&&Hi.call(e)==Ti||!1}function L(e){return e&&1===e.nodeType||!1}function P(e){if(!e)return!0;if(tn(e)||W(e))return!e.length;for(var t in e)if(Bi.call(e,t))return!1;return!0}function R(e,t){return m(e,t)}function j(e){return Yi(e)&&!qi(parseFloat(e))}function H(e){return"function"==typeof e}function z(e){return!(!e||!Ci[typeof e])}function F(e){return B(e)&&e!=+e}function $(e){return null===e}function B(e){return"number"==typeof e||e&&"object"==typeof e&&Hi.call(e)==Ei||!1}function U(e){return e&&Ci[typeof e]&&Hi.call(e)==Mi||!1}function W(e){return"string"==typeof e||e&&"object"==typeof e&&Hi.call(e)==xi||!1}function V(e){return"undefined"==typeof e}function K(e){var t=[];cn(e,function(e,i){t.push(i)}),t=p(t,f(arguments,!0,!1,1));for(var i=-1,n=t.length,s={};++i<n;){var o=t[i];s[o]=e[o]}return s}function Y(e){for(var t=-1,i=sn(e),n=i.length,s=Array(n);++t<n;){var o=i[t];s[t]=[o,e[o]]}return s}function q(e){for(var t=-1,i=f(arguments,!0,!1,1),n=i.length,s={};++t<n;){var o=i[t];o in e&&(s[o]=e[o])}return s}function X(e){for(var t=-1,i=sn(e),n=i.length,s=Array(n);++t<n;)s[t]=e[i[t]];return s}function G(e,t){var i=T(),n=e?e.length:0,s=!1;return n&&"number"==typeof n?s=i(e,t)>-1:un(e,function(e){return(s=e===t)&&di}),s}function Q(e,t,i){var n=!0;t=Kt(t,i,3);var s=-1,o=e?e.length:0;if("number"==typeof o)for(;++s<o&&(n=!!t(e[s],s,e)););else un(e,function(e,i,s){return!(n=!!t(e,i,s))&&di});return n}function J(e,t,i){var n=[];t=Kt(t,i,3);var s=-1,o=e?e.length:0;if("number"==typeof o)for(;++s<o;){var r=e[s];t(r,s,e)&&n.push(r)}else un(e,function(e,i,s){t(e,i,s)&&n.push(e)});return n}function Z(e,t,i){t=Kt(t,i,3);var n=-1,s=e?e.length:0;if("number"!=typeof s){var o;return un(e,function(e,i,n){return t(e,i,n)?(o=e,di):void 0}),o}for(;++n<s;){var r=e[n];if(t(r,n,e))return r}}function et(e,t){return gt(e,t,!0)}function tt(e,t,i){var n=-1,s=e?e.length:0;if(t=t&&"undefined"==typeof i?t:d(t,i,3),"number"==typeof s)for(;++n<s&&t(e[n],n,e)!==di;);else un(e,t)}function it(e,t){var i=e?e.length:0;if("number"==typeof i)for(;i--&&t(e[i],i,e)!==!1;);else{var n=sn(e);i=n.length,un(e,function(e,s,o){return s=n?n[--i]:--i,t(o[s],s,o)===!1&&di})}}function nt(e,t){var i=o(arguments,2),n=-1,s="function"==typeof t,r=e?e.length:0,a=Array("number"==typeof r?r:0);return tt(e,function(e){a[++n]=(s?t:e[t]).apply(e,i)}),a}function st(e,t,i){var n=-1,s=e?e.length:0;if(t=Kt(t,i,3),"number"==typeof s)for(var o=Array(s);++n<s;)o[n]=t(e[n],n,e);else o=[],un(e,function(e,i,s){o[++n]=t(e,i,s)});return o}function ot(e,t,i){var n=-1/0,s=n;"function"!=typeof t&&i&&i[t]===e&&(t=null);var o=-1,r=e?e.length:0;if(null==t&&"number"==typeof r)for(;++o<r;){var a=e[o];a>s&&(s=a)}else t=Kt(t,i,3),tt(e,function(e,i,o){var r=t(e,i,o);r>n&&(n=r,s=e)});return s}function rt(e,t,i){var n=1/0,s=n;"function"!=typeof t&&i&&i[t]===e&&(t=null);var o=-1,r=e?e.length:0;if(null==t&&"number"==typeof r)for(;++o<r;){var a=e[o];s>a&&(s=a)}else t=Kt(t,i,3),tt(e,function(e,i,o){var r=t(e,i,o);n>r&&(n=r,s=e)});return s}function at(e,t,i,n){if(!e)return i;var s=arguments.length<3;t=Kt(t,n,4);var o=-1,r=e.length;if("number"==typeof r)for(s&&(i=e[++o]);++o<r;)i=t(i,e[o],o,e);else un(e,function(e,n,o){i=s?(s=!1,e):t(i,e,n,o)});return i}function lt(e,t,i,n){var s=arguments.length<3;return t=Kt(t,n,4),it(e,function(e,n,o){i=s?(s=!1,e):t(i,e,n,o)}),i}function ct(e,t,i){return t=Kt(t,i,3),J(e,function(e,i,n){return!t(e,i,n)})}function ut(e,t,i){if(e&&"number"!=typeof e.length&&(e=X(e)),null==t||i)return e?e[g(0,e.length-1)]:li;var n=dt(e);return n.length=Qi(Gi(0,t),n.length),n}function dt(e){var t=-1,i=e?e.length:0,n=Array("number"==typeof i?i:0);return tt(e,function(e){var i=g(0,++t);n[t]=n[i],n[i]=e}),n}function ht(e){var t=e?e.length:0;return"number"==typeof t?t:sn(e).length}function pt(e,t,i){var n;t=Kt(t,i,3);var s=-1,o=e?e.length:0;if("number"==typeof o)for(;++s<o&&!(n=t(e[s],s,e)););else un(e,function(e,i,s){return(n=t(e,i,s))&&di});return!!n}function ft(e,i,n){var s=-1,o=e?e.length:0,r=Array("number"==typeof o?o:0);for(i=Kt(i,n,3),tt(e,function(e,t,n){r[++s]={criteria:[i(e,t,n)],index:s,value:e}}),o=r.length,r.sort(t);o--;)r[o]=r[o].value;return r}function mt(e){return tn(e)?o(e):e&&"number"==typeof e.length?st(e):X(e)}function gt(e,t,i){return i&&P(t)?li:(i?Z:J)(e,t)}function vt(e){for(var t=-1,i=e?e.length:0,n=[];++t<i;){var s=e[t];s&&n.push(s)}return n}function _t(e){return p(e,f(arguments,!0,!0,1))}function yt(e,t,i){var n=0,s=e?e.length:0;if("number"!=typeof t&&null!=t){var r=-1;for(t=Kt(t,i,3);++r<s&&t(e[r],r,e);)n++}else if(n=t,null==n||i)return e?e[0]:li;return o(e,0,Qi(Gi(0,n),s))}function bt(e,t){return f(e,t)}function Tt(t,i,n){if("number"==typeof n){var s=t?t.length:0;n=0>n?Gi(0,s+n):n||0}else if(n){var o=Ct(t,i);return t[o]===i?o:-1}return e(t,i,n)}function wt(e,t,i){var n=0,s=e?e.length:0;if("number"!=typeof t&&null!=t){var r=s;for(t=Kt(t,i,3);r--&&t(e[r],r,e);)n++}else n=null==t||i?1:t||n;return o(e,0,Qi(Gi(0,s-n),s))}function Et(){for(var e=[],t=-1,i=arguments.length;++t<i;){var n=arguments[t];(tn(n)||S(n))&&e.push(n)}var s=e[0],o=-1,r=T(),a=s?s.length:0,l=[];e:for(;++o<a;)if(n=s[o],r(l,n)<0){for(var t=i;--t;)if(r(e[t],n)<0)continue e;l.push(n)}return l}function St(e,t,i){var n=0,s=e?e.length:0;if("number"!=typeof t&&null!=t){var r=s;for(t=Kt(t,i,3);r--&&t(e[r],r,e);)n++}else if(n=t,null==n||i)return e?e[s-1]:li;return o(e,Gi(0,s-n))}function Mt(e,t,i){var n=e?e.length:0;for("number"==typeof i&&(n=(0>i?Gi(0,n+i):Qi(i,n-1))+1);n--;)if(e[n]===t)return n;return-1}function xt(e,t,i){e=+e||0,i=+i||1,null==t&&(t=e,e=0);for(var n=-1,s=Gi(0,Fi((t-e)/i)),o=Array(s);++n<s;)o[n]=e,e+=i;return o}function It(e,t,i){if("number"!=typeof t&&null!=t){var n=0,s=-1,r=e?e.length:0;for(t=Kt(t,i,3);++s<r&&t(e[s],s,e);)n++}else n=null==t||i?1:Gi(0,t);return o(e,n)}function Ct(e,t,i,n){var s=0,o=e?e.length:s;for(i=i?Kt(i,n,1):qt,t=i(t);o>s;){var r=s+o>>>1;i(e[r])<t?s=r+1:o=r}return s}function Dt(){return v(f(arguments,!0,!0))}function Nt(e,t,i,n){return"boolean"!=typeof t&&null!=t&&(n=i,i="function"!=typeof t&&n&&n[t]===e?null:t,t=!1),null!=i&&(i=Kt(i,n,3)),v(e,t,i)}function kt(e){return p(e,o(arguments,1))}function Ot(){for(var e=-1,t=ot(fn(arguments,"length")),i=Array(0>t?0:t);++e<t;)i[e]=fn(arguments,e);return i}function At(e,t){var i=-1,n=e?e.length:0,s={};for(t||!n||tn(e[0])||(t=[]);++i<n;){var o=e[i];t?s[o]=t[i]:o&&(s[o[0]]=o[1])}return s}function Lt(e,t){if(!H(t))throw new TypeError;return function(){return--e<1?t.apply(this,arguments):void 0}}function Pt(e,t){return arguments.length>2?y(e,17,o(arguments,2),null,t):y(e,1,null,null,t)}function Rt(e){for(var t=arguments.length>1?f(arguments,!0,!1,1):D(e),i=-1,n=t.length;++i<n;){var s=t[i];e[s]=y(e[s],1,null,null,e)}return e}function jt(){for(var e=arguments,t=e.length;t--;)if(!H(e[t]))throw new TypeError;return function(){for(var t=arguments,i=e.length;i--;)t=[e[i].apply(this,t)];return t[0]}}function Ht(e,t,i){var n,s,o,r,a,l,c,u=0,d=!1,h=!0;if(!H(e))throw new TypeError;if(t=Gi(0,t)||0,i===!0){var p=!0;h=!1}else z(i)&&(p=i.leading,d="maxWait"in i&&(Gi(t,i.maxWait)||0),h="trailing"in i?i.trailing:h);var f=function(){var i=t-(mn()-r);if(0>=i){s&&clearTimeout(s);var d=c;s=l=c=li,d&&(u=mn(),o=e.apply(a,n),l||s||(n=a=null))}else l=setTimeout(f,i)},m=function(){l&&clearTimeout(l),s=l=c=li,(h||d!==t)&&(u=mn(),o=e.apply(a,n),l||s||(n=a=null))};return function(){if(n=arguments,r=mn(),a=this,c=h&&(l||!p),d===!1)var i=p&&!l;else{s||p||(u=r);var g=d-(r-u),v=0>=g;v?(s&&(s=clearTimeout(s)),u=r,o=e.apply(a,n)):s||(s=setTimeout(m,g))}return v&&l?l=clearTimeout(l):l||t===d||(l=setTimeout(f,t)),i&&(v=!0,o=e.apply(a,n)),!v||l||s||(n=a=null),o}}function zt(e){if(!H(e))throw new TypeError;var t=o(arguments,1);return setTimeout(function(){e.apply(li,t)},1)}function Ft(e,t){if(!H(e))throw new TypeError;var i=o(arguments,2);return setTimeout(function(){e.apply(li,i)},t)}function $t(e,t){var i={};return function(){var n=t?t.apply(this,arguments):hi+arguments[0];return Bi.call(i,n)?i[n]:i[n]=e.apply(this,arguments)}}function Bt(e){var t,i;if(!H(e))throw new TypeError;return function(){return t?i:(t=!0,i=e.apply(this,arguments),e=null,i)}}function Ut(e){return y(e,16,o(arguments,1))}function Wt(e,t,i){var n=!0,s=!0;if(!H(e))throw new TypeError;return i===!1?n=!1:z(i)&&(n="leading"in i?i.leading:n,s="trailing"in i?i.trailing:s),i={},i.leading=n,i.maxWait=t,i.trailing=s,Ht(e,t,i)}function Vt(e,t){return y(t,16,[e])}function Kt(e,t,i){var n=typeof e;if(null==e||"function"==n)return d(e,t,i);if("object"!=n)return Qt(e);var s=sn(e);return function(t){for(var i=s.length,n=!1;i--&&(n=t[s[i]]===e[s[i]]););return n}}function Yt(e){return null==e?"":String(e).replace(ln,b)}function qt(e){return e}function Xt(e){tt(D(e),function(t){var i=r[t]=e[t];r.prototype[t]=function(){var e=[this.__wrapped__];Ui.apply(e,arguments);var t=i.apply(r,e);return this.__chain__?new a(t,!0):t}})}function Gt(){return Ni._=ji,this}function Qt(e){return function(t){return t[e]}}function Jt(e,t){return null==e&&null==t&&(t=1),e=+e||0,null==t?(t=e,e=0):t=+t||0,e+$i(Ji()*(t-e+1))}function Zt(e,t){if(e){var i=e[t];return H(i)?e[t]():i}}function ei(e,t,n){var s=r,o=s.templateSettings;e=String(e||""),n=C({},n,o);var a=0,l="__p += '",c=n.variable,u=RegExp((n.escape||gi).source+"|"+(n.interpolate||gi).source+"|"+(n.evaluate||gi).source+"|$","g");e.replace(u,function(t,n,s,o,r){return l+=e.slice(a,r).replace(vi,i),n&&(l+="' +\n_.escape("+n+") +\n'"),o&&(l+="';\n"+o+";\n__p += '"),s&&(l+="' +\n((__t = ("+s+")) == null ? '' : __t) +\n'"),a=r+t.length,t}),l+="';\n",c||(c="obj",l="with ("+c+" || {}) {\n"+l+"\n}\n"),l="function("+c+") {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n"+l+"return __p\n}";try{var d=Function("_","return "+l)(s)}catch(h){throw h.source=l,h}return t?d(t):(d.source=l,d)}function ti(e,t,i){e=(e=+e)>-1?e:0;var n=-1,s=Array(e);for(t=d(t,i,1);++n<e;)s[n]=t(n);return s}function ii(e){return null==e?"":String(e).replace(an,E)}function ni(e){var t=++ui+"";return e?e+t:t}function si(e){return e=new a(e),e.__chain__=!0,e}function oi(e,t){return t(e),e}function ri(){return this.__chain__=!0,this}function ai(){return this.__wrapped__}var li,ci=[],ui=0,di={},hi=+new Date+"",pi=40,fi=/\w*$/,mi=/<%=([\s\S]+?)%>/g,gi=/($^)/,vi=/['\n\r\t\u2028\u2029\\]/g,_i="[object Arguments]",yi="[object Array]",bi="[object Boolean]",Ti="[object Date]",wi="[object Function]",Ei="[object Number]",Si="[object Object]",Mi="[object RegExp]",xi="[object String]",Ii={};Ii[wi]=!1,Ii[_i]=Ii[yi]=Ii[bi]=Ii[Ti]=Ii[Ei]=Ii[Si]=Ii[Mi]=Ii[xi]=!0;var Ci={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},Di={"\\":"\\","'":"'","\n":"n","\r":"r","	":"t","\u2028":"u2028","\u2029":"u2029"},Ni=Ci[typeof window]&&window||this,ki=Ci[typeof exports]&&exports&&!exports.nodeType&&exports,Oi=Ci[typeof module]&&module&&!module.nodeType&&module,Ai=Oi&&Oi.exports===ki&&ki,Li=Ci[typeof global]&&global;!Li||Li.global!==Li&&Li.window!==Li||(Ni=Li);var Pi=[],Ri=Object.prototype,ji=Ni._,Hi=Ri.toString,zi=RegExp("^"+String(Hi).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),Fi=Math.ceil,$i=Math.floor,Bi=Ri.hasOwnProperty,Ui=Pi.push,Wi=Ri.propertyIsEnumerable,Vi=w(Vi=Object.create)&&Vi,Ki=w(Ki=Array.isArray)&&Ki,Yi=Ni.isFinite,qi=Ni.isNaN,Xi=w(Xi=Object.keys)&&Xi,Gi=Math.max,Qi=Math.min,Ji=Math.random,Zi={};Zi[yi]=Array,Zi[bi]=Boolean,Zi[Ti]=Date,Zi[wi]=Function,Zi[Si]=Object,Zi[Ei]=Number,Zi[Mi]=RegExp,Zi[xi]=String,a.prototype=r.prototype;var en={};!function(){var e={0:1,length:1};en.spliceObjects=(Pi.splice.call(e,0,1),!e[0])}(1),r.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:mi,variable:""},Vi||(u=function(){function e(){}return function(t){if(z(t)){e.prototype=t;var i=new e;e.prototype=null}return i||Ni.Object()}}()),S(arguments)||(S=function(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Bi.call(e,"callee")&&!Wi.call(e,"callee")||!1});var tn=Ki||function(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Hi.call(e)==yi||!1},nn=function(e){var t,i=e,n=[];if(!i)return n;if(!Ci[typeof e])return n;for(t in i)Bi.call(i,t)&&n.push(t);return n},sn=Xi?function(e){return z(e)?Xi(e):[]}:nn,on={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},rn=k(on),an=RegExp("("+sn(rn).join("|")+")","g"),ln=RegExp("["+sn(on).join("")+"]","g"),cn=function(e,t){var i,n=e,s=n;if(!n)return s;if(!Ci[typeof n])return s;for(i in n)if(t(n[i],i,e)===di)return s;return s},un=function(e,t){var i,n=e,s=n;if(!n)return s;if(!Ci[typeof n])return s;for(i in n)if(Bi.call(n,i)&&t(n[i],i,e)===di)return s;return s};H(/x/)&&(H=function(e){return"function"==typeof e&&Hi.call(e)==wi});var dn=_(function(e,t,i){Bi.call(e,i)?e[i]++:e[i]=1}),hn=_(function(e,t,i){(Bi.call(e,i)?e[i]:e[i]=[]).push(t)}),pn=_(function(e,t,i){e[i]=t}),fn=st,mn=w(mn=Date.now)&&mn||function(){return(new Date).getTime()};r.after=Lt,r.bind=Pt,r.bindAll=Rt,r.chain=si,r.compact=vt,r.compose=jt,r.countBy=dn,r.debounce=Ht,r.defaults=C,r.defer=zt,r.delay=Ft,r.difference=_t,r.filter=J,r.flatten=bt,r.forEach=tt,r.functions=D,r.groupBy=hn,r.indexBy=pn,r.initial=wt,r.intersection=Et,r.invert=k,r.invoke=nt,r.keys=sn,r.map=st,r.max=ot,r.memoize=$t,r.min=rt,r.omit=K,r.once=Bt,r.pairs=Y,r.partial=Ut,r.pick=q,r.pluck=fn,r.range=xt,r.reject=ct,r.rest=It,r.shuffle=dt,r.sortBy=ft,r.tap=oi,r.throttle=Wt,r.times=ti,r.toArray=mt,r.union=Dt,r.uniq=Nt,r.values=X,r.where=gt,r.without=kt,r.wrap=Vt,r.zip=Ot,r.collect=st,r.drop=It,r.each=tt,r.extend=M,r.methods=D,r.object=At,r.select=J,r.tail=It,r.unique=Nt,r.clone=x,r.cloneDeep=I,r.contains=G,r.escape=Yt,r.every=Q,r.find=Z,r.has=N,r.identity=qt,r.indexOf=Tt,r.isArguments=S,r.isArray=tn,r.isBoolean=O,r.isDate=A,r.isElement=L,r.isEmpty=P,r.isEqual=R,r.isFinite=j,r.isFunction=H,r.isNaN=F,r.isNull=$,r.isNumber=B,r.isObject=z,r.isRegExp=U,r.isString=W,r.isUndefined=V,r.lastIndexOf=Mt,r.mixin=Xt,r.noConflict=Gt,r.random=Jt,r.reduce=at,r.reduceRight=lt,r.result=Zt,r.size=ht,r.some=pt,r.sortedIndex=Ct,r.template=ei,r.unescape=ii,r.uniqueId=ni,r.all=Q,r.any=pt,r.detect=Z,r.findWhere=et,r.foldl=at,r.foldr=lt,r.include=G,r.inject=at,r.first=yt,r.last=St,r.sample=ut,r.take=yt,r.head=yt,Xt(r),r.VERSION="2.4.1",r.prototype.chain=ri,r.prototype.value=ai,tt(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=Pi[e];r.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),en.spliceObjects||0!==e.length||delete e[0],this}}),tt(["concat","join","slice"],function(e){var t=Pi[e];r.prototype[e]=function(){var e=this.__wrapped__,i=t.apply(e,arguments);return this.__chain__&&(i=new a(i),i.__chain__=!0),i}}),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Ni._=r,define("lodash.custom",[],function(){return r})):ki&&Oi?Ai?(Oi.exports=r)._=r:ki._=r:Ni._=r}.call(this),!function(e,t){var i=t.prototype.trim,n=t.prototype.trimRight,s=t.prototype.trimLeft,o=function(e){return 1*e||0},r=function(e,t){if(1>t)return"";for(var i="";t>0;)1&t&&(i+=e),t>>=1,e+=e;return i},a=[].slice,l=function(e){return null==e?"\\s":e.source?e.source:"["+p.escapeRegExp(e)+"]"},c={lt:"<",gt:">",quot:'"',apos:"'",amp:"&"},u={};for(var d in c)u[c[d]]=d;var h=function(){function e(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}var i=r,n=function(){return n.cache.hasOwnProperty(arguments[0])||(n.cache[arguments[0]]=n.parse(arguments[0])),n.format.call(null,n.cache[arguments[0]],arguments)};return n.format=function(n,s){var o,r,a,l,c,u,d,p=1,f=n.length,m="",g=[];for(r=0;f>r;r++)if(m=e(n[r]),"string"===m)g.push(n[r]);else if("array"===m){if(l=n[r],l[2])for(o=s[p],a=0;a<l[2].length;a++){if(!o.hasOwnProperty(l[2][a]))throw new Error(h('[_.sprintf] property "%s" does not exist',l[2][a]));o=o[l[2][a]]}else o=l[1]?s[l[1]]:s[p++];if(/[^s]/.test(l[8])&&"number"!=e(o))throw new Error(h("[_.sprintf] expecting number but found %s",e(o)));switch(l[8]){case"b":o=o.toString(2);break;case"c":o=t.fromCharCode(o);break;case"d":o=parseInt(o,10);break;case"e":o=l[7]?o.toExponential(l[7]):o.toExponential();break;case"f":o=l[7]?parseFloat(o).toFixed(l[7]):parseFloat(o);break;case"o":o=o.toString(8);break;case"s":o=(o=t(o))&&l[7]?o.substring(0,l[7]):o;break;case"u":o=Math.abs(o);break;case"x":o=o.toString(16);break;case"X":o=o.toString(16).toUpperCase()}o=/[def]/.test(l[8])&&l[3]&&o>=0?"+"+o:o,u=l[4]?"0"==l[4]?"0":l[4].charAt(1):" ",d=l[6]-t(o).length,c=l[6]?i(u,d):"",g.push(l[5]?o+c:c+o)}return g.join("")},n.cache={},n.parse=function(e){for(var t=e,i=[],n=[],s=0;t;){if(null!==(i=/^[^\x25]+/.exec(t)))n.push(i[0]);else if(null!==(i=/^\x25{2}/.exec(t)))n.push("%");else{if(null===(i=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(t)))throw new Error("[_.sprintf] huh?");if(i[2]){s|=1;var o=[],r=i[2],a=[];if(null===(a=/^([a-z_][a-z_\d]*)/i.exec(r)))throw new Error("[_.sprintf] huh?");for(o.push(a[1]);""!==(r=r.substring(a[0].length));)if(null!==(a=/^\.([a-z_][a-z_\d]*)/i.exec(r)))o.push(a[1]);else{if(null===(a=/^\[(\d+)\]/.exec(r)))throw new Error("[_.sprintf] huh?");o.push(a[1])}i[2]=o}else s|=2;if(3===s)throw new Error("[_.sprintf] mixing positional and named placeholders is not (yet) supported");n.push(i)}t=t.substring(i[0].length)}return n},n}(),p={VERSION:"2.3.0",isBlank:function(e){return null==e&&(e=""),/^\s*$/.test(e)},stripTags:function(e){return null==e?"":t(e).replace(/<\/?[^>]+>/g,"")},capitalize:function(e){return e=null==e?"":t(e),e.charAt(0).toUpperCase()+e.slice(1)},chop:function(e,i){return null==e?[]:(e=t(e),i=~~i,i>0?e.match(new RegExp(".{1,"+i+"}","g")):[e])},clean:function(e){return p.strip(e).replace(/\s+/g," ")},count:function(e,i){return null==e||null==i?0:t(e).split(i).length-1},chars:function(e){return null==e?[]:t(e).split("")},swapCase:function(e){return null==e?"":t(e).replace(/\S/g,function(e){return e===e.toUpperCase()?e.toLowerCase():e.toUpperCase()})},escapeHTML:function(e){return null==e?"":t(e).replace(/[&<>"']/g,function(e){return"&"+u[e]+";"})},unescapeHTML:function(e){return null==e?"":t(e).replace(/\&([^;]+);/g,function(e,i){var n;return i in c?c[i]:(n=i.match(/^#x([\da-fA-F]+)$/))?t.fromCharCode(parseInt(n[1],16)):(n=i.match(/^#(\d+)$/))?t.fromCharCode(~~n[1]):e})},escapeRegExp:function(e){return null==e?"":t(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},splice:function(e,t,i,n){var s=p.chars(e);return s.splice(~~t,~~i,n),s.join("")},insert:function(e,t,i){return p.splice(e,t,0,i)},include:function(e,i){return""===i?!0:null==e?!1:-1!==t(e).indexOf(i)},join:function(){var e=a.call(arguments),t=e.shift();return null==t&&(t=""),e.join(t)},lines:function(e){return null==e?[]:t(e).split("\n")},reverse:function(e){return p.chars(e).reverse().join("")},startsWith:function(e,i){return""===i?!0:null==e||null==i?!1:(e=t(e),i=t(i),e.length>=i.length&&e.slice(0,i.length)===i)},endsWith:function(e,i){return""===i?!0:null==e||null==i?!1:(e=t(e),i=t(i),e.length>=i.length&&e.slice(e.length-i.length)===i)},succ:function(e){return null==e?"":(e=t(e),e.slice(0,-1)+t.fromCharCode(e.charCodeAt(e.length-1)+1))},titleize:function(e){return null==e?"":t(e).replace(/(?:^|\s)\S/g,function(e){return e.toUpperCase()})},camelize:function(e){return p.trim(e).replace(/[-_\s]+(.)?/g,function(e,t){return t.toUpperCase()})},underscored:function(e){return p.trim(e).replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase()},dasherize:function(e){return p.trim(e).replace(/([A-Z])/g,"-$1").replace(/[-_\s]+/g,"-").toLowerCase()},classify:function(e){return p.titleize(t(e).replace(/_/g," ")).replace(/\s/g,"")},humanize:function(e){return p.capitalize(p.underscored(e).replace(/_id$/,"").replace(/_/g," "))},trim:function(e,n){return null==e?"":!n&&i?i.call(e):(n=l(n),t(e).replace(new RegExp("^"+n+"+|"+n+"+$","g"),""))},ltrim:function(e,i){return null==e?"":!i&&s?s.call(e):(i=l(i),t(e).replace(new RegExp("^"+i+"+"),""))},rtrim:function(e,i){return null==e?"":!i&&n?n.call(e):(i=l(i),t(e).replace(new RegExp(i+"+$"),""))},truncate:function(e,i,n){return null==e?"":(e=t(e),n=n||"...",i=~~i,e.length>i?e.slice(0,i)+n:e)},prune:function(e,i,n){if(null==e)return"";if(e=t(e),i=~~i,n=null!=n?t(n):"...",e.length<=i)return e;var s=function(e){return e.toUpperCase()!==e.toLowerCase()?"A":" "},o=e.slice(0,i+1).replace(/.(?=\W*\w*$)/g,s);return o=o.slice(o.length-2).match(/\w\w/)?o.replace(/\s*\S+$/,""):p.rtrim(o.slice(0,o.length-1)),(o+n).length>e.length?e:e.slice(0,o.length)+n},words:function(e,t){return p.isBlank(e)?[]:p.trim(e,t).split(t||/\s+/)},pad:function(e,i,n,s){e=null==e?"":t(e),i=~~i;var o=0;switch(n?n.length>1&&(n=n.charAt(0)):n=" ",s){case"right":return o=i-e.length,e+r(n,o);case"both":return o=i-e.length,r(n,Math.ceil(o/2))+e+r(n,Math.floor(o/2));default:return o=i-e.length,r(n,o)+e}},lpad:function(e,t,i){return p.pad(e,t,i)},rpad:function(e,t,i){return p.pad(e,t,i,"right")},lrpad:function(e,t,i){return p.pad(e,t,i,"both")},sprintf:h,vsprintf:function(e,t){return t.unshift(e),h.apply(null,t)},toNumber:function(e,i){if(null==e||""==e)return 0;e=t(e);var n=o(o(e).toFixed(~~i));return 0!==n||e.match(/^0+$/)?n:Number.NaN},numberFormat:function(e,t,i,n){if(isNaN(e)||null==e)return"";e=e.toFixed(~~t),n=n||",";var s=e.split("."),o=s[0],r=s[1]?(i||".")+s[1]:"";return o.replace(/(\d)(?=(?:\d{3})+$)/g,"$1"+n)+r},strRight:function(e,i){if(null==e)return"";e=t(e),i=null!=i?t(i):i;var n=i?e.indexOf(i):-1;return~n?e.slice(n+i.length,e.length):e},strRightBack:function(e,i){if(null==e)return"";e=t(e),i=null!=i?t(i):i;var n=i?e.lastIndexOf(i):-1;return~n?e.slice(n+i.length,e.length):e},strLeft:function(e,i){if(null==e)return"";e=t(e),i=null!=i?t(i):i;var n=i?e.indexOf(i):-1;return~n?e.slice(0,n):e},strLeftBack:function(e,t){if(null==e)return"";e+="",t=null!=t?""+t:t;var i=e.lastIndexOf(t);return~i?e.slice(0,i):e},toSentence:function(e,t,i,n){t=t||", ",i=i||" and ";var s=e.slice(),o=s.pop();return e.length>2&&n&&(i=p.rtrim(t)+i),s.length?s.join(t)+i+o:o},toSentenceSerial:function(){var e=a.call(arguments);return e[3]=!0,p.toSentence.apply(p,e)},slugify:function(e){if(null==e)return"";var i="ąàáäâãåæćęèéëêìíïîłńòóöôõøùúüûñçżź",n="aaaaaaaaceeeeeiiiilnoooooouuuunczz",s=new RegExp(l(i),"g");return e=t(e).toLowerCase().replace(s,function(e){var t=i.indexOf(e);return n.charAt(t)||"-"}),p.dasherize(e.replace(/[^\w\s-]/g,""))},surround:function(e,t){return[t,e,t].join("")},quote:function(e){return p.surround(e,'"')},exports:function(){var e={};for(var t in this)this.hasOwnProperty(t)&&!t.match(/^(?:include|contains|reverse)$/)&&(e[t]=this[t]);return e},repeat:function(e,i,n){if(null==e)return"";if(i=~~i,null==n)return r(t(e),i);for(var s=[];i>0;s[--i]=e);return s.join(n)},levenshtein:function(e,i){if(null==e&&null==i)return 0;if(null==e)return t(i).length;if(null==i)return t(e).length;e=t(e),i=t(i);for(var n,s,o=[],r=0;r<=i.length;r++)for(var a=0;a<=e.length;a++)s=r&&a?e.charAt(a-1)===i.charAt(r-1)?n:Math.min(o[a],o[a-1],n)+1:r+a,n=o[a],o[a]=s;return o.pop()}};p.strip=p.trim,p.lstrip=p.ltrim,p.rstrip=p.rtrim,p.center=p.lrpad,p.rjust=p.lpad,p.ljust=p.rpad,p.contains=p.include,p.q=p.quote,"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(module.exports=p),exports._s=p):"function"==typeof define&&define.amd?define("underscore.string",[],function(){return p}):(e._=e._||{},e._.string=e._.str=p)}(this,String),define("underscore",["require","lodash.custom","underscore.string"],function(e){var t=e("lodash.custom");return t.str=e("underscore.string"),t.templateSettings={evaluate:/\{\{([\s\S]+?)\}\}/g,interpolate:/\{\{=([\s\S]+?)\}\}/g,escape:/\{\{-([\s\S]+?)\}\}/g},t.mixin(t.str.exports()),t});var log="";Function.prototype.addMethod=function(e,t){return this.prototype[e]=t,this},Function.prototype.addVar=function(e,t){return this.prototype[e]=t,this},Function.prototype.compose=function(e){var t=this;return function(){return t.call(this,e.apply(this,arguments))}};var overlayObjectStack=new Array;"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.strip()});var timer={},inspect=function(e){var t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(i+" = "+e[i]);return t.join("\n")},getAsFunction=function(e){return toFunction(e)||toFunction("localContext."+e)};BusyMonitor.prototype.run=function(){var e=arguments;null!=this.timer&&clearTimeout(this.timer);var t=function(){this.theFunction.apply(null,e)};this.timer=setTimeout(t.bind(this),this.waitTime)},BusyMonitor.prototype.cancel=function(){this.timer&&clearTimeout(this.timer)},InPlaceEditor.prototype.makeEditable=function(e){var t=this,i=this.elem.id+"Input",n=this.value.strip(),s=Builder.node("input",{className:"control input text",id:i,value:n});this.elem.update(s),this.editing=!0;var o=jQuery("#"+i);if(isIE()){var r=!1;o.hover(function(){!r&&n&&n===this.value&&(this.select(),this.focus(),r=!0)},function(){})}if(o.focus(),o.select(),e){if(e.blur&&($(i).onblur=function(i){i=i?i:window.event;var n=e.blur,s=getAsFunction(n);s.call(t,i)}),(e.onEnter||e.onTab)&&($(i).onkeypress=function(i){var n=null,s=null;i=i?i:window.event,enterKeyHit(i)?(n=e.onEnter,s=getAsFunction(n),s.call(t,i)):i.keyCode==Event.KEY_TAB&&(n=e.onTab,s=getAsFunction(n),s.call(t,i))
  }),e.onMouseup){var a=function(n){if(n=n?n:window.event,$(Event.element(n))!=$(i)){var s=e.onMouseup,o=getAsFunction(s);o.call(t,n)}};isIPad()?document.body.ontouchend=a:document.body.onmousedown=a}e.onEsc&&(document.body.onkeydown=function(i){if(i=i?i:window.event,i.keyCode==Event.KEY_ESC){var n=e.onEsc,s=getAsFunction(n);s.call(t,i)}})}},InPlaceEditor.prototype.makeNonEditable=function(e){if(this.elem&&this.elem.firstDescendant()&&this.editing){var t=this.elem.firstDescendant().value;t=t.replace(/"/g,"'"),e&&(t=t.replace(/<\/?[^>]+(>|$)/g,""),t=t.replace("<>","")),this.elem.update(t),this.editing=!1}},InPlaceEditor.prototype.revertEdit=function(){this.elem.update(this.value),this.editing=!1};var cancelEventDragTarget=null;String.prototype.times=function(e){return 1>e?"":new Array(e+1).join(this)};var tracer={nativeCodeEx:/\[native code\]/,indentCount:-4,tracing:[],traceMe:function(e,t){var i=function(){var i=+new Date,n=" ".times(tracer.indentCount+=4);console.info(n+t+"("+Array.prototype.slice.call(arguments).join(", ")+")");var s=e.apply(this,arguments);return console.info(n+t,"-> ",s,"(",new Date-i,"ms",")"),tracer.indentCount-=4,s};i.traceOff=e;for(var n in e)i[n]=e[n];return console.log("tracing "+t),i},traceAll:function(e,t){if(e!=window&&("object"==typeof e||"function"==typeof e))for(var i in e)if(e.hasOwnProperty(i)&&e[i]!=e){var n=e[i];"function"==typeof n&&(this==e||n.traceOff||this.nativeCodeEx.test(n)||(e[i]=this.traceMe(e[i],i),this.tracing.push({obj:e,methodName:i}))),t&&this.traceAll(n,!0)}},untraceAll:function(){for(var e=0;e<this.tracing.length;++e){var t=this.tracing[e];t.obj[t.methodName]=t.obj[t.methodName].traceOff}console.log("tracing disabled"),tracer.tracing=[]}},ValidationModule={validate:function(e,t){var i=this;if(!isArray(e))return this.validateEntry(e,t);var n=!0;return _.each(e,function(e){n=i.validateEntry(e,t)&&n}),n},validateEntry:function(e,t){if(e.validator)return this.validateLegacy(e,t);if(!e.selector){var i=this._validateElement(e.element,e,t);return null==i}for(var n=jQuery(e.element).find(e.selector),s=!0,o=0;o<n.length;o++){var i=this._validateElement(n[o],e,t);s=s&&null==i}return s},_validateElement:function(e,t,i){var n;if(t.method)n=this._runValidatorOnElement(t.method,e,t.messages,t.options);else for(var s=t.validators,o=0;o<s.length;o++){var r=s[o];if(n=this._runValidatorOnElement(r.method,e,r.messages,r.options),null!=n)break}return i!==!1&&(n?this.showError(e,n):this.hideError(e)),n},_runValidatorOnElement:function(e,t,i,n){_.isString(e)&&(e=this.methods[e]);var s=e.call(this,t.value,i,n);return _.isObject(s)?s.isValid?null:s.errorMessage:s},attachOnEvent:function(e,t){_.isArray(t)||(t=[t]),_.each(t,function(t){jQuery(t.element).on(e,function(){ValidationModule.validateEntry(t)})})},_getMessage:function(e,t,i,n){(_.isArray(i)||void 0===i)&&(n=i,i=this.defaultMessages);var s=null;return t&&(s=t[e]),!s&&i&&(s=i[e]),s&&n&&(s=this.fillPlaceholders(s,n)),s||e},fillPlaceholders:function(e,t){for(var i=0;i<t.length;i++)e=e.replace("{"+i+"}",t[i]);return e},defaultMessages:{mandatory:"Field is mandatory",tooSmall:"Value is too small, at least {0} required",tooBig:"Value is too big, at most {0} allowed",tooShort:"Value is too short, at least {0} characters required",tooLong:"Value is too long, at most {0} characters allowed",wordInvalidChars:"Value should contain only word characters (letters, digits and underscore)",shouldStartWithLetter:"Value should start with letter"},methods:{mandatory:function(e,t){return jQuery.trim(e)?null:this._getMessage("mandatory",t)},minMax:function(e,t,i){var n=jQuery.trim(e);if(!n)return null;var n=parseFloat(n);return isNaN(n)?this._getMessage("notANumber",t):void 0!==i.min&&n<i.min?this._getMessage("tooSmall",t,[i.min]):void 0!==i.max&&n>i.max?this._getMessage("tooBig",t,[i.max]):void 0},minMaxLength:function(e,t,i){return i.minLength&&e.length<i.minLength?this._getMessage("tooShort",t,[i.minLength]):i.maxLength&&e.length>i.maxLength?this._getMessage("tooLong",t,[i.maxLength]):void 0},resourceIdChars:function(e,t){if(!localContext||!localContext.initOptions||!localContext.initOptions.resourceIdNotSupportedSymbols)throw"There is no resourceIdNotSupportedSymbols property in init options.";return new RegExp(localContext.initOptions.resourceIdNotSupportedSymbols,"g").test(e)?this._getMessage("resourceIdInvalidChars",t):void 0},wordChars:function(e,t){return e.search(/\W/)>=0?this._getMessage("wordInvalidChars",t):void 0},startsWithLetter:function(e,t){return e.substr(0,1).match(/[A-Za-z]/)?void 0:this._getMessage("shouldStartWithLetter",t)},isDecimal:function(e){return _.isNumber(e)||_.isString(e)&&!isNaN(Number(e))?null:"defaultErrorMessage"},isInteger:function(e){return _.isNumber(e)||_.isString(e)&&/^[-+]?\d+$/.test(e)?null:"defaultErrorMessage"}},validateLegacy:function(e,t){var i=!0,n=[];return e=isArray(e)?e:[e],t=t!==!1,e.each(function(e){var s=e.validator.call(ValidationModule,e.element.getValue());s.isValid?e.onValid&&e.onValid(e):e.onInvalid&&e.onInvalid(e),s.isValid||n.include(e.element)?n.include(e.element)||t&&ValidationModule.hideError(e.element):(n.push(e.element),t&&ValidationModule.showError(e.element,s.errorMessage),i=!1)}),i},_showMessage:function(e,t,i,n){var s=e.validatorMessageContainer||e.parentNode,o=$(s).select(n)[0];o=o||$(s).select(layoutModule.MESSAGE_PATTERN)[0],o||(o=document.createElement("span"),s.appendChild(o)),o.className="";for(var r=n.split("."),a=0;a<r.length;a++)o.addClassName(r[a].trim());0==o.children.length?o.update(t):o.children[0].update(t),s.addClassName(i)},showError:function(e,t,i){if(this._showMessage(e,t,layoutModule.ERROR_CLASS,layoutModule.MESSAGE_WARNING_PATTERN),i){var n=e.validatorMessageContainer||e.parentNode,s=$(n).select(layoutModule.DETAILS_PATTERN)[0];s&&s.stopObserving("click").observe("click",function(){dialogs.errorPopup.show(i,!0)}.bindAsEventListener(this))}},showSuccess:function(e,t){this._showMessage(e,t,layoutModule.SUCCESS_CLASS,layoutModule.MESSAGE_SUCCESS_PATTERN)},hideError:function(e){var t=e.validatorMessageContainer||e.parentNode;$(t).removeClassName(layoutModule.ERROR_CLASS)},hideSuccess:function(e){var t=e.validatorMessageContainer||e.parentNode;$(t).removeClassName(layoutModule.SUCCESS_CLASS)}},ClassNameBuilder=function(e){return this.element=$(e),this.element.classNameBuilder?this.element.classNameBuilder:(this.names=this.element.className.split(" "),this.names=this.names.compact().uniq(),void(this.element.classNameBuilder=this))};ClassNameBuilder.addMethod("add",function(e){var t=[];if(Object.isString(e))t=e.split(" ");else{if(!isArray(e))return this;t=e}return t.each(function(e){this.names.include(e)||this.names.push(e)}.bind(this)),this}).addMethod("remove",function(e){return this.names=this.names.without(e),this}).addMethod("clean",function(){return this.names=[],this}).addMethod("toClassName",function(){return this.element.className=this.names.join(" "),this.element.className});var JSCookie=function(e,t,i){if(!Object.isString(e))throw"Invalid name";this.name=e,this.value=t,Object.isUndefined(t)?this.value=this._getCookies()[e]:this._setCookie(this.name,this.value,i)};JSCookie.addVar("daysToExpiration",30),JSCookie.addVar("getCookieTemplate",function(){return _.template("{{= name}}={{= value}}; expires={{= expires}}; path=/;")}),JSCookie.addMethod("_getCookies",function(){var e={};return document.cookie.split(";").invoke("strip").each(function(t){var i=t.split("=");e[i[0].strip()]=decodeURI(i[1])}),e}),JSCookie.addMethod("set",function(e,t){this.value=e,this._setCookie(this.name,this.value,t)}),JSCookie.addMethod("get",function(){return this.value}),JSCookie.addMethod("_setCookie",function(e,t,i){document.cookie=this.getCookieTemplate()({name:e,value:encodeURI(new String(t)),expires:this._getExpiresDate(i).toGMTString()})}),JSCookie.addMethod("_getExpiresDate",function(e){var t=new Date;return t.setTime(t.getTime()+(e?e:24*this.daysToExpiration*60*60*1e3)),t});var sessionManager={RESET_SESSION_MIN_TIME:1e3,resetSession:function(e){var t=(new Date).getTime();if(!(this._lastSessionResetTime&&t-this._lastSessionResetTime<this.RESET_SESSION_MIN_TIME)){this._lastSessionResetTime=t;var i=buildActionUrl({flowExecutionKey:e,eventId:"resetSession"}),n={errorHandler:this.errorHandler};ajaxNonReturningUpdate(i,n)}},errorHandler:function(e){var t=e.getResponseHeader("LoginRequested");return t?(document.location=urlContext,!0):void 0}},buildActionUrl=function(e){if(e){var t=deepClone(e);return $w("flowId flowExecutionKey eventId").each(function(e){t[e]&&(t["_"+e]=t[e],delete t[e])}),"flow.html?"+Object.toQueryString(t)}},pageDimmer={DOM_ID:"#pageDimmer",show:function(e){if(jQuery(this.DOM_ID).removeClass("hidden"),e&&e.match(layoutModule.DIALOG_PATTERN)){var t=e.getStyle("zIndex");t=t?parseInt(t,10):0,t>0&&this.setZindex(t-1)}},hide:function(){jQuery(this.DOM_ID).addClass("hidden")},setZindex:function(e){jQuery(this.DOM_ID).css({zIndex:e})}},fileSender={};fileSender.upload=function(e,t,i,n){return fileSender.uploadMultiple([e],t,i,n)},fileSender.uploadMultiple=function(e,t,i,n){for(var s=Builder.node("FORM",{action:"flow.html?_flowId="+t,method:"post",enctype:"multipart/form-data"}),o=0;o<e.length;o++){var r=e[o],a=r.cloneNode(!0);r.writeAttribute("id",null),r.addClassName("hidden"),s.file&&s.file.remove(),fileSender.moveEventHandlers(r,a),r.insert({after:a}),r.remove(),s.insert(r);for(var l in i){var c=Builder.node("INPUT",{type:"hidden",name:l,value:i[l]});s.insert(c)}}return s.addClassName("hidden"),document.body.insert(s),fileSender.submit(s,{onStart:null,onComplete:n}),s.submit(),s},fileSender.moveEventHandlers=function(e,t){var i=Event.cache,n=fileSender.getUniqueElementID(e),s=i[n];delete i[n],s&&(_.each(s,function(e,i){"element"!==i&&_.each(e,function(e){t.observe(i,e.handler)})}),s=null)},fileSender.getUniqueElementID=function(e){return e===window?0:"uniqueID"in document.createElement("div")?e==document?1:e.uniqueID:("undefined"==typeof e._prototypeUID&&(e._prototypeUID=Element.Storage.UID++),e._prototypeUID)},fileSender.frame=function(e){var t="f"+Math.floor(99999*Math.random()),i=$("ajax-upload-iframe").cloneNode(!0);i.writeAttribute("id",t),i.writeAttribute("name",t),document.body.insert(i);var n=function(){fileSender.loaded(t)};return i.observe("load",n),e&&"function"==typeof e.onComplete&&(i.onComplete=e.onComplete),t},fileSender.form=function(e,t){e.setAttribute("target",t)},fileSender.submit=function(e,t){return fileSender.form(e,fileSender.frame(t)),t&&"function"==typeof t.onStart?t.onStart():!0},fileSender.loaded=function(e){var t,i=document.getElementById(e);t=i.contentDocument?i.contentDocument:i.contentWindow?i.contentWindow.document:window.frames[e].document,"about:blank"!=t.location.href&&(fileSender.sessionTimeoutHandler(t)||"function"==typeof i.onComplete&&i.onComplete(t.body.innerHTML))},fileSender.sessionTimeoutHandler=function(e){for(var t=e.getElementsByTagName("meta"),i=0;i<t.length;i++)if("pageHeading"==t[i].name&&"LOGIN PAGE"==t[i].content)return document.location=".",!0;return!1},Keys=new Object,Keys.DOM_VK_BACK_SPACE=8,Keys.DOM_VK_ENTER=13,Keys.DOM_VK_PAGE_UP=33,Keys.DOM_VK_DOWN=40,Keys.DOM_VK_INSERT=45,Keys.DOM_VK_DELETE=46,Keys.DOM_VK_0=48,Keys.DOM_VK_9=57,Keys.DOM_VK_NUMPAD0=96,Keys.DOM_VK_NUMPAD9=105,Keys.DOM_VK_DECIMAL=110,Keys.DOM_VK_COMMA=188,Keys.DOM_VK_PERIOD=190,Keys.DOM_VK_CANCEL=3,Keys.DOM_VK_HELP=6,Keys.DOM_VK_TAB=9,Keys.DOM_VK_CLEAR=12,Keys.DOM_VK_RETURN=13,Keys.DOM_VK_SHIFT=16,Keys.DOM_VK_CONTROL=17,Keys.DOM_VK_ALT=18,Keys.DOM_VK_PAUSE=19,Keys.DOM_VK_CAPS_LOCK=20,Keys.DOM_VK_ESCAPE=27,Keys.DOM_VK_SPACE=32,Keys.DOM_VK_PAGE_DOWN=34,Keys.DOM_VK_END=35,Keys.DOM_VK_HOME=36,Keys.DOM_VK_LEFT=37,Keys.DOM_VK_UP=38,Keys.DOM_VK_RIGHT=39,Keys.DOM_VK_PRINTSCREEN=44,Keys.DOM_VK_1=49,Keys.DOM_VK_2=50,Keys.DOM_VK_3=51,Keys.DOM_VK_4=52,Keys.DOM_VK_5=53,Keys.DOM_VK_6=54,Keys.DOM_VK_7=55,Keys.DOM_VK_8=56,Keys.DOM_VK_SEMICOLON=59,Keys.DOM_VK_EQUALS=61,Keys.DOM_VK_A=65,Keys.DOM_VK_B=66,Keys.DOM_VK_C=67,Keys.DOM_VK_D=68,Keys.DOM_VK_E=69,Keys.DOM_VK_F=70,Keys.DOM_VK_G=71,Keys.DOM_VK_H=72,Keys.DOM_VK_I=73,Keys.DOM_VK_J=74,Keys.DOM_VK_K=75,Keys.DOM_VK_L=76,Keys.DOM_VK_M=77,Keys.DOM_VK_N=78,Keys.DOM_VK_O=79,Keys.DOM_VK_P=80,Keys.DOM_VK_Q=81,Keys.DOM_VK_R=82,Keys.DOM_VK_S=83,Keys.DOM_VK_T=84,Keys.DOM_VK_U=85,Keys.DOM_VK_V=86,Keys.DOM_VK_W=87,Keys.DOM_VK_X=88,Keys.DOM_VK_Y=89,Keys.DOM_VK_Z=90,Keys.DOM_VK_CONTEXT_MENU=93,Keys.DOM_VK_NUMPAD1=97,Keys.DOM_VK_NUMPAD2=98,Keys.DOM_VK_NUMPAD3=99,Keys.DOM_VK_NUMPAD4=100,Keys.DOM_VK_NUMPAD5=101,Keys.DOM_VK_NUMPAD6=102,Keys.DOM_VK_NUMPAD7=103,Keys.DOM_VK_NUMPAD8=104,Keys.DOM_VK_MULTIPLY=106,Keys.DOM_VK_ADD=107,Keys.DOM_VK_SEPARATOR=108,Keys.DOM_VK_SUBTRACT=109,Keys.DOM_VK_SUBTRACT_UNDERSCORE_IE=189,Keys.DOM_VK_DIVIDE=111,Keys.DOM_VK_F1=112,Keys.DOM_VK_F2=113,Keys.DOM_VK_F3=114,Keys.DOM_VK_F4=115,Keys.DOM_VK_F5=116,Keys.DOM_VK_F6=117,Keys.DOM_VK_F7=118,Keys.DOM_VK_F8=119,Keys.DOM_VK_F9=120,Keys.DOM_VK_F10=121,Keys.DOM_VK_F11=122,Keys.DOM_VK_F12=123,Keys.DOM_VK_F13=124,Keys.DOM_VK_F14=125,Keys.DOM_VK_F15=126,Keys.DOM_VK_F16=127,Keys.DOM_VK_F17=128,Keys.DOM_VK_F18=129,Keys.DOM_VK_F19=130,Keys.DOM_VK_F20=131,Keys.DOM_VK_F21=132,Keys.DOM_VK_F22=133,Keys.DOM_VK_F23=134,Keys.DOM_VK_F24=135,Keys.DOM_VK_NUM_LOCK=144,Keys.DOM_VK_SCROLL_LOCK=145,Keys.DOM_VK_SLASH=191,Keys.DOM_VK_BACK_QUOTE=192,Keys.DOM_VK_OPEN_BRACKET=219,Keys.DOM_VK_BACK_SLASH=220,Keys.DOM_VK_CLOSE_BRACKET=221,Keys.DOM_VK_QUOTE=222,Keys.DOM_VK_META=224,compileTemplate=function(e){if(e){var t=_.templateSettings;_.templateSettings={evaluate:/\{\{([\s\S]+?)\}\}/g,interpolate:/\{\{=([\s\S]+?)\}\}/g,escape:/\{\{-([\s\S]+?)\}\}/g};var i=_.template(jQuery(e).html());return _.templateSettings=t,i}},define("utils.common",["prototype","jquery","underscore"],function(e){return function(){var t;return t||e.jQuery}}(this));var Builder={NODEMAP:{AREA:"map",CAPTION:"table",COL:"table",COLGROUP:"table",LEGEND:"fieldset",OPTGROUP:"select",OPTION:"select",PARAM:"object",TBODY:"table",TD:"table",TFOOT:"table",TH:"table",THEAD:"table",TR:"table"},node:function(e){e=e.toUpperCase();var t=this.NODEMAP[e]||"div",i=document.createElement(t);try{i.innerHTML="<"+e+"></"+e+">"}catch(n){}var s=i.firstChild||null;if(s&&s.tagName.toUpperCase()!=e&&(s=s.getElementsByTagName(e)[0]),s||(s=document.createElement(e)),s){if(arguments[1])if(this._isStringOrNumber(arguments[1])||arguments[1]instanceof Array||arguments[1].tagName)this._children(s,arguments[1]);else{var o=this._attributes(arguments[1]);if(o.length){try{i.innerHTML="<"+e+" "+o+"></"+e+">"}catch(n){}if(s=i.firstChild||null,!s){s=document.createElement(e);for(attr in arguments[1])s["class"==attr?"className":attr]=arguments[1][attr]}s.tagName.toUpperCase()!=e&&(s=i.getElementsByTagName(e)[0])}}return arguments[2]&&this._children(s,arguments[2]),$(s)}},_text:function(e){return document.createTextNode(e)},ATTR_MAP:{className:"class",htmlFor:"for"},_attributes:function(e){var t=[];for(attribute in e)t.push((attribute in this.ATTR_MAP?this.ATTR_MAP[attribute]:attribute)+'="'+e[attribute].toString().escapeHTML().gsub(/"/,"&quot;")+'"');return t.join(" ")},_children:function(e,t){return t.tagName?void e.appendChild(t):void("object"==typeof t?t.flatten().each(function(t){"object"==typeof t?e.appendChild(t):Builder._isStringOrNumber(t)&&e.appendChild(Builder._text(t))}):Builder._isStringOrNumber(t)&&e.appendChild(Builder._text(t)))},_isStringOrNumber:function(e){return"string"==typeof e||"number"==typeof e},build:function(e){var t=this.node("div");return $(t).update(e.strip()),t.down()},dump:function(e){"object"!=typeof e&&"function"!=typeof e&&(e=window);var t="A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR".split(/\s+/);t.each(function(t){e[t]=function(){return Builder.node.apply(Builder,[t].concat($A(arguments)))}})}};define("builder",["prototype"],function(e){return function(){var t;return t||e.Builder}}(this)),define("jrs.configs",[],function(){return"undefined"!=typeof __jrsConfigs__?__jrsConfigs__:{contextPath:"",userLocale:"en"}}),define("jquery.ui",["require","jquery"],function(e){var t=e("jquery");return function(e,t){function i(t,i){var s,o,r,a=t.nodeName.toLowerCase();return"area"===a?(s=t.parentNode,o=s.name,t.href&&o&&"map"===s.nodeName.toLowerCase()?(r=e("img[usemap=#"+o+"]")[0],!!r&&n(r)):!1):(/input|select|textarea|button|object/.test(a)?!t.disabled:"a"===a?t.href||i:i)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var s=0,o=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"@VERSION",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,n){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),n&&n.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){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"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var n,s,o=e(this[0]);o.length&&o[0]!==document;){if(n=o.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(s=parseInt(o.css("zIndex"),10),!isNaN(s)&&0!==s))return s;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),s=isNaN(n);return(s||n>=0)&&i(t,!s)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,n){function s(t,i,n,s){return e.each(o,function(){i-=parseFloat(e.css(t,"padding"+this))||0,n&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var o="Width"===n?["Left","Right"]:["Top","Bottom"],r=n.toLowerCase(),a={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(i){return i===t?a["inner"+n].call(this):this.each(function(){e(this).css(r,s(this,i)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?a["outer"+n].call(this,t):this.each(function(){e(this).css(r,s(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,n){var s,o=e.ui[t].prototype;for(s in n)o.plugins[s]=o.plugins[s]||[],o.plugins[s].push([i,n[s]])},call:function(e,t,i){var n,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(n=0;n<s.length;n++)e.options[s[n][0]]&&s[n][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[n]>0?!0:(t[n]=1,s=t[n]>0,t[n]=0,s)}})}(t),function(e,t){var i=0,n=Array.prototype.slice,s=e.cleanData;e.cleanData=function(t){for(var i,n=0;null!=(i=t[n]);n++)try{e(i).triggerHandler("remove")}catch(o){}s(t)},e.widget=function(t,i,n){var s,o,r,a,l={},c=t.split(".")[0];t=t.split(".")[1],s=c+"-"+t,n||(n=i,i=e.Widget),e.expr[":"][s.toLowerCase()]=function(t){return!!e.data(t,s)},e[c]=e[c]||{},o=e[c][t],r=e[c][t]=function(e,t){return this._createWidget?void(arguments.length&&this._createWidget(e,t)):new r(e,t)},e.extend(r,o,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),a=new i,a.options=e.widget.extend({},a.options),e.each(n,function(t,n){return e.isFunction(n)?void(l[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},s=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,o=this._superApply;return this._super=e,this._superApply=s,t=n.apply(this,arguments),this._super=i,this._superApply=o,t}}()):void(l[t]=n)}),r.prototype=e.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix||t:t},l,{constructor:r,namespace:c,widgetName:t,widgetFullName:s}),o?(e.each(o._childConstructors,function(t,i){var n=i.prototype;e.widget(n.namespace+"."+n.widgetName,r,i._proto)}),delete o._childConstructors):i._childConstructors.push(r),e.widget.bridge(t,r)},e.widget.extend=function(i){for(var s,o,r=n.call(arguments,1),a=0,l=r.length;l>a;a++)for(s in r[a])o=r[a][s],r[a].hasOwnProperty(s)&&o!==t&&(i[s]=e.isPlainObject(o)?e.isPlainObject(i[s])?e.widget.extend({},i[s],o):e.widget.extend({},o):o);return i},e.widget.bridge=function(i,s){var o=s.prototype.widgetFullName||i;e.fn[i]=function(r){var a="string"==typeof r,l=n.call(arguments,1),c=this;return r=!a&&l.length?e.widget.extend.apply(null,[r].concat(l)):r,this.each(a?function(){var n,s=e.data(this,o);return s?e.isFunction(s[r])&&"_"!==r.charAt(0)?(n=s[r].apply(s,l),n!==s&&n!==t?(c=n&&n.jquery?c.pushStack(n.get()):n,!1):void 0):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+"'")}:function(){var t=e.data(this,o);t?t.option(r||{})._init():e.data(this,o,new s(r,this))}),c}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),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(),n!==this&&(e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?n.ownerDocument:n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){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")},_destroy:e.noop,widget:function(){return this.element},option:function(i,n){var s,o,r,a=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(a={},s=i.split("."),i=s.shift(),s.length){for(o=a[i]=e.widget.extend({},this.options[i]),r=0;r<s.length-1;r++)o[s[r]]=o[s[r]]||{},o=o[s[r]];if(i=s.pop(),1===arguments.length)return o[i]===t?null:o[i];o[i]=n}else{if(1===arguments.length)return this.options[i]===t?null:this.options[i];a[i]=n}return this._setOptions(a),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){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},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(t,i,n){var s,o=this;"boolean"!=typeof t&&(n=i,i=t,t=!1),n?(i=s=e(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,s=this.widget()),e.each(n,function(n,r){function a(){return t||o.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof r?o[r]:r).apply(o,arguments):void 0}"string"!=typeof r&&(a.guid=r.guid=r.guid||a.guid||e.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+o.eventNamespace,u=l[2];u?s.delegate(u,c,a):i.bind(c,a)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?n[e]:e).apply(n,arguments)}var n=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,n){var s,o,r=this.options[t];if(n=n||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(s in o)s in i||(i[s]=o[s]);return this.element.trigger(i,n),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(n))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(n,s,o){"string"==typeof s&&(s={effect:s});var r,a=s?s===!0||"number"==typeof s?i:s.effect||i:t;s=s||{},"number"==typeof s&&(s={duration:s}),r=!e.isEmptyObject(s),s.complete=o,s.delay&&n.delay(s.delay),r&&e.effects&&e.effects.effect[a]?n[t](s):a!==t&&n[a]?n[a](s.duration,s.easing,o):n.queue(function(i){e(this)[t](),o&&o.call(n[0]),i()})}})}(t),function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"@VERSION",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var n=this,s=1===i.which,o="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return s&&!o&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},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){return n._mouseMove(e)},this._mouseUpDelegate=function(e){return n._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!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)},_mouseUp:function(t){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},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(t),function(e){e.widget("ui.draggable",e.ui.mouse,{version:"@VERSION",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"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()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var i=this.options;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(){e("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var i=this.options;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={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),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)
  },_mouseDrag:function(t,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!i){var n=this._uiHash();if(this._trigger("drag",t,n)===!1)return this._mouseUp({}),!1;this.position=n.position}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},_mouseStop:function(t){var i=this,n=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(n=e.ui.ddmanager.drop(this,t)),this.dropped&&(n=this.dropped,this.dropped=!1),"original"!==this.options.helper||e.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",t)!==!1&&i._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1):!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(t){var i=this.options,n=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"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)},_getParentOffset:function(){var t=this.offsetParent.offset();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={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,n,s=this.options;return s.containment?"window"===s.containment?void(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]):"document"===s.containment?void(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]):s.containment.constructor===Array?void(this.containment=s.containment):("parent"===s.containment&&(s.containment=this.helper[0].parentNode),i=e(s.containment),n=i[0],void(n&&(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(n.scrollWidth,n.offsetWidth):n.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(n.scrollHeight,n.offsetHeight):n.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))):void(this.containment=null)},_convertPositionTo:function(t,i){i||(i=this.position);var n="absolute"===t?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:s.scrollTop(),left:s.scrollLeft()}),{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*n}},_generatePosition:function(t){var i,n,s,o,r=this.options,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=t.pageX,c=t.pageY;return this.offset.scroll||(this.offset.scroll={top:a.scrollTop(),left:a.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(n=this.relative_container.offset(),i=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(c=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(c=i[3]+this.offset.click.top)),r.grid&&(s=r.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,c=i?s-this.offset.click.top>=i[1]||s-this.offset.click.top>i[3]?s:s-this.offset.click.top>=i[1]?s-r.grid[1]:s+r.grid[1]:s,o=r.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,l=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-r.grid[0]:o+r.grid[0]:o)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(t,i,n){return n=n||this._uiHash(),e.ui.plugin.call(this,t,[i,n]),"drag"===t&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i){var n=e(this).data("ui-draggable"),s=n.options,o=e.extend({},i,{item:n.element});n.sortables=[],e(s.connectToSortable).each(function(){var i=e.data(this,"ui-sortable");i&&!i.options.disabled&&(n.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",t,o))})},stop:function(t,i){var n=e(this).data("ui-draggable"),s=e.extend({},i,{item:n.element});e.each(n.sortables,function(){this.instance.isOver?(this.instance.isOver=0,n.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"===n.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,s))})},drag:function(t,i){var n=e(this).data("ui-draggable"),s=this;e.each(n.sortables,function(){var o=!1,r=this;this.instance.positionAbs=n.positionAbs,this.instance.helperProportions=n.helperProportions,this.instance.offset.click=n.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,e.each(n.sortables,function(){return this.instance.positionAbs=n.positionAbs,this.instance.helperProportions=n.helperProportions,this.instance.offset.click=n.offset.click,this!==r&&this.instance._intersectsWith(this.instance.containerCache)&&e.contains(r.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(s).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(){return i.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=n.offset.click.top,this.instance.offset.click.left=n.offset.click.left,this.instance.offset.parent.left-=n.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=n.offset.parent.top-this.instance.offset.parent.top,n._trigger("toSortable",t),n.dropped=this.instance.element,n.currentItem=n.element,this.instance.fromOutside=n),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(),n._trigger("fromSortable",t),n.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(){var t=e("body"),i=e(this).data("ui-draggable").options;t.css("cursor")&&(i._cursor=t.css("cursor")),t.css("cursor",i.cursor)},stop:function(){var t=e(this).data("ui-draggable").options;t._cursor&&e("body").css("cursor",t._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i){var n=e(i.helper),s=e(this).data("ui-draggable").options;n.css("opacity")&&(s._opacity=n.css("opacity")),n.css("opacity",s.opacity)},stop:function(t,i){var n=e(this).data("ui-draggable").options;n._opacity&&e(i.helper).css("opacity",n._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(){var t=e(this).data("ui-draggable");t.scrollParent[0]!==document&&"HTML"!==t.scrollParent[0].tagName&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var i=e(this).data("ui-draggable"),n=i.options,s=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(n.axis&&"x"===n.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-t.pageY<n.scrollSensitivity?i.scrollParent[0].scrollTop=s=i.scrollParent[0].scrollTop+n.scrollSpeed:t.pageY-i.overflowOffset.top<n.scrollSensitivity&&(i.scrollParent[0].scrollTop=s=i.scrollParent[0].scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-t.pageX<n.scrollSensitivity?i.scrollParent[0].scrollLeft=s=i.scrollParent[0].scrollLeft+n.scrollSpeed:t.pageX-i.overflowOffset.left<n.scrollSensitivity&&(i.scrollParent[0].scrollLeft=s=i.scrollParent[0].scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(t.pageY-e(document).scrollTop()<n.scrollSensitivity?s=e(document).scrollTop(e(document).scrollTop()-n.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<n.scrollSensitivity&&(s=e(document).scrollTop(e(document).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(t.pageX-e(document).scrollLeft()<n.scrollSensitivity?s=e(document).scrollLeft(e(document).scrollLeft()-n.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<n.scrollSensitivity&&(s=e(document).scrollLeft(e(document).scrollLeft()+n.scrollSpeed)))),s!==!1&&e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(i,t)}}),e.ui.plugin.add("draggable","snap",{start:function(){var t=e(this).data("ui-draggable"),i=t.options;t.snapElements=[],e(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=e(this),n=i.offset();this!==t.element[0]&&t.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:n.top,left:n.left})})},drag:function(t,i){var n,s,o,r,a,l,c,u,d,h,p=e(this).data("ui-draggable"),f=p.options,m=f.snapTolerance,g=i.offset.left,v=g+p.helperProportions.width,_=i.offset.top,y=_+p.helperProportions.height;for(d=p.snapElements.length-1;d>=0;d--)a=p.snapElements[d].left,l=a+p.snapElements[d].width,c=p.snapElements[d].top,u=c+p.snapElements[d].height,a-m>v||g>l+m||c-m>y||_>u+m||!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(),{snapItem:p.snapElements[d].item})),p.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=Math.abs(c-y)<=m,s=Math.abs(u-_)<=m,o=Math.abs(a-v)<=m,r=Math.abs(l-g)<=m,n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),s&&(i.position.top=p._convertPositionTo("relative",{top:u,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:a-p.helperProportions.width}).left-p.margins.left),r&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l}).left-p.margins.left)),h=n||s||o||r,"outer"!==f.snapMode&&(n=Math.abs(c-_)<=m,s=Math.abs(u-y)<=m,o=Math.abs(a-g)<=m,r=Math.abs(l-v)<=m,n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),s&&(i.position.top=p._convertPositionTo("relative",{top:u-p.helperProportions.height,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:a}).left-p.margins.left),r&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[d].snapping&&(n||s||o||r||h)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[d].item})),p.snapElements[d].snapping=n||s||o||r||h)}}),e.ui.plugin.add("draggable","stack",{start:function(){var t,i=this.data("ui-draggable").options,n=e.makeArray(e(i.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});n.length&&(t=parseInt(e(n[0]).css("zIndex"),10)||0,e(n).each(function(i){e(this).css("zIndex",t+i)}),this.css("zIndex",t+n.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i){var n=e(i.helper),s=e(this).data("ui-draggable").options;n.css("zIndex")&&(s._zIndex=n.css("zIndex")),n.css("zIndex",s.zIndex)},stop:function(t,i){var n=e(this).data("ui-draggable").options;n._zIndex&&e(i.helper).css("zIndex",n._zIndex)}})}(t),function(e){function t(e,t,i){return e>t&&t+i>e}e.widget("ui.droppable",{version:"@VERSION",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,i=this.options,n=i.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(n)?n:function(e){return e.is(n)},this.proportions=function(){return arguments.length?void(t=arguments[0]):t?t:t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},e.ui.ddmanager.droppables[i.scope]=e.ui.ddmanager.droppables[i.scope]||[],e.ui.ddmanager.droppables[i.scope].push(this),i.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var t=0,i=e.ui.ddmanager.droppables[this.options.scope];t<i.length;t++)i[t]===this&&i.splice(t,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){"accept"===t&&(this.accept=e.isFunction(i)?i:function(e){return e.is(i)}),e.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var n=i||e.ui.ddmanager.current,s=!1;return n&&(n.currentItem||n.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=e.data(this,"ui-droppable");return t.options.greedy&&!t.options.disabled&&t.options.scope===n.options.scope&&t.accept.call(t.element[0],n.currentItem||n.element)&&e.ui.intersect(n,e.extend(t,{offset:t.element.offset()}),t.options.tolerance)?(s=!0,!1):void 0}),s?!1:this.accept.call(this.element[0],n.currentItem||n.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(n)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(e,i,n){if(!i.offset)return!1;var s,o,r=(e.positionAbs||e.position.absolute).left,a=(e.positionAbs||e.position.absolute).top,l=r+e.helperProportions.width,c=a+e.helperProportions.height,u=i.offset.left,d=i.offset.top,h=u+i.proportions().width,p=d+i.proportions().height;switch(n){case"fit":return r>=u&&h>=l&&a>=d&&p>=c;case"intersect":return u<r+e.helperProportions.width/2&&l-e.helperProportions.width/2<h&&d<a+e.helperProportions.height/2&&c-e.helperProportions.height/2<p;case"pointer":return s=(e.positionAbs||e.position.absolute).left+(e.clickOffset||e.offset.click).left,o=(e.positionAbs||e.position.absolute).top+(e.clickOffset||e.offset.click).top,t(o,d,i.proportions().height)&&t(s,u,i.proportions().width);case"touch":return(a>=d&&p>=a||c>=d&&p>=c||d>a&&c>p)&&(r>=u&&h>=r||l>=u&&h>=l||u>r&&l>h);default:return!1}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var n,s,o=e.ui.ddmanager.droppables[t.options.scope]||[],r=i?i.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(n=0;n<o.length;n++)if(!(o[n].options.disabled||t&&!o[n].accept.call(o[n].element[0],t.currentItem||t.element))){for(s=0;s<a.length;s++)if(a[s]===o[n].element[0]){o[n].proportions().height=0;continue e}o[n].visible="none"!==o[n].element.css("display"),o[n].visible&&("mousedown"===r&&o[n]._activate.call(o[n],i),o[n].offset=o[n].element.offset(),o[n].proportions({width:o[n].element[0].offsetWidth,height:o[n].element[0].offsetHeight}))}},drop:function(t,i){var n=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance)&&(n=this._drop.call(this,i)||n),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),n},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var n,s,o,r=e.ui.intersect(t,this,this.options.tolerance),a=!r&&this.isover?"isout":r&&!this.isover?"isover":null;a&&(this.options.greedy&&(s=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return e.data(this,"ui-droppable").options.scope===s}),o.length&&(n=e.data(o[0],"ui-droppable"),n.greedyChild="isover"===a)),n&&"isover"===a&&(n.isover=!1,n.isout=!0,n._out.call(n,i)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,i),n&&"isout"===a&&(n.isout=!1,n.isover=!0,n._over.call(n,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}}}(t),function(e){function t(e){return parseInt(e,10)||0}function i(e){return!isNaN(parseInt(e,10))}e.widget("ui.resizable",e.ui.mouse,{version:"@VERSION",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){function t(e){return a._mouseDown(e)}var i,n,s,o,r,a=this,l=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!l.aspectRatio,aspectRatio:l.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:l.helper||l.ghost||l.animate?l.helper||"ui-resizable-helper":null}),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({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=l.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},n=0;n<i.length;n++)s=e.trim(i[n]),r="ui-resizable-"+s,o=e("<div class='ui-resizable-handle "+r+"'></div>"),o.css({zIndex:l.zIndex}),"se"===s&&o.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(o);this._renderAxis=function(t){var i,n,s,o;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=e(this.handles[i]+":last",this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(n=e(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?n.outerHeight():n.outerWidth(),s=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(s,o),this._proportionallyResize()),e(this.handles[i]).length},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element);for(n in this.handles)this._handles=this._handles.add(this.handles[n]);if(this._handles.disableSelection(),this._handles.mouseover(function(){a.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=o&&o[1]?o[1]:"se")}),l.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){l.disabled||(e(this).removeClass("ui-resizable-autohide"),a._handles.show())}).mouseleave(function(){l.disabled||a.resizing||(e(this).addClass("ui-resizable-autohide"),a._handles.hide())})),this._mouseInit(),l.handles.constructor!==String)for(n in l.handles)s=l.handles[n],s instanceof e&&s.bind("mousedown."+this.widgetName,t)},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,n,s=!1;for(i in this.handles)n=e(this.handles[i])[0],(n===t.target||e.contains(n,t.target))&&(s=!0);return!this.options.disabled&&s},_mouseStart:function(i){var n,s,o,r=this.options,a=this.element.position(),l=this.element;return this.resizing=!0,/absolute/.test(l.css("position"))?l.css({position:"absolute",top:l.css("top"),left:l.css("left")}):l.is(".ui-draggable")&&l.css({position:"absolute",top:a.top,left:a.left}),this._renderProxy(),n=t(this.helper.css("left")),s=t(this.helper.css("top")),r.containment&&(n+=e(r.containment).scrollLeft()||0,s+=e(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:n,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:l.width(),height:l.height()},this.originalSize=this._helper?{width:l.outerWidth(),height:l.outerHeight()}:{width:l.width(),height:l.height()},this.originalPosition={left:n,top:s},this.sizeDiff={width:l.outerWidth()-l.width(),height:l.outerHeight()-l.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof r.aspectRatio?r.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===o?this.axis+"-resize":o),l.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(t){var i,n=this.helper,s={},o=this.originalMousePosition,r=this.axis,a=this.position.top,l=this.position.left,c=this.size.width,u=this.size.height,d=t.pageX-o.left||0,h=t.pageY-o.top||0,p=this._change[r];return p?(i=p.apply(this,[t,d,h]),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!==a&&(s.top=this.position.top+"px"),this.position.left!==l&&(s.left=this.position.left+"px"),this.size.width!==c&&(s.width=this.size.width+"px"),this.size.height!==u&&(s.height=this.size.height+"px"),n.css(s),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(s)||this._trigger("resize",t,this.ui()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,n,s,o,r,a,l,c=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,n=i.length&&/textarea/i.test(i[0].nodeName),s=n&&e.ui.hasScroll(i[0],"left")?0:u.sizeDiff.height,o=n?0:u.sizeDiff.width,r={width:u.helper.width()-o,height:u.helper.height()-s},a=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,l=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,c.animate||this.element.css(e.extend(r,{top:l,left:a})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!c.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t,n,s,o,r,a=this.options;r={minWidth:i(a.minWidth)?a.minWidth:0,maxWidth:i(a.maxWidth)?a.maxWidth:1/0,minHeight:i(a.minHeight)?a.minHeight:0,maxHeight:i(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||e)&&(t=r.minHeight*this.aspectRatio,s=r.minWidth/this.aspectRatio,n=r.maxHeight*this.aspectRatio,o=r.maxWidth/this.aspectRatio,t>r.minWidth&&(r.minWidth=t),s>r.minHeight&&(r.minHeight=s),n<r.maxWidth&&(r.maxWidth=n),o<r.maxHeight&&(r.maxHeight=o)),this._vBoundaries=r},_updateCache:function(e){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)},_updateRatio:function(e){var t=this.position,n=this.size,s=this.axis;return i(e.height)?e.width=e.height*this.aspectRatio:i(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===s&&(e.left=t.left+(n.width-e.width),e.top=null),"nw"===s&&(e.top=t.top+(n.height-e.height),e.left=t.left+(n.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,n=this.axis,s=i(e.width)&&t.maxWidth&&t.maxWidth<e.width,o=i(e.height)&&t.maxHeight&&t.maxHeight<e.height,r=i(e.width)&&t.minWidth&&t.minWidth>e.width,a=i(e.height)&&t.minHeight&&t.minHeight>e.height,l=this.originalPosition.left+this.originalSize.width,c=this.position.top+this.size.height,u=/sw|nw|w/.test(n),d=/nw|ne|n/.test(n);return r&&(e.width=t.minWidth),a&&(e.height=t.minHeight),s&&(e.width=t.maxWidth),o&&(e.height=t.maxHeight),r&&u&&(e.left=l-t.minWidth),s&&u&&(e.left=l-t.maxWidth),a&&d&&(e.top=c-t.minHeight),o&&d&&(e.top=c-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},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var e,t,i,n,s,o=this.helper||this.element;for(e=0;e<this._proportionallyResizeElements.length;e++){if(s=this._proportionallyResizeElements[e],!this.borderDif)for(this.borderDif=[],i=[s.css("borderTopWidth"),s.css("borderRightWidth"),s.css("borderBottomWidth"),s.css("borderLeftWidth")],n=[s.css("paddingTop"),s.css("paddingRight"),s.css("paddingBottom"),s.css("paddingLeft")],t=0;t<i.length;t++)this.borderDif[t]=(parseInt(i[t],10)||0)+(parseInt(n[t],10)||0);s.css({height:o.height()-this.borderDif[0]-this.borderDif[2]||0,width:o.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,n=this.originalPosition;
  return{left:n.left+t,width:i.width-t}},n:function(e,t,i){var n=this.originalSize,s=this.originalPosition;return{top:s.top+i,height:n.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,n){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,n]))},sw:function(t,i,n){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,n]))},ne:function(t,i,n){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,n]))},nw:function(t,i,n){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,n]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).data("ui-resizable"),n=i.options,s=i._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),r=o&&e.ui.hasScroll(s[0],"left")?0:i.sizeDiff.height,a=o?0:i.sizeDiff.width,l={width:i.size.width-a,height:i.size.height-r},c=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(l,u&&c?{top:u,left:c}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var n={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};s&&s.length&&e(s[0]).css({width:n.width,height:n.height}),i._updateCache(n),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var i,n,s,o,r,a,l,c=e(this).data("ui-resizable"),u=c.options,d=c.element,h=u.containment,p=h instanceof e?h.get(0):/parent/.test(h)?d.parent().get(0):h;p&&(c.containerElement=e(p),/document/.test(h)||h===document?(c.containerOffset={left:0,top:0},c.containerPosition={left:0,top:0},c.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(i=e(p),n=[],e(["Top","Right","Left","Bottom"]).each(function(e,s){n[e]=t(i.css("padding"+s))}),c.containerOffset=i.offset(),c.containerPosition=i.position(),c.containerSize={height:i.innerHeight()-n[3],width:i.innerWidth()-n[1]},s=c.containerOffset,o=c.containerSize.height,r=c.containerSize.width,a=e.ui.hasScroll(p,"left")?p.scrollWidth:r,l=e.ui.hasScroll(p)?p.scrollHeight:o,c.parentData={element:p,left:s.left,top:s.top,width:a,height:l}))},resize:function(t){var i,n,s,o,r=e(this).data("ui-resizable"),a=r.options,l=r.containerOffset,c=r.position,u=r._aspectRatio||t.shiftKey,d={top:0,left:0},h=r.containerElement;h[0]!==document&&/static/.test(h.css("position"))&&(d=l),c.left<(r._helper?l.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-l.left:r.position.left-d.left),u&&(r.size.height=r.size.width/r.aspectRatio),r.position.left=a.helper?l.left:0),c.top<(r._helper?l.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-l.top:r.position.top),u&&(r.size.width=r.size.height*r.aspectRatio),r.position.top=r._helper?l.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),n=Math.abs((r._helper?r.offset.top-d.top:r.offset.top-l.top)+r.sizeDiff.height),s=r.containerElement.get(0)===r.element.parent().get(0),o=/relative|absolute/.test(r.containerElement.css("position")),s&&o&&(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)),n+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-n,u&&(r.size.width=r.size.height*r.aspectRatio))},stop:function(){var t=e(this).data("ui-resizable"),i=t.options,n=t.containerOffset,s=t.containerPosition,o=t.containerElement,r=e(t.helper),a=r.offset(),l=r.outerWidth()-t.sizeDiff.width,c=r.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(o.css("position"))&&e(this).css({left:a.left-s.left-n.left,width:l,height:c}),t._helper&&!i.animate&&/static/.test(o.css("position"))&&e(this).css({left:a.left-s.left-n.left,width:l,height:c})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,n=function(t){e(t).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?n(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],n(i.alsoResize)):e.each(i.alsoResize,function(e){n(e)})},resize:function(t,i){var n=e(this).data("ui-resizable"),s=n.options,o=n.originalSize,r=n.originalPosition,a={height:n.size.height-o.height||0,width:n.size.width-o.width||0,top:n.position.top-r.top||0,left:n.position.left-r.left||0},l=function(t,n){e(t).each(function(){var t=e(this),s=e(this).data("ui-resizable-alsoresize"),o={},r=n&&n.length?n:t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(r,function(e,t){var i=(s[t]||0)+(a[t]||0);i&&i>=0&&(o[t]=i||null)}),t.css(o)})};"object"!=typeof s.alsoResize||s.alsoResize.nodeType?l(s.alsoResize):e.each(s.alsoResize,function(e,t){l(e,t)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,n=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:n.height,width:n.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).data("ui-resizable");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).data("ui-resizable");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t=e(this).data("ui-resizable"),i=t.options,n=t.size,s=t.originalSize,o=t.originalPosition,r=t.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=a[0]||1,c=a[1]||1,u=Math.round((n.width-s.width)/l)*l,d=Math.round((n.height-s.height)/c)*c,h=s.width+u,p=s.height+d,f=i.maxWidth&&i.maxWidth<h,m=i.maxHeight&&i.maxHeight<p,g=i.minWidth&&i.minWidth>h,v=i.minHeight&&i.minHeight>p;i.grid=a,g&&(h+=l),v&&(p+=c),f&&(h-=l),m&&(p-=c),/^(se|s|e)$/.test(r)?(t.size.width=h,t.size.height=p):/^(ne)$/.test(r)?(t.size.width=h,t.size.height=p,t.position.top=o.top-d):/^(sw)$/.test(r)?(t.size.width=h,t.size.height=p,t.position.left=o.left-u):(p-c>0?(t.size.height=p,t.position.top=o.top-d):(t.size.height=c,t.position.top=o.top+s.height-c),h-l>0?(t.size.width=h,t.position.left=o.left-u):(t.size.width=l,t.position.left=o.left+s.width-l))}})}(t),function(e){e.widget("ui.selectable",e.ui.mouse,{version:"@VERSION",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t=e(i.options.filter,i.element[0]),t.addClass("ui-selectee"),t.each(function(){var t=e(this),i=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=t.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var i=this,n=this.options;this.opos=[t.pageX,t.pageY],this.options.disabled||(this.selectees=e(n.filter,this.element[0]),this._trigger("start",t),e(n.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),n.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var n=e.data(this,"selectable-item");n.startselected=!0,t.metaKey||t.ctrlKey||(n.$element.removeClass("ui-selected"),n.selected=!1,n.$element.addClass("ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",t,{unselecting:n.element}))}),e(t.target).parents().addBack().each(function(){var n,s=e.data(this,"selectable-item");return s?(n=!t.metaKey&&!t.ctrlKey||!s.$element.hasClass("ui-selected"),s.$element.removeClass(n?"ui-unselecting":"ui-selected").addClass(n?"ui-selecting":"ui-unselecting"),s.unselecting=!n,s.selecting=n,s.selected=n,n?i._trigger("selecting",t,{selecting:s.element}):i._trigger("unselecting",t,{unselecting:s.element}),!1):void 0}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var i,n=this,s=this.options,o=this.opos[0],r=this.opos[1],a=t.pageX,l=t.pageY;return o>a&&(i=a,a=o,o=i),r>l&&(i=l,l=r,r=i),this.helper.css({left:o,top:r,width:a-o,height:l-r}),this.selectees.each(function(){var i=e.data(this,"selectable-item"),c=!1;i&&i.element!==n.element[0]&&("touch"===s.tolerance?c=!(i.left>a||i.right<o||i.top>l||i.bottom<r):"fit"===s.tolerance&&(c=i.left>o&&i.right<a&&i.top>r&&i.bottom<l),c?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,n._trigger("selecting",t,{selecting:i.element}))):(i.selecting&&((t.metaKey||t.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),n._trigger("unselecting",t,{unselecting:i.element}))),i.selected&&(t.metaKey||t.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",t,{unselecting:i.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var n=e.data(this,"selectable-item");n.$element.removeClass("ui-unselecting"),n.unselecting=!1,n.startselected=!1,i._trigger("unselected",t,{unselected:n.element})}),e(".ui-selecting",this.element[0]).each(function(){var n=e.data(this,"selectable-item");n.$element.removeClass("ui-selecting").addClass("ui-selected"),n.selecting=!1,n.selected=!0,n.startselected=!0,i._trigger("selected",t,{selected:n.element})}),this._trigger("stop",t),this.helper.remove(),!1}})}(t),function(e){function t(e,t,i){return e>t&&t+i>e}function i(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))}e.widget("ui.sortable",e.ui.mouse,{version:"@VERSION",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===e.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,i){"disabled"===t?(this.options[t]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):e.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,i){var n=null,s=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(t),e(t.target).parents().each(function(){return e.data(this,o.widgetName+"-item")===o?(n=e(this),!1):void 0}),e.data(t.target,o.widgetName+"-item")===o&&(n=e(t.target)),n&&(!this.options.handle||i||(e(this.options.handle,n).find("*").addBack().each(function(){this===t.target&&(s=!0)}),s))?(this.currentItem=n,this._removeCurrentsFromItems(),!0):!1)},_mouseStart:function(t,i,n){var s,o,r=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),r.containment&&this._setContainment(),r.cursor&&"auto"!==r.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",r.cursor),this.storedStylesheet=e("<style>*{ cursor: "+r.cursor+" !important; }</style>").appendTo(o)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(s=this.containers.length-1;s>=0;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var i,n,s,o,r=this.options,a=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<r.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+r.scrollSpeed:t.pageY-this.overflowOffset.top<r.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-r.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<r.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+r.scrollSpeed:t.pageX-this.overflowOffset.left<r.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-r.scrollSpeed)):(t.pageY-e(document).scrollTop()<r.scrollSensitivity?a=e(document).scrollTop(e(document).scrollTop()-r.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<r.scrollSensitivity&&(a=e(document).scrollTop(e(document).scrollTop()+r.scrollSpeed)),t.pageX-e(document).scrollLeft()<r.scrollSensitivity?a=e(document).scrollLeft(e(document).scrollLeft()-r.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<r.scrollSensitivity&&(a=e(document).scrollLeft(e(document).scrollLeft()+r.scrollSpeed))),a!==!1&&e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),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"),i=this.items.length-1;i>=0;i--)if(n=this.items[i],s=n.item[0],o=this._intersectsWithPointer(n),o&&n.instance===this.currentContainer&&s!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==s&&!e.contains(this.placeholder[0],s)&&("semi-dynamic"===this.options.type?!e.contains(this.element[0],s):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(t,n),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var n=this,s=this.placeholder.offset(),o=this.options.axis,r={};o&&"x"!==o||(r.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(r.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(r,parseInt(this.options.revert,10)||500,function(){n._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},e(i).each(function(){var i=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);i&&n.push((t.key||i[1]+"[]")+"="+(t.key&&t.expression?i[1]:i[2]))}),!n.length&&t.key&&n.push(t.key+"="),n.join("&")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},i.each(function(){n.push(e(t.item||this).attr(t.attribute||"id")||"")}),n},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,n=this.positionAbs.top,s=n+this.helperProportions.height,o=e.left,r=o+e.width,a=e.top,l=a+e.height,c=this.offset.click.top,u=this.offset.click.left,d="x"===this.options.axis||n+c>a&&l>n+c,h="y"===this.options.axis||t+u>o&&r>t+u,p=d&&h;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?p:o<t+this.helperProportions.width/2&&i-this.helperProportions.width/2<r&&a<n+this.helperProportions.height/2&&s-this.helperProportions.height/2<l},_intersectsWithPointer:function(e){var i="x"===this.options.axis||t(this.positionAbs.top+this.offset.click.top,e.top,e.height),n="y"===this.options.axis||t(this.positionAbs.left+this.offset.click.left,e.left,e.width),s=i&&n,o=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return s?this.floating?r&&"right"===r||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectsWithSides:function(e){var i=t(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),n=t(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),s=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&n||"left"===o&&!n:s&&("down"===s&&i||"up"===s&&!i)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function i(){a.push(this)}var n,s,o,r,a=[],l=[],c=this._connectWith();if(c&&t)for(n=c.length-1;n>=0;n--)for(o=e(c[n]),s=o.length-1;s>=0;s--)r=e.data(o[s],this.widgetFullName),r&&r!==this&&!r.options.disabled&&l.push([e.isFunction(r.options.items)?r.options.items.call(r.element):e(r.options.items,r.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),r]);for(l.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),n=l.length-1;n>=0;n--)l[n][0].each(i);return e(a)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var i=0;i<t.length;i++)if(t[i]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var i,n,s,o,r,a,l,c,u=this.items,d=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],h=this._connectWith();if(h&&this.ready)for(i=h.length-1;i>=0;i--)for(s=e(h[i]),n=s.length-1;n>=0;n--)o=e.data(s[n],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(d.push([e.isFunction(o.options.items)?o.options.items.call(o.element[0],t,{item:this.currentItem}):e(o.options.items,o.element),o]),this.containers.push(o));for(i=d.length-1;i>=0;i--)for(r=d[i][1],a=d[i][0],n=0,c=a.length;c>n;n++)l=e(a[n]),l.data(this.widgetName+"-item",r),u.push({item:l,instance:r,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,n,s,o;for(i=this.items.length-1;i>=0;i--)n=this.items[i],n.instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(s=this.options.toleranceElement?e(this.options.toleranceElement,n.item):n.item,t||(n.width=s.outerWidth(),n.height=s.outerHeight()),o=s.offset(),n.left=o.left,n.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var i,n=t.options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=t.currentItem[0].nodeName.toLowerCase(),s=e("<"+n+">",t.document[0]).addClass(i||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===n?t.currentItem.children().each(function(){e("<td>&#160;</td>",t.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(s)}):"img"===n&&s.attr("src",t.currentItem.attr("src")),i||s.css("visibility","hidden"),s},update:function(e,s){(!i||n.forcePlaceholderSize)&&(s.height()||s.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),s.width()||s.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(n.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),n.placeholder.update(t,t.placeholder)},_contactContainers:function(n){var s,o,r,a,l,c,u,d,h,p,f=null,m=null;for(s=this.containers.length-1;s>=0;s--)if(!e.contains(this.currentItem[0],this.containers[s].element[0]))if(this._intersectsWith(this.containers[s].containerCache)){if(f&&e.contains(this.containers[s].element[0],f.element[0]))continue;f=this.containers[s],m=s}else this.containers[s].containerCache.over&&(this.containers[s]._trigger("out",n,this._uiHash(this)),this.containers[s].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[m].containerCache.over||(this.containers[m]._trigger("over",n,this._uiHash(this)),this.containers[m].containerCache.over=1);else{for(r=1e4,a=null,p=f.floating||i(this.currentItem),l=p?"left":"top",c=p?"width":"height",u=this.positionAbs[l]+this.offset.click[l],o=this.items.length-1;o>=0;o--)e.contains(this.containers[m].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!p||t(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(d=this.items[o].item.offset()[l],h=!1,Math.abs(d-u)>Math.abs(d+this.items[o][c]-u)&&(h=!0,d+=this.items[o][c]),Math.abs(d-u)<r&&(r=Math.abs(d-u),a=this.items[o],this.direction=h?"up":"down"));if(!a&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[m])return;a?this._rearrange(n,a,null,!0):this._rearrange(n,null,this.containers[m].element,!0),this._trigger("change",n,this._uiHash()),this.containers[m]._trigger("change",n,this._uiHash(this)),this.currentContainer=this.containers[m],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[m]._trigger("over",n,this._uiHash(this)),this.containers[m].containerCache.over=1}},_createHelper:function(t){var i=this.options,n=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||e("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!n[0].style.width||i.forceHelperSize)&&n.width(this.currentItem.width()),(!n[0].style.height||i.forceHelperSize)&&n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"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)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();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={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,n,s=this.options;"parent"===s.containment&&(s.containment=this.helper[0].parentNode),("document"===s.containment||"window"===s.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e("document"===s.containment?document:window).width()-this.helperProportions.width-this.margins.left,(e("document"===s.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(s.containment)||(t=e(s.containment)[0],i=e(s.containment).offset(),n="hidden"!==e(t).css("overflow"),this.containment=[i.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(n?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(n?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,i){i||(i=this.position);var n="absolute"===t?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);return{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:s.scrollTop())*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*n}},_generatePosition:function(t){var i,n,s=this.options,o=t.pageX,r=t.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(r=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),s.grid&&(i=this.originalPageY+Math.round((r-this.originalPageY)/s.grid[1])*s.grid[1],r=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-s.grid[1]:i+s.grid[1]:i,n=this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0],o=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-s.grid[0]:n+s.grid[0]:n)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}
  },_rearrange:function(e,t,i,n){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var s=this.counter;this._delay(function(){s===this.counter&&this.refreshPositions(!n)})},_clear:function(e,t){function i(e,t,i){return function(n){i._trigger(e,n,t._uiHash(t))}}this.reverting=!1;var n,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)("auto"===this._storedCSS[n]||"static"===this._storedCSS[n])&&(this._storedCSS[n]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&s.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||s.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(s.push(function(e){this._trigger("remove",e,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)t||s.push(i("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(s.push(i("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!t){for(this._trigger("beforeStop",e,this._uiHash()),n=0;n<s.length;n++)s[n].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!1}if(t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!t){for(n=0;n<s.length;n++)s[n].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}})}(t),function(e,i){var n="ui-effects-";e.effects={effect:{}},function(e,t){function i(e,t,i){var n=d[t.type]||{};return null==e?i||!t.def?null:t.def:(e=n.floor?~~e:parseFloat(e),isNaN(e)?t.def:n.mod?(e+n.mod)%n.mod:0>e?0:n.max<e?n.max:e)}function n(t){var i=c(),n=i._rgba=[];return t=t.toLowerCase(),f(l,function(e,s){var o,r=s.re.exec(t),a=r&&s.parse(r),l=s.space||"rgba";return a?(o=i[l](a),i[u[l].cache]=o[u[l].cache],n=i._rgba=o._rgba,!1):void 0}),n.length?("0,0,0,0"===n.join()&&e.extend(n,o.transparent),i):o[t]}function s(e,t,i){return i=(i+1)%1,1>6*i?e+(t-e)*i*6:1>2*i?t:2>3*i?e+(t-e)*(2/3-i)*6:e}var o,r="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",a=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],c=e.Color=function(t,i,n,s){return new e.Color.fn.parse(t,i,n,s)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},d={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},h=c.support={},p=e("<p>")[0],f=e.each;p.style.cssText="background-color:rgba(1,1,1,.5)",h.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(u,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),c.fn=e.extend(c.prototype,{parse:function(s,r,a,l){if(s===t)return this._rgba=[null,null,null,null],this;(s.jquery||s.nodeType)&&(s=e(s).css(r),r=t);var d=this,h=e.type(s),p=this._rgba=[];return r!==t&&(s=[s,r,a,l],h="array"),"string"===h?this.parse(n(s)||o._default):"array"===h?(f(u.rgba.props,function(e,t){p[t.idx]=i(s[t.idx],t)}),this):"object"===h?(s instanceof c?f(u,function(e,t){s[t.cache]&&(d[t.cache]=s[t.cache].slice())}):f(u,function(t,n){var o=n.cache;f(n.props,function(e,t){if(!d[o]&&n.to){if("alpha"===e||null==s[e])return;d[o]=n.to(d._rgba)}d[o][t.idx]=i(s[e],t,!0)}),d[o]&&e.inArray(null,d[o].slice(0,3))<0&&(d[o][3]=1,n.from&&(d._rgba=n.from(d[o])))}),this):void 0},is:function(e){var t=c(e),i=!0,n=this;return f(u,function(e,s){var o,r=t[s.cache];return r&&(o=n[s.cache]||s.to&&s.to(n._rgba)||[],f(s.props,function(e,t){return null!=r[t.idx]?i=r[t.idx]===o[t.idx]:void 0})),i}),i},_space:function(){var e=[],t=this;return f(u,function(i,n){t[n.cache]&&e.push(i)}),e.pop()},transition:function(e,t){var n=c(e),s=n._space(),o=u[s],r=0===this.alpha()?c("transparent"):this,a=r[o.cache]||o.to(r._rgba),l=a.slice();return n=n[o.cache],f(o.props,function(e,s){var o=s.idx,r=a[o],c=n[o],u=d[s.type]||{};null!==c&&(null===r?l[o]=c:(u.mod&&(c-r>u.mod/2?r+=u.mod:r-c>u.mod/2&&(r-=u.mod)),l[o]=i((c-r)*t+r,s)))}),this[s](l)},blend:function(t){if(1===this._rgba[3])return this;var i=this._rgba.slice(),n=i.pop(),s=c(t)._rgba;return c(e.map(i,function(e,t){return(1-n)*s[t]+n*e}))},toRgbaString:function(){var t="rgba(",i=e.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===i[3]&&(i.pop(),t="rgb("),t+i.join()+")"},toHslaString:function(){var t="hsla(",i=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&3>t&&(e=Math.round(100*e)+"%"),e});return 1===i[3]&&(i.pop(),t="hsl("),t+i.join()+")"},toHexString:function(t){var i=this._rgba.slice(),n=i.pop();return t&&i.push(~~(255*n)),"#"+e.map(i,function(e){return e=(e||0).toString(16),1===e.length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),c.fn.parse.prototype=c.fn,u.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,i,n=e[0]/255,s=e[1]/255,o=e[2]/255,r=e[3],a=Math.max(n,s,o),l=Math.min(n,s,o),c=a-l,u=a+l,d=.5*u;return t=l===a?0:n===a?60*(s-o)/c+360:s===a?60*(o-n)/c+120:60*(n-s)/c+240,i=0===c?0:.5>=d?c/u:c/(2-u),[Math.round(t)%360,i,d,null==r?1:r]},u.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,i=e[1],n=e[2],o=e[3],r=.5>=n?n*(1+i):n+i-n*i,a=2*n-r;return[Math.round(255*s(a,r,t+1/3)),Math.round(255*s(a,r,t)),Math.round(255*s(a,r,t-1/3)),o]},f(u,function(n,s){var o=s.props,r=s.cache,l=s.to,u=s.from;c.fn[n]=function(n){if(l&&!this[r]&&(this[r]=l(this._rgba)),n===t)return this[r].slice();var s,a=e.type(n),d="array"===a||"object"===a?n:arguments,h=this[r].slice();return f(o,function(e,t){var n=d["object"===a?e:t.idx];null==n&&(n=h[t.idx]),h[t.idx]=i(n,t)}),u?(s=c(u(h)),s[r]=h,s):c(h)},f(o,function(t,i){c.fn[t]||(c.fn[t]=function(s){var o,r=e.type(s),l="alpha"===t?this._hsla?"hsla":"rgba":n,c=this[l](),u=c[i.idx];return"undefined"===r?u:("function"===r&&(s=s.call(this,u),r=e.type(s)),null==s&&i.empty?this:("string"===r&&(o=a.exec(s),o&&(s=u+parseFloat(o[2])*("+"===o[1]?1:-1))),c[i.idx]=s,this[l](c)))})})}),c.hook=function(t){var i=t.split(" ");f(i,function(t,i){e.cssHooks[i]={set:function(t,s){var o,r,a="";if("transparent"!==s&&("string"!==e.type(s)||(o=n(s)))){if(s=c(o||s),!h.rgba&&1!==s._rgba[3]){for(r="backgroundColor"===i?t.parentNode:t;(""===a||"transparent"===a)&&r&&r.style;)try{a=e.css(r,"backgroundColor"),r=r.parentNode}catch(l){}s=s.blend(a&&"transparent"!==a?a:"_default")}s=s.toRgbaString()}try{t.style[i]=s}catch(l){}}},e.fx.step[i]=function(t){t.colorInit||(t.start=c(t.elem,i),t.end=c(t.end),t.colorInit=!0),e.cssHooks[i].set(t.elem,t.start.transition(t.end,t.pos))}})},c.hook(r),e.cssHooks.borderColor={expand:function(e){var t={};return f(["Top","Right","Bottom","Left"],function(i,n){t["border"+n+"Color"]=e}),t}},o=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(t),function(){function n(t){var i,n,s=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,o={};if(s&&s.length&&s[0]&&s[s[0]])for(n=s.length;n--;)i=s[n],"string"==typeof s[i]&&(o[e.camelCase(i)]=s[i]);else for(i in s)"string"==typeof s[i]&&(o[i]=s[i]);return o}function s(t,i){var n,s,o={};for(n in i)s=i[n],t[n]!==s&&(r[n]||(e.fx.step[n]||!isNaN(parseFloat(s)))&&(o[n]=s));return o}var o=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(i,n){e.fx.step[n]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(t.style(e.elem,n,e.end),e.setAttr=!0)}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(t,i,r,a){var l=e.speed(i,r,a);return this.queue(function(){var i,r=e(this),a=r.attr("class")||"",c=l.children?r.find("*").addBack():r;c=c.map(function(){var t=e(this);return{el:t,start:n(this)}}),i=function(){e.each(o,function(e,i){t[i]&&r[i+"Class"](t[i])})},i(),c=c.map(function(){return this.end=n(this.el[0]),this.diff=s(this.start,this.end),this}),r.attr("class",a),c=c.map(function(){var t=this,i=e.Deferred(),n=e.extend({},l,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,n),i.promise()}),e.when.apply(e,c.get()).done(function(){i(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),l.complete.call(r[0])})})},e.fn.extend({addClass:function(t){return function(i,n,s,o){return n?e.effects.animateClass.call(this,{add:i},n,s,o):t.apply(this,arguments)}}(e.fn.addClass),removeClass:function(t){return function(i,n,s,o){return arguments.length>1?e.effects.animateClass.call(this,{remove:i},n,s,o):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(n,s,o,r,a){return"boolean"==typeof s||s===i?o?e.effects.animateClass.call(this,s?{add:n}:{remove:n},o,r,a):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:n},s,o,r)}}(e.fn.toggleClass),switchClass:function(t,i,n,s,o){return e.effects.animateClass.call(this,{add:i,remove:t},n,s,o)}})}(),function(){function t(t,i,n,s){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),e.isFunction(i)&&(s=i,n=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(s=n,n=i,i={}),e.isFunction(n)&&(s=n,n=null),i&&e.extend(t,i),n=n||i.duration,t.duration=e.fx.off?0:"number"==typeof n?n:n in e.fx.speeds?e.fx.speeds[n]:e.fx.speeds._default,t.complete=s||i.complete,t}function s(t){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}e.extend(e.effects,{version:"@VERSION",save:function(e,t){for(var i=0;i<t.length;i++)null!==t[i]&&e.data(n+t[i],e[0].style[t[i]])},restore:function(e,t){var s,o;for(o=0;o<t.length;o++)null!==t[o]&&(s=e.data(n+t[o]),s===i&&(s=""),e.css(t[o],s))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var i,n;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=e[1]/t.width}return{x:n,y:i}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},n=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),s={width:t.width(),height:t.height()},o=document.activeElement;try{o.id}catch(r){o=document.body}return t.wrap(n),(t[0]===o||e.contains(t[0],o))&&e(o).focus(),n=t.parent(),"static"===t.css("position")?(n.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,n){i[n]=t.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(s),n.css(i).show()},removeWrapper:function(t){var i=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).focus()),t},setTransition:function(t,i,n,s){return s=s||{},e.each(i,function(e,i){var o=t.cssUnit(i);o[0]>0&&(s[i]=o[0]*n+o[1])}),s}}),e.fn.extend({effect:function(){function i(t){function i(){e.isFunction(o)&&o.call(s[0]),e.isFunction(t)&&t()}var s=e(this),o=n.complete,a=n.mode;(s.is(":hidden")?"hide"===a:"show"===a)?(s[a](),i()):r.call(s[0],n,i)}var n=t.apply(this,arguments),s=n.mode,o=n.queue,r=e.effects.effect[n.effect];return e.fx.off||!r?s?this[s](n.duration,n.complete):this.each(function(){n.complete&&n.complete.call(this)}):o===!1?this.each(i):this.queue(o||"fx",i)},show:function(e){return function(i){if(s(i))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="show",this.effect.call(this,n)}}(e.fn.show),hide:function(e){return function(i){if(s(i))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(e.fn.hide),toggle:function(e){return function(i){if(s(i)||"boolean"==typeof i)return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(e.fn.toggle),cssUnit:function(t){var i=this.css(t),n=[];return e.each(["em","px","%","pt"],function(e,t){i.indexOf(t)>0&&(n=[parseFloat(i),t])}),n}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,i){t[i]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;e<((t=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,i){e.easing["easeIn"+t]=i,e.easing["easeOut"+t]=function(e){return 1-i(1-e)},e.easing["easeInOut"+t]=function(e){return.5>e?i(2*e)/2:1-i(-2*e+2)/2}})}()}(t),function(e){var t=0,i={},n={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",n.height=n.paddingTop=n.paddingBottom=n.borderTopWidth=n.borderBottomWidth="show",e.widget("ui.accordion",{version:"@VERSION",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e(),content:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?void this._activate(t):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),void("disabled"===e&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t)))},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,n=this.headers.length,s=this.headers.index(t.target),o=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(s+1)%n];break;case i.LEFT:case i.UP:o=this.headers[(s-1+n)%n];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[n-1]}o&&(e(t.target).attr("tabIndex",-1),e(o).attr("tabIndex",0),o.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,n=this.options,s=n.heightStyle,o=this.element.parent(),r=this.accordionId="ui-accordion-"+(this.element.attr("id")||++t);this.active=this._findActive(n.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(t){var i=e(this),n=i.attr("id"),s=i.next(),o=s.attr("id");n||(n=r+"-header-"+t,i.attr("id",n)),o||(o=r+"-panel-"+t,s.attr("id",o)),i.attr("aria-controls",o),s.attr("aria-labelledby",n)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(n.event),"fill"===s?(i=o.height(),this.element.siblings(":visible").each(function(){var t=e(this),n=t.css("position");"absolute"!==n&&"fixed"!==n&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===s&&(i=0,this.headers.next().each(function(){i=Math.max(i,e(this).css("height","").height())}).height(i))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,n=this.active,s=e(t.currentTarget),o=s[0]===n[0],r=o&&i.collapsible,a=r?e():s.next(),l=n.next(),c={oldHeader:n,oldPanel:l,newHeader:r?e():s,newPanel:a};t.preventDefault(),o&&!i.collapsible||this._trigger("beforeActivate",t,c)===!1||(i.active=r?!1:this.headers.index(s),this.active=o?e():s,this._toggle(c),n.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),o||(s.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),s.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,n=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=n,this.options.animate?this._animate(i,n,t):(n.hide(),i.show(),this._toggleComplete(t)),n.attr({"aria-hidden":"true"}),n.prev().attr("aria-selected","false"),i.length&&n.length?n.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true",tabIndex:0,"aria-expanded":"true"})},_animate:function(e,t,s){var o,r,a,l=this,c=0,u=e.length&&(!t.length||e.index()<t.index()),d=this.options.animate||{},h=u&&d.down||d,p=function(){l._toggleComplete(s)};return"number"==typeof h&&(a=h),"string"==typeof h&&(r=h),r=r||h.easing||d.easing,a=a||h.duration||d.duration,t.length?e.length?(o=e.show().outerHeight(),t.animate(i,{duration:a,easing:r,step:function(e,t){t.now=Math.round(e)}}),void e.hide().animate(n,{duration:a,easing:r,complete:p,step:function(e,i){i.now=Math.round(e),"height"!==i.prop?c+=i.now:"content"!==l.options.heightStyle&&(i.now=Math.round(o-t.outerHeight()-c),c=0)}})):t.animate(i,a,r,p):e.animate(n,a,r,p)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}})}(t),function(e){e.widget("ui.autocomplete",{version:"@VERSION",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,n,s=this.element[0].nodeName.toLowerCase(),o="textarea"===s,r="input"===s;this.isMultiLine=o?!0:r?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[o||r?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(s){if(this.element.prop("readOnly"))return t=!0,n=!0,void(i=!0);t=!1,n=!1,i=!1;var o=e.ui.keyCode;switch(s.keyCode){case o.PAGE_UP:t=!0,this._move("previousPage",s);break;case o.PAGE_DOWN:t=!0,this._move("nextPage",s);break;case o.UP:t=!0,this._keyEvent("previous",s);break;case o.DOWN:t=!0,this._keyEvent("next",s);break;case o.ENTER:case o.NUMPAD_ENTER:this.menu.active&&(t=!0,s.preventDefault(),this.menu.select(s));break;case o.TAB:this.menu.active&&this.menu.select(s);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(s),s.preventDefault());break;default:i=!0,this._searchTimeout(s)}},keypress:function(n){if(t)return t=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&n.preventDefault());if(!i){var s=e.ui.keyCode;switch(n.keyCode){case s.PAGE_UP:this._move("previousPage",n);break;case s.PAGE_DOWN:this._move("nextPage",n);break;case s.UP:this._keyEvent("previous",n);break;case s.DOWN:this._keyEvent("next",n)}}},input:function(e){return n?(n=!1,void e.preventDefault()):void this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(e),void this._change(e))}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(n){n.target===t.element[0]||n.target===i||e.contains(i,n.target)||t.close()})})},menufocus:function(t,i){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)});var n=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",t,{item:n})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(n.value):this.liveRegion.text(n.value)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,n=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,n){n(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,s){n.xhr&&n.xhr.abort(),n.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){s(e)},error:function(){s([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var n=this;e.each(i,function(e,i){n._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").append(e("<a>").text(i.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this._value(this.term),void this.menu.blur()):void this.menu[e](t):void this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var n=new RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return n.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.text(t))}})}(t),function(e){var t,i="ui-button ui-widget ui-state-default ui-corner-all",n="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",s=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},o=function(t){var i=t.name,n=t.form,s=e([]);return i&&(i=i.replace(/'/g,"\\'"),s=n?e(n).find("[name='"+i+"']"):e("[name='"+i+"']",t.ownerDocument).filter(function(){return!this.form})),s};e.widget("ui.button",{version:"@VERSION",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,s),"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");
  var n=this,r=this.options,a="checkbox"===this.type||"radio"===this.type,l=a?"":"ui-state-active";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(){r.disabled||this===t&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||e(this).removeClass(l)}).bind("click"+this.eventNamespace,function(e){r.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),a&&this.element.bind("change"+this.eventNamespace,function(){n.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return r.disabled?!1:void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled)return!1;e(this).addClass("ui-state-active"),n.buttonElement.attr("aria-pressed","true");var t=n.element[0];o(t).not(t).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return r.disabled?!1:(e(this).addClass("ui-state-active"),t=this,void n.document.one("mouseup",function(){t=null}))}).bind("mouseup"+this.eventNamespace,function(){return r.disabled?!1:void e(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(t){return r.disabled?!1:void((t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",r.disabled),this._resetButton()},_determineButtonType:function(){var e,t,i;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},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(i+" ui-state-active "+n).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){return this._super(e,t),"disabled"===e?(this.element.prop("disabled",!!t),void(t&&this.buttonElement.removeClass("ui-state-focus"))):void this._resetButton()},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?o(this.element[0]).each(function(){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")}):"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"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var t=this.buttonElement.removeClass(n),i=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),s=this.options.icons,o=s.primary&&s.secondary,r=[];s.primary||s.secondary?(this.options.text&&r.push("ui-button-text-icon"+(o?"s":s.primary?"-primary":"-secondary")),s.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(r.push(o?"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(" "))}}),e.widget("ui.buttonset",{version:"@VERSION",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){"disabled"===e&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return e(this).button("widget")[0]}).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()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(t),function(e,t){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div-1-10-4",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[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.dpDiv=n(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){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")}).delegate(i,"mouseover",function(){e.datepicker._isDisabledDatepicker(o.inline?t.parent()[0]:o.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"))})}function s(t,i){e.extend(t,i);for(var n in i)null==i[n]&&(t[n]=i[n]);return t}e.extend(e.ui,{datepicker:{version:"@VERSION"}});var o,r="datepicker";e.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return s(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var n,s,o;n=t.nodeName.toLowerCase(),s="div"===n||"span"===n,t.id||(this.uuid+=1,t.id="dp"+this.uuid),o=this._newInst(e(t),s),o.settings=e.extend({},i||{}),"input"===n?this._connectDatepicker(t,o):s&&this._inlineDatepicker(t,o)},_newInst:function(t,i){var s=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,i){var n=e(t);i.append=e([]),i.trigger=e([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.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))},_attachments:function(t,i){var n,s,o,r=this._get(i,"appendText"),a=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=e("<span class='"+this._appendClass+"'>"+r+"</span>"),t[a?"before":"after"](i.append)),t.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),n=this._get(i,"showOn"),("focus"===n||"both"===n)&&t.focus(this._showDatepicker),("button"===n||"both"===n)&&(s=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=e(this._get(i,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:o,alt:s,title:s}):e("<button type='button'></button>").addClass(this._triggerClass).html(o?e("<img/>").attr({src:o,alt:s,title:s}):s)),t[a?"before":"after"](i.trigger),i.trigger.click(function(){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}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,n,s,o=new Date(2009,11,20),r=this._get(e,"dateFormat");r.match(/[DM]/)&&(t=function(e){for(i=0,n=0,s=0;s<e.length;s++)e[s].length>i&&(i=e[s].length,n=s);return n},o.setMonth(t(this._get(e,r.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(t(this._get(e,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),e.input.attr("size",this._formatDate(e,o).length)}},_inlineDatepicker:function(t,i){var n=e(t);n.hasClass(this.markerClassName)||(n.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"))},_dialogDatepicker:function(t,i,n,o,a){var l,c,u,d,h,p=this._dialogInst;return p||(this.uuid+=1,l="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+l+"' 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)),s(p.settings,o||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(c=document.documentElement.clientWidth,u=document.documentElement.clientHeight,d=document.documentElement.scrollLeft||document.body.scrollLeft,h=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[c/2-100+d,u/2-150+h]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=n,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},_destroyDatepicker:function(t){var i,n=e(t),s=e.data(t,r);n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,r),"input"===i?(s.append.remove(),s.trigger.remove(),n.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&n.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var i,n,s=e(t),o=e.data(t,r);s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(n=s.children("."+this._inlineClass),n.children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,n,s=e(t),o=e.data(t,r);s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(n=s.children("."+this._inlineClass),n.children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,r)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,n,o){var r,a,l,c,u=this._getInst(i);return 2===arguments.length&&"string"==typeof n?"defaults"===n?e.extend({},e.datepicker._defaults):u?"all"===n?e.extend({},u.settings):this._get(u,n):null:(r=n||{},"string"==typeof n&&(r={},r[n]=o),void(u&&(this._curInst===u&&this._hideDatepicker(),a=this._getDateDatepicker(i,!0),l=this._getMinMaxDate(u,"min"),c=this._getMinMaxDate(u,"max"),s(u.settings,r),null!==l&&r.dateFormat!==t&&r.minDate===t&&(u.settings.minDate=this._formatDate(u,l)),null!==c&&r.dateFormat!==t&&r.maxDate===t&&(u.settings.maxDate=this._formatDate(u,c)),"disabled"in r&&(r.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(e(i),u),this._autoSize(u),this._setDate(u,a),this._updateAlternate(u),this._updateDatepicker(u))))},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,n,s,o=e.datepicker._getInst(t.target),r=!0,a=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),r=!1;break;case 13:return s=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",o.dpDiv),s[0]&&e.datepicker._selectDay(t.target,o.selectedMonth,o.selectedYear,s[0]),i=e.datepicker._get(o,"onSelect"),i?(n=e.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[n,o])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(o,"stepBigMonths"):-e.datepicker._get(o,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(o,"stepBigMonths"):+e.datepicker._get(o,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),r=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),r=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,a?1:-1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(o,"stepBigMonths"):-e.datepicker._get(o,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),r=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,a?-1:1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(o,"stepBigMonths"):+e.datepicker._get(o,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),r=t.ctrlKey||t.metaKey;break;default:r=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):r=!1;r&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,n,s=e.datepicker._getInst(t.target);return e.datepicker._get(s,"constrainInput")?(i=e.datepicker._possibleChars(e.datepicker._get(s,"dateFormat")),n=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||" ">n||!i||i.indexOf(n)>-1):void 0},_doKeyUp:function(t){var i,n=e.datepicker._getInst(t.target);if(n.input.val()!==n.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(n,"dateFormat"),n.input?n.input.val():null,e.datepicker._getFormatConfig(n)),i&&(e.datepicker._setDateFromField(n),e.datepicker._updateAlternate(n),e.datepicker._updateDatepicker(n))}catch(s){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,n,o,r,a,l,c;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])),n=e.datepicker._get(i,"beforeShow"),o=n?n.apply(t,[t,i]):{},o!==!1&&(s(i.settings,o),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(){return r|="fixed"===e(this).css("position"),!r}),a={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),a=e.datepicker._checkOffset(i,a,r),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":r?"fixed":"absolute",display:"none",left:a.left+"px",top:a.top+"px"}),i.inline||(l=e.datepicker._get(i,"showAnim"),c=e.datepicker._get(i,"duration"),i.dpDiv.zIndex(e(t).zIndex()+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[l]?i.dpDiv.show(l,e.datepicker._get(i,"showOptions"),c):i.dpDiv[l||"show"](l?c:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,o=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t),t.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,n=this._getNumberOfMonths(t),s=n[1],r=17;t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),s>1&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",r*s+"em"),t.dpDiv[(1!==n[0]||1!==n[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(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,n){var s=t.dpDiv.outerWidth(),o=t.dpDiv.outerHeight(),r=t.input?t.input.outerWidth():0,a=t.input?t.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:e(document).scrollLeft()),c=document.documentElement.clientHeight+(n?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?s-r:0,i.left-=n&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=n&&i.top===t.input.offset().top+a?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+s>l&&l>s?Math.abs(i.left+s-l):0),i.top-=Math.min(i.top,i.top+o>c&&c>o?Math.abs(o+a):0),i},_findPos:function(t){for(var i,n=this._getInst(t),s=this._get(n,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[s?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,n,s,o,a=this._curInst;!a||t&&a!==e.data(t,r)||this._datepickerShowing&&(i=this._get(a,"showAnim"),n=this._get(a,"duration"),s=function(){e.datepicker._tidyDialog(a)},e.effects&&(e.effects.effect[i]||e.effects[i])?a.dpDiv.hide(i,e.datepicker._get(a,"showOptions"),n,s):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,s),i||s(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),n=e.datepicker._getInst(i[0]);(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!==n)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,n){var s=e(t),o=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(o,i+("M"===n?this._get(o,"showCurrentAtPos"):0),n),this._updateDatepicker(o))},_gotoToday:function(t){var i,n=e(t),s=this._getInst(n[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(i=new Date,s.selectedDay=i.getDate(),s.drawMonth=s.selectedMonth=i.getMonth(),s.drawYear=s.selectedYear=i.getFullYear()),this._notifyChange(s),this._adjustDate(n)},_selectMonthYear:function(t,i,n){var s=e(t),o=this._getInst(s[0]);o["selected"+("M"===n?"Month":"Year")]=o["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(s)},_selectDay:function(t,i,n,s){var o,r=e(t);e(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(o=this._getInst(r[0]),o.selectedDay=o.currentDay=e("a",s).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=n,this._selectDate(t,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var n,s=e(t),o=this._getInst(s[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),n=this._get(o,"onSelect"),n?n.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,n,s,o=this._get(t,"altField");o&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),n=this._getDate(t),s=this.formatDate(i,n,this._getFormatConfig(t)),e(o).each(function(){e(this).val(s)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());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},parseDate:function(t,i,n){if(null==t||null==i)throw"Invalid arguments";if(i="object"==typeof i?i.toString():i+"",""===i)return null;var s,o,r,a,l=0,c=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),d=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,h=(n?n.dayNames:null)||this._defaults.dayNames,p=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,f=(n?n.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,_=-1,y=!1,b=function(e){var i=s+1<t.length&&t.charAt(s+1)===e;return i&&s++,i},T=function(e){var t=b(e),n="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,s=new RegExp("^\\d{1,"+n+"}"),o=i.substring(l).match(s);if(!o)throw"Missing number at position "+l;return l+=o[0].length,parseInt(o[0],10)},w=function(t,n,s){var o=-1,r=e.map(b(t)?s:n,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(r,function(e,t){var n=t[1];return i.substr(l,n.length).toLowerCase()===n.toLowerCase()?(o=t[0],l+=n.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+l},E=function(){if(i.charAt(l)!==t.charAt(s))throw"Unexpected literal at position "+l;l++};for(s=0;s<t.length;s++)if(y)"'"!==t.charAt(s)||b("'")?E():y=!1;else switch(t.charAt(s)){case"d":v=T("d");break;case"D":w("D",d,h);break;case"o":_=T("o");break;case"m":g=T("m");break;case"M":g=w("M",p,f);break;case"y":m=T("y");break;case"@":a=new Date(T("@")),m=a.getFullYear(),g=a.getMonth()+1,v=a.getDate();break;case"!":a=new Date((T("!")-this._ticksTo1970)/1e4),m=a.getFullYear(),g=a.getMonth()+1,v=a.getDate();break;case"'":b("'")?E():y=!0;break;default:E()}if(l<i.length&&(r=i.substr(l),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=m?0:-100)),_>-1)for(g=1,v=_;;){if(o=this._getDaysInMonth(m,g-1),o>=v)break;g++,v-=o}if(a=this._daylightSavingAdjust(new Date(m,g-1,v)),a.getFullYear()!==m||a.getMonth()+1!==g||a.getDate()!==v)throw"Invalid date";return a},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(e,t,i){if(!t)return"";var n,s=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,l=function(t){var i=n+1<e.length&&e.charAt(n+1)===t;return i&&n++,i},c=function(e,t,i){var n=""+t;if(l(e))for(;n.length<i;)n="0"+n;return n},u=function(e,t,i,n){return l(e)?n[t]:i[t]},d="",h=!1;if(t)for(n=0;n<e.length;n++)if(h)"'"!==e.charAt(n)||l("'")?d+=e.charAt(n):h=!1;else switch(e.charAt(n)){case"d":d+=c("d",t.getDate(),2);break;case"D":d+=u("D",t.getDay(),s,o);break;case"o":d+=c("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":d+=c("m",t.getMonth()+1,2);break;case"M":d+=u("M",t.getMonth(),r,a);break;case"y":d+=l("y")?t.getFullYear():(t.getYear()%100<10?"0":"")+t.getYear()%100;break;case"@":d+=t.getTime();break;case"!":d+=1e4*t.getTime()+this._ticksTo1970;break;case"'":l("'")?d+="'":h=!0;break;default:d+=e.charAt(n)}return d},_possibleChars:function(e){var t,i="",n=!1,s=function(i){var n=t+1<e.length&&e.charAt(t+1)===i;return n&&t++,n};for(t=0;t<e.length;t++)if(n)"'"!==e.charAt(t)||s("'")?i+=e.charAt(t):n=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":s("'")?i+="'":n=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,i){return e.settings[i]!==t?e.settings[i]:this._defaults[i]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),n=e.lastVal=e.input?e.input.val():null,s=this._getDefaultDate(e),o=s,r=this._getFormatConfig(e);try{o=this.parseDate(i,n,r)||s}catch(a){n=t?"":n}e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),e.currentDay=n?o.getDate():0,e.currentMonth=n?o.getMonth():0,e.currentYear=n?o.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,n){var s=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},o=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(n){}for(var s=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,o=s.getFullYear(),r=s.getMonth(),a=s.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,c=l.exec(i);c;){switch(c[2]||"d"){case"d":case"D":a+=parseInt(c[1],10);break;case"w":case"W":a+=7*parseInt(c[1],10);break;case"m":case"M":r+=parseInt(c[1],10),a=Math.min(a,e.datepicker._getDaysInMonth(o,r));break;case"y":case"Y":o+=parseInt(c[1],10),a=Math.min(a,e.datepicker._getDaysInMonth(o,r))}c=l.exec(i)}return new Date(o,r,a)},r=null==i||""===i?n:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?n:s(i):new Date(i.getTime());return r=r&&"Invalid Date"===r.toString()?n:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var n=!t,s=e.selectedMonth,o=e.selectedYear,r=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=r.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=r.getMonth(),e.drawYear=e.selectedYear=e.currentYear=r.getFullYear(),s===e.selectedMonth&&o===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(n?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),n="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(n,-i,"M")},next:function(){e.datepicker._adjustDate(n,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(n)},selectDay:function(){return e.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(n,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,n,s,o,r,a,l,c,u,d,h,p,f,m,g,v,_,y,b,T,w,E,S,M,x,I,C,D,N,k,O,A,L,P,R,j,H,z,F=new Date,$=this._daylightSavingAdjust(new Date(F.getFullYear(),F.getMonth(),F.getDate())),B=this._get(e,"isRTL"),U=this._get(e,"showButtonPanel"),W=this._get(e,"hideIfNoPrevNext"),V=this._get(e,"navigationAsDateFormat"),K=this._getNumberOfMonths(e),Y=this._get(e,"showCurrentAtPos"),q=this._get(e,"stepMonths"),X=1!==K[0]||1!==K[1],G=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(e,"min"),J=this._getMinMaxDate(e,"max"),Z=e.drawMonth-Y,et=e.drawYear;
  if(0>Z&&(Z+=12,et--),J)for(t=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-K[0]*K[1]+1,J.getDate())),t=Q&&Q>t?Q:t;this._daylightSavingAdjust(new Date(et,Z,1))>t;)Z--,0>Z&&(Z=11,et--);for(e.drawMonth=Z,e.drawYear=et,i=this._get(e,"prevText"),i=V?this.formatDate(i,this._daylightSavingAdjust(new Date(et,Z-q,1)),this._getFormatConfig(e)):i,n=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-"+(B?"e":"w")+"'>"+i+"</span></a>":W?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+i+"</span></a>",s=this._get(e,"nextText"),s=V?this.formatDate(s,this._daylightSavingAdjust(new Date(et,Z+q,1)),this._getFormatConfig(e)):s,o=this._canAdjustMonth(e,1,et,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+s+"</span></a>":W?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+s+"</span></a>",r=this._get(e,"currentText"),a=this._get(e,"gotoCurrent")&&e.currentDay?G:$,r=V?this.formatDate(r,a,this._getFormatConfig(e)):r,l=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>",c=U?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(B?l:"")+(this._isInRange(e,a)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+(B?"":l)+"</div>":"",u=parseInt(this._get(e,"firstDay"),10),u=isNaN(u)?0:u,d=this._get(e,"showWeek"),h=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),f=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),g=this._get(e,"beforeShowDay"),v=this._get(e,"showOtherMonths"),_=this._get(e,"selectOtherMonths"),y=this._getDefaultDate(e),b="",w=0;w<K[0];w++){for(E="",this.maxRows=4,S=0;S<K[1];S++){if(M=this._daylightSavingAdjust(new Date(et,Z,e.selectedDay)),x=" ui-corner-all",I="",X){if(I+="<div class='ui-datepicker-group",K[1]>1)switch(S){case 0:I+=" ui-datepicker-group-first",x=" ui-corner-"+(B?"right":"left");break;case K[1]-1:I+=" ui-datepicker-group-last",x=" ui-corner-"+(B?"left":"right");break;default:I+=" ui-datepicker-group-middle",x=""}I+="'>"}for(I+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+x+"'>"+(/all|left/.test(x)&&0===w?B?o:n:"")+(/all|right/.test(x)&&0===w?B?n:o:"")+this._generateMonthYearHeader(e,Z,et,Q,J,w>0||S>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead><tr>",C=d?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",T=0;7>T;T++)D=(T+u)%7,C+="<th"+((T+u+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+h[D]+"'>"+p[D]+"</span></th>";for(I+=C+"</tr></thead><tbody>",N=this._getDaysInMonth(et,Z),et===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,N)),k=(this._getFirstDayOfMonth(et,Z)-u+7)%7,O=Math.ceil((k+N)/7),A=X&&this.maxRows>O?this.maxRows:O,this.maxRows=A,L=this._daylightSavingAdjust(new Date(et,Z,1-k)),P=0;A>P;P++){for(I+="<tr>",R=d?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(L)+"</td>":"",T=0;7>T;T++)j=g?g.apply(e.input?e.input[0]:null,[L]):[!0,""],H=L.getMonth()!==Z,z=H&&!_||!j[0]||Q&&Q>L||J&&L>J,R+="<td class='"+((T+u+6)%7>=5?" ui-datepicker-week-end":"")+(H?" ui-datepicker-other-month":"")+(L.getTime()===M.getTime()&&Z===e.selectedMonth&&e._keyEvent||y.getTime()===L.getTime()&&y.getTime()===M.getTime()?" "+this._dayOverClass:"")+(z?" "+this._unselectableClass+" ui-state-disabled":"")+(H&&!v?"":" "+j[1]+(L.getTime()===G.getTime()?" "+this._currentClass:"")+(L.getTime()===$.getTime()?" ui-datepicker-today":""))+"'"+(H&&!v||!j[2]?"":" title='"+j[2].replace(/'/g,"&#39;")+"'")+(z?"":" data-handler='selectDay' data-event='click' data-month='"+L.getMonth()+"' data-year='"+L.getFullYear()+"'")+">"+(H&&!v?"&#xa0;":z?"<span class='ui-state-default'>"+L.getDate()+"</span>":"<a class='ui-state-default"+(L.getTime()===$.getTime()?" ui-state-highlight":"")+(L.getTime()===G.getTime()?" ui-state-active":"")+(H?" ui-priority-secondary":"")+"' href='#'>"+L.getDate()+"</a>")+"</td>",L.setDate(L.getDate()+1),L=this._daylightSavingAdjust(L);I+=R+"</tr>"}Z++,Z>11&&(Z=0,et++),I+="</tbody></table>"+(X?"</div>"+(K[0]>0&&S===K[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),E+=I}b+=E}return b+=c,e._keyEvent=!1,b},_generateMonthYearHeader:function(e,t,i,n,s,o,r,a){var l,c,u,d,h,p,f,m,g=this._get(e,"changeMonth"),v=this._get(e,"changeYear"),_=this._get(e,"showMonthAfterYear"),y="<div class='ui-datepicker-title'>",b="";if(o||!g)b+="<span class='ui-datepicker-month'>"+r[t]+"</span>";else{for(l=n&&n.getFullYear()===i,c=s&&s.getFullYear()===i,b+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",u=0;12>u;u++)(!l||u>=n.getMonth())&&(!c||u<=s.getMonth())&&(b+="<option value='"+u+"'"+(u===t?" selected='selected'":"")+">"+a[u]+"</option>");b+="</select>"}if(_||(y+=b+(!o&&g&&v?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",o||!v)y+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(d=this._get(e,"yearRange").split(":"),h=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?h+parseInt(e,10):parseInt(e,10);return isNaN(t)?h:t},f=p(d[0]),m=Math.max(f,p(d[1]||"")),f=n?Math.max(f,n.getFullYear()):f,m=s?Math.min(m,s.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=f;f++)e.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";e.yearshtml+="</select>",y+=e.yearshtml,e.yearshtml=null}return y+=this._get(e,"yearSuffix"),_&&(y+=(!o&&g&&v?"":"&#xa0;")+b),y+="</div>"},_adjustInstDate:function(e,t,i){var n=e.drawYear+("Y"===i?t:0),s=e.drawMonth+("M"===i?t:0),o=Math.min(e.selectedDay,this._getDaysInMonth(n,s))+("D"===i?t:0),r=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(n,s,o)));e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),n=this._getMinMaxDate(e,"max"),s=i&&i>t?i:t;return n&&s>n?n:s},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,n){var s=this._getNumberOfMonths(e),o=this._daylightSavingAdjust(new Date(i,n+(0>t?t:s[0]*s[1]),1));return 0>t&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(e,o)},_isInRange:function(e,t){var i,n,s=this._getMinMaxDate(e,"min"),o=this._getMinMaxDate(e,"max"),r=null,a=null,l=this._get(e,"yearRange");return l&&(i=l.split(":"),n=(new Date).getFullYear(),r=parseInt(i[0],10),a=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=n),i[1].match(/[+\-].*/)&&(a+=n)),(!s||t.getTime()>=s.getTime())&&(!o||t.getTime()<=o.getTime())&&(!r||t.getFullYear()>=r)&&(!a||t.getFullYear()<=a)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,n){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var s=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(n,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),s,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e("<div class='visualizejs'></div>").append(e.datepicker.dpDiv));var i=Array.prototype.slice.call(arguments,1);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(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new i,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="@VERSION"}(t),function(e){var t={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};e.widget("ui.dialog",{version:"@VERSION",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},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},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;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)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var i,n=this;if(this._isOpen&&this._trigger("beforeClose",t)!==!1){if(this._isOpen=!1,this._destroyOverlay(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement,i&&"body"!==i.nodeName.toLowerCase()&&e(i).blur()}catch(s){}this._hide(this.uiDialog,this.options.hide,function(){n._trigger("close",t)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,t){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!t&&this._trigger("focus",e),i},open:function(){var t=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(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(){t._focusTabbable(),t._trigger("focus")}),void this._trigger("open"))},_focusTabbable:function(){var e=this.element.find("[autofocus]");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()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=e("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),void this.close(t);if(t.keyCode===e.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),n=i.filter(":first"),s=i.filter(":last");t.target!==s[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==n[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(s.focus(1),t.preventDefault()):(n.focus(1),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=e("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title||e.html("&#160;"),e.text(this.options.title)},_createButtonPane:function(){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()},_createButtons:function(){var t=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(i)||e.isArray(i)&&!i.length?void this.uiDialog.removeClass("ui-dialog-buttons"):(e.each(i,function(i,n){var s,o;n=e.isFunction(n)?{click:n,text:i}:n,n=e.extend({type:"button"},n),s=n.click,n.click=function(){s.apply(t.element[0],arguments)},o={icons:n.icons,text:n.showText},delete n.icons,delete n.showText,e("<button></button>",n).button(o).appendTo(t.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,n=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,s){e(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",n,t(s))},drag:function(e,n){i._trigger("drag",e,t(n))},stop:function(s,o){n.position=[o.position.left-i.document.scrollLeft(),o.position.top-i.document.scrollTop()],e(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",s,t(o))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var i=this,n=this.options,s=n.resizable,o=this.uiDialog.css("position"),r="string"==typeof s?s:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:this._minHeight(),handles:r,start:function(n,s){e(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",n,t(s))},resize:function(e,n){i._trigger("resize",e,t(n))},stop:function(s,o){n.height=e(this).height(),n.width=e(this).width(),e(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",s,t(o))}}).css("position",o)},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(n){var s=this,o=!1,r={};e.each(n,function(e,n){s._setOption(e,n),e in t&&(o=!0),e in i&&(r[e]=n)}),o&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",r)},_setOption:function(e,t){var i,n,s=this.uiDialog;"dialogClass"===e&&s.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({label:""+t}),"draggable"===e&&(i=s.is(":data(ui-draggable)"),i&&!t&&s.draggable("destroy"),!i&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(n=s.is(":data(ui-resizable)"),n&&!t&&s.resizable("destroy"),n&&"string"==typeof t&&s.resizable("option","handles",t),n||t===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,i,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),n.minWidth>n.width&&(n.width=n.minWidth),e=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),t=Math.max(0,n.minHeight-e),i="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-e):"none","auto"===n.height?this.element.css({minHeight:t,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,n.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return e(t.target).closest(".ui-dialog").length?!0:!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=this,i=this.widgetFullName;e.ui.dialog.overlayInstances||this._delay(function(){e.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(n){t._allowInteraction(n)||(n.preventDefault(),e(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=e("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),e.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(e.ui.dialog.overlayInstances--,e.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),e.ui.dialog.overlayInstances=0,e.uiBackCompat!==!1&&e.widget("ui.dialog",e.ui.dialog,{_position:function(){var t,i=this.options.position,n=[],s=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(n=i.split?i.split(" "):[i[0],i[1]],1===n.length&&(n[1]=n[0]),e.each(["left","top"],function(e,t){+n[e]===n[e]&&(s[e]=n[e],n[e]=t)}),i={my:n[0]+(s[0]<0?s[0]:"+"+s[0])+" "+n[1]+(s[1]<0?s[1]:"+"+s[1]),at:n.join(" ")}),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()}})}(t),function(e){var t=/up|down|vertical/,i=/up|left|vertical|horizontal/;e.effects.effect.blind=function(n,s){var o,r,a,l=e(this),c=["position","top","bottom","left","right","height","width"],u=e.effects.setMode(l,n.mode||"hide"),d=n.direction||"up",h=t.test(d),p=h?"height":"width",f=h?"top":"left",m=i.test(d),g={},v="show"===u;l.parent().is(".ui-effects-wrapper")?e.effects.save(l.parent(),c):e.effects.save(l,c),l.show(),o=e.effects.createWrapper(l).css({overflow:"hidden"}),r=o[p](),a=parseFloat(o.css(f))||0,g[p]=v?r:0,m||(l.css(h?"bottom":"right",0).css(h?"top":"left","auto").css({position:"absolute"}),g[f]=v?a:r+a),v&&(o.css(p,0),m||o.css(f,a+r)),o.animate(g,{duration:n.duration,easing:n.easing,queue:!1,complete:function(){"hide"===u&&l.hide(),e.effects.restore(l,c),e.effects.removeWrapper(l),s()}})}}(t),function(e){e.effects.effect.bounce=function(t,i){var n,s,o,r=e(this),a=["position","top","bottom","left","right","height","width"],l=e.effects.setMode(r,t.mode||"effect"),c="hide"===l,u="show"===l,d=t.direction||"up",h=t.distance,p=t.times||5,f=2*p+(u||c?1:0),m=t.duration/f,g=t.easing,v="up"===d||"down"===d?"top":"left",_="up"===d||"left"===d,y=r.queue(),b=y.length;for((u||c)&&a.push("opacity"),e.effects.save(r,a),r.show(),e.effects.createWrapper(r),h||(h=r["top"===v?"outerHeight":"outerWidth"]()/3),u&&(o={opacity:1},o[v]=0,r.css("opacity",0).css(v,_?2*-h:2*h).animate(o,m,g)),c&&(h/=Math.pow(2,p-1)),o={},o[v]=0,n=0;p>n;n++)s={},s[v]=(_?"-=":"+=")+h,r.animate(s,m,g).animate(o,m,g),h=c?2*h:h/2;c&&(s={opacity:0},s[v]=(_?"-=":"+=")+h,r.animate(s,m,g)),r.queue(function(){c&&r.hide(),e.effects.restore(r,a),e.effects.removeWrapper(r),i()}),b>1&&y.splice.apply(y,[1,0].concat(y.splice(b,f+1))),r.dequeue()}}(t),function(e){e.effects.effect.clip=function(t,i){var n,s,o,r=e(this),a=["position","top","bottom","left","right","height","width"],l=e.effects.setMode(r,t.mode||"hide"),c="show"===l,u=t.direction||"vertical",d="vertical"===u,h=d?"height":"width",p=d?"top":"left",f={};e.effects.save(r,a),r.show(),n=e.effects.createWrapper(r).css({overflow:"hidden"}),s="IMG"===r[0].tagName?n:r,o=s[h](),c&&(s.css(h,0),s.css(p,o/2)),f[h]=c?o:0,f[p]=c?0:o/2,s.animate(f,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){c||r.hide(),e.effects.restore(r,a),e.effects.removeWrapper(r),i()}})}}(t),function(e){e.effects.effect.drop=function(t,i){var n,s=e(this),o=["position","top","bottom","left","right","opacity","height","width"],r=e.effects.setMode(s,t.mode||"hide"),a="show"===r,l=t.direction||"left",c="up"===l||"down"===l?"top":"left",u="up"===l||"left"===l?"pos":"neg",d={opacity:a?1:0};e.effects.save(s,o),s.show(),e.effects.createWrapper(s),n=t.distance||s["top"===c?"outerHeight":"outerWidth"](!0)/2,a&&s.css("opacity",0).css(c,"pos"===u?-n:n),d[c]=(a?"pos"===u?"+=":"-=":"pos"===u?"-=":"+=")+n,s.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===r&&s.hide(),e.effects.restore(s,o),e.effects.removeWrapper(s),i()}})}}(t),function(e){e.effects.effect.explode=function(t,i){function n(){y.push(this),y.length===d*h&&s()}function s(){p.css({visibility:"visible"}),e(y).remove(),m||p.hide(),i()}var o,r,a,l,c,u,d=t.pieces?Math.round(Math.sqrt(t.pieces)):3,h=d,p=e(this),f=e.effects.setMode(p,t.mode||"hide"),m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/h),_=Math.ceil(p.outerHeight()/d),y=[];for(o=0;d>o;o++)for(l=g.top+o*_,u=o-(d-1)/2,r=0;h>r;r++)a=g.left+r*v,c=r-(h-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-r*v,top:-o*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:a+(m?c*v:0),top:l+(m?u*_:0),opacity:m?0:1}).animate({left:a+(m?0:c*v),top:l+(m?0:u*_),opacity:m?1:0},t.duration||500,t.easing,n)}}(t),function(e){e.effects.effect.fade=function(t,i){var n=e(this),s=e.effects.setMode(n,t.mode||"toggle");n.animate({opacity:s},{queue:!1,duration:t.duration,easing:t.easing,complete:i})}}(t),function(e){e.effects.effect.fold=function(t,i){var n,s,o=e(this),r=["position","top","bottom","left","right","height","width"],a=e.effects.setMode(o,t.mode||"hide"),l="show"===a,c="hide"===a,u=t.size||15,d=/([0-9]+)%/.exec(u),h=!!t.horizFirst,p=l!==h,f=p?["width","height"]:["height","width"],m=t.duration/2,g={},v={};e.effects.save(o,r),o.show(),n=e.effects.createWrapper(o).css({overflow:"hidden"}),s=p?[n.width(),n.height()]:[n.height(),n.width()],d&&(u=parseInt(d[1],10)/100*s[c?0:1]),l&&n.css(h?{height:0,width:u}:{height:u,width:0}),g[f[0]]=l?s[0]:u,v[f[1]]=l?s[1]:0,n.animate(g,m,t.easing).animate(v,m,t.easing,function(){c&&o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()})}}(t),function(e){e.effects.effect.highlight=function(t,i){var n=e(this),s=["backgroundImage","backgroundColor","opacity"],o=e.effects.setMode(n,t.mode||"show"),r={backgroundColor:n.css("backgroundColor")};"hide"===o&&(r.opacity=0),e.effects.save(n,s),n.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(r,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&n.hide(),e.effects.restore(n,s),i()}})}}(t),function(e){e.effects.effect.pulsate=function(t,i){var n,s=e(this),o=e.effects.setMode(s,t.mode||"show"),r="show"===o,a="hide"===o,l=r||"hide"===o,c=2*(t.times||5)+(l?1:0),u=t.duration/c,d=0,h=s.queue(),p=h.length;for((r||!s.is(":visible"))&&(s.css("opacity",0).show(),d=1),n=1;c>n;n++)s.animate({opacity:d},u,t.easing),d=1-d;s.animate({opacity:d},u,t.easing),s.queue(function(){a&&s.hide(),i()}),p>1&&h.splice.apply(h,[1,0].concat(h.splice(p,c+1))),s.dequeue()}}(t),function(e){e.effects.effect.puff=function(t,i){var n=e(this),s=e.effects.setMode(n,t.mode||"hide"),o="hide"===s,r=parseInt(t.percent,10)||150,a=r/100,l={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()};e.extend(t,{effect:"scale",queue:!1,fade:!0,mode:s,complete:i,percent:o?r:100,from:o?l:{height:l.height*a,width:l.width*a,outerHeight:l.outerHeight*a,outerWidth:l.outerWidth*a}}),n.effect(t)},e.effects.effect.scale=function(t,i){var n=e(this),s=e.extend(!0,{},t),o=e.effects.setMode(n,t.mode||"effect"),r=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"hide"===o?0:100),a=t.direction||"both",l=t.origin,c={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()},u={y:"horizontal"!==a?r/100:1,x:"vertical"!==a?r/100:1};s.effect="size",s.queue=!1,s.complete=i,"effect"!==o&&(s.origin=l||["middle","center"],s.restore=!0),s.from=t.from||("show"===o?{height:0,width:0,outerHeight:0,outerWidth:0}:c),s.to={height:c.height*u.y,width:c.width*u.x,outerHeight:c.outerHeight*u.y,outerWidth:c.outerWidth*u.x},s.fade&&("show"===o&&(s.from.opacity=0,s.to.opacity=1),"hide"===o&&(s.from.opacity=1,s.to.opacity=0)),n.effect(s)},e.effects.effect.size=function(t,i){var n,s,o,r=e(this),a=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],c=["width","height","overflow"],u=["fontSize"],d=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=e.effects.setMode(r,t.mode||"effect"),f=t.restore||"effect"!==p,m=t.scale||"both",g=t.origin||["middle","center"],v=r.css("position"),_=f?a:l,y={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&r.show(),n={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()},"toggle"===t.mode&&"show"===p?(r.from=t.to||y,r.to=t.from||n):(r.from=t.from||("show"===p?y:n),r.to=t.to||("hide"===p?y:n)),o={from:{y:r.from.height/n.height,x:r.from.width/n.width},to:{y:r.to.height/n.height,x:r.to.width/n.width}},("box"===m||"both"===m)&&(o.from.y!==o.to.y&&(_=_.concat(d),r.from=e.effects.setTransition(r,d,o.from.y,r.from),r.to=e.effects.setTransition(r,d,o.to.y,r.to)),o.from.x!==o.to.x&&(_=_.concat(h),r.from=e.effects.setTransition(r,h,o.from.x,r.from),r.to=e.effects.setTransition(r,h,o.to.x,r.to))),("content"===m||"both"===m)&&o.from.y!==o.to.y&&(_=_.concat(u).concat(c),r.from=e.effects.setTransition(r,u,o.from.y,r.from),r.to=e.effects.setTransition(r,u,o.to.y,r.to)),e.effects.save(r,_),r.show(),e.effects.createWrapper(r),r.css("overflow","hidden").css(r.from),g&&(s=e.effects.getBaseline(g,n),r.from.top=(n.outerHeight-r.outerHeight())*s.y,r.from.left=(n.outerWidth-r.outerWidth())*s.x,r.to.top=(n.outerHeight-r.to.outerHeight)*s.y,r.to.left=(n.outerWidth-r.to.outerWidth)*s.x),r.css(r.from),("content"===m||"both"===m)&&(d=d.concat(["marginTop","marginBottom"]).concat(u),h=h.concat(["marginLeft","marginRight"]),c=a.concat(d).concat(h),r.find("*[width]").each(function(){var i=e(this),n={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&e.effects.save(i,c),i.from={height:n.height*o.from.y,width:n.width*o.from.x,outerHeight:n.outerHeight*o.from.y,outerWidth:n.outerWidth*o.from.x},i.to={height:n.height*o.to.y,width:n.width*o.to.x,outerHeight:n.height*o.to.y,outerWidth:n.width*o.to.x},o.from.y!==o.to.y&&(i.from=e.effects.setTransition(i,d,o.from.y,i.from),i.to=e.effects.setTransition(i,d,o.to.y,i.to)),o.from.x!==o.to.x&&(i.from=e.effects.setTransition(i,h,o.from.x,i.from),i.to=e.effects.setTransition(i,h,o.to.x,i.to)),i.css(i.from),i.animate(i.to,t.duration,t.easing,function(){f&&e.effects.restore(i,c)})})),r.animate(r.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){0===r.to.opacity&&r.css("opacity",r.from.opacity),"hide"===p&&r.hide(),e.effects.restore(r,_),f||("static"===v?r.css({position:"relative",top:r.to.top,left:r.to.left}):e.each(["top","left"],function(e,t){r.css(t,function(t,i){var n=parseInt(i,10),s=e?r.to.left:r.to.top;return"auto"===i?s+"px":n+s+"px"})})),e.effects.removeWrapper(r),i()}})}}(t),function(e){e.effects.effect.shake=function(t,i){var n,s=e(this),o=["position","top","bottom","left","right","height","width"],r=e.effects.setMode(s,t.mode||"effect"),a=t.direction||"left",l=t.distance||20,c=t.times||3,u=2*c+1,d=Math.round(t.duration/u),h="up"===a||"down"===a?"top":"left",p="up"===a||"left"===a,f={},m={},g={},v=s.queue(),_=v.length;for(e.effects.save(s,o),s.show(),e.effects.createWrapper(s),f[h]=(p?"-=":"+=")+l,m[h]=(p?"+=":"-=")+2*l,g[h]=(p?"-=":"+=")+2*l,s.animate(f,d,t.easing),n=1;c>n;n++)s.animate(m,d,t.easing).animate(g,d,t.easing);s.animate(m,d,t.easing).animate(f,d/2,t.easing).queue(function(){"hide"===r&&s.hide(),e.effects.restore(s,o),e.effects.removeWrapper(s),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,u+1))),s.dequeue()}}(t),function(e){e.effects.effect.slide=function(t,i){var n,s=e(this),o=["position","top","bottom","left","right","width","height"],r=e.effects.setMode(s,t.mode||"show"),a="show"===r,l=t.direction||"left",c="up"===l||"down"===l?"top":"left",u="up"===l||"left"===l,d={};e.effects.save(s,o),s.show(),n=t.distance||s["top"===c?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(s).css({overflow:"hidden"}),a&&s.css(c,u?isNaN(n)?"-"+n:-n:n),d[c]=(a?u?"+=":"-=":u?"-=":"+=")+n,s.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===r&&s.hide(),e.effects.restore(s,o),e.effects.removeWrapper(s),i()}})}}(t),function(e){e.effects.effect.transfer=function(t,i){var n=e(this),s=e(t.to),o="fixed"===s.css("position"),r=e("body"),a=o?r.scrollTop():0,l=o?r.scrollLeft():0,c=s.offset(),u={top:c.top-a,left:c.left-l,height:s.innerHeight(),width:s.innerWidth()},d=n.offset(),h=e("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(t.className).css({top:d.top-a,left:d.left-l,height:n.innerHeight(),width:n.innerWidth(),position:o?"fixed":"absolute"}).animate(u,t.duration,t.easing,function(){h.remove(),i()
  })}}(t),function(e){e.widget("ui.menu",{version:"@VERSION",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,e.proxy(function(e){this.options.disabled&&e.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(e){e.preventDefault()},"click .ui-state-disabled > a":function(e){e.preventDefault()},"click .ui-menu-item:has(a)":function(t){var i=e(t.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&e(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var i=e(t.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.children(".ui-menu-item").eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){e(t.target).closest(".ui-menu").length||this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){function i(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var n,s,o,r,a,l=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:l=!1,s=this.previousFilter||"",o=String.fromCharCode(t.keyCode),r=!1,clearTimeout(this.filterTimer),o===s?r=!0:o=s+o,a=new RegExp("^"+i(o),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return a.test(e(this).children("a").text())}),n=r&&-1!==n.index(this.active.next())?this.active.nextAll(".ui-menu-item"):n,n.length||(o=String.fromCharCode(t.keyCode),a=new RegExp("^"+i(o),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return a.test(e(this).children("a").text())})),n.length?(this.focus(t,n),n.length>1?(this.previousFilter=o,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,i=this.options.icons.submenu,n=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),n.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),n=t.prev("a"),s=e("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);n.attr("aria-haspopup","true").prepend(s),t.attr("aria-labelledby",n.attr("id"))}),t=n.add(this.element),t.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),t.children(":not(.ui-menu-item)").each(function(){var t=e(this);/[^\-\u2014\u2013\s]/.test(t.text())||t.addClass("ui-widget-content ui-menu-divider")}),t.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),this._super(e,t)},focus:function(e,t){var i,n;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),n=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,n,s,o,r,a;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,s=t.offset().top-this.activeMenu.offset().top-i-n,o=this.activeMenu.scrollTop(),r=this.activeMenu.height(),a=t.height(),0>s?this.activeMenu.scrollTop(o+s):s+a>r&&this.activeMenu.scrollTop(o+s-r+a))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var n=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(t),this.activeMenu=n},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var n;this.active&&(n="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.children(".ui-menu-item")[t]()),this.focus(i,n)},nextPage:function(t){var i,n,s;return this.active?void(this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-n-s<0}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]()))):void this.next(t)},previousPage:function(t){var i,n,s;return this.active?void(this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-n+s>0}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item").first()))):void this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,i)}})}(t),function(e,t){function i(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?i/100:1)]}function n(t,i){return parseInt(e.css(t,i),10)||0}function s(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var o,r=Math.max,a=Math.abs,l=Math.round,c=/left|center|right/,u=/top|center|bottom/,d=/[\+\-]\d+(\.[\d]+)?%?/,h=/^\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(o!==t)return o;var i,n,s=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),r=s.children()[0];return e("body").append(s),i=r.offsetWidth,s.css("overflow","scroll"),n=r.offsetWidth,i===n&&(n=s[0].clientWidth),s.remove(),o=i-n},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),n=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),s="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,o="scroll"===n||"auto"===n&&t.height<t.element[0].scrollHeight;return{width:o?e.position.scrollbarWidth():0,height:s?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),n=e.isWindow(i[0]),s=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:n,isDocument:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:n?i.width():i.outerWidth(),height:n?i.height():i.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return f.apply(this,arguments);t=e.extend({},t);var o,p,m,g,v,_,y=e(t.of),b=e.position.getWithinInfo(t.within),T=e.position.getScrollInfo(b),w=(t.collision||"flip").split(" "),E={};return _=s(y),y[0].preventDefault&&(t.at="left top"),p=_.width,m=_.height,g=_.offset,v=e.extend({},g),e.each(["my","at"],function(){var e,i,n=(t[this]||"").split(" ");1===n.length&&(n=c.test(n[0])?n.concat(["center"]):u.test(n[0])?["center"].concat(n):["center","center"]),n[0]=c.test(n[0])?n[0]:"center",n[1]=u.test(n[1])?n[1]:"center",e=d.exec(n[0]),i=d.exec(n[1]),E[this]=[e?e[0]:0,i?i[0]:0],t[this]=[h.exec(n[0])[0],h.exec(n[1])[0]]}),1===w.length&&(w[1]=w[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),o=i(E.at,p,m),v.left+=o[0],v.top+=o[1],this.each(function(){var s,c,u=e(this),d=u.outerWidth(),h=u.outerHeight(),f=n(this,"marginLeft"),_=n(this,"marginTop"),S=d+f+n(this,"marginRight")+T.width,M=h+_+n(this,"marginBottom")+T.height,x=e.extend({},v),I=i(E.my,u.outerWidth(),u.outerHeight());"right"===t.my[0]?x.left-=d:"center"===t.my[0]&&(x.left-=d/2),"bottom"===t.my[1]?x.top-=h:"center"===t.my[1]&&(x.top-=h/2),x.left+=I[0],x.top+=I[1],e.support.offsetFractions||(x.left=l(x.left),x.top=l(x.top)),s={marginLeft:f,marginTop:_},e.each(["left","top"],function(i,n){e.ui.position[w[i]]&&e.ui.position[w[i]][n](x,{targetWidth:p,targetHeight:m,elemWidth:d,elemHeight:h,collisionPosition:s,collisionWidth:S,collisionHeight:M,offset:[o[0]+I[0],o[1]+I[1]],my:t.my,at:t.at,within:b,elem:u})}),t.using&&(c=function(e){var i=g.left-x.left,n=i+p-d,s=g.top-x.top,o=s+m-h,l={target:{element:y,left:g.left,top:g.top,width:p,height:m},element:{element:u,left:x.left,top:x.top,width:d,height:h},horizontal:0>n?"left":i>0?"right":"center",vertical:0>o?"top":s>0?"bottom":"middle"};d>p&&a(i+n)<p&&(l.horizontal="center"),h>m&&a(s+o)<m&&(l.vertical="middle"),l.important=r(a(i),a(n))>r(a(s),a(o))?"horizontal":"vertical",t.using.call(this,e,l)}),u.offset(e.extend(x,{using:c}))})},e.ui.position={fit:{left:function(e,t){var i,n=t.within,s=n.isWindow?n.scrollLeft:n.offset.left,o=n.width,a=e.left-t.collisionPosition.marginLeft,l=s-a,c=a+t.collisionWidth-o-s;t.collisionWidth>o?l>0&&0>=c?(i=e.left+l+t.collisionWidth-o-s,e.left+=l-i):e.left=c>0&&0>=l?s:l>c?s+o-t.collisionWidth:s:l>0?e.left+=l:c>0?e.left-=c:e.left=r(e.left-a,e.left)},top:function(e,t){var i,n=t.within,s=n.isWindow?n.scrollTop:n.offset.top,o=t.within.height,a=e.top-t.collisionPosition.marginTop,l=s-a,c=a+t.collisionHeight-o-s;t.collisionHeight>o?l>0&&0>=c?(i=e.top+l+t.collisionHeight-o-s,e.top+=l-i):e.top=c>0&&0>=l?s:l>c?s+o-t.collisionHeight:s:l>0?e.top+=l:c>0?e.top-=c:e.top=r(e.top-a,e.top)}},flip:{left:function(e,t){var i,n,s=t.within,o=s.offset.left+s.scrollLeft,r=s.width,l=s.isWindow?s.scrollLeft:s.offset.left,c=e.left-t.collisionPosition.marginLeft,u=c-l,d=c+t.collisionWidth-r-l,h="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];0>u?(i=e.left+h+p+f+t.collisionWidth-r-o,(0>i||i<a(u))&&(e.left+=h+p+f)):d>0&&(n=e.left-t.collisionPosition.marginLeft+h+p+f-l,(n>0||a(n)<d)&&(e.left+=h+p+f))},top:function(e,t){var i,n,s=t.within,o=s.offset.top+s.scrollTop,r=s.height,l=s.isWindow?s.scrollTop:s.offset.top,c=e.top-t.collisionPosition.marginTop,u=c-l,d=c+t.collisionHeight-r-l,h="top"===t.my[1],p=h?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];0>u?(n=e.top+p+f+m+t.collisionHeight-r-o,e.top+p+f+m>u&&(0>n||n<a(u))&&(e.top+=p+f+m)):d>0&&(i=e.top-t.collisionPosition.marginTop+p+f+m-l,e.top+p+f+m>d&&(i>0||a(i)<d)&&(e.top+=p+f+m))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,n,s,o,r=document.getElementsByTagName("body")[0],a=document.createElement("div");t=document.createElement(r?"div":"body"),n={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&e.extend(n,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in n)t.style[o]=n[o];t.appendChild(a),i=r||document.documentElement,i.insertBefore(t,i.firstChild),a.style.cssText="position: absolute; left: 10.7432222px;",s=e(a).offset().left,e.support.offsetFractions=s>10&&11>s,t.innerHTML="",i.removeChild(t)}()}(t),function(e,t){e.widget("ui.progressbar",{version:"@VERSION",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=e("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(e){return e===t?this.options.value:(this.options.value=this._constrainedValue(e),void this._refreshValue())},_constrainedValue:function(e){return e===t&&(e=this.options.value),this.indeterminate=e===!1,"number"!=typeof e&&(e=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),this._super(e,t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).toggleClass("ui-corner-right",t===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=e("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}})}(t),function(e){var t=5;e.widget("ui.slider",e.ui.mouse,{version:"@VERSION",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,i,n=this.options,s=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",r=[];for(i=n.values&&n.values.length||1,s.length>i&&(s.slice(i).remove(),s=s.slice(0,i)),t=s.length;i>t;t++)r.push(o);this.handles=s.add(e(r.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)})},_createRange:function(){var t=this.options,i="";t.range?(t.range===!0&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:e.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=e("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===t.range||"max"===t.range?" ui-slider-range-"+t.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){var e=this.handles.add(this.range).filter("a");this._off(e),this._on(e,this._handleEvents),this._hoverable(e),this._focusable(e)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var i,n,s,o,r,a,l,c,u=this,d=this.options;return d.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},n=this._normValueFromMouse(i),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var i=Math.abs(n-u.values(t));(s>i||s===i&&(t===u._lastChangedValue||u.values(t)===d.min))&&(s=i,o=e(this),r=t)}),a=this._start(t,r),a===!1?!1:(this._mouseSliding=!0,this._handleIndex=r,o.addClass("ui-state-active").focus(),l=o.offset(),c=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=c?{left:0,top:0}:{left:t.pageX-l.left-o.width()/2,top:t.pageY-l.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,r,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,i,n,s,o;return"horizontal"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),n=i/t,n>1&&(n=1),0>n&&(n=0),"vertical"===this.orientation&&(n=1-n),s=this._valueMax()-this._valueMin(),o=this._valueMin()+n*s,this._trimAlignValue(o)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",e,i)},_slide:function(e,t,i){var n,s,o;this.options.values&&this.options.values.length?(n=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>n||1===t&&n>i)&&(i=n),i!==this.values(t)&&(s=this.values(),s[t]=i,o=this._trigger("slide",e,{handle:this.handles[t],value:i,values:s}),n=this.values(t?0:1),o!==!1&&this.values(t,i))):i!==this.value()&&(o=this._trigger("slide",e,{handle:this.handles[t],value:i}),o!==!1&&this.value(i))},_stop:function(e,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("stop",e,i)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._lastChangedValue=t,this._trigger("change",e,i)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),void this._change(null,0)):this._value()},values:function(t,i){var n,s,o;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,t);if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(n=this.options.values,s=arguments[0],o=0;o<n.length;o+=1)n[o]=this._trimAlignValue(s[o]),this._change(null,o);this._refreshValue()},_setOption:function(t,i){var n,s=0;switch("range"===t&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),e.isArray(this.options.values)&&(s=this.options.values.length),e.Widget.prototype._setOption.apply(this,arguments),t){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=0;s>n;n+=1)this._change(null,n);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,i,n;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(i[n]);return i}return[]},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,n=e-i;return 2*Math.abs(i)>=t&&(n+=i>0?t:-t),parseFloat(n.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,i,n,s,o,r=this.options.range,a=this.options,l=this,c=this._animateOff?!1:a.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(n){i=(l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())*100,u["horizontal"===l.orientation?"left":"bottom"]=i+"%",e(this).stop(1,1)[c?"animate":"css"](u,a.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===n&&l.range.stop(1,1)[c?"animate":"css"]({left:i+"%"},a.animate),1===n&&l.range[c?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:a.animate})):(0===n&&l.range.stop(1,1)[c?"animate":"css"]({bottom:i+"%"},a.animate),1===n&&l.range[c?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:a.animate}))),t=i}):(n=this.value(),s=this._valueMin(),o=this._valueMax(),i=o!==s?(n-s)/(o-s)*100:0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[c?"animate":"css"](u,a.animate),"min"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:i+"%"},a.animate),"max"===r&&"horizontal"===this.orientation&&this.range[c?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:a.animate}),"min"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:i+"%"},a.animate),"max"===r&&"vertical"===this.orientation&&this.range[c?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:a.animate}))},_handleEvents:{keydown:function(i){var n,s,o,r,a=e(i.target).data("ui-slider-handle-index");switch(i.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,e(i.target).addClass("ui-state-active"),n=this._start(i,a),n===!1))return}switch(r=this.options.step,s=o=this.options.values&&this.options.values.length?this.values(a):this.value(),i.keyCode){case e.ui.keyCode.HOME:o=this._valueMin();break;case e.ui.keyCode.END:o=this._valueMax();break;case e.ui.keyCode.PAGE_UP:o=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/t);break;case e.ui.keyCode.PAGE_DOWN:o=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/t);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(s===this._valueMax())return;o=this._trimAlignValue(s+r);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(s===this._valueMin())return;o=this._trimAlignValue(s-r)}this._slide(i,a,o)},click:function(e){e.preventDefault()},keyup:function(t){var i=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),e(t.target).removeClass("ui-state-active"))}}})}(t),function(e){function t(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.widget("ui.spinner",{version:"@VERSION",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},i=this.element;return e.each(["min","max","step"],function(e,n){var s=i.attr(n);void 0!==s&&s.length&&(t[n]=s)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",e)))},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(t){function i(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n}))}var n;n=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(t)!==!1&&this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){return e(t.currentTarget).hasClass("ui-state-active")?this._start(t)===!1?!1:void this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*e.height())&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()},_keydown:function(t){var i=this.options,n=e.ui.keyCode;switch(t.keyCode){case n.UP:return this._repeat(null,1,t),!0;case n.DOWN:return this._repeat(null,-1,t),!0;case n.PAGE_UP:return this._repeat(null,i.page,t),!0;case n.PAGE_DOWN:return this._repeat(null,-i.page,t),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(e){return this.spinning||this._trigger("start",e)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(e,t,i){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,i)},e),this._spin(t*this.options.step,i)},_spin:function(e,t){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+e*this._increment(this.counter)),this.spinning&&this._trigger("spin",t,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(t){var i=this.options.incremental;return i?e.isFunction(i)?i(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),i=t.indexOf(".");return-1===i?0:t.length-i-1
  },_adjustValue:function(e){var t,i,n=this.options;return t=null!==n.min?n.min:0,i=e-t,i=Math.round(i/n.step)*n.step,e=t+i,e=parseFloat(e.toFixed(this._precision())),null!==n.max&&e>n.max?n.max:null!==n.min&&e<n.min?n.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){if("culture"===e||"numberFormat"===e){var i=this._parse(this.element.val());return this.options[e]=t,void this.element.val(this._format(i))}("max"===e||"min"===e||"step"===e)&&"string"==typeof t&&(t=this._parse(t)),"icons"===e&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(t.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(t.down)),this._super(e,t),"disabled"===e&&(t?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:t(function(e){this._super(e),this._value(this.element.val())}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(e,t){var i;""!==e&&(i=this._parse(e),null!==i&&(t||(i=this._adjustValue(i)),e=this._format(i))),this.element.val(e),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:t(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:t(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:t(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:t(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){return arguments.length?void t(this._value).call(this,e):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}(t),function(e,t){function i(){return++s}function n(e){return e=e.cloneNode(!1),e.hash.length>1&&decodeURIComponent(e.href.replace(o,""))===decodeURIComponent(location.href.replace(o,""))}var s=0,o=/#.*$/;e.widget("ui.tabs",{version:"@VERSION",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var t=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),e.isArray(i.disabled)&&(i.disabled=e.unique(i.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):e(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var t=this.options.active,i=this.options.collapsible,n=location.hash.substring(1);return null===t&&(n&&this.tabs.each(function(i,s){return e(s).attr("aria-controls")===n?(t=i,!1):void 0}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===t||-1===t)&&(t=this.tabs.length?0:!1)),t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),-1===t&&(t=i?!1:0)),!i&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var i=e(this.document[0].activeElement).closest("li"),n=this.tabs.index(i),s=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:n++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:s=!1,n--;break;case e.ui.keyCode.END:n=this.anchors.length-1;break;case e.ui.keyCode.HOME:n=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(n);case e.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(n===this.options.active?!1:n);default:return}t.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,s),t.ctrlKey||(i.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,i){function n(){return t>s&&(t=0),0>t&&(t=s),t}for(var s=this.tabs.length-1;-1!==e.inArray(n(),this.options.disabled);)t=i?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){return"active"===e?void this._activate(t):"disabled"===e?void this._setupDisabled(t):(this._super(e,t),"collapsible"===e&&(this.element.toggleClass("ui-tabs-collapsible",t),t||this.options.active!==!1||this._activate(0)),"event"===e&&this._setupEvents(t),void("heightStyle"===e&&this._setupHeightStyle(t)))},_tabId:function(e){return e.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,i=this.tablist.children(":has(a[href])");t.disabled=e.map(i.filter(".ui-state-disabled"),function(e){return i.index(e)}),this._processTabs(),t.active!==!1&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(i,s){var o,r,a,l=e(s).uniqueId().attr("id"),c=e(s).closest("li"),u=c.attr("aria-controls");n(s)?(o=s.hash,r=t.element.find(t._sanitizeSelector(o))):(a=t._tabId(c),o="#"+a,r=t.element.find(o),r.length||(r=t._createPanel(a),r.insertAfter(t.panels[i-1]||t.tablist)),r.attr("aria-live","polite")),r.length&&(t.panels=t.panels.add(r)),u&&c.data("ui-tabs-aria-controls",u),c.attr({"aria-controls":o.substring(1),"aria-labelledby":l}),r.attr("aria-labelledby",l)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("<div>").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var i,n=0;i=this.tabs[n];n++)t===!0||-1!==e.inArray(n,t)?e(i).addClass("ui-state-disabled").attr("aria-disabled","true"):e(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={click:function(e){e.preventDefault()}};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,n=this.element.parent();"fill"===t?(i=n.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),n=t.css("position");"absolute"!==n&&"fixed"!==n&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,e(this).height("").height())}).height(i))},_eventHandler:function(t){var i=this.options,n=this.active,s=e(t.currentTarget),o=s.closest("li"),r=o[0]===n[0],a=r&&i.collapsible,l=a?e():this._getPanelForTab(o),c=n.length?this._getPanelForTab(n):e(),u={oldTab:n,oldPanel:c,newTab:a?e():o,newPanel:l};t.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||r&&!i.collapsible||this._trigger("beforeActivate",t,u)===!1||(i.active=a?!1:this.tabs.index(o),this.active=r?e():o,this.xhr&&this.xhr.abort(),c.length||l.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(o),t),this._toggle(t,u))},_toggle:function(t,i){function n(){o.running=!1,o._trigger("activate",t,i)}function s(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),r.length&&o.options.show?o._show(r,o.options.show,n):(r.show(),n())}var o=this,r=i.newPanel,a=i.oldPanel;this.running=!0,a.length&&this.options.hide?this._hide(a,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),s()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),a.hide(),s()),a.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),r.length&&a.length?i.oldTab.attr("tabIndex",-1):r.length&&this.tabs.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),r.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(t){var i,n=this._findActive(t);n[0]!==this.active[0]&&(n.length||(n=this.active),i=n.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),i=t.data("ui-tabs-aria-controls");i?t.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var n=this.options.disabled;n!==!1&&(i===t?n=!1:(i=this._getIndex(i),n=e.isArray(n)?e.map(n,function(e){return e!==i?e:null}):e.map(this.tabs,function(e,t){return t!==i?t:null})),this._setupDisabled(n))},disable:function(i){var n=this.options.disabled;if(n!==!0){if(i===t)n=!0;else{if(i=this._getIndex(i),-1!==e.inArray(i,n))return;n=e.isArray(n)?e.merge([i],n).sort():[i]}this._setupDisabled(n)}},load:function(t,i){t=this._getIndex(t);var s=this,o=this.tabs.eq(t),r=o.find(".ui-tabs-anchor"),a=this._getPanelForTab(o),l={tab:o,panel:a};n(r[0])||(this.xhr=e.ajax(this._ajaxSettings(r,i,l)),this.xhr&&"canceled"!==this.xhr.statusText&&(o.addClass("ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.success(function(e){setTimeout(function(){a.html(e),s._trigger("load",i,l)},1)}).complete(function(e,t){setTimeout(function(){"abort"===t&&s.panels.stop(!1,!0),o.removeClass("ui-tabs-loading"),a.removeAttr("aria-busy"),e===s.xhr&&delete s.xhr},1)})))},_ajaxSettings:function(t,i,n){var s=this;return{url:t.attr("href"),beforeSend:function(t,o){return s._trigger("beforeLoad",i,e.extend({jqXHR:t,ajaxSettings:o},n))}}},_getPanelForTab:function(t){var i=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})}(t),function(e){function t(t,i){var n=(t.attr("aria-describedby")||"").split(/\s+/);n.push(i),t.data("ui-tooltip-id",i).attr("aria-describedby",e.trim(n.join(" ")))}function i(t){var i=t.data("ui-tooltip-id"),n=(t.attr("aria-describedby")||"").split(/\s+/),s=e.inArray(i,n);-1!==s&&n.splice(s,1),t.removeData("ui-tooltip-id"),n=e.trim(n.join(" ")),n?t.attr("aria-describedby",n):t.removeAttr("aria-describedby")}var n=0;e.widget("ui.tooltip",{version:"@VERSION",options:{content:function(){var t=e(this).attr("title")||"";return e("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(t,i){var n=this;return"disabled"===t?(this[i?"_disable":"_enable"](),void(this.options[t]=i)):(this._super(t,i),void("content"===t&&e.each(this.tooltips,function(e,t){n._updateContent(t)})))},_disable:function(){var t=this;e.each(this.tooltips,function(i,n){var s=e.Event("blur");s.target=s.currentTarget=n[0],t.close(s,!0)}),this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var i=this,n=e(t?t.target:this.element).closest(this.options.items);n.length&&!n.data("ui-tooltip-id")&&(n.attr("title")&&n.data("ui-tooltip-title",n.attr("title")),n.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&n.parents().each(function(){var t,n=e(this);n.data("ui-tooltip-open")&&(t=e.Event("blur"),t.target=t.currentTarget=this,i.close(t,!0)),n.attr("title")&&(n.uniqueId(),i.parents[this.id]={element:this,title:n.attr("title")},n.attr("title",""))}),this._updateContent(n,t))},_updateContent:function(e,t){var i,n=this.options.content,s=this,o=t?t.type:null;return"string"==typeof n?this._open(t,e,n):(i=n.call(e[0],function(i){e.data("ui-tooltip-open")&&s._delay(function(){t&&(t.type=o),this._open(t,e,i)})}),void(i&&this._open(t,e,i)))},_open:function(i,n,s){function o(e){c.of=e,r.is(":hidden")||r.position(c)}var r,a,l,c=e.extend({},this.options.position);if(s){if(r=this._find(n),r.length)return void r.find(".ui-tooltip-content").html(s);n.is("[title]")&&(i&&"mouseover"===i.type?n.attr("title",""):n.removeAttr("title")),r=this._tooltip(n),t(n,r.attr("id")),r.find(".ui-tooltip-content").html(s),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):r.position(e.extend({of:n},this.options.position)),r.hide(),this._show(r,this.options.show),this.options.show&&this.options.show.delay&&(l=this.delayedShow=setInterval(function(){r.is(":visible")&&(o(c.of),clearInterval(l))},e.fx.interval)),this._trigger("open",i,{tooltip:r}),a={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var i=e.Event(t);i.currentTarget=n[0],this.close(i,!0)}},remove:function(){this._removeTooltip(r)}},i&&"mouseover"!==i.type||(a.mouseleave="close"),i&&"focusin"!==i.type||(a.focusout="close"),this._on(!0,n,a)}},close:function(t){var n=this,s=e(t?t.currentTarget:this.element),o=this._find(s);this.closing||(clearInterval(this.delayedShow),s.data("ui-tooltip-title")&&s.attr("title",s.data("ui-tooltip-title")),i(s),o.stop(!0),this._hide(o,this.options.hide,function(){n._removeTooltip(e(this))}),s.removeData("ui-tooltip-open"),this._off(s,"mouseleave focusout keyup"),s[0]!==this.element[0]&&this._off(s,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&e.each(this.parents,function(t,i){e(i.element).attr("title",i.title),delete n.parents[t]}),this.closing=!0,this._trigger("close",t,{tooltip:o}),this.closing=!1)},_tooltip:function(t){var i="ui-tooltip-"+n++,s=e("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return e("<div>").addClass("ui-tooltip-content").appendTo(s),s.appendTo(this.document[0].body),this.tooltips[i]=t,s},_find:function(t){var i=t.data("ui-tooltip-id");return i?e("#"+i):e()},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(i,n){var s=e.Event("blur");s.target=s.currentTarget=n[0],t.close(s,!0),e("#"+i).remove(),n.data("ui-tooltip-title")&&(n.attr("title",n.data("ui-tooltip-title")),n.removeData("ui-tooltip-title"))})}})}(t),t}),define("common/config/requestSettings",["require","jrs.configs"],function(e){var t=e("jrs.configs"),i=t.userLocale.replace(/_/g,"-");return{headers:{"X-Suppress-Basic":"true","Accept-Language":i,"Cache-Control":"no-cache, no-store",Pragma:"no-cache"}}}),function(e,t){"function"==typeof define&&define.amd?define("common/enum/loggingLevels",[],e):(t.logging||(t.logging={}),t.logging.loggingLevels=e())}(function(){return{DEBUG:100,INFO:200,WARN:300,ERROR:400}},this),function(e,t){"function"==typeof define&&define.amd?define("common/logging/Level",["common/enum/loggingLevels"],e):(t.logging||(t.logging={}),t.logging.Level=e(t.logging.loggingLevels))}(function(e){function t(e,t){this.level=e,this.name=t.toUpperCase()}t.prototype.isGreaterOrEqual=function(e){var i=(e instanceof t?e:t.getLevel(e)).level;return this.level>=i},t.prototype.toString=function(){return this.name},t.getLevel=function(e){return t[e.toUpperCase()]};for(var i in e)e.hasOwnProperty(i)&&(t[i]=new t(e[i],i));return t},this),function(e,t){"function"==typeof define&&define.amd?define("common/logging/LogItem",[],e):(t.logging||(t.logging={}),t.logging.LogItem=e())}(function(){function e(e){var t,i=e.getHours().toString(),n=e.getMinutes().toString(),s=e.getSeconds().toString(),o=e.getMilliseconds();return 1==i.length&&(i="0"+i),1==n.length&&(n="0"+n),1==s.length&&(s="0"+s),t=i+":"+n+":"+s+"."+o}function t(e){for(var t in e)if(e.hasOwnProperty(t)){if("args"===t)for(var i=0,n=e[t].length;n>i;i++)e[t][i]instanceof Error&&(e[t][i]=e[t][i].message);this[t]=e[t]}}return t.prototype.toArray=function(){var t=[];return t.push(e(this.time)),t.push("["+this.id+"]"),"unknown"!==this.file&&t.push("["+this.file+":"+this.line+"]"),t.push("["+this.level.toString()+"] -"),t=t.concat(this.args)},t},this),function(e,t){"function"==typeof define&&define.amd?define("common/logging/Log",["common/logging/Level","common/logging/LogItem"],e):(t.logging||(t.logging={}),t.logging.Log=e(t.logging.Level,t.logging.LogItem))}(function(e,t){function i(t){return function(){return this._prepareLogItem({level:e.getLevel(t),args:arguments})}}function n(e,t){this._id=e.id,this._callback=t}return n.prototype._prepareLogItem=function(e){e.id=this._id,e.args=Array.prototype.slice.call(e.args,0),e.time=new Date;var i=(new Error).stack;if(i){var n=i.split("\n")[2],s=n.match(/\/(\w+\.\w+):(\d+)/i);s&&(e.file=s[1],e.line=s[2])}return e.file||(e.file="unknown",e.line="0"),e=new t(e),this._callback(e),e},n.prototype.debug=i("debug"),n.prototype.info=i("info"),n.prototype.warn=i("warn"),n.prototype.error=i("error"),n},this),function(e,t){"function"==typeof define&&define.amd?define("common/logging/appender/ConsoleAppender",[],e):(t.logging||(t.logging={}),t.logging.appender||(t.logging.appender={}),t.logging.appender.ConsoleAppender=e())}(function(){function e(){}return e.prototype.console=function(){if("undefined"==typeof console){var e=function(){};return{assert:e,clear:e,count:e,debug:e,dir:e,dirxml:e,error:e,group:e,groupCollapsed:e,groupEnd:e,info:e,log:e,markTimeline:e,profile:e,profileEnd:e,table:e,time:e,timeEnd:e,timeStamp:e,trace:e,warn:e}}return console}(),e.prototype.write=function(e){var t=this.console.log;switch(e.level.toString()){case"DEBUG":t=this.console.debug||this.console.log;break;case"INFO":t=this.console.info||this.console.log;break;case"WARN":t=this.console.warn;break;case"ERROR":t=this.console.error}try{t.apply(this.console,e.toArray())}catch(i){try{Function.prototype.apply.call(t,this.console,e.toArray())}catch(n){}}},e},this),function(e,t,i){"function"==typeof define&&define.amd?define("common/logging/LoggerManager",["underscore","common/logging/Log","common/logging/Level","common/logging/appender/ConsoleAppender"],e):(t.logging||(t.logging={}),t.logging.LoggerManager=e(i,t.logging.Log,t.logging.Level,t.logging.appender.ConsoleAppender))}(function(e,t,i,n){var s={console:n},o=function(e){this.initialize(e||{})};return e.extend(o.prototype,{defaults:function(){return{enabled:!1,level:"error",appenders:{},appenderInstances:{},loggers:{}}},initialize:function(t){this.attributes=e.defaults(t,this.defaults());var i={};e.each(s,function(e,t){i[t]=new e}),this.set("appenderInstances",i)},get:function(e){return this.attributes[e]},set:function(e,t){this.attributes[e]=t},register:function(i){var n={id:"root"};if("string"==typeof i&&""!==i?n.id=i:i&&i.hasOwnProperty("id")&&(n.id=i.id),!this.get("loggers").hasOwnProperty(n.id)){var s=this.get("loggers");s[n.id]=new t(n,e.bind(this._processLogItem,this)),this.set("loggers",s)}return this.get("loggers")[n.id]},disable:function(){this.set("enabled",!1)},enable:function(e){e&&this.set("level",i.getLevel(e)),this.set("enabled",!0)},setLevel:function(e){this.set("level",e)},_processLogItem:function(e){this.get("enabled")&&e.level.isGreaterOrEqual(this.get("level"))&&this._appendLogItem(e)},_appendLogItem:function(e){var t=this.get("appenders"),i=this.get("appenderInstances");for(var n in t)i.hasOwnProperty(t[n])&&i[t[n]].write(e)}}),o},this,this._),define("logger",["require","exports","module","common/logging/LoggerManager"],function(e,t,i){var n=e("common/logging/LoggerManager"),s=i.config(),o=new n(s);return o}),function(e){define("xdm",["json3","logger"],e)}(function(e,t){function i(e,t){var i=typeof e[t];return"function"==i||!("object"!=i||!e[t])||"unknown"==i}function n(e,t){return!("object"!=typeof e[t]||!e[t])}function s(e){return"[object Array]"===Object.prototype.toString.call(e)}function o(){var e="Shockwave Flash",t="application/x-shockwave-flash";if(!m(navigator.plugins)&&"object"==typeof navigator.plugins[e]){var i=navigator.plugins[e].description;i&&!m(navigator.mimeTypes)&&navigator.mimeTypes[t]&&navigator.mimeTypes[t].enabledPlugin&&(S=i.match(/\d+/g))}if(!S){var n;try{n=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),S=Array.prototype.slice.call(n.GetVariable("$version").match(/(\d+),(\d+),(\d+),(\d+)/),1),n=null}catch(s){}}if(!S)return!1;var o=parseInt(S[0],10),r=parseInt(S[1],10);return M=o>9&&r>0,!0}function r(){if(!U){U=!0,$("firing dom_onReady");for(var e=0;e<W.length;e++)W[e]();W.length=0}}function a(e,t){return U?void e.call(t):void W.push(function(){e.call(t)})}function l(){var e=parent;if(""!==R)for(var t=0,i=R.split(".");t<i.length;t++)e=e[i[t]];return e.easyXDM}function c(e){return $("Settings namespace to '"+e+"'"),window.easyXDM=H,R=e,R&&(z="easyXDM_"+R.replace(".","_")+"_"),j}function u(e){return e.match(A)[3]}function d(e){return e.match(A)[4]||""}function h(e){var t=e.toLowerCase().match(A),i=t[2],n=t[3],s=t[4]||"";return("http:"==i&&":80"==s||"https:"==i&&":443"==s)&&(s=""),i+"//"+n+s}function p(e){if(e=e.replace(P,"$1/"),!e.match(/^(http||https):\/\//)){var t="/"===e.substring(0,1)?"":location.pathname;"/"!==t.substring(t.length-1)&&(t=t.substring(0,t.lastIndexOf("/")+1)),e=location.protocol+"//"+location.host+t+e}for(;L.test(e);)e=e.replace(L,"");return $("resolved url '"+e+"'"),e}function f(e,t){var i="",n=e.indexOf("#");-1!==n&&(i=e.substring(n),e=e.substring(0,n));var s=[];for(var o in t)t.hasOwnProperty(o)&&s.push(o+"="+encodeURIComponent(t[o]));return e+(F?"#":-1==e.indexOf("?")?"?":"&")+s.join("&")+i}function m(e){return"undefined"==typeof e}function g(e,t,i){var n;for(var s in t)t.hasOwnProperty(s)&&(s in e?(n=t[s],"object"==typeof n?g(e[s],n,i):i||(e[s]=t[s])):e[s]=t[s]);return e}function v(){var e=document.body.appendChild(document.createElement("form")),t=e.appendChild(document.createElement("input"));t.name=z+"TEST"+k,E=t!==e.elements[t.name],document.body.removeChild(e),$("HAS_NAME_PROPERTY_BUG: "+E)}function _(e){$("creating frame: "+e.props.src),m(E)&&v();var t;E?t=document.createElement('<iframe name="'+e.props.name+'"/>'):(t=document.createElement("IFRAME"),t.name=e.props.name),t.id=t.name=e.props.name,delete e.props.name,"string"==typeof e.container&&(e.container=document.getElementById(e.container)),e.container||(g(t.style,{position:"absolute",top:"-2000px",left:"0px"}),e.container=document.body);var i=e.props.src;if(e.props.src="javascript:false",g(t,e.props),t.border=t.frameBorder=0,t.allowTransparency=!0,e.container.appendChild(t),e.onLoad&&x(t,"load",e.onLoad),e.usePost){var n,s=e.container.appendChild(document.createElement("form"));if(s.target=t.name,s.action=i,s.method="POST","object"==typeof e.usePost)for(var o in e.usePost)e.usePost.hasOwnProperty(o)&&(E?n=document.createElement('<input name="'+o+'"/>'):(n=document.createElement("INPUT"),n.name=o),n.value=e.usePost[o],s.appendChild(n));s.submit(),s.parentNode.removeChild(s)}else t.src=i;return e.props.src=i,t}function y(e,t){"string"==typeof e&&(e=[e]);for(var i,n=e.length;n--;)if(i=e[n],i=new RegExp("^"==i.substr(0,1)?i:"^"+i.replace(/(\*)/g,".$1").replace(/\?/g,".")+"$"),i.test(t))return!0;return!1}function b(e){var t,n=e.protocol;if(e.isHost=e.isHost||m(K.xdm_p),F=e.hash||!1,$("preparing transport stack"),e.props||(e.props={}),e.isHost)e.remote=p(e.remote),e.channel=e.channel||"default"+k++,e.secret=Math.random().toString(16).substring(2),m(n)?(n=h(location.href)==h(e.remote)?"4":i(window,"postMessage")||i(document,"postMessage")?"1":e.swf&&i(window,"ActiveXObject")&&o()?"6":"Gecko"===navigator.product&&"frameElement"in window&&-1==navigator.userAgent.indexOf("WebKit")?"5":e.remoteHelper?"2":"0",$("selecting protocol: "+n)):$("using protocol: "+n);else if($("using parameters from query"),e.channel=K.xdm_c.replace(/["'<>\\]/g,""),e.secret=K.xdm_s,e.remote=K.xdm_e.replace(/["'<>\\]/g,""),n=K.xdm_p,e.acl&&!y(e.acl,e.remote))throw new Error("Access denied for "+e.remote);switch(e.protocol=n,n){case"0":if(g(e,{interval:100,delay:2e3,useResize:!0,useParent:!1,usePolling:!1},!0),e.isHost){if(!e.local){$("looking for image to use as local");for(var s,r=location.protocol+"//"+location.host,a=document.body.getElementsByTagName("img"),l=a.length;l--;)if(s=a[l],s.src.substring(0,r.length)===r){e.local=s.src;break}e.local||($("no image found, defaulting to using the window"),e.local=window)}var c={xdm_c:e.channel,xdm_p:0};e.local===window?(e.usePolling=!0,e.useParent=!0,e.local=location.protocol+"//"+location.host+location.pathname+location.search,c.xdm_e=e.local,c.xdm_pa=1):c.xdm_e=p(e.local),e.container&&(e.useResize=!1,c.xdm_po=1),e.remote=f(e.remote,c)}else g(e,{channel:K.xdm_c,remote:K.xdm_e,useParent:!m(K.xdm_pa),usePolling:!m(K.xdm_po),useResize:e.useParent?!1:e.useResize});t=[new j.stack.HashTransport(e),new j.stack.ReliableBehavior({}),new j.stack.QueueBehavior({encode:!0,maxLength:4e3-e.remote.length}),new j.stack.VerifyBehavior({initiate:e.isHost})];break;case"1":t=[new j.stack.PostMessageTransport(e)];break;case"2":e.isHost&&(e.remoteHelper=p(e.remoteHelper)),t=[new j.stack.NameTransport(e),new j.stack.QueueBehavior,new j.stack.VerifyBehavior({initiate:e.isHost})];break;case"3":t=[new j.stack.NixTransport(e)];break;case"4":t=[new j.stack.SameOriginTransport(e)];break;case"5":t=[new j.stack.FrameElementTransport(e)];break;case"6":S||o(),t=[new j.stack.FlashTransport(e)]}return t.push(new j.stack.QueueBehavior({lazy:e.lazy,remove:!0})),t}function T(e){for(var t,i={incoming:function(e,t){this.up.incoming(e,t)},outgoing:function(e,t){this.down.outgoing(e,t)},callback:function(e){this.up.callback(e)},init:function(){this.down.init()},destroy:function(){this.down.destroy()}},n=0,s=e.length;s>n;n++)t=e[n],g(t,i,!0),0!==n&&(t.down=e[n-1]),n!==s-1&&(t.up=e[n+1]);return t}function w(e){e.up.down=e.down,e.down.up=e.up,e.up=e.down=null}if("undefined"==typeof document)return{};var E,S,M,x,I,C=window.setTimeout,D=t.register("EasyXDM"),N=this,k=Math.floor(1e4*Math.random()),O=Function.prototype,A=/^((http.?:)\/\/([^:\/\s]+)(:\d+)*)/,L=/[\-\w]+\/\.\.\//,P=/([^:])\/\//g,R="",j={},H=window.easyXDM,z="easyXDM_",F=!1,$=O;if(i(window,"addEventListener"))x=function(e,t,i){$("adding listener "+t),e.addEventListener(t,i,!1)},I=function(e,t,i){$("removing listener "+t),e.removeEventListener(t,i,!1)};else{if(!i(window,"attachEvent"))throw new Error("Browser not supported");x=function(e,t,i){$("adding listener "+t),e.attachEvent("on"+t,i)},I=function(e,t,i){$("removing listener "+t),e.detachEvent("on"+t,i)}}var B,U=!1,W=[];if("readyState"in document?(B=document.readyState,U="complete"==B||~navigator.userAgent.indexOf("AppleWebKit/")&&("loaded"==B||"interactive"==B)):U=!!document.body,!U){if(i(window,"addEventListener"))x(document,"DOMContentLoaded",r);else if(x(document,"readystatechange",function(){"complete"==document.readyState&&r()}),document.documentElement.doScroll&&window===top){var V=function(){if(!U){try{document.documentElement.doScroll("left")}catch(e){return void C(V,1)}r()}};V()}x(window,"load",r)}var K=function(e){e=e.substring(1).split("&");for(var t,i={},n=e.length;n--;)t=e[n].split("="),i[t[0]]=decodeURIComponent(t[1]);return i}(/xdm_e=/.test(location.search)?location.search:location.hash),Y=function(){var e={},t={a:[1,2,3]},i='{"a":[1,2,3]}';return"undefined"!=typeof JSON&&"function"==typeof JSON.stringify&&JSON.stringify(t).replace(/\s/g,"")===i?JSON:(Object.toJSON&&Object.toJSON(t).replace(/\s/g,"")===i&&(e.stringify=Object.toJSON),"function"==typeof String.prototype.evalJSON&&(t=i.evalJSON(),t.a&&3===t.a.length&&3===t.a[2]&&(e.parse=function(e){return e.evalJSON()})),e.stringify&&e.parse?(Y=function(){return e},e):null)};g(j,{version:"2.4.19.1",query:K,stack:{},apply:g,getJSONObject:Y,whenReady:a,noConflict:c});var q={_deferred:[],flush:function(){this.trace("... deferred messages ...");
  for(var e=0,t=this._deferred.length;t>e;e++)this.trace(this._deferred[e]);this._deferred.length=0,this.trace("... end of deferred messages ...")},getTime:function(){var e=new Date,t=e.getHours()+"",i=e.getMinutes()+"",n=e.getSeconds()+"",s=e.getMilliseconds()+"",o="000";return 1==t.length&&(t="0"+t),1==i.length&&(i="0"+i),1==n.length&&(n="0"+n),s=o.substring(s.length)+s,t+":"+i+":"+n+"."+s},log:function(e){D.debug(location.host+(R?":"+R:"")+": "+e)},getTracer:function(e){var i=t.register(e);return function(e){i.debug(e)}}};return q.log("easyXDM present on '"+location.href),j.Debug=q,$=q.getTracer("EasyXDM.{Private}"),j.DomHelper={on:x,un:I,requiresJSON:function(e){n(window,"JSON")?q.log("native JSON found"):(q.log("loading external JSON"),document.write('<script type="text/javascript" src="'+e+'"></script>'))}},function(){var e={};j.Fn={set:function(t,i){this._trace("storing function "+t),e[t]=i},get:function(t,i){if(this._trace("retrieving function "+t),e.hasOwnProperty(t)){var n=e[t];return n||this._trace(t+" not found"),i&&delete e[t],n}}},j.Fn._trace=q.getTracer("easyXDM.Fn")}(),j.Socket=function(e){var t=q.getTracer("easyXDM.Socket");t("constructor");var i=T(b(e).concat([{incoming:function(t,i){e.onMessage(t,i)},callback:function(t){e.onReady&&e.onReady(t)}}])),n=h(e.remote);this.origin=h(e.remote),this.destroy=function(){i.destroy()},this.postMessage=function(e){i.outgoing(e,n)},i.init()},j.Rpc=function(e,t){var i=q.getTracer("easyXDM.Rpc");if(i("constructor"),t.local)for(var n in t.local)if(t.local.hasOwnProperty(n)){var s=t.local[n];"function"==typeof s&&(t.local[n]={method:s})}var o=T(b(e).concat([new j.stack.RpcBehavior(this,t),{callback:function(t){e.onReady&&e.onReady(t)}}]));this.origin=h(e.remote),this.destroy=function(){o.destroy()},o.init()},j.stack.SameOriginTransport=function(e){var t=q.getTracer("easyXDM.stack.SameOriginTransport");t("constructor");var i,n,s,o;return i={outgoing:function(e,t,i){s(e),i&&i()},destroy:function(){t("destroy"),n&&(n.parentNode.removeChild(n),n=null)},onDOMReady:function(){t("init"),o=h(e.remote),e.isHost?(g(e.props,{src:f(e.remote,{xdm_e:location.protocol+"//"+location.host+location.pathname,xdm_c:e.channel,xdm_p:4}),name:z+e.channel+"_provider"}),n=_(e),j.Fn.set(e.channel,function(e){return s=e,C(function(){i.up.callback(!0)},0),function(e){i.up.incoming(e,o)}})):(s=l().Fn.get(e.channel,!0)(function(e){i.up.incoming(e,o)}),C(function(){i.up.callback(!0)},0))},init:function(){a(i.onDOMReady,i)}}},j.stack.FlashTransport=function(e){function t(e){C(function(){n("received message"),s.up.incoming(e,r)},0)}function i(t){n("creating factory with SWF from "+t);var i=e.swf+"?host="+e.isHost,s="easyXDM_swf_"+Math.floor(1e4*Math.random());j.Fn.set("flash_loaded"+t.replace(/[\-.]/g,"_"),function(){j.stack.FlashTransport[t].swf=l=c.firstChild;for(var e=j.stack.FlashTransport[t].queue,i=0;i<e.length;i++)e[i]();e.length=0}),e.swfContainer?c="string"==typeof e.swfContainer?document.getElementById(e.swfContainer):e.swfContainer:(c=document.createElement("div"),g(c.style,M&&e.swfNoThrottle?{height:"20px",width:"20px",position:"fixed",right:0,top:0}:{height:"1px",width:"1px",position:"absolute",overflow:"hidden",right:0,top:0}),document.body.appendChild(c));var o="callback=flash_loaded"+encodeURIComponent(t.replace(/[\-.]/g,"_"))+"&proto="+N.location.protocol+"&domain="+encodeURIComponent(u(N.location.href))+"&port="+encodeURIComponent(d(N.location.href))+"&ns="+encodeURIComponent(R);o+="&log=true",c.innerHTML="<object height='20' width='20' type='application/x-shockwave-flash' id='"+s+"' data='"+i+"'><param name='allowScriptAccess' value='always'></param><param name='wmode' value='transparent'><param name='movie' value='"+i+"'></param><param name='flashvars' value='"+o+"'></param><embed type='application/x-shockwave-flash' FlashVars='"+o+"' allowScriptAccess='always' wmode='transparent' src='"+i+"' height='1' width='1'></embed></object>"}var n=q.getTracer("easyXDM.stack.FlashTransport");n("constructor");var s,o,r,l,c;return s={outgoing:function(t,i,n){l.postMessage(e.channel,t.toString()),n&&n()},destroy:function(){n("destroy");try{l.destroyChannel(e.channel)}catch(t){}l=null,o&&(o.parentNode.removeChild(o),o=null)},onDOMReady:function(){n("init"),r=e.remote,j.Fn.set("flash_"+e.channel+"_init",function(){C(function(){n("firing onReady"),s.up.callback(!0)})}),j.Fn.set("flash_"+e.channel+"_onMessage",t),e.swf=p(e.swf);var a=u(e.swf),c=function(){j.stack.FlashTransport[a].init=!0,l=j.stack.FlashTransport[a].swf,l.createChannel(e.channel,e.secret,h(e.remote),e.isHost),e.isHost&&(M&&e.swfNoThrottle&&g(e.props,{position:"fixed",right:0,top:0,height:"20px",width:"20px"}),g(e.props,{src:f(e.remote,{xdm_e:h(location.href),xdm_c:e.channel,xdm_p:6,xdm_s:e.secret}),name:z+e.channel+"_provider"}),o=_(e))};j.stack.FlashTransport[a]&&j.stack.FlashTransport[a].init?c():j.stack.FlashTransport[a]?j.stack.FlashTransport[a].queue.push(c):(j.stack.FlashTransport[a]={queue:[c]},i(a))},init:function(){a(s.onDOMReady,s)}}},j.stack.PostMessageTransport=function(e){function t(e){if(e.origin)return h(e.origin);if(e.uri)return h(e.uri);if(e.domain)return location.protocol+"//"+e.domain;throw"Unable to retrieve the origin of the event"}function i(i){var o=t(i);n("received message '"+i.data+"' from "+o),o==l&&i.data.substring(0,e.channel.length+1)==e.channel+" "&&s.up.incoming(i.data.substring(e.channel.length+1),o)}var n=q.getTracer("easyXDM.stack.PostMessageTransport");n("constructor");var s,o,r,l;return s={outgoing:function(t,i,n){r.postMessage(e.channel+" "+t,i||l),n&&n()},destroy:function(){n("destroy"),I(window,"message",i),o&&(r=null,o.parentNode.removeChild(o),o=null)},onDOMReady:function(){if(n("init"),l=h(e.remote),e.isHost){var t=function(a){a.data==e.channel+"-ready"&&(n("firing onReady"),r="postMessage"in o.contentWindow?o.contentWindow:o.contentWindow.document,I(window,"message",t),x(window,"message",i),C(function(){s.up.callback(!0)},0))};x(window,"message",t),g(e.props,{src:f(e.remote,{xdm_e:h(location.href),xdm_c:e.channel,xdm_p:1}),name:z+e.channel+"_provider"}),o=_(e)}else x(window,"message",i),r="postMessage"in window.parent?window.parent:window.parent.document,r.postMessage(e.channel+"-ready",l),C(function(){s.up.callback(!0)},0)},init:function(){a(s.onDOMReady,s)}}},j.stack.FrameElementTransport=function(e){var t=q.getTracer("easyXDM.stack.FrameElementTransport");t("constructor");var i,n,s,o;return i={outgoing:function(e,t,i){s.call(this,e),i&&i()},destroy:function(){t("destroy"),n&&(n.parentNode.removeChild(n),n=null)},onDOMReady:function(){t("init"),o=h(e.remote),e.isHost?(g(e.props,{src:f(e.remote,{xdm_e:h(location.href),xdm_c:e.channel,xdm_p:5}),name:z+e.channel+"_provider"}),n=_(e),n.fn=function(e){return delete n.fn,s=e,C(function(){i.up.callback(!0)},0),function(e){i.up.incoming(e,o)}}):(document.referrer&&h(document.referrer)!=K.xdm_e&&(window.top.location=K.xdm_e),s=window.frameElement.fn(function(e){i.up.incoming(e,o)}),i.up.callback(!0))},init:function(){a(i.onDOMReady,i)}}},j.stack.NameTransport=function(e){function t(t){var i=e.remoteHelper+(l?"#_3":"#_2")+e.channel;o("sending message "+t),o("navigating to  '"+i+"'"),c.contentWindow.sendMessage(t,i)}function i(){l?2!==++d&&l||r.up.callback(!0):(t("ready"),o("calling onReady"),r.up.callback(!0))}function n(e){o("received message "+e),r.up.incoming(e,y)}function s(){v&&C(function(){v(!0)},0)}var o=q.getTracer("easyXDM.stack.NameTransport");o("constructor"),e.isHost&&m(e.remoteHelper)&&o("missing remoteHelper");var r,l,c,u,d,v,y,b;return r={outgoing:function(e,i,n){v=n,t(e)},destroy:function(){o("destroy"),c.parentNode.removeChild(c),c=null,l&&(u.parentNode.removeChild(u),u=null)},onDOMReady:function(){o("init"),l=e.isHost,d=0,y=h(e.remote),e.local=p(e.local),l?(j.Fn.set(e.channel,function(t){o("received initial message "+t),l&&"ready"===t&&(j.Fn.set(e.channel,n),i())}),b=f(e.remote,{xdm_e:e.local,xdm_c:e.channel,xdm_p:2}),g(e.props,{src:b+"#"+e.channel,name:z+e.channel+"_provider"}),u=_(e)):(e.remoteHelper=e.remote,j.Fn.set(e.channel,n));var t=function(){var n=c||this;I(n,"load",t),j.Fn.set(e.channel+"_load",s),function o(){"function"==typeof n.contentWindow.sendMessage?i():C(o,50)}()};c=_({props:{src:e.local+"#_4"+e.channel},onLoad:t})},init:function(){a(r.onDOMReady,r)}}},j.stack.HashTransport=function(e){function t(t){if(o("sending message '"+(p+1)+" "+t+"' to "+y),!m)return void o("no caller window");var i=e.remote+"#"+p++ +"_"+t;(l||!v?m.contentWindow:m).location=i}function i(e){d=e,o("received message '"+d+"' from "+y),r.up.incoming(d.substring(d.indexOf("_")+1),y)}function n(){if(f){var e=f.location.href,t="",n=e.indexOf("#");-1!=n&&(t=e.substring(n)),t&&t!=d&&(o("poll: new message"),i(t))}}function s(){o("starting polling"),c=setInterval(n,u)}var o=q.getTracer("easyXDM.stack.HashTransport");o("constructor");var r,l,c,u,d,p,f,m,v,y;return r={outgoing:function(e){t(e)},destroy:function(){window.clearInterval(c),(l||!v)&&m.parentNode.removeChild(m),m=null},onDOMReady:function(){if(l=e.isHost,u=e.interval,d="#"+e.channel,p=0,v=e.useParent,y=h(e.remote),l){if(g(e.props,{src:e.remote,name:z+e.channel+"_provider"}),v)e.onLoad=function(){f=window,s(),r.up.callback(!0)};else{var t=0,i=e.delay/50;!function n(){if(++t>i)throw o("unable to get reference to _listenerWindow, giving up"),new Error("Unable to reference listenerwindow");try{f=m.contentWindow.frames[z+e.channel+"_consumer"]}catch(a){}f?(s(),o("got a reference to _listenerWindow"),r.up.callback(!0)):C(n,50)}()}m=_(e)}else f=window,s(),v?(m=parent,r.up.callback(!0)):(g(e,{props:{src:e.remote+"#"+e.channel+new Date,name:z+e.channel+"_consumer"},onLoad:function(){r.up.callback(!0)}}),m=_(e))},init:function(){a(r.onDOMReady,r)}}},j.stack.ReliableBehavior=function(){var e=q.getTracer("easyXDM.stack.ReliableBehavior");e("constructor");var t,i,n=0,s=0,o="";return t={incoming:function(r,a){e("incoming: "+r);var l=r.indexOf("_"),c=r.substring(0,l).split(",");r=r.substring(l+1),c[0]==n&&(e("message delivered"),o="",i&&i(!0)),r.length>0&&(e("sending ack, and passing on "+r),t.down.outgoing(c[1]+","+n+"_"+o,a),s!=c[1]&&(s=c[1],t.up.incoming(r,a)))},outgoing:function(e,r,a){o=e,i=a,t.down.outgoing(s+","+ ++n+"_"+e,r)}}},j.stack.QueueBehavior=function(e){function t(){if(e.remove&&0===o.length)return i("removing myself from the stack"),void w(n);if(!r&&0!==o.length&&!s){i("dispatching from queue"),r=!0;var a=o.shift();n.down.outgoing(a.data,a.origin,function(e){r=!1,a.callback&&C(function(){a.callback(e)},0),t()})}}var i=q.getTracer("easyXDM.stack.QueueBehavior");i("constructor");var n,s,o=[],r=!0,a="",l=0,c=!1,u=!1;return n={init:function(){m(e)&&(e={}),e.maxLength&&(l=e.maxLength,u=!0),e.lazy?c=!0:n.down.init()},callback:function(e){r=!1;var i=n.up;t(),i.callback(e)},incoming:function(t,s){if(u){var o=t.indexOf("_"),r=parseInt(t.substring(0,o),10);a+=t.substring(o+1),0===r?(i("received the last fragment"),e.encode&&(a=decodeURIComponent(a)),n.up.incoming(a,s),a=""):i("waiting for more fragments, seq="+t)}else n.up.incoming(t,s)},outgoing:function(s,r,a){e.encode&&(s=encodeURIComponent(s));var d,h=[];if(u){for(;0!==s.length;)d=s.substring(0,l),s=s.substring(d.length),h.push(d);for(;d=h.shift();)i("enqueuing"),o.push({data:h.length+"_"+d,origin:r,callback:0===h.length?a:null})}else o.push({data:s,origin:r,callback:a});c?n.down.init():t()},destroy:function(){i("destroy"),s=!0,n.down.destroy()}}},j.stack.VerifyBehavior=function(e){function t(){i("requesting verification"),s=Math.random().toString(16).substring(2),n.down.outgoing(s)}var i=q.getTracer("easyXDM.stack.VerifyBehavior");i("constructor");var n,s,o;return n={incoming:function(r,a){var l=r.indexOf("_");-1===l?r===s?(i("verified, calling callback"),n.up.callback(!0)):o||(i("returning secret"),o=r,e.initiate||t(),n.down.outgoing(r)):r.substring(0,l)===o&&n.up.incoming(r.substring(l+1),a)},outgoing:function(e,t,i){n.down.outgoing(s+"_"+e,t,i)},callback:function(){e.initiate&&t()}}},j.stack.RpcBehavior=function(e,t){function i(e){e.jsonrpc="2.0",r.down.outgoing(l.stringify(e))}function n(e,t){var n=Array.prototype.slice;return a("creating method "+t),function(){a("executing method "+t);var s,o=arguments.length,r={method:t};return o>0&&"function"==typeof arguments[o-1]?(o>1&&"function"==typeof arguments[o-2]?(s={success:arguments[o-2],error:arguments[o-1]},r.params=n.call(arguments,0,o-2)):(s={success:arguments[o-1]},r.params=n.call(arguments,0,o-1)),u[""+ ++c]=s,r.id=c):r.params=n.call(arguments,0),e.namedParams&&1===r.params.length&&(r.params=r.params[0]),i(r),r.id}}function o(e,t,n,o){if(!n)return a("requested to execute non-existent procedure "+e),void(t&&i({id:t,error:{code:-32601,message:"Procedure not found."}}));a("requested to execute procedure "+e);var r,l;t?(r=function(e){r=O,i({id:t,result:e})},l=function(e,n){l=O;var s={id:t,error:{code:-32099,message:e}};n&&(s.error.data=n),i(s)}):r=l=O,s(o)||(o=[o]);try{var c=n.method.apply(n.scope,o.concat([r,l]));m(c)||r(c)}catch(u){l(u.message)}}var r,a=q.getTracer("easyXDM.stack.RpcBehavior"),l=t.serializer||Y(),c=0,u={};return r={incoming:function(e){var n=l.parse(e);if(n.method)a("received request to execute method "+n.method+(n.id?" using callback id "+n.id:"")),n&&n.params&&n.params[0]&&"object"==typeof n.params[0]&&(n.params[0].id=n.id),t.handle?t.handle(n,i):o(n.method,n.id,t.local[n.method],n.params);else{a("received return value destined to callback with id "+n.id);var s=u[n.id];n.error?s.error?s.error(n.error):a("unhandled error returned."):s.success&&s.success(n.result),delete u[n.id]}},init:function(){if(a("init"),t.remote){a("creating stubs");for(var i in t.remote)t.remote.hasOwnProperty(i)&&(e[i]=n(t.remote[i],i))}r.down.init()},destroy:function(){a("destroy");for(var i in t.remote)t.remote.hasOwnProperty(i)&&e.hasOwnProperty(i)&&delete e[i];r.down.destroy()}}},j}),define("common/transport/fakeXhrFactory",["require","underscore"],function(e){var t=e("underscore");return function(e){var i={},n={};return t.extend(e,{getResponseHeader:function(t){var i,n=/^(.*?):[ \t]*([^\r\n]*)$/gm;if(4===e.readyState){if(!this.responseHeaders)for(this.responseHeaders={};i=n.exec(this.responseHeadersString);)this.responseHeaders[i[1].toLowerCase()]=i[2];i=this.responseHeaders[t.toLowerCase()]}return null==i?null:i},getAllResponseHeaders:function(){return 2===e.readyState?this.responseHeadersString:null},setRequestHeader:function(t,s){var o=t.toLowerCase();return e.readyState||(t=i[o]=i[o]||t,n[t]=s),this}})}}),define("common/transport/xdmRequest",["require","jquery","underscore","xdm","./fakeXhrFactory","jrs.configs","logger"],function(e){function t(e,t){var i=n.Deferred(),s=n.Deferred(),o=e.request(t,function(e){i.resolve(e.data,e.status,r(e.xhr))},function(e){i.reject(e.message,e.data)});return t.success&&i.done(t.success),t.error&&i.fail(t.error),t.complete&&i.always(t.complete),i.done(s.resolve).fail(s.reject).progress(s.notify),s.fail(function(){"pending"==i.state()&&e.abort(o)}),s}function i(){var e=[];return e.push({name:"logEnabled",value:l.get("enabled")}),l.get("level")&&e.push({name:"logLevel",value:l.get("level")}),n.param(e)}var n=e("jquery"),s=e("underscore"),o=e("xdm"),r=e("./fakeXhrFactory"),a=e("jrs.configs"),l=e("logger"),c=function(e){if(0===arguments.length)throw new Error("Not enough arguments to perform the request.");var i=c.create(e.baseUrl?e.baseUrl:a.contextPath);return t(i,e)};return c.create=s.memoize(function(e){return new o.Rpc({remote:e+"/xdm.html?"+i(),container:document.body,props:{style:{display:"none"}}},{remote:{request:{},abort:{}}})}),c}),define("common/transport/xhrRequest",["require","jquery","underscore","logger"],function(e){function t(){r.trigger.apply(r,arguments)}function i(e){(401==e.status||e.getResponseHeader("LoginRequested"))&&(n(window).trigger("sessionExpired"),o.warn("Session timed-out. Redirecting to login page."),window.location.reload())}var n=e("jquery"),s=e("underscore"),o=e("logger").register("request");if("undefined"==typeof document)return{};var r=n(document);return function(e){return s.partial(t,"request:before").apply(null,arguments),n.ajax(e).fail(i).fail(function(e){e.getResponseHeader("adhocException")?o.error(e.getResponseHeader("adhocException")):(500==e.status||e.getResponseHeader("JasperServerError")&&!e.getResponseHeader("SuppressError"))&&o.error(e.responseText)}).fail(s.partial(t,"request:failure")).done(s.partial(t,"request:success"))}}),define("common/transport/request",["require","jquery","underscore","jrs.configs","common/config/requestSettings","common/transport/xdmRequest","common/transport/xhrRequest"],function(e){var t,i=e("jquery"),n=e("underscore"),s=e("jrs.configs"),o=e("common/config/requestSettings"),r=e("common/transport/xdmRequest"),a=e("common/transport/xhrRequest");return function(){t||(t=s.isXdm?r:a);var e=n.extend({},o,arguments[0]);return o.headers&&arguments[0].headers&&(e.headers=n.extend({},o.headers,arguments[0].headers)),arguments[0]=e,t.apply(i,arguments)}}),define("settings",["require","common/transport/request","common/config/requestSettings","underscore","jrs.configs"],function(e){var t=e("common/transport/request"),i=e("common/config/requestSettings"),n=e("underscore"),s=e("jrs.configs"),o=s.contextPath+"/rest_v2/settings/",r=function(e,s){var r=n.extend({},i,{type:"GET",dataType:"json",url:o+e});t(r).fail(function(){s(null)}).then(function(e){s(e)})};return r.load=function(e,t,i,n){return n.isBuild?void i():void r(e,i)},r}),define("common/jquery/extension/datepickerExt",["require","jrs.configs","jquery.ui","underscore","settings!dateTimeSettings"],function(e){function t(e,t){var i="en";return e&&(s.contains(t,e)?i=e:s.contains(t,e.substring(0,2))&&(i=e.substring(0,2))),i.replace("_","-")}var i=e("jrs.configs"),n=e("jquery.ui"),s=e("underscore"),o=e("settings!dateTimeSettings"),r=t(i.userLocale,i.avaliableLocales);return o&&n(function(e){e.datepicker.regional[r]=o.datepicker,e.datepicker.setDefaults(e.datepicker.regional[r])}),n.datepicker.movePickerRelativelyToTriggerIcon=function(e,t){var i=n(e).offset().left,s=parseFloat(t.dpDiv.css("width").replace("px","")),o=i+e.offsetWidth+s<n(window).width();t.dpDiv.css({marginLeft:o?e.offsetWidth+"px":0})},n}),define("jquery.timepicker.addon",["require","jquery.ui"],function(require){var jQuery=require("jquery.ui");return function($){if($.ui.timepicker=$.ui.timepicker||{},!$.ui.timepicker.version){$.extend($.ui,{timepicker:{version:"1.3"}});var Timepicker=function(){this.regional=[],this.regional[""]={currentText:"Now",closeText:"Done",amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"HH:mm",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",microsecText:"Microsecond",timezoneText:"Time Zone",isRTL:!1},this._defaults={showButtonPanel:!0,timeOnly:!1,showHour:null,showMinute:null,showSecond:null,showMillisec:null,showMicrosec:null,showTimezone:null,showTime:!0,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,stepMicrosec:1,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,microsecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,microsecMax:999,minDateTime:null,maxDateTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,microsecGrid:0,alwaysSetTime:!0,separator:" ",altFieldTimeOnly:!0,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:!0,timezoneList:null,addSliderAccess:!1,sliderAccessArgs:null,controlType:"slider",defaultValue:null,parse:"strict"},$.extend(this._defaults,this.regional[""])};$.extend(Timepicker.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,microsec_slider:null,timezone_select:null,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,microsecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,microsecMaxOriginal:null,ampm:"",formattedDate:"",formattedTime:"",formattedDateTime:"",timezoneList:null,units:["hour","minute","second","millisec","microsec"],support:{},control:null,setDefaults:function(e){return extendRemove(this._defaults,e||{}),this},_newInst:function($input,o){var tp_inst=new Timepicker,inlineSettings={},fns={},overrides,i;for(var attrName in this._defaults)if(this._defaults.hasOwnProperty(attrName)){var attrValue=$input.attr("time:"+attrName);if(attrValue)try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}overrides={beforeShow:function(e,t){return $.isFunction(tp_inst._defaults.evnts.beforeShow)?tp_inst._defaults.evnts.beforeShow.call($input[0],e,t,tp_inst):void 0},onChangeMonthYear:function(e,t,i){tp_inst._updateDateTime(i),$.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)&&tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],e,t,i,tp_inst)},onClose:function(e,t){tp_inst.timeDefined===!0&&""!==$input.val()&&tp_inst._updateDateTime(t),$.isFunction(tp_inst._defaults.evnts.onClose)&&tp_inst._defaults.evnts.onClose.call($input[0],e,t,tp_inst)}};for(i in overrides)overrides.hasOwnProperty(i)&&(fns[i]=o[i]||null);tp_inst._defaults=$.extend({},this._defaults,inlineSettings,o,overrides,{evnts:fns,timepicker:tp_inst}),tp_inst.amNames=$.map(tp_inst._defaults.amNames,function(e){return e.toUpperCase()}),tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(e){return e.toUpperCase()}),tp_inst.support=detectSupport(tp_inst._defaults.timeFormat+(tp_inst._defaults.pickerTimeFormat?tp_inst._defaults.pickerTimeFormat:"")+(tp_inst._defaults.altTimeFormat?tp_inst._defaults.altTimeFormat:"")),"string"==typeof tp_inst._defaults.controlType?("slider"==tp_inst._defaults.controlType&&"undefined"==typeof $.ui.slider&&(tp_inst._defaults.controlType="select"),tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]):tp_inst.control=tp_inst._defaults.controlType;var timezoneList=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840];null!==tp_inst._defaults.timezoneList&&(timezoneList=tp_inst._defaults.timezoneList);var tzl=timezoneList.length,tzi=0,tzv=null;if(tzl>0&&"object"!=typeof timezoneList[0])for(;tzl>tzi;tzi++)tzv=timezoneList[tzi],timezoneList[tzi]={value:tzv,label:$.timepicker.timezoneOffsetString(tzv,tp_inst.support.iso8601)};return tp_inst._defaults.timezoneList=timezoneList,tp_inst.timezone=null!==tp_inst._defaults.timezone?$.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone):-1*(new Date).getTimezoneOffset(),tp_inst.hour=tp_inst._defaults.hour<tp_inst._defaults.hourMin?tp_inst._defaults.hourMin:tp_inst._defaults.hour>tp_inst._defaults.hourMax?tp_inst._defaults.hourMax:tp_inst._defaults.hour,tp_inst.minute=tp_inst._defaults.minute<tp_inst._defaults.minuteMin?tp_inst._defaults.minuteMin:tp_inst._defaults.minute>tp_inst._defaults.minuteMax?tp_inst._defaults.minuteMax:tp_inst._defaults.minute,tp_inst.second=tp_inst._defaults.second<tp_inst._defaults.secondMin?tp_inst._defaults.secondMin:tp_inst._defaults.second>tp_inst._defaults.secondMax?tp_inst._defaults.secondMax:tp_inst._defaults.second,tp_inst.millisec=tp_inst._defaults.millisec<tp_inst._defaults.millisecMin?tp_inst._defaults.millisecMin:tp_inst._defaults.millisec>tp_inst._defaults.millisecMax?tp_inst._defaults.millisecMax:tp_inst._defaults.millisec,tp_inst.microsec=tp_inst._defaults.microsec<tp_inst._defaults.microsecMin?tp_inst._defaults.microsecMin:tp_inst._defaults.microsec>tp_inst._defaults.microsecMax?tp_inst._defaults.microsecMax:tp_inst._defaults.microsec,tp_inst.ampm="",tp_inst.$input=$input,o.altField&&(tp_inst.$altInput=$(o.altField).css({cursor:"pointer"}).focus(function(){$input.trigger("focus")})),(0===tp_inst._defaults.minDate||0===tp_inst._defaults.minDateTime)&&(tp_inst._defaults.minDate=new Date),(0===tp_inst._defaults.maxDate||0===tp_inst._defaults.maxDateTime)&&(tp_inst._defaults.maxDate=new Date),void 0!==tp_inst._defaults.minDate&&tp_inst._defaults.minDate instanceof Date&&(tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())),void 0!==tp_inst._defaults.minDateTime&&tp_inst._defaults.minDateTime instanceof Date&&(tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())),void 0!==tp_inst._defaults.maxDate&&tp_inst._defaults.maxDate instanceof Date&&(tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())),void 0!==tp_inst._defaults.maxDateTime&&tp_inst._defaults.maxDateTime instanceof Date&&(tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())),tp_inst.$input.bind("focus",function(){tp_inst._onFocus()}),tp_inst},_addTimePicker:function(e){var t=this.$altInput&&this._defaults.altFieldTimeOnly?this.$input.val()+" "+this.$altInput.val():this.$input.val();this.timeDefined=this._parseTime(t),this._limitMinMaxDateTime(e,!1),this._injectTimePicker()},_parseTime:function(e,t){if(this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),t||!this._defaults.timeOnly){var i=$.datepicker._get(this.inst,"dateFormat");try{var n=parseDateTimeInternal(i,this._defaults.timeFormat,e,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!n.timeObj)return!1;$.extend(this,n.timeObj)}catch(s){return $.timepicker.log("Error parsing the date/time string: "+s+"\ndate/time string = "+e+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+i),!1}return!0}var o=$.datepicker.parseTime(this._defaults.timeFormat,e,this._defaults);return o?($.extend(this,o),!0):!1},_injectTimePicker:function(){var e=this.inst.dpDiv,t=this.inst.settings,i=this,n="",s="",o=null,r={},a={},l=null,c=0,u=0;if(0===e.find("div.ui-timepicker-div").length&&t.showTimepicker){var d=' style="display:none;"',h='<div class="ui-timepicker-div'+(t.isRTL?" ui-timepicker-rtl":"")+'"><dl><dt class="ui_tpicker_time_label"'+(t.showTime?"":d)+">"+t.timeText+'</dt><dd class="ui_tpicker_time"'+(t.showTime?"":d)+"></dd>";for(c=0,u=this.units.length;u>c;c++){if(n=this.units[c],s=n.substr(0,1).toUpperCase()+n.substr(1),o=null!==t["show"+s]?t["show"+s]:this.support[n],r[n]=parseInt(t[n+"Max"]-(t[n+"Max"]-t[n+"Min"])%t["step"+s],10),a[n]=0,h+='<dt class="ui_tpicker_'+n+'_label"'+(o?"":d)+">"+t[n+"Text"]+'</dt><dd class="ui_tpicker_'+n+'"><div class="ui_tpicker_'+n+'_slider"'+(o?"":d)+"></div>",o&&t[n+"Grid"]>0){if(h+='<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>',"hour"==n)for(var p=t[n+"Min"];p<=r[n];p+=parseInt(t[n+"Grid"],10)){a[n]++;var f=$.datepicker.formatTime(this.support.ampm?"hht":"HH",{hour:p},t);h+='<td data-for="'+n+'">'+f+"</td>"}else for(var m=t[n+"Min"];m<=r[n];m+=parseInt(t[n+"Grid"],10))a[n]++,h+='<td data-for="'+n+'">'+(10>m?"0":"")+m+"</td>";h+="</tr></table></div>"}h+="</dd>"}var g=null!==t.showTimezone?t.showTimezone:this.support.timezone;h+='<dt class="ui_tpicker_timezone_label"'+(g?"":d)+">"+t.timezoneText+"</dt>",h+='<dd class="ui_tpicker_timezone" '+(g?"":d)+"></dd>",h+="</dl></div>";var v=$(h);for(t.timeOnly===!0&&(v.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all"><div class="ui-datepicker-title">'+t.timeOnlyTitle+"</div></div>"),e.find(".ui-datepicker-header, .ui-datepicker-calendar").hide()),c=0,u=i.units.length;u>c;c++)n=i.units[c],s=n.substr(0,1).toUpperCase()+n.substr(1),o=null!==t["show"+s]?t["show"+s]:this.support[n],i[n+"_slider"]=i.control.create(i,v.find(".ui_tpicker_"+n+"_slider"),n,i[n],t[n+"Min"],r[n],t["step"+s]),o&&t[n+"Grid"]>0&&(l=100*a[n]*t[n+"Grid"]/(r[n]-t[n+"Min"]),v.find(".ui_tpicker_"+n+" table").css({width:l+"%",marginLeft:t.isRTL?"0":l/(-2*a[n])+"%",marginRight:t.isRTL?l/(-2*a[n])+"%":"0",borderCollapse:"collapse"}).find("td").click(function(){var e=$(this),t=e.html(),s=parseInt(t.replace(/[^0-9]/g),10),o=t.replace(/[^apm]/gi),r=e.data("for");"hour"==r&&(-1!==o.indexOf("p")&&12>s?s+=12:-1!==o.indexOf("a")&&12===s&&(s=0)),i.control.value(i,i[r+"_slider"],n,s),i._onTimeChange(),i._onSelectHandler()}).css({cursor:"pointer",width:100/a[n]+"%",textAlign:"center",overflow:"hidden"}));if(this.timezone_select=v.find(".ui_tpicker_timezone").append("<select></select>").find("select"),$.fn.append.apply(this.timezone_select,$.map(t.timezoneList,function(e){return $("<option />").val("object"==typeof e?e.value:e).text("object"==typeof e?e.label:e)})),"undefined"!=typeof this.timezone&&null!==this.timezone&&""!==this.timezone){var _=-1*new Date(this.inst.selectedYear,this.inst.selectedMonth,this.inst.selectedDay,12).getTimezoneOffset();_==this.timezone?selectLocalTimezone(i):this.timezone_select.val(this.timezone)}else"undefined"!=typeof this.hour&&null!==this.hour&&""!==this.hour?this.timezone_select.val(t.timezone):selectLocalTimezone(i);this.timezone_select.change(function(){i._onTimeChange(),i._onSelectHandler()});var y=e.find(".ui-datepicker-buttonpane");if(y.length?y.before(v):e.append(v),this.$timeObj=v.find(".ui_tpicker_time"),null!==this.inst){var b=this.timeDefined;this._onTimeChange(),this.timeDefined=b}if(this._defaults.addSliderAccess){var T=this._defaults.sliderAccessArgs,w=this._defaults.isRTL;T.isRTL=w,setTimeout(function(){if(0===v.find(".ui-slider-access").length){v.find(".ui-slider:visible").sliderAccess(T);var e=v.find(".ui-slider-access:eq(0)").outerWidth(!0);e&&v.find("table:visible").each(function(){var t=$(this),i=t.outerWidth(),n=t.css(w?"marginRight":"marginLeft").toString().replace("%",""),s=i-e,o=n*s/i+"%",r={width:s,marginRight:0,marginLeft:0};r[w?"marginRight":"marginLeft"]=o,t.css(r)})}},10)}}},_limitMinMaxDateTime:function(e,t){var i=this._defaults,n=new Date(e.selectedYear,e.selectedMonth,e.selectedDay);if(this._defaults.showTimepicker){if(null!==$.datepicker._get(e,"minDateTime")&&void 0!==$.datepicker._get(e,"minDateTime")&&n){var s=$.datepicker._get(e,"minDateTime"),o=new Date(s.getFullYear(),s.getMonth(),s.getDate(),0,0,0,0);(null===this.hourMinOriginal||null===this.minuteMinOriginal||null===this.secondMinOriginal||null===this.millisecMinOriginal||null===this.microsecMinOriginal)&&(this.hourMinOriginal=i.hourMin,this.minuteMinOriginal=i.minuteMin,this.secondMinOriginal=i.secondMin,this.millisecMinOriginal=i.millisecMin,this.microsecMinOriginal=i.microsecMin),e.settings.timeOnly||o.getTime()==n.getTime()?(this._defaults.hourMin=s.getHours(),this.hour<=this._defaults.hourMin?(this.hour=this._defaults.hourMin,this._defaults.minuteMin=s.getMinutes(),this.minute<=this._defaults.minuteMin?(this.minute=this._defaults.minuteMin,this._defaults.secondMin=s.getSeconds(),this.second<=this._defaults.secondMin?(this.second=this._defaults.secondMin,this._defaults.millisecMin=s.getMilliseconds(),this.millisec<=this._defaults.millisecMin?(this.millisec=this._defaults.millisecMin,this._defaults.microsecMin=s.getMicroseconds()):(this.microsec<this._defaults.microsecMin&&(this.microsec=this._defaults.microsecMin),this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.hourMin=this.hourMinOriginal,this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)}if(null!==$.datepicker._get(e,"maxDateTime")&&void 0!==$.datepicker._get(e,"maxDateTime")&&n){var r=$.datepicker._get(e,"maxDateTime"),a=new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0,0);
  (null===this.hourMaxOriginal||null===this.minuteMaxOriginal||null===this.secondMaxOriginal||null===this.millisecMaxOriginal)&&(this.hourMaxOriginal=i.hourMax,this.minuteMaxOriginal=i.minuteMax,this.secondMaxOriginal=i.secondMax,this.millisecMaxOriginal=i.millisecMax,this.microsecMaxOriginal=i.microsecMax),e.settings.timeOnly||a.getTime()==n.getTime()?(this._defaults.hourMax=r.getHours(),this.hour>=this._defaults.hourMax?(this.hour=this._defaults.hourMax,this._defaults.minuteMax=r.getMinutes(),this.minute>=this._defaults.minuteMax?(this.minute=this._defaults.minuteMax,this._defaults.secondMax=r.getSeconds(),this.second>=this._defaults.secondMax?(this.second=this._defaults.secondMax,this._defaults.millisecMax=r.getMilliseconds(),this.millisec>=this._defaults.millisecMax?(this.millisec=this._defaults.millisecMax,this._defaults.microsecMax=r.getMicroseconds()):(this.microsec>this._defaults.microsecMax&&(this.microsec=this._defaults.microsecMax),this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.hourMax=this.hourMaxOriginal,this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)}if(void 0!==t&&t===!0){var l=parseInt(this._defaults.hourMax-(this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour,10),c=parseInt(this._defaults.minuteMax-(this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute,10),u=parseInt(this._defaults.secondMax-(this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond,10),d=parseInt(this._defaults.millisecMax-(this._defaults.millisecMax-this._defaults.millisecMin)%this._defaults.stepMillisec,10);microsecMax=parseInt(this._defaults.microsecMax-(this._defaults.microsecMax-this._defaults.microsecMin)%this._defaults.stepMicrosec,10),this.hour_slider&&(this.control.options(this,this.hour_slider,"hour",{min:this._defaults.hourMin,max:l}),this.control.value(this,this.hour_slider,"hour",this.hour-this.hour%this._defaults.stepHour)),this.minute_slider&&(this.control.options(this,this.minute_slider,"minute",{min:this._defaults.minuteMin,max:c}),this.control.value(this,this.minute_slider,"minute",this.minute-this.minute%this._defaults.stepMinute)),this.second_slider&&(this.control.options(this,this.second_slider,"second",{min:this._defaults.secondMin,max:u}),this.control.value(this,this.second_slider,"second",this.second-this.second%this._defaults.stepSecond)),this.millisec_slider&&(this.control.options(this,this.millisec_slider,"millisec",{min:this._defaults.millisecMin,max:d}),this.control.value(this,this.millisec_slider,"millisec",this.millisec-this.millisec%this._defaults.stepMillisec)),this.microsec_slider&&(this.control.options(this,this.microsec_slider,"microsec",{min:this._defaults.microsecMin,max:microsecMax}),this.control.value(this,this.microsec_slider,"microsec",this.microsec-this.microsec%this._defaults.stepMicrosec))}}},_onTimeChange:function(){var e=this.hour_slider?this.control.value(this,this.hour_slider,"hour"):!1,t=this.minute_slider?this.control.value(this,this.minute_slider,"minute"):!1,i=this.second_slider?this.control.value(this,this.second_slider,"second"):!1,n=this.millisec_slider?this.control.value(this,this.millisec_slider,"millisec"):!1,s=this.microsec_slider?this.control.value(this,this.microsec_slider,"microsec"):!1,o=this.timezone_select?this.timezone_select.val():!1,r=this._defaults,a=r.pickerTimeFormat||r.timeFormat,l=r.pickerTimeSuffix||r.timeSuffix;"object"==typeof e&&(e=!1),"object"==typeof t&&(t=!1),"object"==typeof i&&(i=!1),"object"==typeof n&&(n=!1),"object"==typeof s&&(s=!1),"object"==typeof o&&(o=!1),e!==!1&&(e=parseInt(e,10)),t!==!1&&(t=parseInt(t,10)),i!==!1&&(i=parseInt(i,10)),n!==!1&&(n=parseInt(n,10)),s!==!1&&(s=parseInt(s,10));var c=r[12>e?"amNames":"pmNames"][0],u=e!=this.hour||t!=this.minute||i!=this.second||n!=this.millisec||s!=this.microsec||this.ampm.length>0&&12>e!=(-1!==$.inArray(this.ampm.toUpperCase(),this.amNames))||null!==this.timezone&&o!=this.timezone;u&&(e!==!1&&(this.hour=e),t!==!1&&(this.minute=t),i!==!1&&(this.second=i),n!==!1&&(this.millisec=n),s!==!1&&(this.microsec=s),o!==!1&&(this.timezone=o),this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),this._limitMinMaxDateTime(this.inst,!0)),this.support.ampm&&(this.ampm=c),this.formattedTime=$.datepicker.formatTime(r.timeFormat,this,r),this.$timeObj&&this.$timeObj.text(a===r.timeFormat?this.formattedTime+l:$.datepicker.formatTime(a,this,r)+l),this.timeDefined=!0,u&&this._updateDateTime()},_onSelectHandler:function(){var e=this._defaults.onSelect||this.inst.settings.onSelect,t=this.$input?this.$input[0]:null;e&&t&&e.apply(t,[this.formattedDateTime,this])},_updateDateTime:function(e){e=this.inst||e;var t=$.datepicker._daylightSavingAdjust(new Date(e.selectedYear,e.selectedMonth,e.selectedDay)),i=$.datepicker._get(e,"dateFormat"),n=$.datepicker._getFormatConfig(e),s=null!==t&&this.timeDefined;this.formattedDate=$.datepicker.formatDate(i,null===t?new Date:t,n);var o=this.formattedDate;if(""===e.lastVal&&(e.currentYear=e.selectedYear,e.currentMonth=e.selectedMonth,e.currentDay=e.selectedDay),this._defaults.timeOnly===!0?o=this.formattedTime:this._defaults.timeOnly!==!0&&(this._defaults.alwaysSetTime||s)&&(o+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix),this.formattedDateTime=o,this._defaults.showTimepicker)if(this.$altInput&&this._defaults.timeOnly===!1&&this._defaults.altFieldTimeOnly===!0)this.$altInput.val(this.formattedTime),this.$input.val(this.formattedDate);else if(this.$altInput){this.$input.val(o);var r="",a=this._defaults.altSeparator?this._defaults.altSeparator:this._defaults.separator,l=this._defaults.altTimeSuffix?this._defaults.altTimeSuffix:this._defaults.timeSuffix;this._defaults.timeOnly||(r=this._defaults.altFormat?$.datepicker.formatDate(this._defaults.altFormat,null===t?new Date:t,n):this.formattedDate,r&&(r+=a)),r+=this._defaults.altTimeFormat?$.datepicker.formatTime(this._defaults.altTimeFormat,this,this._defaults)+l:this.formattedTime+l,this.$altInput.val(r)}else this.$input.val(o);else this.$input.val(this.formattedDate);var c=$.datepicker._get(e,"onUpdateDateTime");c&&""!==this.formattedTime&&c.apply(window,[{time:this.formattedTime,date:this.formattedDate,datetime:o}]),this.$input.trigger("change")},_onFocus:function(){if(!this.$input.val()&&this._defaults.defaultValue){this.$input.val(this._defaults.defaultValue);var e=$.datepicker._getInst(this.$input.get(0)),t=$.datepicker._get(e,"timepicker");if(t&&t._defaults.timeOnly&&e.input.val()!=e.lastVal)try{$.datepicker._updateDatepicker(e)}catch(i){$.timepicker.log(i)}}},_controls:{slider:{create:function(e,t,i,n,s,o,r){var a=e._defaults.isRTL;return t.prop("slide",null).slider({orientation:"horizontal",value:a?-1*n:n,min:a?-1*o:s,max:a?-1*s:o,step:r,slide:function(t,n){e.control.value(e,$(this),i,a?-1*n.value:n.value),e._onTimeChange()},stop:function(){e._onSelectHandler()}})},options:function(e,t,i,n,s){if(e._defaults.isRTL){if("string"==typeof n)return"min"==n||"max"==n?void 0!==s?t.slider(n,-1*s):Math.abs(t.slider(n)):t.slider(n);var o=n.min,r=n.max;return n.min=n.max=null,void 0!==o&&(n.max=-1*o),void 0!==r&&(n.min=-1*r),t.slider(n)}return"string"==typeof n&&void 0!==s?t.slider(n,s):t.slider(n)},value:function(e,t,i,n){return e._defaults.isRTL?void 0!==n?t.slider("value",-1*n):Math.abs(t.slider("value")):void 0!==n?t.slider("value",n):t.slider("value")}},select:{create:function(e,t,i,n,s,o,r){for(var a='<select class="ui-timepicker-select" data-unit="'+i+'" data-min="'+s+'" data-max="'+o+'" data-step="'+r+'">',l=e._defaults.pickerTimeFormat||e._defaults.timeFormat,c=s;o>=c;c+=r)a+='<option value="'+c+'"'+(c==n?" selected":"")+">",a+="hour"==i?$.datepicker.formatTime($.trim(l.replace(/[^ht ]/gi,"")),{hour:c},e._defaults):"millisec"==i||"microsec"==i||c>=10?c:"0"+c.toString(),a+="</option>";return a+="</select>",t.children("select").remove(),$(a).appendTo(t).change(function(){e._onTimeChange(),e._onSelectHandler()}),t},options:function(e,t,i,n,s){var o={},r=t.children("select");if("string"==typeof n){if(void 0===s)return r.data(n);o[n]=s}else o=n;return e.control.create(e,t,r.data("unit"),r.val(),o.min||r.data("min"),o.max||r.data("max"),o.step||r.data("step"))},value:function(e,t,i,n){var s=t.children("select");return void 0!==n?s.val(n):s.val()}}}}),$.fn.extend({timepicker:function(e){e=e||{};var t=Array.prototype.slice.call(arguments);return"object"==typeof e&&(t[0]=$.extend(e,{timeOnly:!0})),$(this).each(function(){$.fn.datetimepicker.apply($(this),t)})},datetimepicker:function(e){e=e||{};var t=arguments;return"string"==typeof e?"getDate"==e?$.fn.datepicker.apply($(this[0]),t):this.each(function(){var e=$(this);e.datepicker.apply(e,t)}):this.each(function(){var t=$(this);t.datepicker($.timepicker._newInst(t,e)._defaults)})}}),$.datepicker.parseDateTime=function(e,t,i,n,s){var o=parseDateTimeInternal(e,t,i,n,s);if(o.timeObj){var r=o.timeObj;o.date.setHours(r.hour,r.minute,r.second,r.millisec),o.date.setMicroseconds(r.microsec)}return o.date},$.datepicker.parseTime=function(e,t,i){var n=extendRemove(extendRemove({},$.timepicker._defaults),i||{}),s=(-1!==e.replace(/\'.*?\'/g,"").indexOf("Z"),function(e,t,i){var n,s=function(e,t){var i=[];return e&&$.merge(i,e),t&&$.merge(i,t),i=$.map(i,function(e){return e.replace(/[.*+?|()\[\]{}\\]/g,"\\$&")}),"("+i.join("|")+")?"},o=function(e){var t=e.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),i={h:-1,m:-1,s:-1,l:-1,c:-1,t:-1,z:-1};if(t)for(var n=0;n<t.length;n++)-1==i[t[n].toString().charAt(0)]&&(i[t[n].toString().charAt(0)]=n+1);return i},r="^"+e.toString().replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(e){var t=e.length;switch(e.charAt(0).toLowerCase()){case"h":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"m":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"s":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"l":return"(\\d?\\d?\\d)";case"c":return"(\\d?\\d?\\d)";case"z":return"(z|[-+]\\d\\d:?\\d\\d|\\S+)?";case"t":return s(i.amNames,i.pmNames);default:return"("+e.replace(/\'/g,"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g,function(e){return"\\"+e})+")?"}}).replace(/\s/g,"\\s?")+i.timeSuffix+"$",a=o(e),l="";n=t.match(new RegExp(r,"i"));var c={hour:0,minute:0,second:0,millisec:0,microsec:0};return n?(-1!==a.t&&(void 0===n[a.t]||0===n[a.t].length?(l="",c.ampm=""):(l=-1!==$.inArray(n[a.t].toUpperCase(),i.amNames)?"AM":"PM",c.ampm=i["AM"==l?"amNames":"pmNames"][0])),-1!==a.h&&(c.hour="AM"==l&&"12"==n[a.h]?0:"PM"==l&&"12"!=n[a.h]?parseInt(n[a.h],10)+12:Number(n[a.h])),-1!==a.m&&(c.minute=Number(n[a.m])),-1!==a.s&&(c.second=Number(n[a.s])),-1!==a.l&&(c.millisec=Number(n[a.l])),-1!==a.c&&(c.microsec=Number(n[a.c])),-1!==a.z&&void 0!==n[a.z]&&(c.timezone=$.timepicker.timezoneOffsetNumber(n[a.z])),c):!1}),o=function(e,t,i){try{var n=new Date("2012-01-01 "+t);if(isNaN(n.getTime())&&(n=new Date("2012-01-01T"+t),isNaN(n.getTime())&&(n=new Date("01/01/2012 "+t),isNaN(n.getTime()))))throw"Unable to parse time with native Date: "+t;return{hour:n.getHours(),minute:n.getMinutes(),second:n.getSeconds(),millisec:n.getMilliseconds(),microsec:n.getMicroseconds(),timezone:-1*n.getTimezoneOffset()}}catch(o){try{return s(e,t,i)}catch(r){$.timepicker.log("Unable to parse \ntimeString: "+t+"\ntimeFormat: "+e)}}return!1};return"function"==typeof n.parse?n.parse(e,t,n):"loose"===n.parse?o(e,t,n):s(e,t,n)},$.datepicker.formatTime=function(e,t,i){i=i||{},i=$.extend({},$.timepicker._defaults,i),t=$.extend({hour:0,minute:0,second:0,millisec:0,timezone:0},t);var n=e,s=i.amNames[0],o=parseInt(t.hour,10);return o>11&&(s=i.pmNames[0]),n=n.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|('.*?'|".*?"))/g,function(e){switch(e){case"HH":return("0"+o).slice(-2);case"H":return o;case"hh":return("0"+convert24to12(o)).slice(-2);case"h":return convert24to12(o);case"mm":return("0"+t.minute).slice(-2);case"m":return t.minute;case"ss":return("0"+t.second).slice(-2);case"s":return t.second;case"l":return("00"+t.millisec).slice(-3);case"c":return("00"+t.microsec).slice(-3);case"z":return $.timepicker.timezoneOffsetString(null===t.timezone?i.timezone:t.timezone,!1);case"Z":return $.timepicker.timezoneOffsetString(null===t.timezone?i.timezone:t.timezone,!0);case"T":return s.charAt(0).toUpperCase();case"TT":return s.toUpperCase();case"t":return s.charAt(0).toLowerCase();case"tt":return s.toLowerCase();default:return e.replace(/\'/g,"")||"'"}}),n=$.trim(n)},$.datepicker._base_selectDate=$.datepicker._selectDate,$.datepicker._selectDate=function(e,t){var i=this._getInst($(e)[0]),n=this._get(i,"timepicker");n?(n._limitMinMaxDateTime(i,!0),i.inline=i.stay_open=!0,this._base_selectDate(e,t),i.inline=i.stay_open=!1,this._notifyChange(i),this._updateDatepicker(i)):this._base_selectDate(e,t)},$.datepicker._base_updateDatepicker=$.datepicker._updateDatepicker,$.datepicker._updateDatepicker=function(e){var t=e.input[0];if(!($.datepicker._curInst&&$.datepicker._curInst!=e&&$.datepicker._datepickerShowing&&$.datepicker._lastInput!=t||"boolean"==typeof e.stay_open&&e.stay_open!==!1)){this._base_updateDatepicker(e);var i=this._get(e,"timepicker");i&&i._addTimePicker(e)}},$.datepicker._base_doKeyPress=$.datepicker._doKeyPress,$.datepicker._doKeyPress=function(e){var t=$.datepicker._getInst(e.target),i=$.datepicker._get(t,"timepicker");if(i&&$.datepicker._get(t,"constrainInput")){var n=i.support.ampm,s=null!==i._defaults.showTimezone?i._defaults.showTimezone:i.support.timezone,o=$.datepicker._possibleChars($.datepicker._get(t,"dateFormat")),r=i._defaults.timeFormat.toString().replace(/[hms]/g,"").replace(/TT/g,n?"APM":"").replace(/Tt/g,n?"AaPpMm":"").replace(/tT/g,n?"AaPpMm":"").replace(/T/g,n?"AP":"").replace(/tt/g,n?"apm":"").replace(/t/g,n?"ap":"")+" "+i._defaults.separator+i._defaults.timeSuffix+(s?i._defaults.timezoneList.join(""):"")+i._defaults.amNames.join("")+i._defaults.pmNames.join("")+o,a=String.fromCharCode(void 0===e.charCode?e.keyCode:e.charCode);return e.ctrlKey||" ">a||!o||r.indexOf(a)>-1}return $.datepicker._base_doKeyPress(e)},$.datepicker._base_updateAlternate=$.datepicker._updateAlternate,$.datepicker._updateAlternate=function(e){var t=this._get(e,"timepicker");if(t){var i=t._defaults.altField;if(i){var n=(t._defaults.altFormat||t._defaults.dateFormat,this._getDate(e)),s=$.datepicker._getFormatConfig(e),o="",r=t._defaults.altSeparator?t._defaults.altSeparator:t._defaults.separator,a=t._defaults.altTimeSuffix?t._defaults.altTimeSuffix:t._defaults.timeSuffix,l=null!==t._defaults.altTimeFormat?t._defaults.altTimeFormat:t._defaults.timeFormat;o+=$.datepicker.formatTime(l,t,t._defaults)+a,t._defaults.timeOnly||t._defaults.altFieldTimeOnly||null===n||(o=t._defaults.altFormat?$.datepicker.formatDate(t._defaults.altFormat,n,s)+r+o:t.formattedDate+r+o),$(i).val(o)}}else $.datepicker._base_updateAlternate(e)},$.datepicker._base_doKeyUp=$.datepicker._doKeyUp,$.datepicker._doKeyUp=function(e){var t=$.datepicker._getInst(e.target),i=$.datepicker._get(t,"timepicker");if(i&&i._defaults.timeOnly&&t.input.val()!=t.lastVal)try{$.datepicker._updateDatepicker(t)}catch(n){$.timepicker.log(n)}return $.datepicker._base_doKeyUp(e)},$.datepicker._base_gotoToday=$.datepicker._gotoToday,$.datepicker._gotoToday=function(e){var t=this._getInst($(e)[0]),i=t.dpDiv;this._base_gotoToday(e);var n=this._get(t,"timepicker");selectLocalTimezone(n);var s=new Date;this._setTime(t,s),$(".ui-datepicker-today",i).click()},$.datepicker._disableTimepickerDatepicker=function(e){var t=this._getInst(e);if(t){var i=this._get(t,"timepicker");$(e).datepicker("getDate"),i&&(i._defaults.showTimepicker=!1,i._updateDateTime(t))}},$.datepicker._enableTimepickerDatepicker=function(e){var t=this._getInst(e);if(t){var i=this._get(t,"timepicker");$(e).datepicker("getDate"),i&&(i._defaults.showTimepicker=!0,i._addTimePicker(t),i._updateDateTime(t))}},$.datepicker._setTime=function(e,t){var i=this._get(e,"timepicker");if(i){var n=i._defaults;i.hour=t?t.getHours():n.hour,i.minute=t?t.getMinutes():n.minute,i.second=t?t.getSeconds():n.second,i.millisec=t?t.getMilliseconds():n.millisec,i.microsec=t?t.getMicroseconds():n.microsec,i._limitMinMaxDateTime(e,!0),i._onTimeChange(),i._updateDateTime(e)}},$.datepicker._setTimeDatepicker=function(e,t,i){var n=this._getInst(e);if(n){var s=this._get(n,"timepicker");if(s){this._setDateFromField(n);var o;t&&("string"==typeof t?(s._parseTime(t,i),o=new Date,o.setHours(s.hour,s.minute,s.second,s.millisec),o.setMicroseconds(s.microsec)):o=new Date(t.getTime()),"Invalid Date"==o.toString()&&(o=void 0),this._setTime(n,o))}}},$.datepicker._base_setDateDatepicker=$.datepicker._setDateDatepicker,$.datepicker._setDateDatepicker=function(e,t){var i=this._getInst(e);if(i){var n=this._get(i,"timepicker"),s=t instanceof Date?new Date(t.getTime()):t;n&&null!=n.timezone&&(t=$.timepicker.timezoneAdjust(t,n.timezone),s=$.timepicker.timezoneAdjust(s,n.timezone)),this._updateDatepicker(i),this._base_setDateDatepicker.apply(this,arguments),this._setTimeDatepicker(e,s,!0)}},$.datepicker._base_getDateDatepicker=$.datepicker._getDateDatepicker,$.datepicker._getDateDatepicker=function(e,t){var i=this._getInst(e);if(i){var n=this._get(i,"timepicker");if(n){void 0===i.lastVal&&this._setDateFromField(i,t);var s=this._getDate(i);return s&&n._parseTime($(e).val(),n.timeOnly)&&(s.setHours(n.hour,n.minute,n.second,n.millisec),s.setMicroseconds(n.microsec),null!=n.timezone&&(s=$.timepicker.timezoneAdjust(s,n.timezone))),s}return this._base_getDateDatepicker(e,t)}},$.datepicker._base_parseDate=$.datepicker.parseDate,$.datepicker.parseDate=function(e,t,i){var n;try{n=this._base_parseDate(e,t,i)}catch(s){if(!(s.indexOf(":")>=0))throw s;n=this._base_parseDate(e,t.substring(0,t.length-(s.length-s.indexOf(":")-2)),i)}return n},$.datepicker._base_formatDate=$.datepicker._formatDate,$.datepicker._formatDate=function(e){var t=this._get(e,"timepicker");return t?(t._updateDateTime(e),t.$input.val()):this._base_formatDate(e)},$.datepicker._base_optionDatepicker=$.datepicker._optionDatepicker,$.datepicker._optionDatepicker=function(e,t,i){var n,s=this._getInst(e);if(!s)return null;var o=this._get(s,"timepicker");if(o){var r,a=null,l=null,c=null,u=o._defaults.evnts,d={};if("string"==typeof t){if("minDate"===t||"minDateTime"===t)a=i;else if("maxDate"===t||"maxDateTime"===t)l=i;else if("onSelect"===t)c=i;else if(u.hasOwnProperty(t)){if("undefined"==typeof i)return u[t];d[t]=i,n={}}}else if("object"==typeof t){t.minDate?a=t.minDate:t.minDateTime?a=t.minDateTime:t.maxDate?l=t.maxDate:t.maxDateTime&&(l=t.maxDateTime);for(r in u)u.hasOwnProperty(r)&&t[r]&&(d[r]=t[r])}for(r in d)d.hasOwnProperty(r)&&(u[r]=d[r],n||(n=$.extend({},t)),delete n[r]);if(n&&isEmptyObject(n))return;a?(a=0===a?new Date:new Date(a),o._defaults.minDate=a,o._defaults.minDateTime=a):l?(l=0===l?new Date:new Date(l),o._defaults.maxDate=l,o._defaults.maxDateTime=l):c&&(o._defaults.onSelect=c)}return void 0===i?this._base_optionDatepicker.call($.datepicker,e,t):this._base_optionDatepicker.call($.datepicker,e,n||t,i)};var isEmptyObject=function(e){var t;for(t in e)if(e.hasOwnProperty(e))return!1;return!0},extendRemove=function(e,t){$.extend(e,t);for(var i in t)(null===t[i]||void 0===t[i])&&(e[i]=t[i]);return e},detectSupport=function(e){var t=e.replace(/\'.*?\'/g,"").toLowerCase(),i=function(e,t){return-1!==e.indexOf(t)?!0:!1};return{hour:i(t,"h"),minute:i(t,"m"),second:i(t,"s"),millisec:i(t,"l"),microsec:i(t,"c"),timezone:i(t,"z"),ampm:i("t")&&i(e,"h"),iso8601:i(e,"Z")}},convert24to12=function(e){return e>12&&(e-=12),0===e&&(e=12),String(e)},splitDateTime=function(e,t,i,n){try{var s=n&&n.separator?n.separator:$.timepicker._defaults.separator,o=n&&n.timeFormat?n.timeFormat:$.timepicker._defaults.timeFormat,r=o.split(s),a=r.length,l=t.split(s),c=l.length;if(c>1)return[l.splice(0,c-a).join(s),l.splice(0,a).join(s)]}catch(u){if($.timepicker.log("Could not split the date from the time. Please check the following datetimepicker options\nthrown error: "+u+"\ndateTimeString"+t+"\ndateFormat = "+e+"\nseparator = "+n.separator+"\ntimeFormat = "+n.timeFormat),u.indexOf(":")>=0){{var d=t.length-(u.length-u.indexOf(":")-2);t.substring(d)}return[$.trim(t.substring(0,d)),$.trim(t.substring(d))]}throw u}return[t,""]},parseDateTimeInternal=function(e,t,i,n,s){var o,r=splitDateTime(e,i,n,s);if(o=$.datepicker._base_parseDate(e,r[0],n),""!==r[1]){var a=r[1],l=$.datepicker.parseTime(t,a,s);if(null===l)throw"Wrong time format";return{date:o,timeObj:l}}return{date:o}},selectLocalTimezone=function(e,t){if(e&&e.timezone_select){var i="undefined"!=typeof t?t:new Date;e.timezone_select.val(-1*i.getTimezoneOffset())}};$.timepicker=new Timepicker,$.timepicker.timezoneOffsetString=function(e,t){if(isNaN(e)||e>840)return e;var i=e,n=i%60,s=(i-n)/60,o=t?":":"",r=(i>=0?"+":"-")+("0"+(101*s).toString()).slice(-2)+o+("0"+(101*n).toString()).slice(-2);return"+00:00"==r?"Z":r},$.timepicker.timezoneOffsetNumber=function(e){return e=e.toString().replace(":",""),"Z"===e.toUpperCase()?0:/^(\-|\+)\d{4}$/.test(e)?("-"==e.substr(0,1)?-1:1)*(60*parseInt(e.substr(1,2),10)+parseInt(e.substr(3,2),10)):e},$.timepicker.timezoneAdjust=function(e,t){var i=$.timepicker.timezoneOffsetNumber(t);if(!isNaN(i)){var n=-1*e.getTimezoneOffset(),s=n-i;e.setMinutes(e.getMinutes()+s)}return e},$.timepicker.timeRange=function(e,t,i){return $.timepicker.handleRange("timepicker",e,t,i)},$.timepicker.datetimeRange=function(e,t,i){$.timepicker.handleRange("datetimepicker",e,t,i)},$.timepicker.dateRange=function(e,t,i){$.timepicker.handleRange("datepicker",e,t,i)},$.timepicker.handleRange=function(e,t,i,n){function s(s,o){var r=t[e]("getDate"),a=i[e]("getDate"),l=s[e]("getDate");if(null!==r){var c=new Date(r.getTime()),u=new Date(r.getTime());c.setMilliseconds(c.getMilliseconds()+n.minInterval),u.setMilliseconds(u.getMilliseconds()+n.maxInterval),n.minInterval>0&&c>a?i[e]("setDate",c):n.maxInterval>0&&a>u?i[e]("setDate",u):r>a&&o[e]("setDate",l)}}function o(t,i,s){if(t.val()){var o=t[e].call(t,"getDate");null!==o&&n.minInterval>0&&("minDate"==s&&o.setMilliseconds(o.getMilliseconds()+n.minInterval),"maxDate"==s&&o.setMilliseconds(o.getMilliseconds()-n.minInterval)),o.getTime&&i[e].call(i,"option",s,o)}}return n=$.extend({},{minInterval:0,maxInterval:0,start:{},end:{}},n),$.fn[e].call(t,$.extend({onClose:function(){s($(this),i)},onSelect:function(){o($(this),i,"minDate")}},n,n.start)),$.fn[e].call(i,$.extend({onClose:function(){s($(this),t)},onSelect:function(){o($(this),t,"maxDate")}},n,n.end)),s(t,i),o(t,i,"minDate"),o(i,t,"maxDate"),$([t.get(0),i.get(0)])},$.timepicker.log=function(e){window.console&&console.log(e)},Date.prototype.getMicroseconds||(Date.microseconds=0,Date.prototype.getMicroseconds=function(){return this.microseconds},Date.prototype.setMicroseconds=function(e){return this.microseconds=e,this}),$.timepicker.version="1.3"}}(jQuery),jQuery}),define("common/jquery/extension/timepickerExt",["require","jquery.timepicker.addon","settings!dateTimeSettings"],function(e){var t=e("jquery.timepicker.addon"),i=e("settings!dateTimeSettings");return i&&t.timepicker.setDefaults(i.timepicker),t}),jQuery.noConflict();var JRS={vars:{element_scrolled:!1,ajax_in_progress:!1,current_flow:null,contextPath:__jrsConfigs__.contextPath},i18n:{}},Calendar={};if("undefined"==typeof isEncryptionOn)var isEncryptionOn=!1;var jaspersoft={components:{},i18n:{}};"undefined"==typeof JRS&&(JRS={Mocks:{}}),"undefined"==typeof JRS.vars&&(JRS.vars={element_scrolled:!1,ajax_in_progress:!1,current_flow:null}),"undefined"==typeof JRS.Export&&(JRS.Export={i18n:{"file.name.empty":"export.file.name.empty","file.name.too.long":"export.file.name.too.long","file.name.not.valid":"export.file.name.not.valid","export.select.users":"export.select.users","export.select.roles":"export.select.roles","export.session.expired":"export.session.expired","error.timeout":"export.file.name.empty"},configs:{TIMEOUT:12e5,DELAY:3e3}}),"undefined"==typeof localContext&&(localContext={}),__jrsConfigs__.calendar&&(JRS.i18n.bundledCalendarFormat=__jrsConfigs__.calendar.i18n.bundledCalendarFormat,JRS.i18n.bundledCalendarTimeFormat=__jrsConfigs__.calendar.i18n.bundledCalendarTimeFormat),define("namespace",["common/jquery/extension/timepickerExt"],function(e){return function(){var t;return t||e.jaspersoft}}(this));var ajax={};ajax.cancelRequestsBefore,ajax.LOADING_ID="loading",ajax.csrfRequestHeaders=new Hash,ajax.setCsrfHeaders=function(e){ajax.csrfRequestHeaders.each(function(t){e.setRequestHeader(t.key,t.value)})},AjaxRequester.addVar("CUMULATIVE_UPDATE","c").addVar("ROW_COPY_UPDATE","r").addVar("TARGETTED_REPLACE_UPDATE","t").addVar("EVAL_JSON","j").addVar("DUMMY_POST_PARAM","dummyPostData").addVar("MAX_WAIT_TIME",2e3).addVar("errorHandler",function(){return!1}).addMethod("doGet",function(){return this.xmlhttp?(this.xmlhttp.open("GET",this.url,this.async),this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),this.xmlhttp.setRequestHeader("If-Modified-Since","Sat, 1 Jan 2000 00:00:00 GMT"),this.xmlhttp.setRequestHeader("x-requested-with","AJAXRequest"),ajax.setCsrfHeaders(this.xmlhttp),this.xmlhttp.send(null),!0):!1}).addMethod("doPost",function(){return this.xmlhttp?(this.postData===AjaxRequester.prototype.DUMMY_POST_PARAM&&(this.postData=null),this.xmlhttp.open("POST",this.url,this.async),this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),this.xmlhttp.setRequestHeader("x-requested-with","AJAXRequest"),ajax.setCsrfHeaders(this.xmlhttp),this.xmlhttp.send(this.postData),!0):!1}).addMethod("processResponse",function(e){return function(){if(4==e.xmlhttp.readyState){if(ajax.cancelRequestsBefore&&ajax.cancelRequestsBefore>e.requestTime)return void ajaxRequestEnded(e);handleResponse(e)}}}).addMethod("setErrorHandler",function(){this.errorHandler=errorHandler}).addMethod("verifyAjaxResponse",function(){return this.xmlhttp.getResponseHeader("Server")||this.confirmContinue()}).addMethod("startResponseTimer",function(){this.responseTimer=window.setTimeout(function(){dialogs.popup.show($(ajax.LOADING_ID),!0)},this.MAX_WAIT_TIME)}).addMethod("cancelResponseTimer",function(){window.clearTimeout(this.responseTimer)}).addMethod("confirmContinue",function(){return confirm(serverIsNotResponding)});var clobberingResponseHandler=function(e){var t=e.params[2];document.body.innerHTML=e.xmlhttp.responseText,document.fire("dom:loaded"),invokeCallbacks(t)},evalJSONResponseHandler=function(e){var t=null;try{t=e.xmlhttp.responseText.evalJSON()}catch(i){window.console&&console.log(i)}var n=e.params[2];invokeCallbacks(n,t)},ERROR_POPUP_DIV="jsErrorPopup",ERROR_POPUP_CONTENTS="errorPopupContents",ERROR_POPUP_BACK_BUTTON="errorBack",ERROR_POPUP_CLOSE_BUTTON="errorPopupCloseButton";ajax.ajaxRequestCount=0,define("core.ajax",["jquery","prototype","utils.common","builder","namespace"],function(e){return function(){var t;return t||e.ajax}}(this));var heartbeat={DOM_ID:"heartbeatOptin",PERMIT_CHECKBOX_ID:"heartbeatCheck",initialize:function(e){this._baseUrl=e.baseUrl,this._showDialog=e.showDialog,this._sendClientInfo=e.sendClientInfo,this._dom=$(this.DOM_ID),this._permit=$(this.PERMIT_CHECKBOX_ID),this._okButton=this._dom.select(layoutModule.BUTTON_PATTERN)[0],this._okButton.observe("click",this._okHandler.bind(this))},_okHandler:function(){dialogs.popup.hide(this._dom);var e=this._baseUrl+"/heartbeat.html?permit="+this._permit.checked;ajaxNonReturningUpdate(e,{errorHandler:baseErrorHandler})},start:function(){this._showDialog&&(dialogs.popup.show(this._dom),this._okButton.focus()),this._sendClientInfo&&this._doSendClientInfo()},_doSendClientInfo:function(){try{var e={};e.navAppName=navigator.appName,e.navAppVersion=navigator.appVersion,e.scrWidth=screen.width,e.scrHeight=screen.height,e.scrColorDepth=screen.colorDepth;var t=appendPostData("",e),i=this._baseUrl+"/heartbeatInfo.html";ajaxNonReturningUpdate(i,{postData:t})}catch(n){}}};define("components.heartbeat",["prototype","core.ajax"],function(e){return function(){var t;return t||e.heartbeat}}(this)),String.prototype.parseColor=function(){var e="#";if("rgb("==this.slice(0,4)){var t=this.slice(4,this.length-1).split(","),i=0;do e+=parseInt(t[i]).toColorPart();while(++i<3)}else if("#"==this.slice(0,1)){if(4==this.length)for(var i=1;4>i;i++)e+=(this.charAt(i)+this.charAt(i)).toLowerCase();7==this.length&&(e=this.toLowerCase())}return 7==e.length?e:arguments[0]||this},Element.collectTextNodes=function(e){return $A($(e).childNodes).collect(function(e){return 3==e.nodeType?e.nodeValue:e.hasChildNodes()?Element.collectTextNodes(e):""}).flatten().join("")},Element.collectTextNodesIgnoreClass=function(e,t){return $A($(e).childNodes).collect(function(e){return 3==e.nodeType?e.nodeValue:e.hasChildNodes()&&!Element.hasClassName(e,t)?Element.collectTextNodesIgnoreClass(e,t):""}).flatten().join("")},Element.setContentZoom=function(e,t){return e=$(e),e.setStyle({fontSize:t/100+"em"}),Prototype.Browser.WebKit&&window.scrollBy(0,0),e},Element.getInlineOpacity=function(e){return $(e).style.opacity||""},Element.forceRerendering=function(e){try{e=$(e);var t=document.createTextNode(" ");e.appendChild(t),e.removeChild(t)}catch(i){}};var Effect={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},Transitions:{linear:Prototype.K,sinoidal:function(e){return-Math.cos(e*Math.PI)/2+.5},reverse:function(e){return 1-e},flicker:function(e){var e=-Math.cos(e*Math.PI)/4+.75+Math.random()/4;return e>1?1:e},wobble:function(e){return-Math.cos(e*Math.PI*9*e)/2+.5},pulse:function(e,t){return-Math.cos(e*((t||5)-.5)*2*Math.PI)/2+.5},spring:function(e){return 1-Math.cos(4.5*e*Math.PI)*Math.exp(6*-e)},none:function(){return 0},full:function(){return 1}},DefaultOptions:{duration:1,fps:100,sync:!1,from:0,to:1,delay:0,queue:"parallel"},tagifyText:function(e){var t="position:relative";Prototype.Browser.IE&&(t+=";zoom:1"),e=$(e),$A(e.childNodes).each(function(i){3==i.nodeType&&(i.nodeValue.toArray().each(function(n){e.insertBefore(new Element("span",{style:t}).update(" "==n?String.fromCharCode(160):n),i)}),Element.remove(i))})},multiple:function(e,t){var i;i=("object"==typeof e||Object.isFunction(e))&&e.length?e:$(e).childNodes;var n=Object.extend({speed:.1,delay:0},arguments[2]||{}),s=n.delay;$A(i).each(function(e,i){new t(e,Object.extend(n,{delay:i*n.speed+s}))})},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(e,t,i){return e=$(e),t=(t||"appear").toLowerCase(),Effect[Effect.PAIRS[t][e.visible()?1:0]](e,Object.extend({queue:{position:"end",scope:e.id||"global",limit:1}},i||{}))}};if(Effect.DefaultOptions.transition=Effect.Transitions.sinoidal,Effect.ScopedQueue=Class.create(Enumerable,{initialize:function(){this.effects=[],this.interval=null},_each:function(e){this.effects._each(e)},add:function(e){var t=(new Date).getTime(),i=Object.isString(e.options.queue)?e.options.queue:e.options.queue.position;switch(i){case"front":this.effects.findAll(function(e){return"idle"==e.state}).each(function(t){t.startOn+=e.finishOn,t.finishOn+=e.finishOn});break;case"with-last":t=this.effects.pluck("startOn").max()||t;break;case"end":t=this.effects.pluck("finishOn").max()||t}e.startOn+=t,e.finishOn+=t,(!e.options.queue.limit||this.effects.length<e.options.queue.limit)&&this.effects.push(e),this.interval||(this.interval=setInterval(this.loop.bind(this),15))
  },remove:function(e){this.effects=this.effects.reject(function(t){return t==e}),0==this.effects.length&&(clearInterval(this.interval),this.interval=null)},loop:function(){for(var e=(new Date).getTime(),t=0,i=this.effects.length;i>t;t++)this.effects[t]&&this.effects[t].loop(e)}}),Effect.Queues={instances:$H(),get:function(e){return Object.isString(e)?this.instances.get(e)||this.instances.set(e,new Effect.ScopedQueue):e}},Effect.Queue=Effect.Queues.get("global"),Effect.Base=Class.create({position:null,start:function(e){e&&e.transition===!1&&(e.transition=Effect.Transitions.linear),this.options=Object.extend(Object.extend({},Effect.DefaultOptions),e||{}),this.currentFrame=0,this.state="idle",this.startOn=1e3*this.options.delay,this.finishOn=this.startOn+1e3*this.options.duration,this.fromToDelta=this.options.to-this.options.from,this.totalTime=this.finishOn-this.startOn,this.totalFrames=this.options.fps*this.options.duration,this.render=function(){function e(e,t){e.options[t+"Internal"]&&e.options[t+"Internal"](e),e.options[t]&&e.options[t](e)}return function(t){"idle"===this.state&&(this.state="running",e(this,"beforeSetup"),this.setup&&this.setup(),e(this,"afterSetup")),"running"===this.state&&(t=this.options.transition(t)*this.fromToDelta+this.options.from,this.position=t,e(this,"beforeUpdate"),this.update&&this.update(t),e(this,"afterUpdate"))}}(),this.event("beforeStart"),this.options.sync||Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).add(this)},loop:function(e){if(e>=this.startOn){if(e>=this.finishOn)return this.render(1),this.cancel(),this.event("beforeFinish"),this.finish&&this.finish(),void this.event("afterFinish");var t=(e-this.startOn)/this.totalTime,i=(t*this.totalFrames).round();i>this.currentFrame&&(this.render(t),this.currentFrame=i)}},cancel:function(){this.options.sync||Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).remove(this),this.state="finished"},event:function(e){this.options[e+"Internal"]&&this.options[e+"Internal"](this),this.options[e]&&this.options[e](this)},inspect:function(){var e=$H();for(property in this)Object.isFunction(this[property])||e.set(property,this[property]);return"#<Effect:"+e.inspect()+",options:"+$H(this.options).inspect()+">"}}),Effect.Parallel=Class.create(Effect.Base,{initialize:function(e){this.effects=e||[],this.start(arguments[1])},update:function(e){this.effects.invoke("render",e)},finish:function(e){this.effects.each(function(t){t.render(1),t.cancel(),t.event("beforeFinish"),t.finish&&t.finish(e),t.event("afterFinish")})}}),Effect.Tween=Class.create(Effect.Base,{initialize:function(e,t,i){e=Object.isString(e)?$(e):e;var n=$A(arguments),s=n.last(),o=5==n.length?n[3]:null;this.method=Object.isFunction(s)?s.bind(e):Object.isFunction(e[s])?e[s].bind(e):function(t){e[s]=t},this.start(Object.extend({from:t,to:i},o||{}))},update:function(e){this.method(e)}}),Effect.Event=Class.create(Effect.Base,{initialize:function(){this.start(Object.extend({duration:0},arguments[0]||{}))},update:Prototype.emptyFunction}),Effect.Opacity=Class.create(Effect.Base,{initialize:function(e){if(this.element=$(e),!this.element)throw Effect._elementDoesNotExistError;Prototype.Browser.IE&&!this.element.currentStyle.hasLayout&&this.element.setStyle({zoom:1});var t=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});this.start(t)},update:function(e){this.element.setOpacity(e)}}),Effect.Move=Class.create(Effect.Base,{initialize:function(e){if(this.element=$(e),!this.element)throw Effect._elementDoesNotExistError;var t=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});this.start(t)},setup:function(){this.element.makePositioned(),this.originalLeft=parseFloat(this.element.getStyle("left")||"0"),this.originalTop=parseFloat(this.element.getStyle("top")||"0"),"absolute"==this.options.mode&&(this.options.x=this.options.x-this.originalLeft,this.options.y=this.options.y-this.originalTop)},update:function(e){this.element.setStyle({left:(this.options.x*e+this.originalLeft).round()+"px",top:(this.options.y*e+this.originalTop).round()+"px"})}}),Effect.MoveBy=function(e,t,i){return new Effect.Move(e,Object.extend({x:i,y:t},arguments[3]||{}))},Effect.Scale=Class.create(Effect.Base,{initialize:function(e,t){if(this.element=$(e),!this.element)throw Effect._elementDoesNotExistError;var i=Object.extend({scaleX:!0,scaleY:!0,scaleContent:!0,scaleFromCenter:!1,scaleMode:"box",scaleFrom:100,scaleTo:t},arguments[2]||{});this.start(i)},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||!1,this.elementPositioning=this.element.getStyle("position"),this.originalStyle={},["top","left","width","height","fontSize"].each(function(e){this.originalStyle[e]=this.element.style[e]}.bind(this)),this.originalTop=this.element.offsetTop,this.originalLeft=this.element.offsetLeft;var e=this.element.getStyle("font-size")||"100%";["em","px","%","pt"].each(function(t){e.indexOf(t)>0&&(this.fontSize=parseFloat(e),this.fontSizeType=t)}.bind(this)),this.factor=(this.options.scaleTo-this.options.scaleFrom)/100,this.dims=null,"box"==this.options.scaleMode&&(this.dims=[this.element.offsetHeight,this.element.offsetWidth]),/^content/.test(this.options.scaleMode)&&(this.dims=[this.element.scrollHeight,this.element.scrollWidth]),this.dims||(this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth])},update:function(e){var t=this.options.scaleFrom/100+this.factor*e;this.options.scaleContent&&this.fontSize&&this.element.setStyle({fontSize:this.fontSize*t+this.fontSizeType}),this.setDimensions(this.dims[0]*t,this.dims[1]*t)},finish:function(){this.restoreAfterFinish&&this.element.setStyle(this.originalStyle)},setDimensions:function(e,t){var i={};if(this.options.scaleX&&(i.width=t.round()+"px"),this.options.scaleY&&(i.height=e.round()+"px"),this.options.scaleFromCenter){var n=(e-this.dims[0])/2,s=(t-this.dims[1])/2;"absolute"==this.elementPositioning?(this.options.scaleY&&(i.top=this.originalTop-n+"px"),this.options.scaleX&&(i.left=this.originalLeft-s+"px")):(this.options.scaleY&&(i.top=-n+"px"),this.options.scaleX&&(i.left=-s+"px"))}this.element.setStyle(i)}}),Effect.Highlight=Class.create(Effect.Base,{initialize:function(e){if(this.element=$(e),!this.element)throw Effect._elementDoesNotExistError;var t=Object.extend({startcolor:"#ffff99"},arguments[1]||{});this.start(t)},setup:function(){return"none"==this.element.getStyle("display")?void this.cancel():(this.oldStyle={},this.options.keepBackgroundImage||(this.oldStyle.backgroundImage=this.element.getStyle("background-image"),this.element.setStyle({backgroundImage:"none"})),this.options.endcolor||(this.options.endcolor=this.element.getStyle("background-color").parseColor("#ffffff")),this.options.restorecolor||(this.options.restorecolor=this.element.getStyle("background-color")),this._base=$R(0,2).map(function(e){return parseInt(this.options.startcolor.slice(2*e+1,2*e+3),16)}.bind(this)),void(this._delta=$R(0,2).map(function(e){return parseInt(this.options.endcolor.slice(2*e+1,2*e+3),16)-this._base[e]}.bind(this))))},update:function(e){this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(t,i,n){return t+(this._base[n]+this._delta[n]*e).round().toColorPart()}.bind(this))})},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}}),Effect.ScrollTo=function(e){var t=arguments[1]||{},i=document.viewport.getScrollOffsets(),n=$(e).cumulativeOffset();return t.offset&&(n[1]+=t.offset),new Effect.Tween(null,i.top,n[1],t,function(e){scrollTo(i.left,e.round())})},Effect.Fade=function(e){e=$(e);var t=e.getInlineOpacity(),i=Object.extend({from:e.getOpacity()||1,to:0,afterFinishInternal:function(e){0==e.options.to&&e.element.hide().setStyle({opacity:t})}},arguments[1]||{});return new Effect.Opacity(e,i)},Effect.Appear=function(e){e=$(e);var t=Object.extend({from:"none"==e.getStyle("display")?0:e.getOpacity()||0,to:1,afterFinishInternal:function(e){e.element.forceRerendering()},beforeSetup:function(e){e.element.setOpacity(e.options.from).show()}},arguments[1]||{});return new Effect.Opacity(e,t)},Effect.Puff=function(e){e=$(e);var t={opacity:e.getInlineOpacity(),position:e.getStyle("position"),top:e.style.top,left:e.style.left,width:e.style.width,height:e.style.height};return new Effect.Parallel([new Effect.Scale(e,200,{sync:!0,scaleFromCenter:!0,scaleContent:!0,restoreAfterFinish:!0}),new Effect.Opacity(e,{sync:!0,to:0})],Object.extend({duration:1,beforeSetupInternal:function(e){Position.absolutize(e.effects[0].element)},afterFinishInternal:function(e){e.effects[0].element.hide().setStyle(t)}},arguments[1]||{}))},Effect.BlindUp=function(e){return e=$(e),e.makeClipping(),new Effect.Scale(e,0,Object.extend({scaleContent:!1,scaleX:!1,restoreAfterFinish:!0,afterFinishInternal:function(e){e.element.hide().undoClipping()}},arguments[1]||{}))},Effect.BlindDown=function(e){e=$(e);var t=e.getDimensions();return new Effect.Scale(e,100,Object.extend({scaleContent:!1,scaleX:!1,scaleFrom:0,scaleMode:{originalHeight:t.height,originalWidth:t.width},restoreAfterFinish:!0,afterSetup:function(e){e.element.makeClipping().setStyle({height:"0px"}).show()},afterFinishInternal:function(e){e.element.undoClipping()}},arguments[1]||{}))},Effect.SwitchOff=function(e){e=$(e);var t=e.getInlineOpacity();return new Effect.Appear(e,Object.extend({duration:.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(e){new Effect.Scale(e.element,1,{duration:.3,scaleFromCenter:!0,scaleX:!1,scaleContent:!1,restoreAfterFinish:!0,beforeSetup:function(e){e.element.makePositioned().makeClipping()},afterFinishInternal:function(e){e.element.hide().undoClipping().undoPositioned().setStyle({opacity:t})}})}},arguments[1]||{}))},Effect.DropOut=function(e){e=$(e);var t={top:e.getStyle("top"),left:e.getStyle("left"),opacity:e.getInlineOpacity()};return new Effect.Parallel([new Effect.Move(e,{x:0,y:100,sync:!0}),new Effect.Opacity(e,{sync:!0,to:0})],Object.extend({duration:.5,beforeSetup:function(e){e.effects[0].element.makePositioned()},afterFinishInternal:function(e){e.effects[0].element.hide().undoPositioned().setStyle(t)}},arguments[1]||{}))},Effect.Shake=function(e){e=$(e);var t=Object.extend({distance:20,duration:.5},arguments[1]||{}),i=parseFloat(t.distance),n=parseFloat(t.duration)/10,s={top:e.getStyle("top"),left:e.getStyle("left")};return new Effect.Move(e,{x:i,y:0,duration:n,afterFinishInternal:function(e){new Effect.Move(e.element,{x:2*-i,y:0,duration:2*n,afterFinishInternal:function(e){new Effect.Move(e.element,{x:2*i,y:0,duration:2*n,afterFinishInternal:function(e){new Effect.Move(e.element,{x:2*-i,y:0,duration:2*n,afterFinishInternal:function(e){new Effect.Move(e.element,{x:2*i,y:0,duration:2*n,afterFinishInternal:function(e){new Effect.Move(e.element,{x:-i,y:0,duration:n,afterFinishInternal:function(e){e.element.undoPositioned().setStyle(s)}})}})}})}})}})}})},Effect.SlideDown=function(e){e=$(e).cleanWhitespace();var t=e.down().getStyle("bottom"),i=e.getDimensions();return new Effect.Scale(e,100,Object.extend({scaleContent:!1,scaleX:!1,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:i.height,originalWidth:i.width},restoreAfterFinish:!0,afterSetup:function(e){e.element.makePositioned(),e.element.down().makePositioned(),window.opera&&e.element.setStyle({top:""}),e.element.makeClipping().setStyle({height:"0px"}).show()},afterUpdateInternal:function(e){e.element.down().setStyle({bottom:e.dims[0]-e.element.clientHeight+"px"})},afterFinishInternal:function(e){e.element.undoClipping().undoPositioned(),e.element.down().undoPositioned().setStyle({bottom:t})}},arguments[1]||{}))},Effect.SlideUp=function(e){e=$(e).cleanWhitespace();var t=e.down().getStyle("bottom"),i=e.getDimensions();return new Effect.Scale(e,window.opera?0:1,Object.extend({scaleContent:!1,scaleX:!1,scaleMode:"box",scaleFrom:100,scaleMode:{originalHeight:i.height,originalWidth:i.width},restoreAfterFinish:!0,afterSetup:function(e){e.element.makePositioned(),e.element.down().makePositioned(),window.opera&&e.element.setStyle({top:""}),e.element.makeClipping().show()},afterUpdateInternal:function(e){e.element.down().setStyle({bottom:e.dims[0]-e.element.clientHeight+"px"})},afterFinishInternal:function(e){e.element.hide().undoClipping().undoPositioned(),e.element.down().undoPositioned().setStyle({bottom:t})}},arguments[1]||{}))},Effect.Squish=function(e){return new Effect.Scale(e,window.opera?1:0,{restoreAfterFinish:!0,beforeSetup:function(e){e.element.makeClipping()},afterFinishInternal:function(e){e.element.hide().undoClipping()}})},Effect.Grow=function(e){e=$(e);var t,i,n,s,o=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{}),r={top:e.style.top,left:e.style.left,height:e.style.height,width:e.style.width,opacity:e.getInlineOpacity()},a=e.getDimensions();switch(o.direction){case"top-left":t=i=n=s=0;break;case"top-right":t=a.width,i=s=0,n=-a.width;break;case"bottom-left":t=n=0,i=a.height,s=-a.height;break;case"bottom-right":t=a.width,i=a.height,n=-a.width,s=-a.height;break;case"center":t=a.width/2,i=a.height/2,n=-a.width/2,s=-a.height/2}return new Effect.Move(e,{x:t,y:i,duration:.01,beforeSetup:function(e){e.element.hide().makeClipping().makePositioned()},afterFinishInternal:function(e){new Effect.Parallel([new Effect.Opacity(e.element,{sync:!0,to:1,from:0,transition:o.opacityTransition}),new Effect.Move(e.element,{x:n,y:s,sync:!0,transition:o.moveTransition}),new Effect.Scale(e.element,100,{scaleMode:{originalHeight:a.height,originalWidth:a.width},sync:!0,scaleFrom:window.opera?1:0,transition:o.scaleTransition,restoreAfterFinish:!0})],Object.extend({beforeSetup:function(e){e.effects[0].element.setStyle({height:"0px"}).show()},afterFinishInternal:function(e){e.effects[0].element.undoClipping().undoPositioned().setStyle(r)}},o))}})},Effect.Shrink=function(e){e=$(e);var t,i,n=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{}),s={top:e.style.top,left:e.style.left,height:e.style.height,width:e.style.width,opacity:e.getInlineOpacity()},o=e.getDimensions();switch(n.direction){case"top-left":t=i=0;break;case"top-right":t=o.width,i=0;break;case"bottom-left":t=0,i=o.height;break;case"bottom-right":t=o.width,i=o.height;break;case"center":t=o.width/2,i=o.height/2}return new Effect.Parallel([new Effect.Opacity(e,{sync:!0,to:0,from:1,transition:n.opacityTransition}),new Effect.Scale(e,window.opera?1:0,{sync:!0,transition:n.scaleTransition,restoreAfterFinish:!0}),new Effect.Move(e,{x:t,y:i,sync:!0,transition:n.moveTransition})],Object.extend({beforeStartInternal:function(e){e.effects[0].element.makePositioned().makeClipping()},afterFinishInternal:function(e){e.effects[0].element.hide().undoClipping().undoPositioned().setStyle(s)}},n))},Effect.Pulsate=function(e){e=$(e);var t=arguments[1]||{},i=e.getInlineOpacity(),n=t.transition||Effect.Transitions.linear,s=function(e){return 1-n(-Math.cos(e*(t.pulses||5)*2*Math.PI)/2+.5)};return new Effect.Opacity(e,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(e){e.element.setStyle({opacity:i})}},t),{transition:s}))},Effect.Fold=function(e){e=$(e);var t={top:e.style.top,left:e.style.left,width:e.style.width,height:e.style.height};return e.makeClipping(),new Effect.Scale(e,5,Object.extend({scaleContent:!1,scaleX:!1,afterFinishInternal:function(){new Effect.Scale(e,1,{scaleContent:!1,scaleY:!1,afterFinishInternal:function(e){e.element.hide().undoClipping().setStyle(t)}})}},arguments[1]||{}))},Effect.Morph=Class.create(Effect.Base,{initialize:function(e){if(this.element=$(e),!this.element)throw Effect._elementDoesNotExistError;var t=Object.extend({style:{}},arguments[1]||{});if(Object.isString(t.style))if(t.style.include(":"))this.style=t.style.parseStyle();else{this.element.addClassName(t.style),this.style=$H(this.element.getStyles()),this.element.removeClassName(t.style);var i=this.element.getStyles();this.style=this.style.reject(function(e){return e.value==i[e.key]}),t.afterFinishInternal=function(e){e.element.addClassName(e.options.style),e.transforms.each(function(t){e.element.style[t.style]=""})}}else this.style=$H(t.style);this.start(t)},setup:function(){function e(e){return(!e||["rgba(0, 0, 0, 0)","transparent"].include(e))&&(e="#ffffff"),e=e.parseColor(),$R(0,2).map(function(t){return parseInt(e.slice(2*t+1,2*t+3),16)})}this.transforms=this.style.map(function(t){var i=t[0],n=t[1],s=null;if("#zzzzzz"!=n.parseColor("#zzzzzz"))n=n.parseColor(),s="color";else if("opacity"==i)n=parseFloat(n),Prototype.Browser.IE&&!this.element.currentStyle.hasLayout&&this.element.setStyle({zoom:1});else if(Element.CSS_LENGTH.test(n)){var o=n.match(/^([\+\-]?[0-9\.]+)(.*)$/);n=parseFloat(o[1]),s=3==o.length?o[2]:null}var r=this.element.getStyle(i);return{style:i.camelize(),originalValue:"color"==s?e(r):parseFloat(r||0),targetValue:"color"==s?e(n):n,unit:s}}.bind(this)).reject(function(e){return e.originalValue==e.targetValue||"color"!=e.unit&&(isNaN(e.originalValue)||isNaN(e.targetValue))})},update:function(e){for(var t,i={},n=this.transforms.length;n--;)i[(t=this.transforms[n]).style]="color"==t.unit?"#"+Math.round(t.originalValue[0]+(t.targetValue[0]-t.originalValue[0])*e).toColorPart()+Math.round(t.originalValue[1]+(t.targetValue[1]-t.originalValue[1])*e).toColorPart()+Math.round(t.originalValue[2]+(t.targetValue[2]-t.originalValue[2])*e).toColorPart():(t.originalValue+(t.targetValue-t.originalValue)*e).toFixed(3)+(null===t.unit?"":t.unit);this.element.setStyle(i,!0)}}),Effect.Transform=Class.create({initialize:function(e){this.tracks=[],this.options=arguments[1]||{},this.addTracks(e)},addTracks:function(e){return e.each(function(e){e=$H(e);var t=e.values().first();this.tracks.push($H({ids:e.keys().first(),effect:Effect.Morph,options:{style:t}}))}.bind(this)),this},play:function(){return new Effect.Parallel(this.tracks.map(function(e){var t=e.get("ids"),i=e.get("effect"),n=e.get("options"),s=[$(t)||$$(t)].flatten();return s.map(function(e){return new i(e,Object.extend({sync:!0},n))})}).flatten(),this.options)}}),Element.CSS_PROPERTIES=$w("backgroundColor backgroundPosition borderBottomColor borderBottomStyle borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderSpacing borderTopColor borderTopStyle borderTopWidth bottom clip color fontSize fontWeight height left letterSpacing lineHeight marginBottom marginLeft marginRight marginTop markerOffset maxHeight maxWidth minHeight minWidth opacity outlineColor outlineOffset outlineWidth paddingBottom paddingLeft paddingRight paddingTop right textIndent top width wordSpacing zIndex"),Element.CSS_LENGTH=/^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/,String.__parseStyleElement=document.createElement("div"),String.prototype.parseStyle=function(){var e,t=$H();return Prototype.Browser.WebKit?e=new Element("div",{style:this}).style:(String.__parseStyleElement.innerHTML='<div style="'+this+'"></div>',e=String.__parseStyleElement.childNodes[0].style),Element.CSS_PROPERTIES.each(function(i){e[i]&&t.set(i,e[i])}),Prototype.Browser.IE&&this.include("opacity")&&t.set("opacity",this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]),t},Element.getStyles=document.defaultView&&document.defaultView.getComputedStyle?function(e){var t=document.defaultView.getComputedStyle($(e),null);return Element.CSS_PROPERTIES.inject({},function(e,i){return e[i]=t[i],e})}:function(e){e=$(e);var t,i=e.currentStyle;return t=Element.CSS_PROPERTIES.inject({},function(e,t){return e[t]=i[t],e}),t.opacity||(t.opacity=e.getOpacity()),t},Effect.Methods={morph:function(e,t){return e=$(e),new Effect.Morph(e,Object.extend({style:t},arguments[2]||{})),e},visualEffect:function(e,t,i){e=$(e);var n=t.dasherize().camelize(),s=n.charAt(0).toUpperCase()+n.substring(1);return new Effect[s](e,i),e},highlight:function(e,t){return e=$(e),new Effect.Highlight(e,t),e}},$w("fade appear grow shrink fold blindUp blindDown slideUp slideDown pulsate shake puff squish switchOff dropOut").each(function(e){Effect.Methods[e]=function(t,i){return t=$(t),Effect[e.charAt(0).toUpperCase()+e.substring(1)](t,i),t}}),$w("getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles").each(function(e){Effect.Methods[e]=Element[e]}),Element.addMethods(Effect.Methods),define("effects",["prototype"],function(e){return function(){var t;return t||e.Effect}}(this)),define("utils.animation",["prototype","effects"],function(e){return function(){var t;return t||e.jQuery}}(this)),Object.isUndefined(Effect))throw"dragdrop.js requires including script.aculo.us' effects.js library";var Droppables={drops:[],remove:function(e){this.drops=this.drops.reject(function(t){return t.element==$(e)})},add:function(e){e=$(e);var t=Object.extend({greedy:!0,hoverclass:null,tree:!1},arguments[1]||{});if(t.containment){t._containers=[];var i=t.containment;Object.isArray(i)?i.each(function(e){t._containers.push($(e))}):t._containers.push($(i))}t.accept&&(t.accept=[t.accept].flatten()),Element.makePositioned(e),t.element=e,this.drops.push(t)},findDeepestChild:function(e){for(deepest=e[0],i=1;i<e.length;++i)Element.isParent(e[i].element,deepest.element)&&(deepest=e[i]);return deepest},isContained:function(e,t){var i;return i=t.tree?e.treeNode:e.parentNode,t._containers.detect(function(e){return i==e})},isAffected:function(e,t,i){return i.element!=t&&(!i._containers||this.isContained(t,i))&&(!i.accept||Element.classNames(t).detect(function(e){return i.accept.include(e)}))&&Position.within(i.element,e[0],e[1])},deactivate:function(e){e.hoverclass&&Element.removeClassName(e.element,e.hoverclass),this.last_active=null},activate:function(e){e.hoverclass&&Element.addClassName(e.element,e.hoverclass),this.last_active=e},show:function(e,t){if(this.drops.length){var i,n=[];this.drops.each(function(i){Droppables.isAffected(e,t,i)&&n.push(i)}),n.length>0&&(i=Droppables.findDeepestChild(n)),this.last_active&&this.last_active!=i&&this.deactivate(this.last_active),i&&(Position.within(i.element,e[0],e[1]),i.onHover&&i.onHover(t,i.element,Position.overlap(i.overlap,i.element)),i!=this.last_active&&Droppables.activate(i))}},fire:function(e,t){if(this.last_active){var i;return Position.prepare(),i=Draggables.supportsTouch?Draggables._lastPointer:[Event.pointerX(e),Event.pointerY(e)],this.isAffected(i,t,this.last_active)&&this.last_active.onDrop?(this.last_active.onDrop(t,this.last_active.element,e),!0):void 0}},reset:function(){this.last_active&&this.deactivate(this.last_active)}},Draggables={DEFAULT_TOLERANCE:window.Prototype.BrowserFeatures.SupportsTouch?2:1,drags:[],observers:[],supportsTouch:window.Prototype.BrowserFeatures.SupportsTouch,register:function(e){0==this.drags.length&&(this.eventMouseUp=this.endDrag.bindAsEventListener(this),this.eventMouseMove=this.updateDrag.bindAsEventListener(this),this.eventKeypress=this.keyPress.bindAsEventListener(this),Draggables.supportsTouch?(Event.observe(document,"touchend",this.eventMouseUp),Event.observe(document,"touchmove",this.eventMouseMove)):Event.observe(document,"mouseup",this.eventMouseUp),Event.observe(document,"keypress",this.eventKeypress)),this.drags.push(e)},unregister:function(e){this.drags=this.drags.reject(function(t){return t==e}),0==this.drags.length&&(Draggables.supportsTouch?(Event.stopObserving(document,"touchend",this.eventMouseUp),Event.stopObserving(document,"touchmove",this.eventMouseMove)):Event.stopObserving(document,"mouseup",this.eventMouseUp),Event.stopObserving(document,"keypress",this.eventKeypress))},activate:function(e){Draggables.supportsTouch||Event.observe(document,"mousemove",this.eventMouseMove),e.options.delay?this._timeout=setTimeout(function(){Draggables._timeout=null,window.focus(),Draggables.activeDraggable=e}.bind(this),e.options.delay):(window.focus(),this.activeDraggable=e)},deactivate:function(){Draggables.supportsTouch||Event.stopObserving(document,"mousemove",this.eventMouseMove),this.activeDraggable=null},updateDrag:function(e){if(this.activeDraggable){var t=[Event.pointerX(e),Event.pointerY(e)];this.pointerInRadius(t)||(this._lastPointer=t,this.activeDraggable.updateDrag(e,t))}},pointerInRadius:function(e,t){return t=t||2,this._lastPointer&&Math.abs(this._lastPointer[0]-e[0])<=t&&Math.abs(this._lastPointer[1]-e[1])<=t},endDrag:function(e){this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this.activeDraggable&&(Draggables.supportsTouch||(this._lastPointer=null),this.activeDraggable.endDrag(e),this.activeDraggable=null)},keyPress:function(e){this.activeDraggable&&this.activeDraggable.keyPress(e)},addObserver:function(e){this.observers.push(e),this._cacheObserverCallbacks()},removeObserver:function(e){this.observers=this.observers.reject(function(t){return t.element==e||t.element&&e&&t.element.id==e.id}),this._cacheObserverCallbacks()},notify:function(e,t,i){this[e+"Count"]>0&&this.observers.each(function(n){n[e]&&n[e](e,t,i)}),t.options[e]&&t.options[e](t,i)},_cacheObserverCallbacks:function(){["onStart","onEnd","onDrag"].each(function(e){Draggables[e+"Count"]=Draggables.observers.select(function(t){return t[e]}).length})}},Draggable=Class.create({initialize:function(e){var t={handle:!1,reverteffect:function(e,t,i){var n=.02*Math.sqrt(Math.abs(2^t)+Math.abs(2^i));new Effect.Move(e,{x:-i,y:-t,duration:n,queue:{scope:"_draggable",position:"end"}})},endeffect:function(e){Draggable._dragging[e]=!1},zindex:1e3,revert:!1,quiet:!1,scroll:!1,scrollSensitivity:20,scrollSpeed:15,snap:!1,delay:0};(!arguments[1]||Object.isUndefined(arguments[1].endeffect))&&Object.extend(t,{starteffect:function(e){e._opacity=Element.getOpacity(e),Draggable._dragging[e]=!0}});var i=Object.extend(t,arguments[1]||{});this.element=$(e),i.handle&&Object.isString(i.handle)&&(this.handle=this.element.down("."+i.handle,0)),this.handle||(this.handle=$(i.handle)),this.handle||(this.handle=this.element),!i.scroll||i.scroll.scrollTo||i.scroll.outerHTML||(i.scroll=$(i.scroll),this._isScrollChild=Element.childOf(this.element,i.scroll)),Element.makePositioned(this.element),this.options=i,this.dragging=!1,this.eventMouseDown=this.initDrag.bindAsEventListener(this),Draggables.supportsTouch?Event.observe(this.handle,"touchstart",this.eventMouseDown):Event.observe(this.handle,"mousedown",this.eventMouseDown),Draggables.register(this)},destroy:function(){Draggables.supportsTouch?Event.stopObserving(this.handle,"touchstart",this.eventMouseDown):Event.stopObserving(this.handle,"mousedown",this.eventMouseDown),Draggables.unregister(this)},currentDelta:function(){var e=Element.getStyle(this.element,"left")||"",t=Element.getStyle(this.element,"top")||"";return e.include("%")&&(e=this.element.parentNode.getWidth()*parseInt(e)/100),t.include("%")&&(t=this.element.parentNode.getHeight()*parseInt(t)/100),[parseInt(e)||"0",parseInt(t)||"0"]},initDrag:function(e){if((Object.isUndefined(Draggable._dragging[this.element])||!Draggable._dragging[this.element])&&(Event.isLeftClick(e)||Draggables.supportsTouch&&e.touches&&1==e.touches.length)){var t=Event.element(e);if((tag_name=t.tagName.toUpperCase())&&("INPUT"==tag_name||"SELECT"==tag_name||"OPTION"==tag_name||"BUTTON"==tag_name||"TEXTAREA"==tag_name))return;var i=[Event.pointerX(e),Event.pointerY(e)],n=this.element.cumulativeOffset();this.offset=[0,1].map(function(e){return i[e]-n[e]}),Draggables.activate(this),this.countdown=Draggables.DEFAULT_TOLERANCE,Event.stop(e),Draggables.supportsTouch?this.handle.fire("drag:"+e.type,{targetEvent:e}):this.handle.fire("drag:mousedown",{targetEvent:e})}},startDrag:function(e){if(this.dragging=!0,this.delta||(this.delta=this.currentDelta()),this.options.zindex&&(this.originalZ=parseInt(Element.getStyle(this.element,"z-index")||0),this.element.style.zIndex=this.options.zindex),this.options.ghosting&&(this._clone=this.element.cloneNode(!0),this._originallyAbsolute="absolute"==this.element.getStyle("position"),this._originallyAbsolute||Position.absolutize(this.element),this.element.parentNode.insertBefore(this._clone,this.element),"TR"===this.element.parentNode.tagName&&document.body.appendChild(this.element)),this.options.scroll)if(this.options.scroll==window){var t=this._getWindowScroll(this.options.scroll);this.originalScrollLeft=t.left,this.originalScrollTop=t.top}else this.originalScrollLeft=this.options.scroll.scrollLeft,this.originalScrollTop=this.options.scroll.scrollTop;Draggables.notify("onStart",this,e),this.options.starteffect&&this.options.starteffect(this.element)},updateDrag:function(event,pointer){if(!this.dragging)if(Draggables.supportsTouch){if(!isIE7()&&this.countdown&&this.countdown--)return;this.startDrag(event)}else{if(this.countdown&&this.countdown--)return;this.startDrag(event)}if(Draggables.supportsTouch&&event.touches.length>1&&this.endDrag(event),this.options.quiet||(Position.prepare(),Droppables.show(pointer,this.element)),Draggables.notify("onDrag",this,event),this.draw(pointer),this.options.change&&this.options.change(this),this.options.scroll){this.stopScrolling();var p;if(this.options.scroll==window)with(this._getWindowScroll(this.options.scroll))p=[left,top,left+width,top+height];else p=Position.page(this.options.scroll).toArray(),p[0]+=this.options.scroll.scrollLeft+Position.deltaX,p[1]+=this.options.scroll.scrollTop+Position.deltaY,p.push(p[0]+this.options.scroll.offsetWidth),p.push(p[1]+this.options.scroll.offsetHeight);var speed=[0,0];pointer[0]<p[0]+this.options.scrollSensitivity&&(speed[0]=pointer[0]-(p[0]+this.options.scrollSensitivity)),pointer[1]<p[1]+this.options.scrollSensitivity&&(speed[1]=pointer[1]-(p[1]+this.options.scrollSensitivity)),pointer[0]>p[2]-this.options.scrollSensitivity&&(speed[0]=pointer[0]-(p[2]-this.options.scrollSensitivity)),pointer[1]>p[3]-this.options.scrollSensitivity&&(speed[1]=pointer[1]-(p[3]-this.options.scrollSensitivity)),this.startScrolling(speed)}Prototype.Browser.WebKit&&window.scrollBy(0,0),Event.stop(event)},finishDrag:function(e,t){if(this.dragging=!1,this.options.quiet){Position.prepare();var i=[Event.pointerX(e),Event.pointerY(e)];Droppables.show(i,this.element)}this.options.ghosting&&(this._originallyAbsolute||(Position.relativize(this.element),"TR"===this._clone.parentNode.tagName&&this._clone.parentNode.insertBefore(this.element,this._clone)),delete this._originallyAbsolute,Element.remove(this._clone),this._clone=null);var n=!1;t&&(n=Droppables.fire(e,this.element),n?Draggables.supportsTouch&&(Draggables._lastPointer=null):n=!1),n&&this.options.onDropped&&this.options.onDropped(this.element),Draggables.notify("onEnd",this,e);var s=this.options.revert;s&&Object.isFunction(s)&&(s=s(this.element));var o=this.currentDelta();s&&this.options.reverteffect?(0==n||"failure"!=s)&&this.options.reverteffect(this.element,o[1]-this.delta[1],o[0]-this.delta[0]):this.delta=o,this.options.zindex&&(this.element.style.zIndex=this.originalZ),this.options.endeffect&&this.options.endeffect(this.element),Draggables.deactivate(this),Droppables.reset()},keyPress:function(e){e.keyCode==Event.KEY_ESC&&(this.finishDrag(e,!1),Event.stop(e))},endDrag:function(e){this.dragging&&(this.stopScrolling(),this.finishDrag(e,!0),Event.stop(e))},draw:function(e){var t=this.element.cumulativeOffset();if(this.options.ghosting){var i=Position.realOffset(this.element);t[0]+=i[0]-Position.deltaX,t[1]+=i[1]-Position.deltaY}var n=this.currentDelta();t[0]-=n[0],t[1]-=n[1],this.options.scroll&&this.options.scroll!=window&&this._isScrollChild&&(t[0]-=this.options.scroll.scrollLeft-this.originalScrollLeft,t[1]-=this.options.scroll.scrollTop-this.originalScrollTop);var s=[0,1].map(function(i){return e[i]-t[i]-this.offset[i]}.bind(this));this.options.snap&&(s=Object.isFunction(this.options.snap)?this.options.snap(s[0],s[1],this):s.map(Object.isArray(this.options.snap)?function(e,t){return(e/this.options.snap[t]).round()*this.options.snap[t]
  }.bind(this):function(e){return(e/this.options.snap).round()*this.options.snap}.bind(this)));var o=this.element.style;this.options.constraint&&"horizontal"!=this.options.constraint||(o.left=s[0]+"px"),this.options.constraint&&"vertical"!=this.options.constraint||(o.top=s[1]+"px"),"hidden"==o.visibility&&(o.visibility="")},stopScrolling:function(){this.scrollInterval&&(clearInterval(this.scrollInterval),this.scrollInterval=null,Draggables._lastScrollPointer=null)},startScrolling:function(e){(e[0]||e[1])&&(this.scrollSpeed=[e[0]*this.options.scrollSpeed,e[1]*this.options.scrollSpeed],this.lastScrolled=new Date,this.scrollInterval=setInterval(this.scroll.bind(this),10))},scroll:function(){var current=new Date,delta=current-this.lastScrolled;if(this.lastScrolled=current,this.options.scroll==window){with(this._getWindowScroll(this.options.scroll))if(this.scrollSpeed[0]||this.scrollSpeed[1]){var d=delta/1e3;this.options.scroll.scrollTo(left+d*this.scrollSpeed[0],top+d*this.scrollSpeed[1])}}else this.options.scroll.scrollLeft+=this.scrollSpeed[0]*delta/1e3,this.options.scroll.scrollTop+=this.scrollSpeed[1]*delta/1e3;Position.prepare(),Droppables.show(Draggables._lastPointer,this.element),Draggables.notify("onDrag",this),this._isScrollChild&&(Draggables._lastScrollPointer=Draggables._lastScrollPointer||$A(Draggables._lastPointer),Draggables._lastScrollPointer[0]+=this.scrollSpeed[0]*delta/1e3,Draggables._lastScrollPointer[1]+=this.scrollSpeed[1]*delta/1e3,Draggables._lastScrollPointer[0]<0&&(Draggables._lastScrollPointer[0]=0),Draggables._lastScrollPointer[1]<0&&(Draggables._lastScrollPointer[1]=0),this.draw(Draggables._lastScrollPointer)),this.options.change&&this.options.change(this)},_getWindowScroll:function(w){var T,L,W,H;with(w.document)w.document.documentElement&&documentElement.scrollTop?(T=documentElement.scrollTop,L=documentElement.scrollLeft):w.document.body&&(T=body.scrollTop,L=body.scrollLeft),w.innerWidth?(W=w.innerWidth,H=w.innerHeight):w.document.documentElement&&documentElement.clientWidth?(W=documentElement.clientWidth,H=documentElement.clientHeight):(W=body.offsetWidth,H=body.offsetHeight);return{top:T,left:L,width:W,height:H}}});Draggable._dragging={};var SortableObserver=Class.create({initialize:function(e,t){this.element=$(e),this.observer=t,this.lastValue=Sortable.serialize(this.element)},onStart:function(){this.lastValue=Sortable.serialize(this.element)},onEnd:function(){Sortable.unmark(),this.lastValue!=Sortable.serialize(this.element)&&this.observer(this.element)}}),Sortable={SERIALIZE_RULE:/^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/,sortables:{},_findRootElement:function(e){for(;"BODY"!=e.tagName.toUpperCase();){if(e.id&&Sortable.sortables[e.id])return e;e=e.parentNode}},options:function(e){return(e=Sortable._findRootElement($(e)))?Sortable.sortables[e.id]:void 0},destroy:function(e){e=$(e);var t=Sortable.sortables[e.id];t&&(Draggables.removeObserver(t.element),t.droppables.each(function(e){Droppables.remove(e)}),t.draggables.invoke("destroy"),delete Sortable.sortables[t.element.id])},create:function(e){e=$(e);var t=Object.extend({element:e,tag:"li",dropOnEmpty:!1,accept:[],tree:!1,treeTag:"ul",overlap:"vertical",constraint:"vertical",containment:e,handle:!1,only:!1,delay:0,hoverclass:null,ghosting:!1,quiet:!1,scroll:!1,scrollSensitivity:20,scrollSpeed:15,format:this.SERIALIZE_RULE,elements:!1,handles:!1,onDrop:Prototype.emptyFunction,onHover:Sortable.onHover,onChange:Prototype.emptyFunction,onUpdate:Prototype.emptyFunction},arguments[1]||{});this.destroy(e);var i={revert:!0,quiet:t.quiet,scroll:t.scroll,scrollSpeed:t.scrollSpeed,scrollSensitivity:t.scrollSensitivity,delay:t.delay,ghosting:t.ghosting,constraint:t.constraint,onStart:t.onStart,handle:t.handle};t.starteffect&&(i.starteffect=t.starteffect),t.reverteffect?i.reverteffect=t.reverteffect:t.ghosting&&(i.reverteffect=function(e){e.style.top=0,e.style.left=0}),t.endeffect&&(i.endeffect=t.endeffect),t.zindex&&(i.zindex=t.zindex);var n={overlap:t.overlap,containment:t.containment,tree:t.tree,hoverclass:t.hoverclass,onHover:t.onHover,onDrop:t.onDrop},s={onHover:t.onEmptyHover||Sortable.onEmptyHover,overlap:t.overlap,containment:t.containment,hoverclass:t.hoverclass,accept:t.accept,onDrop:t.onDrop};Element.cleanWhitespace(e),t.draggables=[],t.droppables=[],(t.dropOnEmpty||t.tree)&&(Droppables.add(e,s),t.droppables.push(e)),(t.elements||this.findElements(e,t)||[]).each(function(s,o){var r=t.handles?$(t.handles[o]):t.handle?$(s).select("."+t.handle)[0]:s;t.draggables.push(new Draggable(s,Object.extend(i,{handle:r}))),Droppables.add(s,n),t.tree&&(s.treeNode=e),t.droppables.push(s)}),t.tree&&(Sortable.findTreeElements(e,t)||[]).each(function(i){Droppables.add(i,s),i.treeNode=e,t.droppables.push(i)}),this.sortables[e.identify()]=t,Draggables.addObserver(new SortableObserver(e,t.onUpdate))},findElements:function(e,t){return Element.findChildren(e,t.only,t.tree?!0:!1,t.tag)},findTreeElements:function(e,t){return Element.findChildren(e,t.only,t.tree?!0:!1,t.treeTag)},onHover:function(e,t,i){var n=null,s=null;if(!(Element.isParent(t,e)||i>.33&&.66>i&&Sortable.options(t).tree))if(i>.5)Sortable.mark(t,"before"),t.previousSibling!=e&&(n=e.parentNode,e.style.visibility="hidden",t.parentNode.insertBefore(e,t),t.parentNode!=n&&(s=Sortable.options(n),s&&s.onChange(e)),Sortable.options(t.parentNode).onChange(e));else{Sortable.mark(t,"after");var o=t.nextSibling||null;o!=e&&(n=e.parentNode,e.style.visibility="hidden",t.parentNode.insertBefore(e,o),t.parentNode!=n&&(s=Sortable.options(n),s&&s.onChange(e)),Sortable.options(t.parentNode).onChange(e))}},onEmptyHover:function(e,t,i){var n=e.parentNode,s=Sortable.options(t);if(!Element.isParent(t,e)){var o,r=Sortable.findElements(t,{tag:s.tag,only:s.only}),a=null;if(r){var l,c=null,u=Element.offsetSize(t,s.overlap)*(1-i);for(o=0;o<r.length;o+=1)if(c=Element.offsetSize(r[o],s.overlap),l=r[o].cumulativeOffset().top,Position.ycomp>=l&&Position.ycomp<l+r[o].offsetHeight){if(!(u-c>=0)){if(u-c/2>=0){a=o+1<r.length?r[o+1]:null;break}a=r[o];break}u-=c}}t.insertBefore(e,a);var d=Sortable.options(n);d&&d.onChange(e),s.onChange(e)}},unmark:function(){Sortable._marker&&Sortable._marker.hide()},mark:function(e,t){var i=Sortable.options(e.parentNode);if(!i||i.ghosting){Sortable._marker||(Sortable._marker=($("dropmarker")||Element.extend(document.createElement("DIV"))).hide().addClassName("dropmarker").setStyle({position:"absolute"}),document.getElementsByTagName("body").item(0).appendChild(Sortable._marker));var n=e.cumulativeOffset();Sortable._marker.setStyle({left:n[0]+"px",top:n[1]+"px"}),"after"==t&&Sortable._marker.setStyle("horizontal"==i.overlap?{left:n[0]+e.clientWidth+"px"}:{top:n[1]+e.clientHeight+"px"}),Sortable._marker.show()}},_tree:function(e,t,i){for(var n=Sortable.findElements(e,t)||[],s=0;s<n.length;++s){var o=n[s].id.match(t.format);if(o){var r={id:encodeURIComponent(o?o[1]:null),element:e,parent:i,children:[],position:i.children.length,container:$(n[s]).down(t.treeTag)};r.container&&this._tree(r.container,t,r),i.children.push(r)}}return i},tree:function(e){e=$(e);var t=this.options(e),i=Object.extend({tag:t.tag,treeTag:t.treeTag,only:t.only,name:e.id,format:t.format},arguments[1]||{}),n={id:null,parent:null,children:[],container:e,position:0};return Sortable._tree(e,i,n)},_constructIndex:function(e){var t="";do e.id&&(t="["+e.position+"]"+t);while(null!=(e=e.parent));return t},sequence:function(e){e=$(e);var t=Object.extend(this.options(e),arguments[1]||{});return $(this.findElements(e,t)||[]).map(function(e){return e.id.match(t.format)?e.id.match(t.format)[1]:""})},setSequence:function(e,t){e=$(e);var i=Object.extend(this.options(e),arguments[2]||{}),n={};this.findElements(e,i).each(function(e){e.id.match(i.format)&&(n[e.id.match(i.format)[1]]=[e,e.parentNode]),e.parentNode.removeChild(e)}),t.each(function(e){var t=n[e];t&&(t[1].appendChild(t[0]),delete n[e])})},serialize:function(e){e=$(e);var t=Object.extend(Sortable.options(e),arguments[1]||{}),i=encodeURIComponent(arguments[1]&&arguments[1].name?arguments[1].name:e.id);return t.tree?Sortable.tree(e,arguments[1]).children.map(function(e){return[i+Sortable._constructIndex(e)+"[id]="+encodeURIComponent(e.id)].concat(e.children.map(arguments.callee))}).flatten().join("&"):Sortable.sequence(e,arguments[1]).map(function(e){return i+"[]="+encodeURIComponent(e)}).join("&")}};Element.isParent=function(e,t){return e.parentNode&&e!=t?e.parentNode==t?!0:Element.isParent(e.parentNode,t):!1},Element.findChildren=function(e,t,i,n){if(!e.hasChildNodes())return null;n=n.toUpperCase(),t&&(t=[t].flatten());var s=[];return $A(e.childNodes).each(function(e){if(!e.tagName||e.tagName.toUpperCase()!=n||t&&!Element.classNames(e).detect(function(e){return t.include(e)})||s.push(e),i){var o=Element.findChildren(e,t,i,n);o&&s.push(o)}}),s.length>0?s.flatten():[]},Element.offsetSize=function(e,t){return e["offset"+("vertical"==t||"height"==t?"Height":"Width")]},define("dragdrop",["prototype","effects"],function(e){return function(){var t;return t||e.Draggable}}(this)),Draggable.prototype.startDrag=function(e){this.dragging=!0,this.delta||(this.delta=this.currentDelta()),this.options.zindex&&(this.originalZ=parseInt(Element.getStyle(this.element,"z-index")||0),this.element.style.zIndex=this.options.zindex),this.options.ghosting&&(this._clone=this.element.cloneNode(!0),this.element._originallyAbsolute="absolute"==this.element.getStyle("position"),this.element._originallyAbsolute||Position.absolutize(this.element),this.element.parentNode.insertBefore(this._clone,this.element));var t=jQuery("body"),i=jQuery(this.element),n=i.offset();if(this._sizes={window:{w:t.outerWidth(!0),h:t.outerHeight(!0)},element:{w:i.outerWidth(),h:i.outerHeight()},mouseOffset:{left:Event.pointerX(e)-n.left,top:Event.pointerY(e)-n.top}},this.options.superghosting){Position.prepare();var s=[Event.pointerX(e),Event.pointerY(e)];body=document.getElementsByTagName("body")[0],me=this.element,this._clone=me.cloneNode(!0),me.parentNode.insertBefore(this._clone,me),me.id="clone_"+me.id,me.hide(),Position.absolutize(me),me.parentNode.removeChild(me),body.appendChild(me),("0px"==me.style.width||"0px"==me.style.height)&&(me.style.width=Element.getWidth(this._clone)+"px",me.style.height=Element.getHeight(this._clone)+"px"),this.originalScrollTop=Element.getHeight(this._clone)/2,this.draw(s),me.show()}if(this.options.scroll)if(this.options.scroll==window){var o=this._getWindowScroll(this.options.scroll);this.originalScrollLeft=o.left,this.originalScrollTop=o.top}else this.originalScrollLeft=this.options.scroll.scrollLeft,this.originalScrollTop=this.options.scroll.scrollTop;Draggables.notify("onStart",this,e),this.options.starteffect&&this.options.starteffect(this.element)},Draggable.prototype.draw=function(e){"undefined"==typeof this.elemSizeCaptured&&(setTimeout(function(){if(this._sizes){var e=jQuery(this.element);this._sizes.element={w:e.outerWidth(),h:e.outerHeight()}}}.bind(this),100),this.elemSizeCaptured=!0);var t=jQuery(this.element),i=t.offset(),n={left:e[0]-this._sizes.mouseOffset.left,top:e[1]-this._sizes.mouseOffset.top},s=[n.left,n.top];this.options.snap&&(s=Object.isFunction(this.options.snap)?this.options.snap(s[0],s[1],this):s.map(Object.isArray(this.options.snap)?function(e,t){return(e/this.options.snap[t]).round()*this.options.snap[t]}.bind(this):function(e){return(e/this.options.snap).round()*this.options.snap}.bind(this))),n={left:s[0],top:s[1]},this.options.constraint&&"horizontal"==this.options.constraint&&(n.top=i.top),this.options.constraint&&"vertical"==this.options.constraint&&(n.left=i.left),this.options.mouseOffset&&(n={left:e[0],top:e[1]}),(0>n.top||0>n.left||n.top+this._sizes.element.h>this._sizes.window.h||n.left+this._sizes.element.w>this._sizes.window.w)&&(0>n.top&&(n.top=0),0>n.left&&(n.left=0),n.top+this._sizes.element.h>this._sizes.window.h&&(n.top=this._sizes.window.h-this._sizes.element.h),n.left+this._sizes.element.w>this._sizes.window.w&&(n.left=this._sizes.window.w-this._sizes.element.w)),t.offset(n),this._sequencer=this._sequencer||0,this._sequencer++,1==this._sequencer&&t.offset(n)},Droppables.isAffected=function(e,t,i){return Position.prepare(),positioned_within=Position.withinIncludingScrolloffsets(i.element,e[0],e[1]),i.element!=t&&(!i._containers||this.isContained(t,i))&&(!i.accept||Element.classNames(t).detect(function(e){return i.accept.include(e)}))&&positioned_within},Draggable.prototype.finishDrag=function(e,t){if(this.dragging=!1,delete this._sequencer,delete this._sizes,this.options.quiet){Position.prepare();var i=[Event.pointerX(e),Event.pointerY(e)];Droppables.show(i,this.element)}this.options.ghosting&&(this.element._originallyAbsolute||Position.relativize(this.element),this.element._originallyAbsolute=void 0,Element.remove(this._clone),this._clone=null),this.options.superghosting&&(body=document.getElementsByTagName("body")[0],Element.remove(this.element),new Draggable(this._clone,this.options));var n=!1;t&&(n=Droppables.fire(e,this.element),n||(n=!1)),n&&this.options.onDropped&&this.options.onDropped(this.element),Draggables.notify("onEnd",this,e);var s=this.options.revert;s&&"function"==typeof s&&(s=s(this.element));var o=this.currentDelta();s&&this.options.reverteffect?(0==n||"failure"!=s)&&this.options.reverteffect(this.element,o[1]-this.delta[1],o[0]-this.delta[0]):this.delta=o,this.options.zindex&&(this.element.style.zIndex=this.originalZ,this._clone&&(this._clone.style.zIndex=this.originalZ)),this.options.endeffect&&this.options.endeffect(this.element),Draggables.deactivate(this),Droppables.reset()},define("dragdrop.extra",["dragdrop","jquery"],function(e){return function(){var t;return t||e.Draggable}}(this));var Truncator=Class.create({initialize:function(e,t){if(e&&e[0]){var i=null;t&&(i=t),e.each(function(e){this.truncate(e,i)}.bind(this))}},truncate:function(e,t){if("ABBR"==e.nodeName){var i=e.title.replace("&quot;",'"');e=e.parentNode,e.update(i.strip().escapeHTML())}var n=Object.isUndefined(e.innerText)?e.textContent:e.innerText;e.insert(Truncator.template.evaluate({divId:Truncator.tmpDivId,spanId:Truncator.tmpSpanId}));var s=$(Truncator.tmpSpanId);s.insert(n.escapeHTML());var o=t?t:e.getWidth(),r=s.getWidth();if(o>=r)return void $(Truncator.tmpDivId).remove();for(var a=n,l=0,c=n.length,u=(c-l)/2;u>1;)u+=l,a=n.substr(0,u),isIE()?s.innerText=a:s.update(a.escapeHTML()),s.getWidth()+30>o?c=u:l=u,u=(c-l)/2;$(Truncator.tmpDivId).remove(),e.update(this.truncateString(this.ellipsifyString(a.escapeHTML()),n.escapeHTML().replace('"',"&quot;")))},untruncate:function(e){e.each(function(e){"ABBR"==e.nodeName&&e.update(e.title.strip().escapeHTML())})},ellipsifyString:function(e){return e+"&hellip;"},truncateString:function(e,t){return'<abbr title="'+t+'">'+e+"</abbr>"}});Truncator.tmpDivId="truncator-tmp-div",Truncator.tmpSpanId="truncator-tmp-span",Truncator.template=new Template('    <div id="#{divId}" style="width:9999px; left:-9999px; top:-9999px; display:block; position: absolute">        <span id="#{spanId}"></span>    </div>'),define("tools.truncator",["prototype"],function(e){return function(){var t;return t||e.jQuery}}(this)),function(){var e=Math,t=/webkit/i.test(navigator.appVersion)?"webkit":/firefox/i.test(navigator.userAgent)?"Moz":"opera"in window?"O":"",n="WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix,s="ontouchstart"in window,o=t+"Transform"in document.documentElement.style,r=/android/gi.test(navigator.appVersion),a=/iphone|ipad/gi.test(navigator.appVersion),c=/playbook/gi.test(navigator.appVersion),u=a||c,d=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return setTimeout(e,1)}}(),h=function(){return window.cancelRequestAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout}(),p="onorientationchange"in window?"orientationchange":"resize",f=s?"touchstart":"mousedown",m=s?"touchmove":"mousemove",g=s?"touchend":"mouseup",v=s?"touchcancel":"mouseup",_="Moz"==t?"DOMMouseScroll":"mousewheel",y="translate"+(n?"3d(":"("),b=n?",0)":")",T=function(e,i){var l,c=this,d=document;c.wrapper="object"==typeof e?e:d.getElementById(e),c.wrapper.style.overflow="hidden",c.scroller=c.wrapper.children[0],c.options={hScroll:!0,vScroll:!0,bounce:!0,bounceLock:!1,momentum:!0,lockDirection:!0,useTransform:!0,useTransition:!1,checkDOMChanges:!1,hScrollbar:!0,vScrollbar:!0,fixedScrollbar:r,hideScrollbar:a,fadeScrollbar:a&&n,scrollbarClass:"",zoom:!1,zoomMin:1,zoomMax:4,doubleTapZoom:2,wheelAction:"scroll",snap:!1,snapThreshold:1,onRefresh:null,onBeforeScrollStart:function(e){e.preventDefault()},onScrollStart:null,onBeforeScrollMove:null,onScrollMove:null,onBeforeScrollEnd:null,onScrollEnd:null,onTouchEnd:null,onDestroy:null,onZoomStart:null,onZoom:null,onZoomEnd:null};for(l in i)c.options[l]=i[l];c.options.useTransform=o?c.options.useTransform:!1,c.options.hScrollbar=c.options.hScroll&&c.options.hScrollbar,c.options.vScrollbar=c.options.vScroll&&c.options.vScrollbar,c.options.zoom=c.options.useTransform&&c.options.zoom,c.options.useTransition=u&&c.options.useTransition,c.scroller.style[t+"TransitionProperty"]=c.options.useTransform?"-"+t.toLowerCase()+"-transform":"top left",c.scroller.style[t+"TransitionDuration"]="0",c.scroller.style[t+"TransformOrigin"]="0 0",c.options.useTransition&&(c.scroller.style[t+"TransitionTimingFunction"]="cubic-bezier(0.33,0.66,0.66,1)"),c.options.useTransform?c.scroller.style[t+"Transform"]=y+"0,0"+b:c.scroller.style.cssText+=";position:absolute;top:0;left:0",c.options.useTransition&&(c.options.fixedScrollbar=!0),c.refresh(),c._bind(p,window),c._bind(f),s||(c._bind("mouseout",c.wrapper),c._bind(_)),c.options.checkDOMChanges&&(c.checkDOMTime=setInterval(function(){c._checkDOMChanges()},500))};T.prototype={enabled:!0,x:0,y:0,steps:[],scale:1,currPageX:0,currPageY:0,pagesX:[],pagesY:[],aniTime:null,wheelZoomCount:0,handleEvent:function(e){var t=this;switch(e.type){case f:if(!s&&0!==e.button)return;t._start(e);break;case m:t._move(e);break;case g:case v:t._end(e);break;case p:t._resize();break;case _:t._wheel(e);break;case"mouseout":t._mouseout(e);break;case"webkitTransitionEnd":t._transitionEnd(e)}},_checkDOMChanges:function(){this.moved||this.zoomed||this.animating||this.scrollerW==this.scroller.offsetWidth*this.scale&&this.scrollerH==this.scroller.offsetHeight*this.scale||this.refresh()},_scrollbar:function(i){var n,s=this,r=document;return s[i+"Scrollbar"]?(s[i+"ScrollbarWrapper"]||(n=r.createElement("div"),s.options.scrollbarClass?n.className=s.options.scrollbarClass+i.toUpperCase():n.style.cssText="position:absolute;z-index:100;"+("h"==i?"height:7px;bottom:1px;left:2px;right:"+(s.vScrollbar?"7":"2")+"px":"width:7px;bottom:"+(s.hScrollbar?"7":"2")+"px;top:2px;right:1px"),n.style.cssText+=";pointer-events:none;-"+t+"-transition-property:opacity;-"+t+"-transition-duration:"+(s.options.fadeScrollbar?"350ms":"0")+";overflow:hidden;opacity:"+(s.options.hideScrollbar?"0":"1"),s.wrapper.appendChild(n),s[i+"ScrollbarWrapper"]=n,n=r.createElement("div"),s.options.scrollbarClass||(n.style.cssText="position:absolute;z-index:100;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);-"+t+"-background-clip:padding-box;-"+t+"-box-sizing:border-box;"+("h"==i?"height:100%":"width:100%")+";-"+t+"-border-radius:3px;border-radius:3px"),n.style.cssText+=";pointer-events:none;-"+t+"-transition-property:-"+t+"-transform;-"+t+"-transition-timing-function:cubic-bezier(0.33,0.66,0.66,1);-"+t+"-transition-duration:0;-"+t+"-transform:"+y+"0,0"+b,s.options.useTransition&&(n.style.cssText+=";-"+t+"-transition-timing-function:cubic-bezier(0.33,0.66,0.66,1)"),s[i+"ScrollbarWrapper"].appendChild(n),s[i+"ScrollbarIndicator"]=n),"h"==i?(s.hScrollbarSize=s.hScrollbarWrapper.clientWidth,s.hScrollbarIndicatorSize=e.max(e.round(s.hScrollbarSize*s.hScrollbarSize/s.scrollerW),8),s.hScrollbarIndicator.style.width=s.hScrollbarIndicatorSize+"px",s.hScrollbarMaxScroll=s.hScrollbarSize-s.hScrollbarIndicatorSize,s.hScrollbarProp=s.hScrollbarMaxScroll/s.maxScrollX):(s.vScrollbarSize=s.vScrollbarWrapper.clientHeight,s.vScrollbarIndicatorSize=e.max(e.round(s.vScrollbarSize*s.vScrollbarSize/s.scrollerH),8),s.vScrollbarIndicator.style.height=s.vScrollbarIndicatorSize+"px",s.vScrollbarMaxScroll=s.vScrollbarSize-s.vScrollbarIndicatorSize,s.vScrollbarProp=s.vScrollbarMaxScroll/s.maxScrollY),void s._scrollbarPos(i,!0)):void(s[i+"ScrollbarWrapper"]&&(o&&(s[i+"ScrollbarIndicator"].style[t+"Transform"]=""),s[i+"ScrollbarWrapper"].parentNode.removeChild(s[i+"ScrollbarWrapper"]),s[i+"ScrollbarWrapper"]=null,s[i+"ScrollbarIndicator"]=null))},_resize:function(){var e=this;setTimeout(function(){e.refresh()},r?200:0)},_pos:function(i,n){i=this.hScroll?i:0,n=this.vScroll?n:0,this.options.useTransform?this.scroller.style[t+"Transform"]=y+i+"px,"+n+"px"+b+" scale("+this.scale+")":(i=e.round(i),n=e.round(n),this.scroller.style.left=i+"px",this.scroller.style.top=n+"px"),this.x=i,this.y=n,this._scrollbarPos("h"),this._scrollbarPos("v")},_scrollbarPos:function(i,n){var s,o=this,r="h"==i?o.x:o.y;o[i+"Scrollbar"]&&(r=o[i+"ScrollbarProp"]*r,0>r?(o.options.fixedScrollbar||(s=o[i+"ScrollbarIndicatorSize"]+e.round(3*r),8>s&&(s=8),o[i+"ScrollbarIndicator"].style["h"==i?"width":"height"]=s+"px"),r=0):r>o[i+"ScrollbarMaxScroll"]&&(o.options.fixedScrollbar?r=o[i+"ScrollbarMaxScroll"]:(s=o[i+"ScrollbarIndicatorSize"]-e.round(3*(r-o[i+"ScrollbarMaxScroll"])),8>s&&(s=8),o[i+"ScrollbarIndicator"].style["h"==i?"width":"height"]=s+"px",r=o[i+"ScrollbarMaxScroll"]+(o[i+"ScrollbarIndicatorSize"]-s))),o[i+"ScrollbarWrapper"].style[t+"TransitionDelay"]="0",o[i+"ScrollbarWrapper"].style.opacity=n&&o.options.hideScrollbar?"0":"1",o[i+"ScrollbarIndicator"].style[t+"Transform"]=y+("h"==i?r+"px,0":"0,"+r+"px")+b)},_start:function(i){var n,o,r,a,l,c=this,u=s?i.touches[0]:i;T.scrolling=!1,clearTimeout(T.scrollTimer),!c.enabled||Draggables.dragging||i.touches.length<2||(c.options.onBeforeScrollStart&&c.options.onBeforeScrollStart.call(c,i),(c.options.useTransition||c.options.zoom)&&c._transitionTime(0),c.moved=!1,c.animating=!1,c.zoomed=!1,c.distX=0,c.distY=0,c.absDistX=0,c.absDistY=0,c.dirX=0,c.dirY=0,c.options.zoom&&s&&i.touches.length>1&&(a=e.abs(i.touches[0].pageX-i.touches[1].pageX),l=e.abs(i.touches[0].pageY-i.touches[1].pageY),c.touchesDistStart=e.sqrt(a*a+l*l),c.originX=e.abs(i.touches[0].pageX+i.touches[1].pageX-2*c.wrapperOffsetLeft)/2-c.x,c.originY=e.abs(i.touches[0].pageY+i.touches[1].pageY-2*c.wrapperOffsetTop)/2-c.y,c.options.onZoomStart&&c.options.onZoomStart.call(c,i)),c.options.momentum&&(c.options.useTransform?(n=getComputedStyle(c.scroller,null)[t+"Transform"].replace(/[^0-9-.,]/g,"").split(","),o=1*n[4],r=1*n[5]):(o=1*getComputedStyle(c.scroller,null).left.replace(/[^0-9-]/g,""),r=1*getComputedStyle(c.scroller,null).top.replace(/[^0-9-]/g,"")),(o!=c.x||r!=c.y)&&(c.options.useTransition?c._unbind("webkitTransitionEnd"):h(c.aniTime),c.steps=[],c._pos(o,r))),c.absStartX=c.x,c.absStartY=c.y,c.startX=c.x,c.startY=c.y,c.pointX=u.pageX,c.pointY=u.pageY,c.startTime=i.timeStamp||(new Date).getTime(),c.options.onScrollStart&&c.options.onScrollStart.call(c,i),c._bind(m),c._bind(g),c._bind(v),T.scrolling=!0)},_move:function(i){var n,o,r,a=this,l=s?i.touches[0]:i,c=l.pageX-a.pointX,u=l.pageY-a.pointY,d=a.x+c,h=a.y+u,p=i.timeStamp||(new Date).getTime();return a.options.onBeforeScrollMove&&a.options.onBeforeScrollMove.call(a,i),a.options.zoom&&s&&i.touches.length>1?(n=e.abs(i.touches[0].pageX-i.touches[1].pageX),o=e.abs(i.touches[0].pageY-i.touches[1].pageY),a.touchesDist=e.sqrt(n*n+o*o),a.zoomed=!0,r=1/a.touchesDistStart*a.touchesDist*this.scale,r<a.options.scaleMin?r=.5*a.options.scaleMin*Math.pow(2,r/a.options.scaleMin):r>a.options.scaleMax&&(r=2*a.options.scaleMax*Math.pow(.5,a.options.scaleMax/r)),a.lastScale=r/this.scale,d=this.originX-this.originX*a.lastScale+this.x,h=this.originY-this.originY*a.lastScale+this.y,this.scroller.style[t+"Transform"]=y+d+"px,"+h+"px"+b+" scale("+r+")",void(a.options.onZoom&&a.options.onZoom.call(a,i))):(a.pointX=l.pageX,a.pointY=l.pageY,(d>0||d<a.maxScrollX)&&(d=a.options.bounce?a.x+c/2:d>=0||a.maxScrollX>=0?0:a.maxScrollX),(h>0||h<a.maxScrollY)&&(h=a.options.bounce?a.y+u/2:h>=0||a.maxScrollY>=0?0:a.maxScrollY),a.absDistX<6&&a.absDistY<6?(a.distX+=c,a.distY+=u,a.absDistX=e.abs(a.distX),void(a.absDistY=e.abs(a.distY))):(a.options.lockDirection&&(a.absDistX>a.absDistY+5?(h=a.y,u=0):a.absDistY>a.absDistX+5&&(d=a.x,c=0)),a.moved=!0,a._pos(d,h),a.dirX=c>0?-1:0>c?1:0,a.dirY=u>0?-1:0>u?1:0,p-a.startTime>300&&(a.startTime=p,a.startX=a.x,a.startY=a.y),void(a.options.onScrollMove&&a.options.onScrollMove.call(a,i))))},_end:function(i){if(!s||0==i.touches.length){var n,o,r,a,l,c,u=this,d=s?i.changedTouches[0]:i,h={dist:0,time:0},p={dist:0,time:0},f=(i.timeStamp||(new Date).getTime())-u.startTime,_=u.x,w=u.y;if(u._unbind(m),u._unbind(g),u._unbind(v),T.scrollTimer=setTimeout(function(){T.scrolling=!1},1e3),u.options.onBeforeScrollEnd&&u.options.onBeforeScrollEnd.call(u,i),u.zoomed)return c=u.scale*u.lastScale,c=Math.max(u.options.zoomMin,c),c=Math.min(u.options.zoomMax,c),u.lastScale=c/u.scale,u.scale=c,u.x=u.originX-u.originX*u.lastScale+u.x,u.y=u.originY-u.originY*u.lastScale+u.y,u.scroller.style[t+"TransitionDuration"]="200ms",u.scroller.style[t+"Transform"]=y+u.x+"px,"+u.y+"px"+b+" scale("+u.scale+")",u.zoomed=!1,u.refresh(),void(u.options.onZoomEnd&&u.options.onZoomEnd.call(u,i));if(!u.moved)return s&&(u.doubleTapTimer&&u.options.zoom?(clearTimeout(u.doubleTapTimer),u.doubleTapTimer=null,u.options.onZoomStart&&u.options.onZoomStart.call(u,i),u.zoom(u.pointX,u.pointY,1==u.scale?u.options.doubleTapZoom:1)):u.doubleTapTimer=setTimeout(function(){for(u.doubleTapTimer=null,n=d.target;1!=n.nodeType;)n=n.parentNode;"SELECT"!=n.tagName&&"INPUT"!=n.tagName&&"TEXTAREA"!=n.tagName&&(o=document.createEvent("MouseEvents"),o.initMouseEvent("click",!0,!0,i.view,1,d.screenX,d.screenY,d.clientX,d.clientY,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,0,null),o._fake=!0,n.dispatchEvent(o))},u.options.zoom?250:0)),u._resetPos(200),void(u.options.onTouchEnd&&u.options.onTouchEnd.call(u,i));if(i.scrollEvent=!0,300>f&&u.options.momentum&&(h=_?u._momentum(_-u.startX,f,-u.x,u.scrollerW-u.wrapperW+u.x,u.options.bounce?u.wrapperW:0):h,p=w?u._momentum(w-u.startY,f,-u.y,u.maxScrollY<0?u.scrollerH-u.wrapperH+u.y:0,u.options.bounce?u.wrapperH:0):p,_=u.x+h.dist,w=u.y+p.dist,(u.x>0&&_>0||u.x<u.maxScrollX&&_<u.maxScrollX)&&(h={dist:0,time:0}),(u.y>0&&w>0||u.y<u.maxScrollY&&w<u.maxScrollY)&&(p={dist:0,time:0})),h.dist||p.dist)return l=e.max(e.max(h.time,p.time),10),u.options.snap&&(r=_-u.absStartX,a=w-u.absStartY,e.abs(r)<u.options.snapThreshold&&e.abs(a)<u.options.snapThreshold?u.scrollTo(u.absStartX,u.absStartY,200):(snap=u._snap(_,w),_=snap.x,w=snap.y,l=e.max(snap.time,l))),u.scrollTo(_,w,l),void(u.options.onTouchEnd&&u.options.onTouchEnd.call(u,i));if(u.options.snap)return r=_-u.absStartX,a=w-u.absStartY,e.abs(r)<u.options.snapThreshold&&e.abs(a)<u.options.snapThreshold?u.scrollTo(u.absStartX,u.absStartY,200):(snap=u._snap(u.x,u.y),(snap.x!=u.x||snap.y!=u.y)&&u.scrollTo(snap.x,snap.y,snap.time)),void(u.options.onTouchEnd&&u.options.onTouchEnd.call(u,i));u._resetPos(200),u.options.onTouchEnd&&u.options.onTouchEnd.call(u,i)}},_resetPos:function(e){var i=this,n=i.x>=0?0:i.x<i.maxScrollX?i.maxScrollX:i.x,s=i.y>=0||i.maxScrollY>0?0:i.y<i.maxScrollY?i.maxScrollY:i.y;return n==i.x&&s==i.y?(i.moved&&(i.moved=!1,i.options.onScrollEnd&&i.options.onScrollEnd.call(i)),i.hScrollbar&&i.options.hideScrollbar&&("webkit"==t&&(i.hScrollbarWrapper.style[t+"TransitionDelay"]="300ms"),i.hScrollbarWrapper.style.opacity="0"),void(i.vScrollbar&&i.options.hideScrollbar&&("webkit"==t&&(i.vScrollbarWrapper.style[t+"TransitionDelay"]="300ms"),i.vScrollbarWrapper.style.opacity="0"))):void i.scrollTo(n,s,e||0)},_wheel:function(e){var t,i,n,s,o,r=this;return"wheelDeltaX"in e?(t=e.wheelDeltaX/12,i=e.wheelDeltaY/12):t=i="detail"in e?3*-e.detail:-e.wheelDelta,"zoom"==r.options.wheelAction?(o=r.scale*Math.pow(2,1/3*(i?i/Math.abs(i):0)),i<r.options.zoomMin&&(i=r.options.zoomMin),i>r.options.zoomMax&&(i=r.options.zoomMax),void(i!=r.scale&&(!r.wheelZoomCount&&r.options.onZoomStart&&r.options.onZoomStart.call(r,e),r.wheelZoomCount++,r.zoom(e.pageX,e.pageY,i,400),setTimeout(function(){r.wheelZoomCount--,!r.wheelZoomCount&&r.options.onZoomEnd&&r.options.onZoomEnd.call(r,e)},400)))):(n=r.x+t,s=r.y+i,n>0?n=0:n<r.maxScrollX&&(n=r.maxScrollX),s>0?s=0:s<r.maxScrollY&&(s=r.maxScrollY),void r.scrollTo(n,s,0))},_mouseout:function(e){var t=e.relatedTarget;if(!t)return void this._end(e);for(;t=t.parentNode;)if(t==this.wrapper)return;this._end(e)},_transitionEnd:function(e){var t=this;e.target==t.scroller&&(t._unbind("webkitTransitionEnd"),t._startAni())},_startAni:function(){var t,i,n=this,s=n.x,o=n.y,r=(new Date).getTime();if(!n.animating)return n.steps.length?(t=n.steps.shift(),t.x==s&&t.y==o&&(t.time=0),n.animating=!0,n.moved=!0,n.options.useTransition?(n._transitionTime(t.time),n._pos(t.x,t.y),n.animating=!1,void(t.time?n._bind("webkitTransitionEnd"):n._resetPos(0))):void function a(){var l,c,u=(new Date).getTime();return u>=r+t.time?(n._pos(t.x,t.y),n.animating=!1,n.options.onAnimationEnd&&n.options.onAnimationEnd.call(n),void n._startAni()):(u=(u-r)/t.time-1,i=e.sqrt(1-u*u),l=(t.x-s)*i+s,c=(t.y-o)*i+o,n._pos(l,c),void(n.animating&&(n.aniTime=d(a))))}()):void n._resetPos(400)},_transitionTime:function(e){e+="ms",this.scroller.style[t+"TransitionDuration"]=e,this.hScrollbar&&(this.hScrollbarIndicator.style[t+"TransitionDuration"]=e),this.vScrollbar&&(this.vScrollbarIndicator.style[t+"TransitionDuration"]=e)},_momentum:function(t,i,n,s,o){var r=6e-4,a=e.abs(t)/i,l=a*a/(2*r),c=0,u=0;return t>0&&l>n?(u=o/(6/(l/a*r)),n+=u,a=a*n/l,l=n):0>t&&l>s&&(u=o/(6/(l/a*r)),s+=u,a=a*s/l,l=s),l*=0>t?-1:1,c=a/r,{dist:l,time:e.round(c)}},_offset:function(e){for(var t=-e.offsetLeft,i=-e.offsetTop;e=e.offsetParent;)t-=e.offsetLeft,i-=e.offsetTop;return e!=this.wrapper&&(t*=this.scale,i*=this.scale),{left:t,top:i}},_snap:function(t,i){var n,s,o,r,a,l,c=this;for(o=c.pagesX.length-1,n=0,s=c.pagesX.length;s>n;n++)if(t>=c.pagesX[n]){o=n;break}for(o==c.currPageX&&o>0&&c.dirX<0&&o--,t=c.pagesX[o],a=e.abs(t-c.pagesX[c.currPageX]),a=a?e.abs(c.x-t)/a*500:0,c.currPageX=o,o=c.pagesY.length-1,n=0;o>n;n++)if(i>=c.pagesY[n]){o=n;break}return o==c.currPageY&&o>0&&c.dirY<0&&o--,i=c.pagesY[o],l=e.abs(i-c.pagesY[c.currPageY]),l=l?e.abs(c.y-i)/l*500:0,c.currPageY=o,r=e.round(e.max(a,l))||200,{x:t,y:i,time:r}},_bind:function(e,t,i){(t||this.scroller).addEventListener(e,this,!!i)},_unbind:function(e,t,i){(t||this.scroller).removeEventListener(e,this,!!i)},destroy:function(){var e=this;e.scroller.style[t+"Transform"]="",e.hScrollbar=!1,e.vScrollbar=!1,e._scrollbar("h"),e._scrollbar("v"),e._unbind(p,window),e._unbind(f),e._unbind(m),e._unbind(g),e._unbind(v),e.options.hasTouch&&(e._unbind("mouseout",e.wrapper),e._unbind(_)),e.options.useTransition&&e._unbind("webkitTransitionEnd"),e.options.checkDOMChanges&&clearInterval(e.checkDOMTime),e.options.onDestroy&&e.options.onDestroy.call(e)},refresh:function(){var n,s=this,o=0,r=0;if(T.scrolling=!1,s.scale<s.options.zoomMin&&(s.scale=s.options.zoomMin),s.wrapperW=s.wrapper.clientWidth||1,s.wrapperH=s.wrapper.clientHeight||1,s.scrollerW=e.round(s.scroller.offsetWidth*s.scale),s.scrollerH=e.round(s.scroller.offsetHeight*s.scale),s.maxScrollX=s.wrapperW-s.scrollerW,s.maxScrollY=s.wrapperH-s.scrollerH,s.dirX=0,s.dirY=0,s.hScroll=s.options.hScroll&&s.maxScrollX<0,s.vScroll=s.options.vScroll&&(!s.options.bounceLock&&!s.hScroll||s.scrollerH>s.wrapperH),s.hScrollbar=s.hScroll&&s.options.hScrollbar,s.vScrollbar=s.vScroll&&s.options.vScrollbar&&s.scrollerH>s.wrapperH,n=s._offset(s.wrapper),s.wrapperOffsetLeft=-n.left,s.wrapperOffsetTop=-n.top,"string"==typeof s.options.snap)for(s.pagesX=[],s.pagesY=[],els=s.scroller.querySelectorAll(s.options.snap),i=0,l=els.length;l>i;i++)o=s._offset(els[i]),o.left+=s.wrapperOffsetLeft,o.top+=s.wrapperOffsetTop,s.pagesX[i]=o.left<s.maxScrollX?s.maxScrollX:o.left*s.scale,s.pagesY[i]=o.top<s.maxScrollY?s.maxScrollY:o.top*s.scale;
  else if(s.options.snap){for(s.pagesX=[];o>=s.maxScrollX;)s.pagesX[r]=o,o-=s.wrapperW,r++;for(s.maxScrollX%s.wrapperW&&(s.pagesX[s.pagesX.length]=s.maxScrollX-s.pagesX[s.pagesX.length-1]+s.pagesX[s.pagesX.length-1]),o=0,r=0,s.pagesY=[];o>=s.maxScrollY;)s.pagesY[r]=o,o-=s.wrapperH,r++;s.maxScrollY%s.wrapperH&&(s.pagesY[s.pagesY.length]=s.maxScrollY-s.pagesY[s.pagesY.length-1]+s.pagesY[s.pagesY.length-1])}s._scrollbar("h"),s._scrollbar("v"),s.zoomed||(s.scroller.style[t+"TransitionDuration"]="0",s._resetPos(200))},scrollTo:function(e,t,i,n){var s,o,r=this,a=e;for(r.stop(),a.length||(a=[{x:e,y:t,time:i,relative:n}]),s=0,o=a.length;o>s;s++)a[s].relative&&(a[s].x=r.x-a[s].x,a[s].y=r.y-a[s].y),r.steps.push({x:a[s].x,y:a[s].y,time:a[s].time||0});r._startAni()},scrollToElement:function(t,i){var n,s=this;t=t.nodeType?t:s.scroller.querySelector(t),t&&(n=s._offset(t),n.left+=s.wrapperOffsetLeft,n.top+=s.wrapperOffsetTop,n.left=n.left>0?0:n.left<s.maxScrollX?s.maxScrollX:n.left,n.top=n.top>0?0:n.top<s.maxScrollY?s.maxScrollY:n.top,i=void 0===i?e.max(2*e.abs(n.left),2*e.abs(n.top)):i,s.scrollTo(n.left,n.top,i))},scrollToPage:function(e,t,i){var n,s,o=this;o.options.snap?(e="next"==e?o.currPageX+1:"prev"==e?o.currPageX-1:e,t="next"==t?o.currPageY+1:"prev"==t?o.currPageY-1:t,e=0>e?0:e>o.pagesX.length-1?o.pagesX.length-1:e,t=0>t?0:t>o.pagesY.length-1?o.pagesY.length-1:t,o.currPageX=e,o.currPageY=t,n=o.pagesX[e],s=o.pagesY[t]):(n=-o.wrapperW*e,s=-o.wrapperH*t,n<o.maxScrollX&&(n=o.maxScrollX),s<o.maxScrollY&&(s=o.maxScrollY)),o.scrollTo(n,s,i||400)},disable:function(){this.stop(),this._resetPos(0),this.enabled=!1,this._unbind(m),this._unbind(g),this._unbind(v)},enable:function(){this.enabled=!0},stop:function(){this.options.useTransition?this._unbind("webkitTransitionEnd"):h(this.aniTime),this.steps=[],this.moved=!1,this.animating=!1},zoom:function(e,i,n,s){var o=this,r=n/o.scale;o.options.useTransform&&(o.zoomed=!0,s=void 0===s?200:s,e=e-o.wrapperOffsetLeft-o.x,i=i-o.wrapperOffsetTop-o.y,o.x=e-e*r+o.x,o.y=i-i*r+o.y,o.scale=n,o.refresh(),o.x=o.x>0?0:o.x<o.maxScrollX?o.maxScrollX:o.x,o.y=o.y>0?0:o.y<o.maxScrollY?o.maxScrollY:o.y,o.scroller.style[t+"TransitionDuration"]=s+"ms",o.scroller.style[t+"Transform"]=y+o.x+"px,"+o.y+"px"+b+" scale("+n+")",o.zoomed=!1)},isReady:function(){return!this.moved&&!this.zoomed&&!this.animating}},"undefined"!=typeof exports?exports.iScroll=T:window.iScroll=T}(),define("iscroll",function(e){return function(){var t;return t||e.iScroll}}(this));var webHelpModule={currentContext:"default",displayWebHelp:function(){var e=__jrsConfigs__.webHelpModuleState;if(e){var t=e.hostURL+"/"+e.pagePrefix+webHelpModule.getPageForContext();window.name="";var i=window.open(t,"MCWebHelp");i.focus()}},getPageForContext:function(){return __jrsConfigs__.webHelpModuleState.contextMap[webHelpModule.currentContext]},setCurrentContext:function(e){webHelpModule.currentContext=e}};define("components.webHelp",["jrs.configs"],function(e){return function(){var t;return t||e.webHelpModule}}(this));var layoutModule={ELEMENT_CONTEXTMENU:"element:contextmenu",SIZEABLE_PATTERN:".sizeable",SIZER_PATTERN:".sizer",RESIZE_OVERLAY_PATTERN:".resizeOverlay",MOVEABLE_PATTERN:".moveable",MOVER_PATTERN:".mover",MINIMIZER_PATTERN:".maximized .minimize",MINIMIZED_PATTERN:".minimized .minimize",TRUNCATE_PATTERN:".trunc",TREE_LEAF_PATTERN:"a.>node",TREE_CONTAINER_PATTERN:".collapsible",TOOLBAR_CAPSULE_PATTERN:"#toolbar .capsule",NAVIGATION_MUTTON_PATTERN:"li.mutton",NAVIGATION_PATTERN:"#navigationOptions li",NAVIGATION_HOVER_PATTERN:"#navigationOptions li.over",META_LINKS_PATTERN:"#metaLinks #main_logOut_link",BUTTON_SET_BUTTON:".buttonSet > *",TABSET_TAB_PATTERN:".tab",BUTTON_PATTERN:".button",PRESSED_PATTERN:".pressed",SELECTED_PATTERN:".selected",LIST_ITEM_PATTERN:".list.responsive > li",LIST_ITEM_WRAP_PATTERN:".wrap",DISCLOSURE_BUTTON_PATTERN:".disclosure",MENU_LIST_PATTERN:"#menu li",SEPARATOR_PATTERN:".separator",MESSAGE_PATTERN:".message",MESSAGE_WARNING_PATTERN:".message.warning",MESSAGE_SUCCESS_PATTERN:".message.success",DETAILS_PATTERN:".details",COLUMN_NODE_WRAPPER_PATTERN:".node > .wrap > .column",COLUMN_LEAF_WRAPPER_PATTERN:".leaf > .wrap > .column",SEARCH_LOCKUP_PATTERN:".searchLockup",DIALOG_PATTERN:".dialog",DIALOG_LOADING_PATTERN:".dialog.loading",SWIPE_SCROLL_PATTERN:".swipeScroll",SCROLL_WRAPPER_PATTERN:".scrollWrapper",ADHOC_MODE_OPTION_CLASS:"tab mode horizontal",DRAGGING_CLASS:"dragging",COPY_CLASS:"copy",PRESSED_CLASS:"pressed",SELECTED_CLASS:"selected",DISABLED_CLASS:"disabled",HOVERED_CLASS:"over",ERROR_CLASS:"error",SUCCESS_CLASS:"error",MESSAGE_CLASS:"error",UP_CLASS:"up",LAST_CLASS:"last",FIRST_CLASS:"first",SCHEDULED_CLASS:"scheduled",NODE_CLASS:"node",LEAF_CLASS:"leaf",ICON_CLASS:"icon",OPEN_CLASS:"open",CLOSED_CLASS:"closed",LOADING_CLASS:"loading",NOTHING_TO_DISPLAY_CLASS:"nothingToDisplay",COLLAPSIBLE_CLASS:"collapsible",RESPONSIVE_CLASS:"responsive",HIDDEN_CLASS:"hidden",NO_GENERATORS_CLASS:"noGenerators",STACKTRACE_CLASS:"stacktrace",EMPHASIS_CLASS:"emphasis",ASCENDING_CLASS:"ascending",DESCENDING_CLASS:"descending",CANCELLABLE_CLASS:"cancellable",DROP_TARGET_CLASS:"dropTarget",BUTTON_CLASS:"button",ONE_COLUMN_CLASS:"oneColumn",CONTROL_PAGE_CLASS:"controlPage",DISABLED_ATTR_NAME:"disabled",SELECTED_ATTR_NAME:"selected",OPEN_ATTR_NAME:"open",CLOSED_ATTR_NAME:"closed",READONLY_ATTR_NAME:"readonly",DIMMER_ID:"pageDimmer",PAGE_BODY_ID:"display",MENU_ID:"menu",MAIN_NAVIGATION_ID:"mainNavigation",MAIN_NAVIGATION_HOME_ITEM_ID:"main_home",MAIN_NAVIGATION_LIBRARY_ITEM_ID:"main_library",META_LINK_LOGOUT_ID:"main_logOut_link",SCROLL_SENSITIVITY:50,DND_MOVABLE_ZINDEX:2e3,DIMMER_Z_INDEX:900,FOLDERS_RESIZABLE_PANEL_ID:"folders",FILTERS_RESIZABLE_PANEL_ID:"filters",PROPERTIES_RESIZABLE_PANEL_ID:"properties",FIELDS_RESIZABLE_PANEL_ID:"fields",FOLDERS_RESIZABLE_PANEL_COOKIE_NAME:"foldersPanelWidth",FOLDERS_MINIMIZED_PANEL_COOKIE_NAME:"foldersMinimized",FILTERS_RESIZABLE_PANEL_COOKIE_NAME:"filtersPanelWidth",FILTERS_MINIMIZED_PANEL_COOKIE_NAME:"filtersMinimized",PROPERTIES_RESIZABLE_PANEL_COOKIE_NAME:"propertiesPanelWidth",PROPERTIES_MINIMIZED_PANEL_COOKIE_NAME:"propertiesMinimized",FIELDS_RESIZABLE_PANEL_COOKIE_NAME:"fieldsPanelWidth",FIELDS_MINIMIZED_PANEL_COOKIE_NAME:"fieldsMinimized",PANEL_WIDTH:"PanelWidth",MINIMIZED:"Minimized",PANEL_STATE_CHANGED_MANUALLY:"PSCM",scrolls:$H(),initialize:function(e){e=$(e)||$(document.body),new Truncator(e.select(layoutModule.TRUNCATE_PATTERN)),isIE7()&&this.fixIE7Sizes(),e.select(this.SIZEABLE_PATTERN).each(this.createSizer.bind(this)),e.select(this.MOVEABLE_PATTERN).each(this.createMover.bind(this)),e.select(".centered_horz,.centered_vert").each(function(e){var t=parseFunc(e,"centered_fn_");t||(t=centerElement),t(e,{horz:e.match(".centered_horz"),vert:e.match(".centered_vert")})}),null!=$(layoutModule.DIMMER_ID)&&($(layoutModule.DIMMER_ID).style.zIndex=layoutModule.DIMMER_Z_INDEX),jQuery.datepicker&&jQuery.datepicker.initialized&&(jQuery.datepicker.initialized=!1),jQuery(function(){0==jQuery("#ajaxbuffer").length&&jQuery("body").append(jQuery('<div id="ajaxbuffer" style="display:none"></div>'))}),jQuery(window).resize(function(){this.resizeTo&&clearTimeout(this.resizeTo),this.resizeTo=setTimeout(function(){jQuery(this).trigger("resizeEnd")},500)})},updateOnOrientation:function(){},isVisible:function(e){return e&&!$(e).hasClassName(layoutModule.HIDDEN_CLASS)},createScroller:function(e,t){if(e){e=e.identify?e:$(e);var i=layoutModule.scrolls.get(e.identify());i&&i.destroy();var n=["mainTableContainer","resultsContainer","filtersPanel","foldersPodContent"];e.identify().startsWith("iframeScroll_")&&n.push(e.identify()),t=Object.extend({hideScrollbar:!1,useTransform:!n.include(e.identify()),bounce:["resultsContainer"].include(e.identify())},t||{});var s=new iScroll(e,t);return layoutModule.scrolls.set(e.identify(),s),s}return null},createSizer:function(e,t){e=$(e);var i=t&&t.sizer?$(t.sizer):e.down(this.SIZER_PATTERN);if(i&&!matchMeOrUp(e,"."+layoutModule.HIDDEN_CLASS)){var n=this.getSizerType(i),s=this.alignmentModule.getSizerAlignment(i,n),o=new Draggable(i);o.resizeablePanel=e,o.primaryPanel=$(e).siblings().find(function(e){return e.match(".primary")}),t&&t.fillerPattern&&(o.filler=$(jQuery(e).find(t.fillerPattern)[0]));var r=function(){return function(e){o.pointerX=e.pointerX(),o.pointerY=e.pointerY()}}();i.observe("mousedown",r),jQuery(i).bind({touchstart:function(e){r(e.originalEvent),this.style.background="#666",this.style.zIndex=9},touchend:function(){this.style.background="transparent"}}),o.sizerType=n,o.alignment=s,o.options={constraint:"diagonal"===n?"":n,onStart:layoutModule.beginSizerDragging.bind(layoutModule),onDrag:isIPad()?doNothing:layoutModule.respondToDrag.bind(layoutModule),onEnd:layoutModule.endSizerDragging.bind(layoutModule)}}},getSizerType:function(e){return e.match(".horizontal")&&"horizontal"||e.match(".vertical")&&"vertical"||e.match(".diagonal")&&"diagonal"},alignmentModule:{alignments:[["left","right"],["top","bottom"]],alignmentIndexes:{horizontal:0,vertical:1},dimensions:["width","height"],getSizerAlignment:function(e,t){var i=["",""];if("diagonal"===t)return["right","bottom"];var n=this.alignmentIndexes[t],s=this.alignments[n],o=[0,1].map(function(t){return parseInt(e.getStyle(s[t]))}),r=isNaN(o[0])||o[0]>o[1]?s[1]:s[0];return i[n]=r,i}},beginSizerDragging:function(e,t){var i=e.element;e.parentOffset=[i.getStyle(e.alignment[0]),i.getStyle(e.alignment[1])],e.offsetUnit="px",e.pointerX=e.pointerX||t.pointerX(),e.pointerY=e.pointerY||t.pointerY(),e.element.addClassName(layoutModule.DRAGGING_CLASS),$$(layoutModule.RESIZE_OVERLAY_PATTERN).each(function(e){e.removeClassName(layoutModule.HIDDEN_CLASS)})},endSizerDragging:function(e,t){layoutModule.respondToDrag(e,t),e.element.removeClassName(layoutModule.DRAGGING_CLASS),$$(layoutModule.RESIZE_OVERLAY_PATTERN).each(function(e){e.addClassName(layoutModule.HIDDEN_CLASS)}),document.fire("dragger:sizer",{targetEvent:t,element:e.element})},respondToDrag:function(e,t){"vertical"!==e.sizerType&&this.resizeOnDrag(e,t,"horizontal"),"horizontal"!==e.sizerType&&this.resizeOnDrag(e,t,"vertical")},resizeOnDrag:function(e,t,i){var n={};n.axis="horizontal"==i?0:1,n.myAlignments=this.alignmentModule.alignments[n.axis],n.dimension=this.alignmentModule.dimensions[n.axis],n.sizeProperty=n.axis?"offsetHeight":"offsetWidth";{var s=n.axis?"pointerY":"pointerX",o={pointerY:"clientY",pointerX:"clientX"};e.element}n.sizeableAnchorage=e.alignment[n.axis]===n.myAlignments[0]?n.myAlignments[1]:n.myAlignments[0];var r=t.changedTouches?t.changedTouches[0][o[s]]:t[s](),a=e[s]?r-e[s]:0;a=e.alignment[n.axis]===n.myAlignments[1]?a:0-a,n.dragDelta=a,e[s]=t[s](),this.resizePanelsOnDrag(e,n)},resizePanelsOnDrag:function(e,t){var i=this.getSizeTracker();i.checkpoint(e.resizeablePanel[t.sizeProperty]),e.filler&&!e["fillerDelta"+t.dimension]&&(e["fillerDelta"+t.dimension]=e.resizeablePanel[t.sizeProperty]-e.filler[t.sizeProperty]);var n=getDimensionInPx(e.resizeablePanel,t.dimension);if((this.isInBounds(e,t)||!this.isInBounds(e,t)&&t.dragDelta<0)&&(e.resizeablePanel.setStyle(t.dimension+":"+(n+t.dragDelta)+"px"),e.filler&&e.filler.setStyle(t.dimension+":"+(n+t.dragDelta-e["fillerDelta"+t.dimension])+"px")),new JSCookie(e.resizeablePanel.identify()+layoutModule.PANEL_WIDTH,e.resizeablePanel.getWidth()),!i.changed(e.resizeablePanel[t.sizeProperty])){var s=getActualDimension(e.resizeablePanel,t.dimension);return e.alignment[t.axis]!=t.myAlignments[0]&&(e.element.style[t.myAlignments[0]]=""),e.element.setStyle(e.alignment[t.axis]+":"+e.parentOffset[t.axis]),e.resizeablePanel.setStyle(t.dimension+":"+s+"px"),e.primaryPanel&&e.primaryPanel.style.zIndex==e.resizeablePanel.style.zIndex&&e.primaryPanel.setStyle(t.sizeableAnchorage+":"+s+"px"),void(e.filler&&e.filler.setStyle(t.dimension+":"+(s-e["fillerDelta"+t.dimension])+"px"))}var o;if(e.resizeablePanel.currentStyle?o=e.resizeablePanel.currentStyle.minWidth:(o=document.defaultView.getComputedStyle(e.resizeablePanel,null),o=o["min-width"]?o["min-width"]:o.minWidth),o=o.substring(0,o.indexOf("px")),e.primaryPanel&&e.primaryPanel.style.zIndex==e.resizeablePanel.style.zIndex){var r=getDimensionInPx(e.primaryPanel,t.sizeableAnchorage)+t.dragDelta,a=o>r?o:r;e.primaryPanel.setStyle(t.sizeableAnchorage+":"+a+"px")}e.alignment[t.axis]!=t.myAlignments[0]&&(e.element.style[t.myAlignments[0]]=""),e.element.setStyle(e.alignment[t.axis]+":"+e.parentOffset[t.axis]),jQuery("body").trigger("layout_update")},isInBounds:function(e,t){var i,n,s,o,r,a=jQuery(e.primaryPanel),l=a.parent(),c=t.dimension;if(e.primaryPanel){c=c.replace(c.charAt(0),c.charAt(0).toUpperCase()),r=jQuery.fn["outer"+c],o=r.call(a,!0)-r.call(a),i=parseInt(a.css("min-"+t.dimension)),isNaN(i)&&(i=0),n=parseInt(a.css(t.sizeableAnchorage)),s=parseInt(l.css(t.dimension));var u=l.children("div:visible:not(.minimized)");return jQuery.each(u,function(){var t=jQuery(this),i=0===t.width()||0===t.height();e.resizeablePanel==this||e.primaryPanel==this||i||(s-=r.call(t,!0))}),s-n-t.dragDelta>i+o}return!0},getSizeTracker:function(){return lastSize=-1,{checkpoint:function(e){lastSize=e},changed:function(e){return e!=lastSize}}},createMover:function(e){var t=e.down(this.MOVER_PATTERN);if(t&&!matchMeOrUp(e,"."+layoutModule.HIDDEN_CLASS)){var i=Math.max(this.DND_MOVABLE_ZINDEX,e.getStyle("zIndex"));new Draggable(e,{handle:t,zindex:i})}},maximize:function(e,t){function i(){s.removeClassName("minimized_if_vertical_orientation"),s.removeClassName("minimized"),s.addClassName("maximized"),new JSCookie(s.identify()+layoutModule.MINIMIZED,!1),jQuery("div.content",s).show()}t=!0;var n=e.hasClassName?e:$(e),s=n.hasClassName("column")?n:n.up(".column");0===window.orientation&&("filters"==s.id&&layoutModule.minimize(document.getElementById("fields")),"fields"==s.id&&layoutModule.minimize(document.getElementById("filters")));var o,r=layoutModule.alignmentModule.alignments[0],a=r.map(function(e){return parseInt(s.getStyle(e))}),l=r[0===a[0]?0:1],c=s.siblings().find(function(e){return e.match(".primary")});c&&(o=new JSCookie(s.identify()+layoutModule.PANEL_WIDTH).value),o&&!isNaN(o)&&(o+="px",s.setStyle({width:o}),t?(c.style[l]=o,s.removeClassName("minimized_if_vertical_orientation"),s.removeClassName("minimized"),s.addClassName("maximized"),new JSCookie(s.identify()+layoutModule.MINIMIZED,!1),jQuery("div.content",s).show(),jQuery("div.vtitle",s).hide()):(new Effect.Morph(c,{style:l+":"+o,duration:.6,afterFinish:function(){jQuery("body").trigger("layout_update")}}),new Effect.Opacity(s,{to:0,from:1,duration:.3,queue:{position:"front",scope:"sidePanel"},afterFinish:i}),new Effect.Opacity(s,{to:1,from:0,duration:.3,queue:{position:"end",scope:"sidePanel"}}))),jQuery(s).find(".sizer").show(),jQuery("body").trigger("layout_update",{elem:e.parentNode,type:"panel-maximize"}),jQuery(".column.secondary > div.content > .body").show().height()},minimize:function(e,t){function i(){r.addClassName("minimized"),r.removeClassName("maximized"),r.removeClassName("minimized_if_vertical_orientation"),new JSCookie(r.identify()+layoutModule.MINIMIZED,!0),jQuery("div.content",r).hide()}var n,s;t=!0;var o=e.hasClassName?e:$(e),r=o.hasClassName("column")?o:o.up(".column"),a="true"==new JSCookie(r.identify()+layoutModule.MINIMIZED).value;!a&&new JSCookie(r.identify()+layoutModule.PANEL_WIDTH,r.getWidth());var l=layoutModule.alignmentModule.alignments[0],c=l.map(function(e){return parseInt(r.getStyle(e))}),u=l[0===c[0]?0:1];if(n=r.siblings().find(function(e){return e.match(".primary")}))if(s=n.getStyle(u),t){var d=jQuery("div.title",r).eq(0),h=jQuery("div.vtitle",r),p=d.html(),f=d.width();f=7*jQuery.trim(d.text()).length,n.style[u]="12px",r.addClassName("minimized"),r.removeClassName("maximized"),r.removeClassName("minimized_if_vertical_orientation"),new JSCookie(r.identify()+layoutModule.MINIMIZED,!0),h.length||(h=jQuery('<div class="vtitle"></div>').appendTo(r),h.on("mouseup touchend",function(e){layoutModule.maximize(h[0]),e.preventDefault()}),h.html(jQuery.trim(p)).width(f+24)),isIE7()||isIE8()||isIE9()?h.css({top:0,left:0}):h.css("top",f+24+"px"),location.href.indexOf("nui=1")>0?h.hide():h.show(),jQuery("div.content",r).hide()}else new Effect.Morph(n,{style:u+":0px",duration:.6,afterFinish:function(){jQuery("body").trigger("layout_update")}}),new Effect.Opacity(r,{to:0,from:1,duration:.3,queue:{position:"front",scope:"sidePanel"},afterFinish:i}),new Effect.Opacity(r,{to:1,from:0,duration:.3,queue:{position:"end",scope:"sidePanel"}});jQuery(r).find(".sizer").hide(),jQuery("body").trigger("layout_update",{elem:e.parentNode,type:"panel-minimize"})},resizeOnClient:function(e,t,i){var n,s=[],o=jQuery("#"+t),r=jQuery("#display").width()-20-parseInt(o.width());jQuery.each([e,i],function(e,t){t&&(s.push({id:t,isLeft:0==e?!0:!1,jo:jQuery("#"+t),width:parseInt(new JSCookie(t+layoutModule.PANEL_WIDTH).value)}),s[e].minimized=new JSCookie(t+layoutModule.MINIMIZED).value,s[e].minimized=Object.isUndefined(s[e].minimized)?s[e].jo.hasClass("minimized"):"true"==s[e].minimized,n=s[e].jo[0].currentStyle?s[e].jo[0].currentStyle.minWidth:document.defaultView.getComputedStyle(s[e].jo[0],null).minWidth,s[e].minWidth=(n&&n.indexOf("px"))>0?n.substring(0,n.indexOf("px")):200,s[e].width=s[e].width?s[e].width:s[e].jo.width(),r-=s[e].width)});var a=0>r?Math.abs(r):0;r=0,jQuery.each(s,function(e,t){t.jo.length&&t.jo.is(":visible")&&(t.minimized?(t.jo.removeClass("maximized").addClass("minimized"),layoutModule.minimize(t.jo[0],!0)):(1==e&&!s[0].minimized&&s[0].jo.is(":visible")&&(t.width-=a,t.width<t.minWidth&&(r=t.width-t.minWidth,t.width=t.minWidth)),t.jo.removeClass("minimized").addClass("maximized"),o.css(t.isLeft?"left":"right",t.width+"px"),t.jo.css("width",t.width+"px")))}),0!=r&&(s[0].width+=r,s[0].width=s[0].width<s[0].minWidth?s[0].minWidth:s[0].width,o.css("left",s[0].width+"px"),s[0].jo.css("width",s[0].width+"px"))},autoMaximize:function(e){var t=new JSCookie(e.identify()+layoutModule.MINIMIZED).value;"true"==t?e.hasClassName("minimized")&&layoutModule.maximize(e,!0):!e.hasClassName("minimized")&&layoutModule.minimize(e,!0)},autoMinimize:function(e){var t=new JSCookie(e.identify()+layoutModule.MINIMIZED).value;"false"==t?layoutModule.minimize(e,!0):e.removeClassName("minimized")},fixIE7Sizes:function(){$$(".control.tabSet.buttons.vertical").each(function(e){e.immediateDescendants().each(function(t){t.style.width=e.clientWidth||e.offsetWidth})})},storePanelWidth:function(e,t){new JSCookie(e+layoutModule.PANEL_WIDTH,t)},getPanelWidth:function(e){return new JSCookie(e+layoutModule.PANEL_WIDTH).value},getPanelMinimizedState:function(e){return new JSCookie(e+layoutModule.MINIMIZED).value},storePanelMinimizedState:function(e,t){new JSCookie(e+layoutModule.MINIMIZED,t.toString())},manuallyChangePanelState:function(e,t,i){new JSCookie(e+layoutModule.PANEL_STATE_CHANGED_MANUALLY+t,i)},panelStateWasManuallyChanged:function(e,t){return"true"===new JSCookie(e+layoutModule.PANEL_STATE_CHANGED_MANUALLY+t).value}};define("core.layout",["jquery","prototype","utils.common","dragdrop.extra","tools.truncator","iscroll","components.webHelp"],function(e){return function(){var t;return t||e.layoutModule}}(this)),define("bundle",["require","common/transport/request","common/config/requestSettings","underscore","jrs.configs"],function(e){var t=e("common/transport/request"),i=e("common/config/requestSettings"),n=e("underscore"),s=e("jrs.configs"),o=s.contextPath+"/rest_v2/bundles",r="all",a=function(e,s){var a=r===e?"?expanded=true":"/"+e,l=n.extend({},i,{type:"GET",dataType:"json",url:o+a});t(l).then(function(t){s(r!==e?t:n(t).reduce(function(e,t){return n.extend(e,t)},{}))})};return a.load=function(e,t,i,n){return n.isBuild?void i():void a(e,i)},a});var dialogs={};dialogs.systemConfirm={container:null,message:null,show:function(e,t){window.isEmbeddedDesigner?jQuery(document).trigger("adhocDesigner:notification",[e,t]):(this.container=this.container||jQuery("#systemMessageConsole").on("mouseup touchend",function(){dialogs.systemConfirm.container.slideUp()}),this.message=this.message||document.getElementById("systemMessage"),this.closeText||(this.closeText=this.message.innerHTML.toLowerCase()),this.message.innerHTML=e+' <span>| <a href="#">'+this.closeText+"</a></span>",dialogs.systemConfirm.container.slideDown(),setTimeout("dialogs.systemConfirm.hide()",t?t:2e3))},showWarning:function(e,t){e='<span class="warning">'+e+"</span>",this.show(e,t)},hide:function(){dialogs.systemConfirm.container&&dialogs.systemConfirm.container.slideUp()}},dialogs.errorPopup={_dom:null,_content:null,_DOM_ID:"standardAlert",_CONTENT_ID:"errorPopupContents",_PAGE_CONTENT_PATTERN:"#errorPageContent",_DIALOG_WIDTH:"546px",_DIALOG_HEIGHT:"350px",clickHandler:null,show:function(e,t,i){i||(i={});var n=Builder.node("DIV",{style:"display:none"});n.innerHTML=e,document.body.insertBefore(n,document.body.firstChild);var s=$$(this._PAGE_CONTENT_PATTERN)[0],o=s?s.innerHTML:e,r=s&&s.innerHTML;if(n.remove(),o&&(this._dom||(this._dom=$(this._DOM_ID),this._content=$(this._CONTENT_ID),this.clickHandler=this._clickHandler.bindAsEventListener(this)),this._dom)){var a=o;r||(a=Builder.node("P",{"class":"message"}),a.update(o)),this._content.update(a),this._dom.observe("click",this.clickHandler),this._dom.setStyle({height:i.height||this._DIALOG_HEIGHT,width:i.width||this._DIALOG_WIDTH}),t&&this._dom.addClassName(layoutModule.STACKTRACE_CLASS),dialogs.popup.show(this._dom,t);var l=document.getElementById("completeStackTrace");l&&isIPad()&&new TouchController(l,l.parentNode,{noInit3d:!0})}},_hide:function(){this._dom&&(this._dom.stopObserving("click",this.clickHandler),dialogs.popup.hide(this._dom))},_clickHandler:function(e){var t=e.element();matchAny(t,["button"],!0)&&this._hide()}},dialogs.clusterErrorPopup=_.extend({},dialogs.errorPopup,{show:function(){var e=this;require(["bundle!jasperserver_messages","bundle!jsexceptions_messages"],function(t,i){var n=i["cluster.exception.session.attribute.missing.popup"];dialogs.errorPopup.show.call(e,n);var s=t["button.home"];jQuery("#"+e._DOM_ID).find("button span.wrap").html(s)})},_hide:function(){dialogs.errorPopup._hide.apply(this,arguments),window.location="home.html"}}),dialogs.popup={show:function(e,t,i){i=i||{},e=$(e),e&&((isIE7()||isIE8())&&(jo=jQuery(e),0==jo.children("div.msshadow").length&&jo.prepend('<div class="msshadow" style="position:absolute;top:-10px;right:10px;bottom:10px;left:-10px;border:0;background:#fff;">&nbsp;</div>')),t&&(pageDimmer.show(),e.match(layoutModule.DIALOG_LOADING_PATTERN)&&pageDimmer.setZindex(e.getStyle("zIndex")-1)),reParent(e,document.body),e.setOpacity(0),e.removeClassName(layoutModule.HIDDEN_CLASS),isIE7()&&!e.match(".sizeable")&&setWidthStyleByReflection(e,".content"),layoutModule.createMover.call(layoutModule,e),layoutModule.createSizer.call(layoutModule,e),i.cascade?cascadeElement(e,{position:i.position,number:i.number,horzOffset:40,vertOffset:40}):centerElement(e,{horz:!0,vert:!0}),dialogs.popup._setMaxZIndex(e),layoutModule.createMover.call(layoutModule,e),isIPad()?e.setOpacity(1)&&e.show():appear(e,.4),e.tabIndex=-1,(!i||"undefined"==typeof i.focus||i.focus)&&(isIE8()?setTimeout(function(){try{e.focus()}catch(t){}},450):e.focus()),!t&&e.observe("click",dialogs.popup.zIndexHandler))},hide:function(e){e&&(e=$(e),e.hasClassName(layoutModule.HIDDEN_CLASS)||(e.addClassName(layoutModule.HIDDEN_CLASS),pageDimmer.hide(),e.match(layoutModule.DIALOG_LOADING_PATTERN)&&pageDimmer.setZindex(layoutModule.DIMMER_Z_INDEX)),e.stopObserving("click",dialogs.popup.zIndexHandler))},zIndexHandler:function(e){var t=Event.element(e),i=matchMeOrUp(t,layoutModule.DIALOG_PATTERN);dialogs.popup._setMaxZIndex(i)},_setMaxZIndex:function(e,t){if(e){var i=t?t.getStyle("zIndex"):0,n=document.body.select(layoutModule.DIALOG_PATTERN),s=function(e){e.visible()&&!e.match(layoutModule.DIALOG_LOADING_PATTERN)&&(i=Math.max(i,e.getStyle("zIndex"),layoutModule.DIMMER_Z_INDEX+1))};1==n.length?s(n[0]):n.each(s),e.setStyle({zIndex:Math.max(i+1,e.getStyle("zIndex"))})}}},dialogs.popupConfirm=_.extend({},dialogs.popup,{show:function(e,t,i){dialogs.popup.show.apply(this,arguments),i=_.extend({okButtonSelector:"button.ok",cancelButtonSelector:"button.cancel"},i);var n=jQuery(e),s=n.find(i.okButtonSelector),o=n.find(i.cancelButtonSelector),r=jQuery.Deferred();return s.on("click",function(){i.validateFunc&&i.validateFunc()===!1||(s.off("click"),o.off("click"),dialogs.popupConfirm.hide(e),r.resolve())}),o.on("click",function(){s.off("click"),o.off("click"),dialogs.popupConfirm.hide(e),r.reject()}),r}}),dialogs.childPopup=_.extend({},dialogs.popup,{cascadePopups:{},show:function(e,t,i,n){i?(n=_.extend({parent:i},n),this.cascadePopups[i.id]||(this.cascadePopups[i.id]=[]),this.cascadePopups[i.id].push(e.id),$(e).setAttribute("data-parentDialog",i.id),dialogs.popup.show.apply(this,[e,t,n]),dialogs.popup._setMaxZIndex(e,i),t&&pageDimmer.setZindex(e.getStyle("zIndex")-1),i.stopObserving("click",dialogs.popup.zIndexHandler)):dialogs.popup.show.apply(this,[e,t,n])},hide:function(e){var t=$(e).getAttribute("data-parentDialog");if(t){this.cascadePopups[t]&&(this.cascadePopups[t]=_.without(this.cascadePopups[t],e.id)),dialogs.popup.hide.apply(this,[e]);var i=$(t);pageDimmer.show(i),dialogs.popup._setMaxZIndex(i)}else dialogs.popup.hide.apply(this,[e])}}),define("components.dialogs",["jquery","prototype","underscore","utils.common","utils.animation","core.layout"],function(e){return function(){var t;return t||e.dialogs}}(this));var about={initialize:function(){about.aboutBox.registerListeners()}};about.aboutBox={show:function(){var e=jQuery("#aboutBox");e.hasClass("hidden")&&dialogs.popup.show(e[0],!0)},_hide:function(){var e=jQuery("#aboutBox");e.hasClass("hidden")||dialogs.popup.hide(e[0])},registerListeners:function(){jQuery(document).delegate("#about","click",function(e){e.preventDefault(),about.aboutBox.show()}),jQuery(document).delegate("#aboutBox button","click",function(e){about.aboutBox._hide(),e.stopPropagation()})}},jQuery(function(){"undefined"==typeof require&&about.initialize()}),define("components.about",["components.dialogs"],function(e){return function(){var t;return t||e.about}}(this)),define("commons.minimal.main",["require","commons.bare.main","!domReady","components.heartbeat","jrs.configs","components.about","components.webHelp","jquery"],function(e){e("commons.bare.main");var t=e("!domReady"),i=e("components.heartbeat"),n=e("jrs.configs"),s=e("components.about"),o=e("components.webHelp"),r=e("jquery");t(function(){i.initialize(n.heartbeatInitOptions),i.start(),n.initAdditionalUIComponents&&s.initialize();var e=r("#helpLink");e&&e.on("click",function(e){e.preventDefault(),o.displayWebHelp()})})});var Mustache=function(){function e(e){return String(e).replace(/&(?!\w+;)|[<>"']/g,function(e){return r[e]||e})}var t=Object.prototype.toString;Array.isArray=Array.isArray||function(e){return"[object Array]"==t.call(e)};var i,n=String.prototype.trim;if(n)i=function(e){return null==e?"":n.call(e)};else{var s,o;/\S/.test(" ")?(s=/^[\s\xA0]+/,o=/[\s\xA0]+$/):(s=/^\s+/,o=/\s+$/),i=function(e){return null==e?"":e.toString().replace(s,"").replace(o,"")}}var r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},a={},l=function(){};return l.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":!0},context:{},render:function(e,t,i,n){if(n||(this.context=t,this.buffer=[]),!this.includes("",e))return n?e:void this.send(e);e=this.render_pragmas(e);var s=this.render_section(e,t,i);return s===!1&&(s=this.render_tags(e,t,i,n)),n?s:void this.sendLines(s)},send:function(e){""!==e&&this.buffer.push(e)},sendLines:function(e){if(e)for(var t=e.split("\n"),i=0;i<t.length;i++)this.send(t[i])},render_pragmas:function(e){if(!this.includes("%",e))return e;var t=this,i=this.getCachedRegex("render_pragmas",function(e,t){return new RegExp(e+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+t,"g")});return e.replace(i,function(e,i,n){if(!t.pragmas_implemented[i])throw{message:"This implementation of mustache doesn't understand the '"+i+"' pragma"};if(t.pragmas[i]={},n){var s=n.split("=");t.pragmas[i][s[0]]=s[1]}return""})},render_partial:function(e,t,n){if(e=i(e),!n||void 0===n[e])throw{message:"unknown_partial '"+e+"'"};return t&&"object"==typeof t[e]?this.render(n[e],t[e],n,!0):this.render(n[e],t,n,!0)},render_section:function(e,t,i){if(!this.includes("#",e)&&!this.includes("^",e))return!1;var n=this,s=this.getCachedRegex("render_section",function(e,t){return new RegExp("^([\\s\\S]*?)"+e+"(\\^|\\#)\\s*(.+)\\s*"+t+"\n*([\\s\\S]*?)"+e+"\\/\\s*\\3\\s*"+t+"\\s*([\\s\\S]*)$","g")});return e.replace(s,function(e,s,o,r,a,l){var c,u=s?n.render_tags(s,t,i,!0):"",d=l?n.render(l,t,i,!0):"",h=n.find(r,t);return"^"===o?c=!h||Array.isArray(h)&&0===h.length?n.render(a,t,i,!0):"":"#"===o&&(c=Array.isArray(h)?n.map(h,function(e){return n.render(a,n.create_context(e),i,!0)}).join(""):n.is_object(h)?n.render(a,n.create_context(h),i,!0):"function"==typeof h?h.call(t,a,function(e){return n.render(e,t,i,!0)}):h?n.render(a,t,i,!0):""),u+c+d})},render_tags:function(t,i,n,s){for(var o=this,r=function(){return o.getCachedRegex("render_tags",function(e,t){return new RegExp(e+"(=|!|>|&|\\{|%)?([^#\\^]+?)\\1?"+t+"+","g")})},a=r(),l=function(t,s,l){switch(s){case"!":return"";case"=":return o.set_delimiters(l),a=r(),"";case">":return o.render_partial(l,i,n);case"{":case"&":return o.find(l,i);default:return e(o.find(l,i))}},c=t.split("\n"),u=0;u<c.length;u++)c[u]=c[u].replace(a,l,this),s||this.send(c[u]);return s?c.join("\n"):void 0},set_delimiters:function(e){var t=e.split(" ");this.otag=this.escape_regex(t[0]),this.ctag=this.escape_regex(t[1])},escape_regex:function(e){if(!arguments.callee.sRE){var t=["/",".","*","+","?","|","(",")","[","]","{","}","\\"];arguments.callee.sRE=new RegExp("(\\"+t.join("|\\")+")","g")}return e.replace(arguments.callee.sRE,"\\$1")},find:function(e,t){function n(e){return e===!1||0===e||e}e=i(e);var s;if(e.match(/([a-z_]+)\./gi)){var o=this.walk_context(e,t);n(o)&&(s=o)}else n(t[e])?s=t[e]:n(this.context[e])&&(s=this.context[e]);return"function"==typeof s?s.apply(t):void 0!==s?s:""},walk_context:function(e,t){for(var i=e.split("."),n=void 0!=t[i[0]]?t:this.context,s=n[i.shift()];void 0!=s&&i.length>0;)n=s,s=s[i.shift()];return"function"==typeof s?s.apply(n):s},includes:function(e,t){return-1!=t.indexOf(this.otag+e)},create_context:function(e){if(this.is_object(e))return e;var t=".";this.pragmas["IMPLICIT-ITERATOR"]&&(t=this.pragmas["IMPLICIT-ITERATOR"].iterator);var i={};return i[t]=e,i},is_object:function(e){return e&&"object"==typeof e},map:function(e,t){if("function"==typeof e.map)return e.map(t);for(var i=[],n=e.length,s=0;n>s;s++)i.push(t(e[s]));return i},getCachedRegex:function(e,t){var i=a[this.otag];i||(i=a[this.otag]={});var n=i[this.ctag];n||(n=i[this.ctag]={});var s=n[e];return s||(s=n[e]=t(this.otag,this.ctag)),s}},{name:"mustache.js",version:"0.4.0",to_html:function(e,t,i,n){var s=new l;return n&&(s.send=n),s.render(e,t||{},i),n?void 0:s.buffer.join("\n")}}}();define("mustache",function(e){return function(){var t,i;return i=function(){return Mustache},t=i.apply(e,arguments)}}(this)),jaspersoft.components.templateEngine=function(e,t,i){return{render:function(e,n,s){if(!s)return i.to_html(e,n);if(s==this.STD_PLACEHOLDERS){var o=String(e);return t.each(n,function(e,t){var i=new RegExp("\\{"+t+"\\}");o=o.replace(i,e)}),o}},renderUrl:function(e,t,n){var s=i.to_html(e,t);return n&&(s=encodeURI(s)),s},getTemplateText:function(t){var i=e("#"+t);return i.html()},createTemplate:function(t){var n=e("#"+t),s=n.html();return s&&s.length>0?function(e){return i.to_html(s,e)}:void 0},createTemplateFromText:function(e){return e&&e.length>0?function(t){return i.to_html(e,t)}:void 0},createTemplateSection:function(e,t){var n="\\{\\{#val\\}\\}(\\s|\\S)*\\{\\{/val\\}\\}",s=n.replace(/val/g,e),o=new RegExp(s,"g"),r=this.getTemplateText(t),a=r.match(o)[0];
  return function(e){return i.to_html(a,e)}},STD_PLACEHOLDERS:"std_placeholder"}}(jQuery,_,Mustache),define("components.templateengine",["namespace","jquery","underscore","mustache"],function(e){return function(){var t;return t||e.jaspersoft.components.templateEngine}}(this)),function(){{var e,t=this,i=t.Backbone,n=[],s=(n.push,n.slice);n.splice}e="undefined"!=typeof exports?exports:t.Backbone={},e.VERSION="1.1.0";var o=t._;o||"undefined"==typeof require||(o=require("underscore")),e.$=t.jQuery||t.Zepto||t.ender||t.$,e.noConflict=function(){return t.Backbone=i,this},e.emulateHTTP=!1,e.emulateJSON=!1;var r=e.Events={on:function(e,t,i){if(!l(this,"on",e,[t,i])||!t)return this;this._events||(this._events={});var n=this._events[e]||(this._events[e]=[]);return n.push({callback:t,context:i,ctx:i||this}),this},once:function(e,t,i){if(!l(this,"once",e,[t,i])||!t)return this;var n=this,s=o.once(function(){n.off(e,s),t.apply(this,arguments)});return s._callback=t,this.on(e,s,i)},off:function(e,t,i){var n,s,r,a,c,u,d,h;if(!this._events||!l(this,"off",e,[t,i]))return this;if(!e&&!t&&!i)return this._events={},this;for(a=e?[e]:o.keys(this._events),c=0,u=a.length;u>c;c++)if(e=a[c],r=this._events[e]){if(this._events[e]=n=[],t||i)for(d=0,h=r.length;h>d;d++)s=r[d],(t&&t!==s.callback&&t!==s.callback._callback||i&&i!==s.context)&&n.push(s);n.length||delete this._events[e]}return this},trigger:function(e){if(!this._events)return this;var t=s.call(arguments,1);if(!l(this,"trigger",e,t))return this;var i=this._events[e],n=this._events.all;return i&&c(i,t),n&&c(n,arguments),this},stopListening:function(e,t,i){var n=this._listeningTo;if(!n)return this;var s=!t&&!i;i||"object"!=typeof t||(i=this),e&&((n={})[e._listenId]=e);for(var r in n)e=n[r],e.off(t,i,this),(s||o.isEmpty(e._events))&&delete this._listeningTo[r];return this}},a=/\s+/,l=function(e,t,i,n){if(!i)return!0;if("object"==typeof i){for(var s in i)e[t].apply(e,[s,i[s]].concat(n));return!1}if(a.test(i)){for(var o=i.split(a),r=0,l=o.length;l>r;r++)e[t].apply(e,[o[r]].concat(n));return!1}return!0},c=function(e,t){var i,n=-1,s=e.length,o=t[0],r=t[1],a=t[2];switch(t.length){case 0:for(;++n<s;)(i=e[n]).callback.call(i.ctx);return;case 1:for(;++n<s;)(i=e[n]).callback.call(i.ctx,o);return;case 2:for(;++n<s;)(i=e[n]).callback.call(i.ctx,o,r);return;case 3:for(;++n<s;)(i=e[n]).callback.call(i.ctx,o,r,a);return;default:for(;++n<s;)(i=e[n]).callback.apply(i.ctx,t)}},u={listenTo:"on",listenToOnce:"once"};o.each(u,function(e,t){r[t]=function(t,i,n){var s=this._listeningTo||(this._listeningTo={}),r=t._listenId||(t._listenId=o.uniqueId("l"));return s[r]=t,n||"object"!=typeof i||(n=this),t[e](i,n,this),this}}),r.bind=r.on,r.unbind=r.off,o.extend(e,r);var d=e.Model=function(e,t){var i=e||{};t||(t={}),this.cid=o.uniqueId("c"),this.attributes={},t.collection&&(this.collection=t.collection),t.parse&&(i=this.parse(i,t)||{}),i=o.defaults({},i,o.result(this,"defaults")),this.set(i,t),this.changed={},this.initialize.apply(this,arguments)};o.extend(d.prototype,r,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(){return o.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return o.escape(this.get(e))},has:function(e){return null!=this.get(e)},set:function(e,t,i){var n,s,r,a,l,c,u,d;if(null==e)return this;if("object"==typeof e?(s=e,i=t):(s={})[e]=t,i||(i={}),!this._validate(s,i))return!1;r=i.unset,l=i.silent,a=[],c=this._changing,this._changing=!0,c||(this._previousAttributes=o.clone(this.attributes),this.changed={}),d=this.attributes,u=this._previousAttributes,this.idAttribute in s&&(this.id=s[this.idAttribute]);for(n in s)t=s[n],o.isEqual(d[n],t)||a.push(n),o.isEqual(u[n],t)?delete this.changed[n]:this.changed[n]=t,r?delete d[n]:d[n]=t;if(!l){a.length&&(this._pending=!0);for(var h=0,p=a.length;p>h;h++)this.trigger("change:"+a[h],this,d[a[h]],i)}if(c)return this;if(!l)for(;this._pending;)this._pending=!1,this.trigger("change",this,i);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,o.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var i in this.attributes)t[i]=void 0;return this.set(t,o.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!o.isEmpty(this.changed):o.has(this.changed,e)},changedAttributes:function(e){if(!e)return this.hasChanged()?o.clone(this.changed):!1;var t,i=!1,n=this._changing?this._previousAttributes:this.attributes;for(var s in e)o.isEqual(n[s],t=e[s])||((i||(i={}))[s]=t);return i},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return o.clone(this._previousAttributes)},fetch:function(e){e=e?o.clone(e):{},void 0===e.parse&&(e.parse=!0);var t=this,i=e.success;return e.success=function(n){return t.set(t.parse(n,e),e)?(i&&i(t,n,e),void t.trigger("sync",t,n,e)):!1},R(this,e),this.sync("read",this,e)},save:function(e,t,i){var n,s,r,a=this.attributes;if(null==e||"object"==typeof e?(n=e,i=t):(n={})[e]=t,i=o.extend({validate:!0},i),n&&!i.wait){if(!this.set(n,i))return!1}else if(!this._validate(n,i))return!1;n&&i.wait&&(this.attributes=o.extend({},a,n)),void 0===i.parse&&(i.parse=!0);var l=this,c=i.success;return i.success=function(e){l.attributes=a;var t=l.parse(e,i);return i.wait&&(t=o.extend(n||{},t)),o.isObject(t)&&!l.set(t,i)?!1:(c&&c(l,e,i),void l.trigger("sync",l,e,i))},R(this,i),s=this.isNew()?"create":i.patch?"patch":"update","patch"===s&&(i.attrs=n),r=this.sync(s,this,i),n&&i.wait&&(this.attributes=a),r},destroy:function(e){e=e?o.clone(e):{};var t=this,i=e.success,n=function(){t.trigger("destroy",t,t.collection,e)};if(e.success=function(s){(e.wait||t.isNew())&&n(),i&&i(t,s,e),t.isNew()||t.trigger("sync",t,s,e)},this.isNew())return e.success(),!1;R(this,e);var s=this.sync("delete",this,e);return e.wait||n(),s},url:function(){var e=o.result(this,"urlRoot")||o.result(this.collection,"url")||P();return this.isNew()?e:e+("/"===e.charAt(e.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(e){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},isValid:function(e){return this._validate({},o.extend(e||{},{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=o.extend({},this.attributes,e);var i=this.validationError=this.validate(e,t)||null;return i?(this.trigger("invalid",this,i,o.extend(t,{validationError:i})),!1):!0}});var h=["keys","values","pairs","invert","pick","omit"];o.each(h,function(e){d.prototype[e]=function(){var t=s.call(arguments);return t.unshift(this.attributes),o[e].apply(o,t)}});var p=e.Collection=function(e,t){t||(t={}),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,o.extend({silent:!0},t))},f={add:!0,remove:!0,merge:!0},m={add:!0,remove:!1};o.extend(p.prototype,r,{model:d,initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return e.sync.apply(this,arguments)},add:function(e,t){return this.set(e,o.extend({merge:!1},t,m))},remove:function(e,t){var i=!o.isArray(e);e=i?[e]:o.clone(e),t||(t={});var n,s,r,a;for(n=0,s=e.length;s>n;n++)a=e[n]=this.get(e[n]),a&&(delete this._byId[a.id],delete this._byId[a.cid],r=this.indexOf(a),this.models.splice(r,1),this.length--,t.silent||(t.index=r,a.trigger("remove",a,this,t)),this._removeReference(a));return i?e[0]:e},set:function(e,t){t=o.defaults({},t,f),t.parse&&(e=this.parse(e,t));var i=!o.isArray(e);e=i?e?[e]:[]:o.clone(e);var n,s,r,a,l,c,u,h=t.at,p=this.model,m=this.comparator&&null==h&&t.sort!==!1,g=o.isString(this.comparator)?this.comparator:null,v=[],_=[],y={},b=t.add,T=t.merge,w=t.remove,E=!m&&b&&w?[]:!1;for(n=0,s=e.length;s>n;n++){if(l=e[n],r=l instanceof d?a=l:l[p.prototype.idAttribute],c=this.get(r))w&&(y[c.cid]=!0),T&&(l=l===a?a.attributes:l,t.parse&&(l=c.parse(l,t)),c.set(l,t),m&&!u&&c.hasChanged(g)&&(u=!0)),e[n]=c;else if(b){if(a=e[n]=this._prepareModel(l,t),!a)continue;v.push(a),a.on("all",this._onModelEvent,this),this._byId[a.cid]=a,null!=a.id&&(this._byId[a.id]=a)}E&&E.push(c||a)}if(w){for(n=0,s=this.length;s>n;++n)y[(a=this.models[n]).cid]||_.push(a);_.length&&this.remove(_,t)}if(v.length||E&&E.length)if(m&&(u=!0),this.length+=v.length,null!=h)for(n=0,s=v.length;s>n;n++)this.models.splice(h+n,0,v[n]);else{E&&(this.models.length=0);var S=E||v;for(n=0,s=S.length;s>n;n++)this.models.push(S[n])}if(u&&this.sort({silent:!0}),!t.silent){for(n=0,s=v.length;s>n;n++)(a=v[n]).trigger("add",a,this,t);(u||E&&E.length)&&this.trigger("sort",this,t)}return i?e[0]:e},reset:function(e,t){t||(t={});for(var i=0,n=this.models.length;n>i;i++)this._removeReference(this.models[i]);return t.previousModels=this.models,this._reset(),e=this.add(e,o.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,o.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e),t},unshift:function(e,t){return this.add(e,o.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e),t},slice:function(){return s.apply(this.models,arguments)},get:function(e){return null==e?void 0:this._byId[e.id]||this._byId[e.cid]||this._byId[e]},at:function(e){return this.models[e]},where:function(e,t){return o.isEmpty(e)?t?void 0:[]:this[t?"find":"filter"](function(t){for(var i in e)if(e[i]!==t.get(i))return!1;return!0})},findWhere:function(e){return this.where(e,!0)},sort:function(e){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return e||(e={}),o.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(o.bind(this.comparator,this)),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return o.invoke(this.models,"get",e)},fetch:function(e){e=e?o.clone(e):{},void 0===e.parse&&(e.parse=!0);var t=e.success,i=this;return e.success=function(n){var s=e.reset?"reset":"set";i[s](n,e),t&&t(i,n,e),i.trigger("sync",i,n,e)},R(this,e),this.sync("read",this,e)},create:function(e,t){if(t=t?o.clone(t):{},!(e=this._prepareModel(e,t)))return!1;t.wait||this.add(e,t);var i=this,n=t.success;return t.success=function(e,t,s){s.wait&&i.add(e,s),n&&n(e,t,s)},e.save(null,t),e},parse:function(e){return e},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(e instanceof d)return e.collection||(e.collection=this),e;t=t?o.clone(t):{},t.collection=this;var i=new this.model(e,t);return i.validationError?(this.trigger("invalid",this,i.validationError,t),!1):i},_removeReference:function(e){this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,i,n){("add"!==e&&"remove"!==e||i===this)&&("destroy"===e&&this.remove(t,n),t&&e==="change:"+t.idAttribute&&(delete this._byId[t.previous(t.idAttribute)],null!=t.id&&(this._byId[t.id]=t)),this.trigger.apply(this,arguments))}});var g=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain"];o.each(g,function(e){p.prototype[e]=function(){var t=s.call(arguments);return t.unshift(this.models),o[e].apply(o,t)}});var v=["groupBy","countBy","sortBy"];o.each(v,function(e){p.prototype[e]=function(t,i){var n=o.isFunction(t)?t:function(e){return e.get(t)};return o[e](this.models,n,i)}});var _=e.View=function(e){this.cid=o.uniqueId("view"),e||(e={}),o.extend(this,o.pick(e,b)),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},y=/^(\S+)\s*(.*)$/,b=["model","collection","el","id","attributes","className","tagName","events"];o.extend(_.prototype,r,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(t,i){return this.$el&&this.undelegateEvents(),this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0],i!==!1&&this.delegateEvents(),this},delegateEvents:function(e){if(!e&&!(e=o.result(this,"events")))return this;this.undelegateEvents();for(var t in e){var i=e[t];if(o.isFunction(i)||(i=this[e[t]]),i){var n=t.match(y),s=n[1],r=n[2];i=o.bind(i,this),s+=".delegateEvents"+this.cid,""===r?this.$el.on(s,i):this.$el.on(s,r,i)}}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_ensureElement:function(){if(this.el)this.setElement(o.result(this,"el"),!1);else{var t=o.extend({},o.result(this,"attributes"));this.id&&(t.id=o.result(this,"id")),this.className&&(t["class"]=o.result(this,"className"));var i=e.$("<"+o.result(this,"tagName")+">").attr(t);this.setElement(i,!1)}}}),e.sync=function(t,i,n){var s=w[t];o.defaults(n||(n={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var r={type:s,dataType:"json"};if(n.url||(r.url=o.result(i,"url")||P()),null!=n.data||!i||"create"!==t&&"update"!==t&&"patch"!==t||(r.contentType="application/json",r.data=JSON.stringify(n.attrs||i.toJSON(n))),n.emulateJSON&&(r.contentType="application/x-www-form-urlencoded",r.data=r.data?{model:r.data}:{}),n.emulateHTTP&&("PUT"===s||"DELETE"===s||"PATCH"===s)){r.type="POST",n.emulateJSON&&(r.data._method=s);var a=n.beforeSend;n.beforeSend=function(e){return e.setRequestHeader("X-HTTP-Method-Override",s),a?a.apply(this,arguments):void 0}}"GET"===r.type||n.emulateJSON||(r.processData=!1),"PATCH"===r.type&&T&&(r.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var l=n.xhr=e.ajax(o.extend(r,n));return i.trigger("request",i,l,n),l};var T=!("undefined"==typeof window||!window.ActiveXObject||window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent),w={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var E=e.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},S=/\((.*?)\)/g,M=/(\(\?)?:\w+/g,x=/\*\w+/g,I=/[\-{}\[\]+?.,\\\^$|#\s]/g;o.extend(E.prototype,r,{initialize:function(){},route:function(t,i,n){o.isRegExp(t)||(t=this._routeToRegExp(t)),o.isFunction(i)&&(n=i,i=""),n||(n=this[i]);var s=this;return e.history.route(t,function(o){var r=s._extractParameters(t,o);n&&n.apply(s,r),s.trigger.apply(s,["route:"+i].concat(r)),s.trigger("route",i,r),e.history.trigger("route",s,i,r)}),this},navigate:function(t,i){return e.history.navigate(t,i),this},_bindRoutes:function(){if(this.routes){this.routes=o.result(this,"routes");for(var e,t=o.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(I,"\\$&").replace(S,"(?:$1)?").replace(M,function(e,t){return t?e:"([^/]+)"}).replace(x,"(.*?)"),new RegExp("^"+e+"$")},_extractParameters:function(e,t){var i=e.exec(t).slice(1);return o.map(i,function(e){return e?decodeURIComponent(e):null})}});var C=e.History=function(){this.handlers=[],o.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},D=/^[#\/]|\s+$/g,N=/^\/+|\/+$/g,k=/msie [\w.]+/,O=/\/$/,A=/[?#].*$/;C.started=!1,o.extend(C.prototype,r,{interval:50,getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getFragment:function(e,t){if(null==e)if(this._hasPushState||!this._wantsHashChange||t){e=this.location.pathname;var i=this.root.replace(O,"");e.indexOf(i)||(e=e.slice(i.length))}else e=this.getHash();return e.replace(D,"")},start:function(t){if(C.started)throw new Error("Backbone.history has already been started");C.started=!0,this.options=o.extend({root:"/"},this.options,t),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var i=this.getFragment(),n=document.documentMode,s=k.exec(navigator.userAgent.toLowerCase())&&(!n||7>=n);this.root=("/"+this.root+"/").replace(N,"/"),s&&this._wantsHashChange&&(this.iframe=e.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(i)),this._hasPushState?e.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!s?e.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=i;var r=this.location,a=r.pathname.replace(/[^\/]$/,"$&/")===this.root;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!a)return this.fragment=this.getFragment(null,!0),this.location.replace(this.root+this.location.search+"#"+this.fragment),!0;this._hasPushState&&a&&r.hash&&(this.fragment=this.getHash().replace(D,""),this.history.replaceState({},document.title,this.root+this.fragment+r.search))}return this.options.silent?void 0:this.loadUrl()},stop:function(){e.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),clearInterval(this._checkUrlInterval),C.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(){var e=this.getFragment();return e===this.fragment&&this.iframe&&(e=this.getFragment(this.getHash(this.iframe))),e===this.fragment?!1:(this.iframe&&this.navigate(e),void this.loadUrl())},loadUrl:function(e){return e=this.fragment=this.getFragment(e),o.any(this.handlers,function(t){return t.route.test(e)?(t.callback(e),!0):void 0})},navigate:function(e,t){if(!C.started)return!1;t&&t!==!0||(t={trigger:!!t});var i=this.root+(e=this.getFragment(e||""));if(e=e.replace(A,""),this.fragment!==e){if(this.fragment=e,""===e&&"/"!==i&&(i=i.slice(0,-1)),this._hasPushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,i);else{if(!this._wantsHashChange)return this.location.assign(i);this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getFragment(this.getHash(this.iframe))&&(t.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,e,t.replace))}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,i){if(i){var n=e.href.replace(/(javascript:|#).*$/,"");e.replace(n+"#"+t)}else e.hash="#"+t}}),e.history=new C;var L=function(e,t){var i,n=this;i=e&&o.has(e,"constructor")?e.constructor:function(){return n.apply(this,arguments)},o.extend(i,n,t);var s=function(){this.constructor=i};return s.prototype=n.prototype,i.prototype=new s,e&&o.extend(i.prototype,e),i.__super__=n.prototype,i};d.extend=p.extend=E.extend=_.extend=C.extend=L;var P=function(){throw new Error('A "url" property or function must be specified')},R=function(e,t){var i=t.error;t.error=function(n){i&&i(e,n,t),e.trigger("error",e,n,t)}}}.call(this),define("backbone.original",["underscore","json3"],function(e){return function(){var t;return t||e.Backbone}}(this)),define("backbone",["require","backbone.original","common/transport/request"],function(e){var t=e("backbone.original"),i=e("common/transport/request");return t.ajax=i,t}),jaspersoft||(jaspersoft={components:{}}),jaspersoft.components||(jaspersoft.components={}),function(e,t,i,n,s,o){var r=n.View.extend({rendered:!1,contentSelector:".body",events:{"click .cancel":"hide"},initialize:function(e){if(this.templateId=e&&e.templateId||this.templateId,this.contentSelector=e&&e.contentSelector||this.contentSelector,!this.templateId)throw"Dialog template is not provided";i.bindAll(this),this.options=i.extend({},e)},render:function(e){return this.undelegateEvents(),this.$el=t(s.getTemplateText(this.templateId)).closest("div"),this.el=this.$el[0],t(e?e:document.body).append(this.$el),this.delegateEvents(),this.rendered=!0,this},hide:function(e){o.popup.hide(this.el),e&&e.stopPropagation()},show:function(e){this.rendered||this.render(e),o.popup.show(this.el,this.options.modal)},setContent:function(e){this.$el.find(this.contentSelector).html(t(e))},_updateMessage:function(e){e=i.isString(e)?[e]:e;var n=document.createDocumentFragment();i.each(e||[],function(e){n.appendChild(t("<p/>",{text:e,"class":"message"})[0])},this),this.$el.find(".body").html(n)}}),a=r.extend({templateId:"standardConfirmTemplate",events:{"click button.cancel":"hide","click button.ok":"onOk"},initialize:function(e){r.prototype.initialize.call(this,e),i.extend(this,i.defaults(e||{},{messages:"",ok:function(){}}))},show:function(e){r.prototype.show.call(this),this._updateMessage(e.messages||this.messages),e.ok&&(this.ok=e.ok)},onOk:function(){this.hide(),this.ok()}});e.Dialog=r,e.ConfirmDialog=a}(jaspersoft.components,jQuery,_,Backbone,jaspersoft.components.templateEngine,dialogs),define("components.dialog",["jquery","underscore","components.templateengine","components.dialogs","backbone"],function(e){return function(){var t;return t||e.jaspersoft.components.Dialog}}(this)),jaspersoft.components.NotificationViewTrait=function(e,t,i){return i.View.extend({initialize:function(){t.bindAll(this),this.collection&&this.collection.each(this.addListeners)},addListeners:function(e){e.on("error:server",this.handleServerError),e.on("notification:show",this.handleNotificationShow)},showErrorNotification:function(e,t){this.showNotification(e,"error",t)},showSuccessNotification:function(e,t){this.showNotification(e,"success",t)},showNotification:function(){},hideNotification:function(){},handleServerError:function(e){this.showErrorNotification(e.message)},handleNotificationShow:function(e){this.showSuccessNotification(e.message)}})}(jQuery,_,Backbone),define("components.notificationviewtrait",["namespace","jquery","underscore","backbone"],function(e){return function(){var t;return t||e.jaspersoft.components.NotificationViewTrait}}(this)),jaspersoft.components.SystemNotificationView=function(e,t){return e.NotificationViewTrait.extend({PSEUDO_INFINITY_DELAY:9999999999,showNotification:function(e){t.systemConfirm.show(e,this.PSEUDO_INFINITY_DELAY)}})}(jaspersoft.components,dialogs),define("components.systemnotificationview",["namespace","jquery","underscore","components.dialogs","components.notificationviewtrait"],function(e){return function(){var t;return t||e.jaspersoft.components.SystemNotificationView}}(this)),jaspersoft.components.Layout=function(e,t,i,n){return i.View.extend({initialize:function(e){t.bindAll(this),this.createUIComponents(e)},render:function(t){return this.notificationView.render(),t&&t.container?(e(t.container).find(".body").prepend(this.notificationView.el),this.defaultRender(this.formView,{container:e(t.container)})):(this.dialogRender(this.formView,this.dialog),this.dialog.$el.find(".body").prepend(this.notificationView.el)),this},createUIComponents:function(e){if(e&&(e.type&&e.namespace[e.type]&&(this.formView=new e.namespace[e.type]({model:this.model})),e.container||(this.dialog=new n.Dialog({modal:e.modal,templateId:"exportsDialogTemplate"}))),this.model){this.stateView=new n.StateView({model:this.model.get("state")});var t=new i.Collection([this.model,this.model.get("state")]);this.notificationView=new n.SystemNotificationView({collection:t})}},defaultRender:function(e,t){t&&t.container&&e.render(t)},dialogRender:function(t,i){i&&t&&(i.render(e("body")),t.render({container:i.$el}),e("#exportDialog #cancelExportButton").removeClass("hidden"))},showDialog:function(){this.dialog&&(this.formView.prepareToShow&&this.formView.prepareToShow(),this.notificationView.hideNotification(),this.dialog.show())}})}(jQuery,_,Backbone,jaspersoft.components),define("components.layout",["jquery","underscore","components.dialog","components.systemnotificationview"],function(e){return function(){var t;return t||e.jaspersoft.components.Layout}}(this)),TouchController=function(e,t,i){if(this.element=e,this.parent=t,this.children=[],this.hbar=null,this.vbar=null,i=i||{},this.element.style.position=i.absolute?"absolute":"relative",this.useParent=this.observer=i.useParent?t:e,this.translate3d=i.translate3d!==!1?!0:!1,this.forceLayout=i.forceLayout!==!0?!1:!0,this.use2Fingers=i.use2Fingers!==!0?!1:!0,this.fit=i.fit,i.debug&&(t.style.border="solid 1px #f00",e.style.border="solid 1px #00f"),this.translate3d&&!i.noInit3d){var n=jQuery(e).position();e.style.webkitTransform="translate3d("+n.left+"px,"+n.top+"px,0)",e.style.top="",e.style.left=""}if(i.scrollbars===!0){var s=jQuery('<div style="position:absolute;bottom:4px;left:0;right:0;"><div style="position:relative;background:#3fb8fa;min-height:4px;width:24px;opacity:0.4;"></div></div>').appendTo(t),o=jQuery('<div style="position:absolute;top:0;bottom:0;right:4px;"><div style="position:relative;background:#3fb8fa;min-width:4px;height:24px;opacity:0.4;"></div></div>').appendTo(t);this.hbar=s.children().eq(0),this.vbar=o.children().eq(0)}this.computeBoundaries(),this.dragging=!1,this.drag_sensitivity=20,this.scale=1,this.element.style.top=0,this.element.style.left=0,this.maxX=0,this.maxY=0,this.startTouchY=0,this.startTouchX=0,this.contentOffsetX=0,this.contentOffsetY=0,this.observer.addEventListener("touchstart",this,!1),this.observer.addEventListener("touchmove",this,!1),this.observer.addEventListener("touchend",this,!1)},TouchController.prototype.handleEvent=function(e){switch(e.type){case"touchstart":this.onTouchStart(e);break;case"touchmove":this.onTouchMove(e);break;case"touchend":this.onTouchEnd(e)}},TouchController.prototype.computeBoundaries=function(){this.maxX=this.parent.clientWidth-this.element.clientWidth,this.maxY=this.parent.clientHeight-this.element.clientHeight,this.maxX=this.maxX<0?this.maxX:0,this.maxY=this.maxY<0?this.maxY:0,this.hbar&&0!==this.maxX?(this.hratio=this.parent.clientWidth/this.element.clientWidth,this.hbar.width(this.hratio*this.parent.clientWidth),this.hbar.show()):this.hbar&&this.hbar.hide(),this.vbar&&0!==this.maxY?(this.vratio=this.parent.clientHeight/this.element.clientHeight,this.vbar.height(this.vratio*this.parent.clientHeight),this.vbar.show()):this.vbar&&this.vbar.hide(),0===this.maxX&&0===this.maxY&&(this.element.style.minWidth=this.parent.clientWidth+"px",this.element.style.minHeight=this.parent.clientHeight+"px","reportContainer"===this.element.id&&(this.element.style.maxWidth=this.parent.clientWidth+"px",this.element.style.maxHeight=this.parent.clientHeight+"px"))},TouchController.prototype.onTouchStart=function(e){this.scale_pre=!1,this.computeBoundaries(),this.startTouchX=e.touches[0].clientX,this.startTouchY=e.touches[0].clientY,this.contentStartOffsetX=this.contentOffsetX,this.contentStartOffsetY=this.contentOffsetY},TouchController.prototype.onTouchMove=function(e){var t=e.touches[0].clientY,i=e.touches[0].clientX;(!this.use2Fingers||this.use2Fingers&&2==e.touches.length)&&(this.dragging?this.animateTo(i,t):this.isDragging(e)&&(TouchController.element_scrolled=!0,this.forceLayout&&(this.element.style.top=0,this.element.style.webkitTransform="translate3d(0,"+this.contentOffsetY+"px,0)"),this.animateTo(i,t)))},TouchController.prototype.onTouchEnd=function(e){this.dragging&&(this.forceLayout&&(this.element.style.webkitTransform="translate3d(0,0,0)",this.element.style.top=this.contentOffsetY+"px"),this.hbar&&this.hbar.hide(),this.vbar&&this.vbar.hide(),e.preventDefault(),this.shouldStartMomentum()),this.dragging=!1},TouchController.prototype.animateTo=function(e,t){var i=e-this.startTouchX,n=t-this.startTouchY,s=i+this.contentStartOffsetX,o=n+this.contentStartOffsetY,r=jQuery(this.element).position();this.translate3d?(s>0&&(s=0),o>0&&(o=0),s<this.maxX&&(s=this.maxX),o<this.maxY&&(o=this.maxY)):(s+r.left>0&&(s=-1*r.left),o+r.top>0&&(o=-1*r.top),r.left+s<this.maxX&&(s=this.maxX-r.left),r.top+o<this.maxY&&(o=this.maxY-r.top)),this.contentOffsetX=s,this.contentOffsetY=o,this.translate3d||this.use2Fingers?this.element.style.webkitTransform="scale("+this.scale+") translate3d("+s+"px,"+o+"px, 0)":(this.element.style.top=r.top+o+"px",this.element.style.left=r.left+s+"px"),this.hbar&&this.hbar.css("left",-1*s*this.hratio+"px"),this.vbar&&this.vbar.css("top",-1*o*this.vratio+"px")},TouchController.prototype.isDragging=function(e){var t=e.touches[0].clientX-this.startTouchX,i=e.touches[0].clientY-this.startTouchY,n=Math.abs(t),s=Math.abs(i);return this.dragging=n>this.drag_sensitivity||s>this.drag_sensitivity?!0:!1,this.dragging},TouchController.prototype.shouldStartMomentum=function(){return!1},TouchController.prototype.reset=function(){offsetX=this.contentOffsetX,offsetY=this.contentOffsetY,this.maxX=this.parent.clientWidth-this.element.clientWidth,this.maxY=this.parent.clientHeight-this.element.clientHeight,this.translate3d?(this.element.style.webkitTransform="scale("+this.scale+") translate3d("+offsetX+"px,"+offsetY+"px, 0)",this.element.style.webkitTransform="scale("+this.scale+") translate3d(0,0,0)",this.contentOffsetX=0,this.contentOffsetY=0):(this.element.style.top=0,this.element.style.left=0)},TouchController.prototype.forceRefresh=function(){},TouchController.prototype.isBottom=function(){return this.maxY>=0?!1:this.contentOffsetY-this.maxY<10},TouchController.prototype.addPadding=function(e,t){var i=jQuery("#"+e).width()+t.right,n=jQuery("#"+e).height()+t.bottom;this.element.style.width=i+"px",this.element.style.height=n+"px"},define("touchcontroller",["jquery"],function(e){return function(){var t;return t||e.TouchController}}(this)),JSTooltip.addVar("SEPARATOR","@@"),JSTooltip.addVar("TOOLTIP_LABEL","tooltiplabel"),JSTooltip.addVar("TOOLTIP_TEXT","tooltiptext"),JSTooltip.addVar("TOOLTIP_TEMPLATE","tooltiptemplate"),JSTooltip.addVar("TOOLTIP_TEMPLATE_ID","jsTooltip"),JSTooltip.addVar("LABEL_PATTERN",".message.label"),JSTooltip.addVar("TEXT_PATTERN",".message:not(.label)"),JSTooltip.addMethod("_toAttribute",function(e,t){this.srcElement&&this.srcElement.writeAttribute(e,isArray(t)?t.join(this.SEPARATOR):t)}),JSTooltip.addMethod("_fromAttribute",function(e){if(this.srcElement&&this.srcElement.hasAttribute(e)){var t=this.srcElement.readAttribute(e);return t.include(this.SEPARATOR)?t.split(this.SEPARATOR):t}return null}),JSTooltip.addMethod("_setValues",function(e,t){e.each(function(e,i){t[i]&&e.update(t[i])})}),JSTooltip.addMethod("_calculateZIndex",function(e){function t(e){return parseInt(jQuery(e).css("z-index"))}var i=t(e);(!_.isNumber(i)||_.isNaN(i))&&(i=1e3);var n=_.flatten([this.srcElement,jQuery(this.srcElement).parents().toArray()]),s=_.reduce(n,function(e,i){var n=t(i);return _.isNumber(n)&&!_.isNaN(n)&&(e=Math.max(e,n)),e},i);return s+1}),JSTooltip.addMethod("show",function(e){e&&(this.offsets=e),this._element=$(this.templateId);var e;this.showBelow?(e=getBoxOffsets(this.srcElement),e[1]+=this.srcElement.clientHeight+5):e=[getScrollLeft()+5,getScrollTop()+5],this.offsets&&(e[0]+=this.offsets[0],e[1]+=this.offsets[1]),this._element.setStyle({position:"absolute",left:e[0]+"px",top:e[1]+"px",zIndex:this._calculateZIndex(this._element)});var t=this._element.select(this.LABEL_PATTERN),i=this._element.select(this.TEXT_PATTERN);if(this.label&&this._setValues(t,isArray(this.label)?this.label:[this.label]),this.text&&this._setValues(i,isArray(this.text)?this.text:[this.text]),this._element.removeClassName(layoutModule.HIDDEN_CLASS),e[0]+this._element.clientWidth>jQuery(window).width()){var n=e[0]-this._element.clientWidth>0?e[0]-this._element.clientWidth:15;this._element.setStyle({left:n+"px"})}if(e[1]+this._element.clientHeight>jQuery(window).height()){var s=e[1]-this._element.clientHeight-10;this._element.setStyle({top:s+"px"})}return this.loadTextCallback&&!this.loadTextExecuted&&(this.loadTextExecuted=!0,this.loadTextCallback(this)),this}),JSTooltip.addMethod("updateText",function(e){this.text=e,this.show()}),JSTooltip.addMethod("hide",function(){this._element&&this._element.addClassName(layoutModule.HIDDEN_CLASS)});var tooltipModule={TOOLTIP_PATTERN:"*[tooltiptext] > *",ELEMENT_WITH_TOOLTIP_PATTERN:"*[tooltiptext]",actualX:0,actualY:0,tooltips:[],showJSTooltip:function(e,t){e.jsTooltip||(e.jsTooltip=new JSTooltip(e,{})),this.actualX=t[0],this.actualY=t[1],this.cleanUp();
  var i=jQuery(e).attr("tooltipappeardelay");i=i?parseInt(i):1e3,e.jsTooltip.timer&&clearTimeout(e.jsTooltip.timer),e.jsTooltip.timer=setTimeout(function(){e.jsTooltip.show([tooltipModule.actualX,tooltipModule.actualY])},i),jQuery(e).on("mousemove",function(e){tooltipModule.actualX=e.clientX,tooltipModule.actualY=e.clientY})},hideJSTooltip:function(e){e&&e.jsTooltip&&(e.jsTooltip.timer&&clearTimeout(e.jsTooltip.timer),e.jsTooltip.hide(),jQuery(e).off("mousemove"))},cleanUp:function(){if(this.tooltips&&this.tooltips.length>0){var e=[],t="fuigasuifdughaiadbvguaidbapvuwbev";this.tooltips.each(function(i){i.srcElement.id&&document.getElementById(i.srcElement.id)||(i.srcElement.setAttribute("id",t),document.getElementById(t)||(i.hide(),e.push(i)),i.srcElement.setAttribute("id",null))}),e.length>0&&(this.tooltips=this.tooltips.reject(function(t){return e.include(t)}))}}};define("components.tooltip",["jquery","prototype","utils.common","core.layout"],function(e){return function(){var t;return t||e.JSTooltip}}(this)),document.observe(isSupportsTouch()?"drag:touchstart":"drag:mousedown",function(e){var t=e.memo.targetEvent.element();if(!isSupportsTouch()||!event.treeEvent&&!event.listEvent){var i=matchMeOrUp(t,layoutModule.LIST_ITEM_PATTERN);i&&!t.match(layoutModule.DISCLOSURE_BUTTON_PATTERN)&&buttonManager.down(i,function(e){return $(e).down(layoutModule.LIST_ITEM_WRAP_PATTERN)}),t.match(layoutModule.DISCLOSURE_BUTTON_PATTERN)&&buttonManager.down(t)}});var buttonManager={over:function(e,t){if(e&&!this.isSelected(e)){var i=t?t(e):e;$(i).addClassName(layoutModule.HOVERED_CLASS)}},out:function(e,t){if(e){var i=t?t(e):e;$(i).removeClassName(layoutModule.HOVERED_CLASS).removeClassName(layoutModule.PRESSED_CLASS)}},down:function(e,t){if(e&&!this.isSelected(e)){var i=t?t(e):e;$(i).removeClassName(layoutModule.HOVERED_CLASS).addClassName(layoutModule.PRESSED_CLASS)}},up:function(e,t){if(e&&!this.isSelected(e)){var i=t?t(e):e;i=$(i),i.removeClassName(layoutModule.PRESSED_CLASS),!isIPad()&&i.addClassName(layoutModule.HOVERED_CLASS)}},disable:function(e){e&&(buttonManager.out(e),$(e).writeAttribute(layoutModule.DISABLED_ATTR_NAME,layoutModule.DISABLED_ATTR_NAME))},enable:function(e){e&&(buttonManager.out(e),$(e).writeAttribute(layoutModule.DISABLED_ATTR_NAME,null))},isDisabled:function(e){return e?$(e).readAttribute(layoutModule.DISABLED_ATTR_NAME)===layoutModule.DISABLED_ATTR_NAME||$(e).hasClassName(layoutModule.DISABLED_CLASS):void 0},unSelect:function(e){e&&$(e).removeClassName(layoutModule.SELECTED_CLASS)},select:function(e){e&&$(e).addClassName(layoutModule.SELECTED_CLASS)},isSelected:function(e,t){if(e){var i=t?t(e):$(e),n=i.up("li");return n&&n.hasClassName(layoutModule.SELECTED_CLASS)}return!1}};document.observe("mouseup",function(e){if(isRightClick(e)){var t=e.element();document.fire(layoutModule.ELEMENT_CONTEXTMENU,{targetEvent:e,node:t})}}),document.observe("contextmenu",function(e){return Event.stop(e),!1}),document.observe("dom:loaded",function(){isIE()&&document.body.setAttribute("oncontextmenu","return false"),jQuery("body").on("mouseover mouseout",layoutModule.BUTTON_PATTERN,function(e){hasDisabledAttributeSet(this)||("mouseover"==e.type?buttonManager.over(this):buttonManager.out(this))}),jQuery("body").on("mousedown mouseup touchstart touchend",[layoutModule.BUTTON_PATTERN,layoutModule.MENU_LIST_PATTERN,layoutModule.DISCLOSURE_BUTTON_PATTERN,layoutModule.META_LINKS_PATTERN].join(","),function(e){"mousedown"==e.type||"touchstart"==e.type?!hasDisabledAttributeSet(this)&&buttonManager.down(this):!hasDisabledAttributeSet(this)&&buttonManager.up(this),("mouseup"==e.type||"touchend"==e.type)&&(this.parentNode.id==layoutModule.MAIN_NAVIGATION_HOME_ITEM_ID&&primaryNavModule.navigationOption("home"),this.parentNode.id==layoutModule.MAIN_NAVIGATION_LIBRARY_ITEM_ID&&primaryNavModule.navigationOption("library"))}),jQuery("#frame").on("touchend mouseup",".minimize",function(e){this.parentNode.className.indexOf("maximized")>=0?layoutModule.minimize(this):layoutModule.maximize(this),e.preventDefault()}),jQuery("#frame").on("touchend mouseup",layoutModule.TABSET_TAB_PATTERN,function(){hasDisabledAttributeSet(this)||(jQuery(this).siblings().removeClass(layoutModule.SELECTED_CLASS).each(function(){jQuery(jQuery(this).attr("tabId")).addClass("hidden")}),jQuery(this).addClass(layoutModule.SELECTED_CLASS),jQuery(jQuery(this).attr("tabId")).removeClass("hidden"))}),jQuery("#"+layoutModule.META_LINK_LOGOUT_ID).on("mousedown touchstart",function(e){e.preventDefault(),primaryNavModule.navigationOption("logOut")}),jQuery("body").on("mouseover mouseout click","[tooltiptext]",function(e){("mouseout"==e.type||"click"==e.type)&&tooltipModule.hideJSTooltip(this),"mouseover"==e.type&&tooltipModule.showJSTooltip(this,[e.clientX,e.clientY])}),jQuery("#mainNavigation").on("mouseover",layoutModule.NAVIGATION_MUTTON_PATTERN,function(e){primaryNavModule.showNavButtonMenu(e,this)}),isSupportsTouch()&&(document.body.addEventListener("touchstart",function(){window.calendar&&window.calendar.hide&&!window.calendar.hidden&&window.calendar.hide(),"undefined"!=typeof TouchController&&(TouchController.element_scrolled=!1)},!1),document.body.addEventListener("touchmove",function(){},!1)),jQuery("#filePath").on("mouseenter mouseout",function(){jQuery("#fake_upload_button").toggleClass("over")})}),define("core.events.bis",["jquery","prototype","utils.common","core.layout","components.tooltip"],function(e){return function(){var t;return t||e.buttonManager}}(this));var baseList={isResponsive:function(e){return $(e.up(0)).hasClassName(layoutModule.RESPONSIVE_CLASS)},isCollapsible:function(e){return $(e.up(0)).hasClassName(layoutModule.COLLAPSIBLE_CLASS)},selectItem:function(e){this.isItemDisabled(e)||$(e).addClassName(layoutModule.SELECTED_CLASS)},deselectItem:function(e){$(e).removeClassName(layoutModule.SELECTED_CLASS)},isItemSelected:function(e){return $(e).hasClassName(layoutModule.SELECTED_CLASS)},disableItem:function(e){buttonManager.disable(e)},enableItem:function(e){buttonManager.enable(e)},isItemDisabled:function(e){buttonManager.isDisabled(e)},openItem:function(e){$(e).removeClassName(layoutModule.CLOSED_CLASS).addClassName(layoutModule.OPEN_CLASS).isOpen=!0},isItemOpen:function(e){return $(e).hasClassName(layoutModule.OPEN_CLASS)||$(e).isOpen&&!$(e).hasClassName(layoutModule.CLOSED_CLASS)},closeItem:function(e){$(e).removeClassName(layoutModule.OPEN_CLASS).addClassName(layoutModule.CLOSED_CLASS).isOpen=!1}},dynamicList={lists:{},activeListId:null,_templateHash:{},messages:{listNItemsSelected:"#{count} items selected"}};dynamicList.ListItem=function(e){this._itemId=void 0,this._list=void 0,this.first=!1,this.last=!1,e&&(this._value=e.value?e.value:{},this._label=e.label?e.label:"",this._subList=e.subList,this._cssClassName=e.cssClassName?e.cssClassName:void 0,this._templateDomId=e.templateDomId?e.templateDomId:void 0,this._respondOnItemEvents=Object.isUndefined(e.respondOnItemEvents)?!0:e.respondOnItemEvents,this._excludeFromEventHandling=e.excludeFromEventHandling?e.excludeFromEventHandling:void 0,this._excludeFromSelectionTriggers=e.excludeFromSelectionTriggers?e.excludeFromSelectionTriggers:void 0)},dynamicList.ListItem.addVar("DEFAULT_TEMPLATE_DOM_ID","dynamicListItemTemplate"),dynamicList.ListItem.addVar("DEFAULT_ITEM_ID_PREFIX","item"),dynamicList.ListItem.addVar("DEFAULT_SUB_LIST_ID_SUFFIX","SubList"),dynamicList.ListItem.addMethod("getId",function(){return this._itemId}),dynamicList.ListItem.addMethod("setList",function(e){this._list=e,this.getList()&&(this._itemId=this.getList().getNextItemId())}),dynamicList.ListItem.addMethod("getList",function(){return this._list}),dynamicList.ListItem.addMethod("setValue",function(e){return this._value=e}),dynamicList.ListItem.addMethod("getValue",function(){return this._value}),dynamicList.ListItem.addMethod("setLabel",function(e){return this._label=e}),dynamicList.ListItem.addMethod("getLabel",function(){return this._label}),dynamicList.ListItem.addMethod("setCssClassName",function(e){this._cssClassName=e}).addMethod("getCssClassName",function(){return this._cssClassName}),dynamicList.ListItem.addMethod("setTemplateDomId",function(e){this._templateDomId=e}),dynamicList.ListItem.addMethod("getTemplateDomId",function(){return this._templateDomId}),dynamicList.ListItem.addMethod("show",function(e){if(e){this._element=this.processTemplate(this._getTemplate()),this._getElement().setAttribute("id",this._generateId()),this._getElement().setAttribute("tabindex",-1),this.first&&this.getList().tabindex&&this._getElement().writeAttribute("tabindex",this.getList().tabindex),this._getElement().listItem=this,this.refreshStyle();var t=e.childElements(),i=this.index(),n=i-1;n>-1&&n<t.length?this._getElement().insert({after:t[n]}):$(e).insert(this._getElement())}}),dynamicList.ListItem.addMethod("refresh",function(){isNotNullORUndefined(this._getElement())&&(this.getList()?(this._element=this.processTemplate(this._getElement()),this.refreshStyle()):(this._getElement().remove(),this._element=null))}),dynamicList.ListItem.addMethod("refreshStyle",function(){var e=this._getElement();e.templateClassName&&(e.className=e.templateClassName),this.first&&e.addClassName(layoutModule.FIRST_CLASS),this.last&&e.addClassName(layoutModule.LAST_CLASS),this.isSelected()&&e.addClassName(layoutModule.SELECTED_CLASS),this.isDisabled()&&e.addClassName(layoutModule.DISABLED_CLASS),this.getCssClassName()&&e.addClassName(this.getCssClassName())}),dynamicList.ListItem.addMethod("isRendered",function(){return isNotNullORUndefined(this._getElement())}),dynamicList.ListItem.addMethod("disable",function(){baseList.disableItem(this._getElement())}).addMethod("enable",function(){baseList.enableItem(this._getElement())}).addMethod("isDisabled",function(){return baseList.isItemDisabled(this._getElement())}),dynamicList.ListItem.addMethod("processTemplate",function(e){var t=e.childElements()[0];t.cleanWhitespace();var i=t.childElements().length;return i==t.childNodes.length?t.insert(this.getLabel().escapeHTML()):t.childNodes[i].data=this.getLabel(),e}),dynamicList.ListItem.addMethod("focus",function(){this._getElement().focus()}),dynamicList.ListItem.addMethod("remove",function(){this.getList().removeItems([this])}),dynamicList.ListItem.addMethod("isSelected",function(){return this.getList().isItemSelected(this)}),dynamicList.ListItem.addMethod("select",function(){this.getList().selectItem(this,!0)}),dynamicList.ListItem.addMethod("deselect",function(){this.getList().deselectItem(this)}),dynamicList.ListItem.addMethod("index",function(){this.getList().getItems().indexOf(this)}),dynamicList.ListItem.addMethod("_getElement",function(){if(!this._element){var e=$(this._generateId());this._element=Object.isElement(e)?e:void 0}return this._element}),dynamicList.ListItem.addMethod("_getTemplate",function(){var e=this._templateDomId;dynamicList._templateHash[e]||(dynamicList._templateHash[e]=e);var t=$(dynamicList._templateHash[e]).cloneNode(!0);return t.templateId=e,t.templateClassName=t.className,t}),dynamicList.ListItem.addMethod("_generateId",function(){return this.getList().getId()+"_"+this.DEFAULT_ITEM_ID_PREFIX+this.getId()}),dynamicList.ListItem.addMethod("_isElementInExcluded",function(e){var t=e.element();return this._excludeFromEventHandling&&null!=matchAny(t,this._excludeFromEventHandling)}),dynamicList.ListItem.addMethod("_isExcludedFromSelectionTriggers",function(e){var t=e.element();return this._excludeFromSelectionTriggers&&null!=matchAny(t,this._excludeFromSelectionTriggers)}),dynamicList.CompositeItem=function(e){dynamicList.ListItem.call(this,e),this.isComposite=!0,this._items=e.items,this._openUp=e.openUp,this._subList=null,this._subListOptions=e.listOptions?e.listOptions:{},this._listTagName="ul",this.OPEN_HANDLER_PATTERN=e.openHandlerPattern?e.openHandlerPattern:this.OPEN_HANDLER_PATTERN,this.CLOSE_HANDLER_PATTERN=e.closeHandlerPattern?e.closeHandlerPattern:this.CLOSE_HANDLER_PATTERN},dynamicList.CompositeItem.prototype=deepClone(dynamicList.ListItem.prototype),dynamicList.CompositeItem.addVar("OPEN_HANDLER_PATTERN","[openHandler=openHandler]"),dynamicList.CompositeItem.addVar("CLOSE_HANDLER_PATTERN","[closeHandler=closeHandler]"),dynamicList.CompositeItem.addMethod("getItems",function(){return this._items}),dynamicList.CompositeItem.addMethod("setItems",function(e){this._items=e}),dynamicList.CompositeItem.addMethod("addItem",function(e){this._items.push(e)}),dynamicList.CompositeItem.addMethod("removeItems",function(e){this._items=this._items.reject(function(t){return e.include(t)}),this._subList.removeItems(e)}),dynamicList.CompositeItem.addMethod("show",function(e){this._listTagName=e.tagName,dynamicList.ListItem.prototype.show.call(this,e),baseList.closeItem(this._getElement()),this._items&&this._showSubList()}),dynamicList.CompositeItem.addMethod("_showSubList",function(){var e=this._getSubListId(),t=new Element(this._listTagName,{id:e});this._getElement().insert(this._openUp?{top:t}:{bottom:t});var i=this._subListOptions;this._subList=new dynamicList.List(e,{responsive:i.responsive?i.responsive:this.getList()._responsive,collapsible:i.collapsible?i.collapsible:this.getList()._collapsible,multiSelect:i.multiSelect?i.multiSelect:this.getList()._multiSelect,cssClassName:i.cssClassName?i.cssClassName:this.getList()._cssClassName,listTemplateDomId:i.listTemplateDomId?i.listTemplateDomId:this.getList()._listTemplateDomId,itemTemplateDomId:i.itemTemplateDomId?i.itemTemplateDomId:this.getList()._itemTemplateDomId,itemCssClassName:i.itemCssClassName?i.itemCssClassName:this.getList()._itemCssClassName,comparator:i.comparator?i.comparator:this.getList()._comparator,items:this._items}),this._subList._initEvents=function(){},this._subList.show(),this._subList._parentList=this.getList(),this._subList.getItems().each(function(e){e.parentItem=this}.bind(this))}),dynamicList.CompositeItem.addMethod("refresh",function(){dynamicList.ListItem.prototype.refresh.call(this),this._items&&(this._subList?this._subList.refresh():this._showSubList())}),dynamicList.CompositeItem.addMethod("getFirstChild",function(){return this._subList.getItems()[0]}),dynamicList.CompositeItem.addMethod("refreshStyle",function(){dynamicList.ListItem.prototype.refreshStyle.call(this),baseList.isItemOpen(this._getElement())?baseList.openItem(this._getElement()):baseList.closeItem(this._getElement()),this._subList&&this._subList.refreshStyle()}),dynamicList.CompositeItem.addMethod("_isOpenHandler",function(e){return e.match(this.OPEN_HANDLER_PATTERN)}).addMethod("_isCloseHandler",function(e){return e.match(this.CLOSE_HANDLER_PATTERN)}),dynamicList.CompositeItem.addMethod("_getSubListId",function(){return this._generateId()+"_"+this.DEFAULT_SUB_LIST_ID_SUFFIX}),dynamicList.TemplatedListItem=function(e){this.tooltipText=e?e.tooltipText:null,dynamicList.ListItem.call(this,e)};var tempFunc=function(){};tempFunc.prototype=dynamicList.ListItem.prototype,dynamicList.TemplatedListItem.prototype=new tempFunc,dynamicList.TemplatedListItem.prototype.constructor=dynamicList.TemplatedListItem,dynamicList.TemplatedListItem.prototype.processTemplate=function(e){var t=Mustache.to_html(e.innerHTML,this.getValue());return e.innerHTML=t,null!=this.tooltipText&&new JSTooltip(e,{text:this.tooltipText}),e},dynamicList.UnderscoreTemplatedListItem=function(e){dynamicList.TemplatedListItem.call(this,e),this._template=e?e.template:""};var tempFunc=function(){};tempFunc.prototype=dynamicList.TemplatedListItem.prototype,dynamicList.UnderscoreTemplatedListItem.prototype=new tempFunc,dynamicList.UnderscoreTemplatedListItem.prototype.constructor=dynamicList.UnderscoreTemplatedListItem,dynamicList.UnderscoreTemplatedListItem.prototype._getTemplate=function(){return this._template},dynamicList.UnderscoreTemplatedListItem.prototype.processTemplate=function(){var e=jQuery(_.template(this._template,this.getValue()))[0];return e.templateClassName=e.className,null!=this.tooltipText&&new JSTooltip(e,{text:this.tooltipText}),e},dynamicList.List=function(e,t){this._id=e,this._items=[],this._selectedItems=[],this._lastSelectedItem=null,this._nextId=1,this.draggables=[],this._parentList=null,t&&(this._multiSelect=t.multiSelect?t.multiSelect:!1,this._cssClassName=t.cssClassName?t.cssClassName:"",this._listTemplateDomId=t.listTemplateDomId,this._itemTemplateDomId=t.itemTemplateDomId,this._itemCssClassName=t.itemCssClassName,this._comparator=t.comparator,this._excludeFromEventHandling=t.excludeFromEventHandling,this._excludeFromSelectionTriggers=t.excludeFromSelectionTriggers,this.dragPattern=t.dragPattern,this.selectOnMousedown=t.selectOnMousedown,this.scroll=t.scroll,this.setItems(t.items)),this._createFromTemplate(),this._registerCustomScroll(),dynamicList.activeListId=this.getId(),this._msgNItemsSelected=new Template(dynamicList.messages.listNItemsSelected),dynamicList.lists[this._id]=this},dynamicList.List.addVar("Event",{ITEM_SELECTED:"item:selected",ITEM_UNSELECTED:"item:unselected",ITEM_MOUSEUP:"item:mouseup",ITEM_MOUSEDOWN:"item:mousedown",ITEM_CLICK:"item:click",ITEM_DBLCLICK:"item:dblclick",ITEM_OPEN:"item:open",ITEM_CLOSED:"item:closed",ITEM_CONTEXTMENU:"item:contextmenu",ITEM_BEFORE_SELECT_OR_UNSELECT:"item:beforeSelectOrUnselect"}),dynamicList.List.addVar("DND_WRAPPER_TEMPLATE","column_two"),dynamicList.List.addVar("DND_ITEM_TEMPLATE","column_two:resourceName"),dynamicList.List.addMethod("getNextItemId",function(){return this._nextId++}),dynamicList.List.addMethod("getId",function(){return this._id}),dynamicList.List.addMethod("getItems",function(){return this._items}),dynamicList.List.addMethod("setItems",function(e){e&&(this._items=[],this.resetSelected(),this.addItems(e))}),dynamicList.List.addMethod("addItems",function(e){e&&(e.compact().each(function(e){this._prepareListItem(e),this._items.push(e)}.bind(this)),this._comparator&&(this._items=this._items.sort(this._comparator)))}),dynamicList.List.addMethod("insertItems",function(e,t){t&&(t=t.compact(),t.each(function(e){this._prepareListItem(e)}.bind(this)),this._items.splice.apply(this._items,[e,0].concat(t)),this._comparator&&(this._items=this._items.sort(this._comparator)))}),dynamicList.List.addMethod("_prepareListItem",function(e){e&&(e.setList(this),this._itemTemplateDomId&&!e.getTemplateDomId()&&e.setTemplateDomId(this._itemTemplateDomId),this._itemCssClassName&&!e.getCssClassName()&&e.setCssClassName(this._itemCssClassName),this._excludeFromEventHandling&&!e._excludeFromEventHandling&&(e._excludeFromEventHandling=this._excludeFromEventHandling),this._excludeFromSelectionTriggers&&!e._excludeFromSelectionTriggers&&(e._excludeFromSelectionTriggers=this._excludeFromSelectionTriggers))}),dynamicList.List.addMethod("removeItems",function(e){e&&isArray(e)&&(this._items=this._items.reject(function(t){return e.include(t)}),e.each(function(e){this.deselectItem(e)}.bind(this)),e.each(function(e){e.setList(null),e.refresh()}))}),dynamicList.List.addMethod("sort",function(e){e&&(this._comparator=e),this._comparator&&this.getItems().sort(this._comparator)}),dynamicList.List.addMethod("getSelectedItems",function(){return this._selectedItems}),dynamicList.List.addMethod("isItemSelected",function(e){return this.getSelectedItems().include(e)}),dynamicList.List.addMethod("selectItem",function(e,t,i,n){var s=this.fire(this.Event.ITEM_BEFORE_SELECT_OR_UNSELECT,{item:e});if(!s.stopSelectOrUnselect&&(!(this._multiSelect&&this._selectedItems.length>1&&this.isItemSelected(e))||t||i||n)){var o=this.isItemSelected(e)&&n,r=!(this._multiSelect&&t||o),a=this.isItemSelected(e)&&t&&!o,l=!a&&isNotNullORUndefined(this._lastSelectedItem)&&i,c=!a&&!l;if(r&&this.resetSelected(),a&&!r&&this._removeItemFromSelected(e),l){var u=this._items.indexOf(this._lastSelectedItem),d=this._items.indexOf(e),h=Math.min(u,d),p=Math.max(u,d);if(h>-1)for(var f=h;p>=f;f++)this._addItemToSelected(this._items[f],!1);else this._addItemToSelected(this._items[p],!1)}c&&(this._addItemToSelected(e,!i),this.cursor=e)}}),dynamicList.List.addMethod("deselectItem",function(e){this._removeItemFromSelected(e)}),dynamicList.List.addMethod("deselectOthers",function(e,t,i,n){var s=this.fire(this.Event.ITEM_BEFORE_SELECT_OR_UNSELECT,{item:e});if(!s.stopSelectOrUnselect&&this._multiSelect&&this._selectedItems.length>1&&this.isItemSelected(e)&&!(t||i||n)){var o=this._selectedItems.findAll(function(t){return t!=e});o.each(function(e){this._removeItemFromSelected(e)}.bind(this))}}),dynamicList.List.addMethod("resetSelected",function(e){var t=this._selectedItems;this._selectedItems=[],t.each(function(e){e.getList()!==this&&e.getList().resetSelected(!0),e.refreshStyle(),this.fire(this.Event.ITEM_UNSELECTED,{item:e})}.bind(this)),this._parentList&&!e&&this._parentList.resetSelected()}),dynamicList.List.addMethod("getNextItem",function(e){var t=this.getItems(),i=t.indexOf(e);return~i?this.getItems()[i+1]:null}),dynamicList.List.addMethod("getPreviousItem",function(e){var t=this.getItems(),i=t.indexOf(e);return~i?this.getItems()[i-1]:null}),dynamicList.List.addMethod("selectNext",function(e){var t=e.memo.targetEvent,i=this.cursor?this.cursor:this.getSelectedItems()[this.getSelectedItems().length-1],n=i.getList().getNextItem(i);n&&(isShiftHeld(t)?this.isItemSelected(n)?i.getList().deselectItem(i):this._addItemToSelected(n,!1):(this.resetSelected(),i.getList().selectItem(n)),n._getElement().focus(),this.cursor=n)}),dynamicList.List.addMethod("selectPrevious",function(e){var t=e.memo.targetEvent,i=this.cursor?this.cursor:this.getSelectedItems()[0],n=i.getList().getPreviousItem(i);n&&(isShiftHeld(t)?this.isItemSelected(n)?i.getList().deselectItem(i):this._addItemToSelected(n,!1):(this.resetSelected(),i.getList().selectItem(n)),n._getElement().focus(),this.cursor=n)}),dynamicList.List.addMethod("selectOutwards",function(e){var t=this.getSelectedItems()[0],i=t._getElement(),n=!baseList.isItemOpen(i)&&t.parentItem;n?(t.deselect(),n.select(),n._getElement().focus()):(baseList.closeItem(i),this.fire(this.Event.ITEM_CLOSED,{targetEvent:e,item:t}))}),dynamicList.List.addMethod("selectInwards",function(e){var t=this.getSelectedItems()[0];if(t.isComposite){var i=t._getElement(),n=baseList.isItemOpen(i)&&t.getFirstChild();n?(t.deselect(),n.select(),i.focus()):(baseList.openItem(i),this.fire(this.Event.ITEM_OPEN,{targetEvent:e,item:t}))}}),dynamicList.List.addMethod("show",function(){dynamicList.activeListId=this.getId(),this._getElement().update(),this.getItems().each(function(e,t){e.first=0===t,e.last=t===this.getItems().length-1,e.show(this._getElement())}.bind(this)),this.draggables=[],this.scroll&&this.scroll.refresh(),this._initEvents()}),dynamicList.List.addMethod("refresh",function(){this.refreshStyle();var e=this._getElement().childElements(),t=[];this.getItems().each(function(i,n){if(i.first=0===n,i.last=n===this.getItems().length-1,i.isRendered())if(i.index()!=e.indexOf(i._getElement())){var s=baseList.isItemOpen(i._getElement());i._getElement().remove(),i.show(this._getElement()),s&&baseList.openItem(i._getElement())}else i.refresh();else i.show(this._getElement());t.push(i._getElement())}.bind(this)),e.each(function(e){!t.include(e)&&e.parentNode&&e.remove()})}),dynamicList.List.addMethod("refreshStyle",function(){var e=this._getElement();e.templateClassName&&(e.className=e.templateClassName),this._cssClassName&&e.addClassName(this._cssClassName)}),dynamicList.List.addMethod("fire",function(e,t){return this._getElement().fire(e,t)}),dynamicList.List.addMethod("observe",function(e,t){this._getElement().observe(e,t)}),dynamicList.List.addMethod("stopObserving",function(e){this._getElement().stopObserving(e,handler)}),dynamicList.List.addMethod("_getElement",function(){return this._element||(this._element=$(this.getId())),this._element}),dynamicList.List.addMethod("getItemByEvent",function(e){if(e)for(var t=Event.element(e);t&&t.readAttribute&&t.readAttribute("id")!==this.getId();){var i=t.listItem;if(i&&null!=i.getList())return i;t=$(t.parentNode)}return null}),dynamicList.List.addMethod("_createFromTemplate",function(){var e=this._getElement().readAttribute("tabindex");this.tabindex=parseInt(e&&e.length>0?e:-1),this._getElement().insert({after:this._getTemplateElement(this._getElement())}),this._getElement().remove(),this._element=null,this._getElement().update(),this.tabindex&&this.tabindex.length>0&&this._getElement().writeAttribute("tabindex",this.tabindex),disableSelectionWithoutCursorStyle(this._getElement())}),dynamicList.List.addMethod("_getTemplateElement",function(e){var t=this._listTemplateDomId;dynamicList._templateHash[t]||(dynamicList._templateHash[t]=t);var i=$(dynamicList._templateHash[t]).cloneNode(!0);return i.writeAttribute("id",this.getId()),i.templateId=t,i.templateClassName=i.className,cloneCustomAttributes(e,i),i}),dynamicList.List.addMethod("_addItemToSelected",function(e,t){e&&!this.isItemSelected(e)&&(this._selectedItems.push(e),t&&(this._lastSelectedItem=e),e.refreshStyle(),this._parentList?this._parentList._addItemToSelected(e,t):this.fire(this.Event.ITEM_SELECTED,{item:e}))}),dynamicList.List.addMethod("_removeItemFromSelected",function(e){e&&this.isItemSelected(e)&&(this._selectedItems=this._selectedItems.without(e),e.refreshStyle(),this._parentList?this._parentList._removeItemFromSelected(e):this.fire(this.Event.ITEM_UNSELECTED,{item:e}))}),dynamicList.List.addMethod("_buildDnDOverlay",function(e){e.setStyle({width:null,height:null}),e.items.length>1?e.update(this._msgNItemsSelected.evaluate({count:e.items.length})):1==e.items.length&&e.update(e.items[0].getLabel())}),dynamicList.List.addMethod("_registerCustomScroll",function(){if(!this.scroll&&this._getElement()){var e=this._getElement().up(layoutModule.SWIPE_SCROLL_PATTERN);if(e){var t=layoutModule.scrolls.get(e.identify());t&&(this.scroll=t)}}}),dynamicList.List.addMethod("createDraggableIfNeeded",function(e){var t=e.element();if(this.dragPattern&&!this.draggables[t.identify()]){var i=matchAny(t,[this.dragPattern],!0);if(i){if(!i||this.draggables[i.identify()])return;var n=this.getItemByEvent(e);this.draggables[i.identify()]=new Draggable(i,{superghosting:!0,mouseOffset:!0,onStart:this.setDragStartState.bind(this,n),onEnd:this.setDragEndState.bind(this,n)})}}}),dynamicList.List.addMethod("setDragStartState",function(e,t){var i=e._getElement().templateClassName;i&&t.element.addClassName(i),t.element.addClassName(layoutModule.DRAGGING_CLASS).addClassName(this.getId()),t.element.items=this.getSelectedItems().slice(0),this._buildDnDOverlay(t.element),t.options.scroll=this._getElement(),t.options.scrollSensitivity=layoutModule.SCROLL_SENSITIVITY,Draggables.dragging=this.regionID||!0}),dynamicList.List.addMethod("setDragEndState",function(){delete Draggables.dragging}),dynamicList.List.addMethod("_mouseupHandler",function(e){var t=e.element(),i=matchMeOrUp(t,layoutModule.BUTTON_PATTERN)&&this.getItemByEvent(e);if(i&&!i._isElementInExcluded(e)){if(e.listEvent=!0,i._respondOnItemEvents&&!e.isInvoked){if(this.fire(this.Event.ITEM_MOUSEUP,{targetEvent:e,item:i}),!i._isExcludedFromSelectionTriggers(e)){var n=isMetaHeld(e),s=isShiftHeld(e),o=isRightClick(e),r=!this.selectOnMousedown&&!TouchController.element_scrolled&&(!isSupportsTouch()||e.changedTouches.length>=1);if(r&&i.getList().selectItem(i,n,s,o),!r&&this._multiSelect&&this._selectedItems.length>1&&this.isItemSelected(i)&&!(n||s||o)&&(this._lastSelectedItem=i),i.getList().deselectOthers(i,isMetaHeld(e),isShiftHeld(e),isRightClick(e)),this.twofingers){this.twofingers=!1;var a=jQuery(t).parents("li:first");a.hasClass("selected")&&document.fire(layoutModule.ELEMENT_CONTEXTMENU,{targetEvent:e,node:t})}}this.createDraggableIfNeeded(e)}e.isInvoked=!0}}),dynamicList.List.addMethod("_mousedownHandler",function(e){e="dataavailable"==e.type?e.memo.targetEvent:e;var t=e.element(),i=matchMeOrUp(t,layoutModule.BUTTON_PATTERN)&&this.getItemByEvent(e);if(i&&!i._isElementInExcluded(e)){if(e.listEvent=!0,this.twofingers=e.touches&&2==e.touches.length?!0:!1,i._respondOnItemEvents&&!e.isInvoked&&(this.fire(this.Event.ITEM_MOUSEDOWN,{targetEvent:e,item:i}),!i._isExcludedFromSelectionTriggers(e))){var n=this.selectOnMousedown;n&&i.getList().selectItem(i,isMetaHeld(e),isShiftHeld(e),isRightClick(e))}e.isInvoked=!0}}),dynamicList.List.addMethod("_mouseoverHandler",function(e){matchMeOrUp(e.element(),layoutModule.BUTTON_PATTERN)&&this.createDraggableIfNeeded(e)}),dynamicList.List.addMethod("_clickHandler",function(e){var t=matchMeOrUp(e.element(),layoutModule.BUTTON_PATTERN)&&this.getItemByEvent(e);if(t&&!t._isElementInExcluded(e)){if(!e.isInvoked){if(t._respondOnItemEvents&&this.fire(this.Event.ITEM_CLICK,{targetEvent:e,item:t}),!t.isComposite)return;var i=t._getElement(),n=e.element();t._isCloseHandler(n)&&baseList.isItemOpen(i)?(baseList.closeItem(i),this.fire(this.Event.ITEM_CLOSED,{targetEvent:e,item:t})):t._isOpenHandler(n)&&!baseList.isItemOpen(i)&&(baseList.openItem(i),this.fire(this.Event.ITEM_OPEN,{targetEvent:e,item:t}))}e.isInvoked=!0}}),dynamicList.List.addMethod("_dblclickHandler",function(e){var t=matchMeOrUp(e.element(),layoutModule.BUTTON_PATTERN)&&this.getItemByEvent(e);t&&!t._isElementInExcluded(e)&&(t._respondOnItemEvents&&!e.isInvoked&&this.fire(this.Event.ITEM_DBLCLICK,{targetEvent:e,item:t}),e.isInvoked=!0)}),dynamicList.List.addMethod("_initEvents",function(){var e=this._getElement();this.draggables=[],isSupportsTouch()?(e.stopObserving("touchstart").observe("touchstart",this._mousedownHandler.bindAsEventListener(this)),e.stopObserving("drag:touchstart").observe("drag:touchstart",this._mousedownHandler.bindAsEventListener(this)),e.stopObserving("touchend").observe("touchend",this._mouseupHandler.bindAsEventListener(this))):(e.stopObserving("mouseup").observe("mouseup",this._mouseupHandler.bindAsEventListener(this)),e.stopObserving("mousedown").observe("mousedown",this._mousedownHandler.bindAsEventListener(this)),e.stopObserving("drag:mousedown").observe("drag:mousedown",this._mousedownHandler.bindAsEventListener(this))),isIPad||e.stopObserving("mouseover").observe("mouseover",this._mouseoverHandler.bindAsEventListener(this)),e.stopObserving("click").observe("click",this._clickHandler.bindAsEventListener(this)),e.stopObserving("dblclick").observe("dblclick",this._dblclickHandler.bindAsEventListener(this)),e.stopObserving("key:down").observe("key:down",this.selectNext.bindAsEventListener(this)),e.stopObserving("key:up").observe("key:up",this.selectPrevious.bindAsEventListener(this)),e.stopObserving("key:right").observe("key:right",this.selectInwards.bindAsEventListener(this)),e.stopObserving("key:left").observe("key:left",this.selectOutwards.bindAsEventListener(this))}),dynamicList.UnderscoreTemplatedList=function(e,t){this._template=t?t.template:"",dynamicList.List.apply(this,arguments)};var tempFunc=function(){};tempFunc.prototype=dynamicList.List.prototype,dynamicList.UnderscoreTemplatedList.prototype=new tempFunc,dynamicList.UnderscoreTemplatedList.prototype.constructor=dynamicList.UnderscoreTemplatedList,dynamicList.UnderscoreTemplatedList.prototype._getTemplateElement=function(e){var t=jQuery(_.template(this._template,{}))[0];return t.writeAttribute("id",this.getId()),t.templateClassName=t.className,cloneCustomAttributes(e,t),t},define("components.list",["jquery","prototype","components.layout","touchcontroller","utils.common","dragdrop.extra","core.events.bis"],function(e){return function(){var t;return t||e.dynamicList}}(this)),"undefined"==typeof localContext&&(localContext=window);var actionModel={};actionModel.SIMPLE_ACTION="simpleAction",actionModel.SELECT_ACTION="selectAction",actionModel.INPUT_ACTION="inputAction",actionModel.OPTION_ACTION="optionAction",actionModel.SEPARATOR="separator",actionModel.SINGLE_SELECT_CONSTRAINT="singleSelect",actionModel.HIGH_Z_INDEX=99999,actionModel.RES_LABEL="$label",actionModel.RES_ID="$id",actionModel.RES_SELECTED="$selected",actionModel.EVENT="$event",actionModel.selObjects=[],actionModel.lastItemWasSeparator=!1,actionModel.noItemsYet=!0,actionModel.data=null,actionModel.openedSubMenus=[],actionModel.parentMenu="",actionModel.menuDom=null,actionModel.menuListDom=null,actionModel.PARENT_MENU_CONTAINER="menuList",actionModel.PARENT_MENU_STYLE="menu vertical context hidden",actionModel.SIMPLE_ACTION_DOM_ID="menuList_simpleAction",actionModel.SEPARATOR_DOM_ID="menuList_separator",actionModel.FLYOUT_PARENT_DOM_ID="menuList_flyout",actionModel.EXTRA_INPUT_DOM_ID="menuList_extraInput",actionModel.LIST_ITEM_DOM_ID="menuList_listItem",actionModel.DISPLAY_STYLE="inline",actionModel.DROP_DOWN_MENU=".dropDown",actionModel.showDynamicMenu=function(e,t,i,n,s,o){if(null==e){if(!isProVersion())return;
  var r=designerBase.getSelectedObject();if(!r||!r.menuLevel)return;e=r.menuLevel}actionModel.resetMenu(),actionModel.updateCSSClass(i),actionModel.initActionModelData(s),actionModel.assembleMenuFromActionModel(e,t,actionModel.menuListDom,o),actionModel.setMenuPosition(actionModel.menuDom,t,n),actionModel.setMenuEventHandlers(actionModel.menuDom),isIE()&&jQuery("#"+actionModel.menuDom.id).prepend('<div class="msshadow"></div>'),actionModel.makeMenuVisible(actionModel.menuDom),isIE7()&&setWidthStyleByReflection(actionModel.menuDom,".content"),actionModel.adjustMenuPosition(actionModel.menuDom),actionModel.focusMenu(),jQuery("body").on("mouseout",actionModel.closeHandler)},actionModel.closeHandler=function(e){var t=jQuery(e.relatedTarget);(t.hasClass("mutton")||t.parents(".mutton").length)&&e.relatedTarget||"menu"===t.attr("id")||t.parents("#menu").length?e.stopPropagation():(jQuery("body").trigger("actionmodel-mouseout"),actionModel.hideMenu())},actionModel.resetMenu=function(){var e=$("menu");e.parentId=void 0,e.setAttribute("tabIndex",-1),e.childElements().each(function(e){Element.remove(e)}),e.innerHTML=$("commonMenu").cloneNode(!0).innerHTML;var t=e.down("ul"),i=t.readAttribute("id");t.writeAttribute("id",actionModel.updateTemplateId(i)),e.className=actionModel.PARENT_MENU_STYLE,e.writeAttribute("style",""),actionModel.menuDom=e,actionModel.menuListDom=t},actionModel.updateTemplateId=function(e){var t=new RegExp("_template");return e.replace(t,"")},actionModel.updateCSSClass=function(e){isNotNullORUndefined(e)&&($(actionModel.menuDom).className=e+" hidden")},actionModel.setMenuPosition=function(e,t,i){var n=t?t:window.event,s=Event.pointer(n);isSupportsTouch()&&n.changedTouches&&(s={x:n.changedTouches[0].pageX+20,y:n.changedTouches[0].pageY});var o,r;isNotNullORUndefined(i)?(o=isNotNullORUndefined(i.menuLeft)?i.menuLeft:s.x,r=isNotNullORUndefined(i.menuTop)?i.menuTop:s.y):(o=s.x,r=s.y),e.setStyle({left:o+"px",top:r+"px"})},actionModel.adjustMenuPosition=function(e,t,i,n,s){(!$(e).hasClassName("dropDown")||$(e).hasClassName("fitable"))&&fitObjectIntoScreen(e,null,i,null,s)},actionModel.assembleMenuFromActionModel=function(e,t,i,n){actionModel.noItemsYet=!0;var s=actionModel.data[e];n&&(s=n(e,s)),s.each(function(e){actionModel.appendToMenu(e,t,i)}),actionModel.removeTrailingSeparator()},actionModel.initActionModelData=function(e){actionModel.data="navigationActionModel"===e?primaryNavModule.JSON:_.isString(e)?jQuery("#"+e).html().evalJSON():e},actionModel.appendToMenu=function(e,t,i){if(actionModel.passesClientTest(e)){var n=getMenuMouseupFunction(getAsFunction(e.action),e.actionArgs,e.text,e.id,t);actionModel.appendDesiredRowType(e,t,n,i)}},actionModel.appendDesiredRowType=function(e,t,i,n){var s=function(){actionModel.isMenuShowing()&&actionModel.hideMenu(),i&&i()};e.type==actionModel.SIMPLE_ACTION&&actionModel.addSimpleActionRow(e,s,n),e.type!=actionModel.SEPARATOR||actionModel.lastItemWasSeparator||actionModel.addSeparatorRows(e,n),e.type==actionModel.SELECT_ACTION&&actionModel.addSelector(e,n,t),e.type==actionModel.OPTION_ACTION&&actionModel.addOption(e,s,n)},actionModel.addSimpleActionRow=function(e,t,i){var n=null;n=e.className&&"requiresInput"==e.className?$(actionModel.EXTRA_INPUT_DOM_ID).cloneNode(!0):$(actionModel.SIMPLE_ACTION_DOM_ID).cloneNode(!0),isSupportsTouch()?n.ontouchend=t:n.onmouseup=t,n.onmouseup_saved=t;var s=$(n).down(".button"),o=document.createTextNode(e.text);o.nodeValue=replaceNbsps(o.nodeValue),s.appendChild(o);var r=n.readAttribute("id")+getRandomId();n.writeAttribute("id",r),actionModel.insertMenuRow(i,n,!1,e.isDisabled,e.id,null)},actionModel.addSeparatorRows=function(e,t){var i=null;if(!actionModel.noItemsYet){var n=$(actionModel.SEPARATOR_DOM_ID).cloneNode(!0),s=n.readAttribute("id")+getRandomId();n.writeAttribute("id",s),e.className&&(i=e.className),actionModel.insertMenuRow(t,n,!0,e.isDisabled,null,i)}},actionModel.addOption=function(e,t,i){if(actionModel.passesClientTest(e)){var n=null,s=$(actionModel.LIST_ITEM_DOM_ID).cloneNode(!0);e.button=e.button&&"true"==String(e.button).toLowerCase()?!0:!1,isSupportsTouch()?s.ontouchend=t:s.onmouseup=t,s.onmouseup_saved=t;var o=$(s).down(".button"),r=document.createTextNode(e.text);r.nodeValue=replaceNbsps(r.nodeValue),o.appendChild(r);var a=s.readAttribute("id")+getRandomId();s.writeAttribute("id",a),e.className&&(n=e.className),!e.button&&evaluateTest(e.isSelectedTest,e.isSelectedTestArgs,e.text,e.id,!1,!1)&&o.addClassName("down"),actionModel.insertMenuRow(i,s,!1,e.isDisabled,e.id,n)}},actionModel.addSelector=function(e,t,i){var n,s=e.className;if("flyout"==s){if(e&&e.children.length>0){n=$(actionModel.FLYOUT_PARENT_DOM_ID).cloneNode(!0);var o=$(n).down(".button"),r=document.createTextNode(e.text);r.nodeValue=replaceNbsps(r.nodeValue),o.appendChild(r);var a=n.readAttribute("id")+getRandomId();n.writeAttribute("id",a),actionModel.insertMenuRow(t,n,!1,e.isDisabled,e.id,null);var l=actionModel.menuDom.cloneNode(!1);l.writeAttribute("id",n.readAttribute("id")+"_subMenu"),l.innerHTML=$("commonMenu").cloneNode(!0).innerHTML;var c=l.down("ul"),u=c.readAttribute("id");c.writeAttribute("id",actionModel.updateTemplateId(u)),n.appendChild(l);var d=l.select("ul")[0],h=d.writeAttribute("id",d.readAttribute("id")+"_subMenu");actionModel.buildSubMenu(e,h,i)}}else e.children.each(function(e){var n=getMenuMouseupFunction(getAsFunction(e.action),e.actionArgs,e.text,e.id,i);actionModel.appendDesiredRowType(e,i,n,t)})},actionModel.getSubMenuLeft=function(e){var t=$(e).up(2).clientWidth,i=Math.abs(parseInt($(e).up(1).offsetLeft));return t+i},actionModel.getSubMenuTop=function(e){return Math.abs(parseInt($(e).offsetTop))},actionModel.showChildSubmenu=function(e){var t,i,n=e.parentNode.parentNode.parentNode.id,s=!1;for(t=0;t<actionModel.openedSubMenus.length;t++)actionModel.openedSubMenus[t]==n&&(i=t,s=!0,jQuery("#"+n+">div.content>ul").children("li.node").each(function(){actionModel.hideChildSubmenu(jQuery(this).get(0))})),s&&jQuery("#"+actionModel.openedSubMenus[t]+">div.content>ul").children("li.node").each(function(){actionModel.hideChildSubmenu(jQuery(this).get(0))});actionModel.openedSubMenus.splice(i,actionModel.openedSubMenus.length-i);var o=null,r=null,a=null,l=20,c=e.childElements()[1];c.setStyle({display:actionModel.DISPLAY_STYLE}),c.setStyle({position:"absolute"});var u=actionModel.getSubMenuLeft(e),d=0;c.setStyle({left:u+"px",top:d+"px"}),isIE()&&jQuery(c).prepend('<div class="msshadow"></div>'),actionModel.makeMenuVisible(c),isIE7()&&setWidthStyleByReflection(c,".content"),o=$(c).cumulativeOffset()[1],r=$(c).getHeight();var h=getWindowHeight(),p=o+r;p>h&&(d=h-p-l,c.setStyle({top:d+"px"}));var f=c.cumulativeOffset()[0];a=c.getWidth(),getWindowWidth()<f+a&&c.setStyle({left:"-"+a+"px"}),actionModel.openedSubMenus.push(n)},actionModel.hideChildSubmenu=function(e){var t=e.childElements()[1];t.setStyle({display:"none"}),t.setStyle({position:"absolute"}),t.setStyle({left:0}),actionModel.makeMenuInVisible($(t))},actionModel.makeMenuVisible=function(e){var t=e.down("ul");t.childElements().length>0&&(e.setStyle({zIndex:actionModel.HIGH_Z_INDEX}),$(e).removeClassName("hidden"))},actionModel.makeMenuInVisible=function(e){e.addClassName("hidden")},actionModel.buildSubMenu=function(e,t,i){e.children.each(function(e){actionModel.appendToMenu(e,i,$(t))})},actionModel.isMenuShowing=function(){return!("none"==$("menu").getStyle("display")||$("menu").hasClassName("hidden"))},actionModel.updateRowDom=function(e,t){if(e){e.innerHTML=t;var i=e.readAttribute("id")+getRandomId();e.writeAttribute("id",i)}return e},actionModel.launchNewMenu=function(){actionModel.hideMenu(),alert("action not implemented...")},actionModel.insertMenuRow=function(e,t,i,n,s,o){null==t.readAttribute("id")&&(s?t.setAttribute("id",s):t.identify()),n&&actionModel.disableMenuOption(t),o&&t.addClassName(o),e.appendChild(t),actionModel.lastItemWasSeparator=i,actionModel.noItemsYet=!1},actionModel.disableMenuOption=function(e){buttonManager.disable(e),_.isEmpty(e.childNodes)&&buttonManager.disable(e.childNodes[0])},actionModel.passesClientTest=function(e){var t,i=!0;if(e.clientTest){t=e.clientTest;var n=!1;t.startsWith("!")&&(t=e.clientTest.sub("!",""),n=!0),i=evaluateTest(t,e.clientTestArgs,e.text,e.id,n,null)}var s=actionModel.selObjects;return _.isEmpty(s)||i&&e.selectionConstraint&&(i=e.selectionConstraint==actionModel.SINGLE_SELECT_CONSTRAINT?1==s.length:s.length>1),i},actionModel.removeTrailingSeparator=function(){var e=actionModel.menuListDom.lastChild;if($(e)&&!actionModel.noItemsYet){var t=e.identify(),i=new RegExp("w*separatorw*");i.test(t)&&e.remove()}},actionModel.getMenuParent=function(){return $(actionModel.menuDom.parentId)},actionModel.getFirstMenuButton=function(){return actionModel.menuDom.down(layoutModule.BUTTON_PATTERN,0)},actionModel.focusMenu=function(){var e=actionModel.menuDom;if(actionModel.lastFocused=document.activeElement,!e.hasClassName(layoutModule.HIDDEN_CLASS)&&e.focus(),!e.match(actionModel.DROP_DOWN_MENU)&&!isSupportsTouch()){var t=e.select("li");if(t[0]){var i=t[0].down(layoutModule.BUTTON_PATTERN);i&&buttonManager.over(i)}}},actionModel.showDropDownMenu=function(e,t,i,n,s){t=jQuery(t);var o=t.offset(),r={menuLeft:o.left,menuTop:o.top+t.height()-1};actionModel.showDynamicMenu(i,e,n,r,s)},actionModel.setMenuEventHandlers=function(e){e.select("li").each(function(e){e.hasClassName("disabled")||e.hasClassName("node")&&(isSupportsTouch()?Event.observe(e,"touchstart",function(t){t.firstCall||actionModel.showChildSubmenu(e),t.firstCall=!0}):(Event.observe(e,"mouseenter",function(){actionModel.showChildSubmenu(e)}),Event.observe(e,"mouseleave",function(){actionModel.hideChildSubmenu(e)})))})},actionModel.initializeOneTimeMenuHandlers=function(){$("menu").observe("mouseenter",function(){var e=this.select("."+layoutModule.HOVERED_CLASS)[0];e&&buttonManager.out(e)}.bind($("menu")))},actionModel.hideMenu=function(){if(actionModel.isMenuShowing()){var e=function(){var e=actionModel.lastFocused;try{e&&e.focus()}catch(t){}};!isSupportsTouch()&&setTimeout(e,0),actionModel.makeMenuInVisible($("menu")),jQuery("body").off("mouseout",actionModel.closeHandler)}},actionModel.createMenuElement=function(e,t){if(!e)throw new Error("Can not construct actionModel object: type can not be empty");return Object.extend({type:e},t)},actionModel.setSelected=function(e){actionModel.selObjects=e},define("actionModel.modelGenerator",["prototype","utils.common","core.events.bis"],function(e){return function(){var t;return t||e.actionModel}}(this));var accessibilityModule={ATTR_TAB_INDEX:"data-tab-index",ATTR_COMPONENT_TYPE:"data-component-type",delayTime:500,components:[],currentTabIndex:-1,disabled:!1,initialize:function(){var e=$$("*["+this.ATTR_TAB_INDEX+"]");e.each(function(e){var t=this.getTabIndex(e);t>0&&(this.components[t]=e)}.bind(this))},enable:function(){this.disabled=!1},disable:function(){this.disabled=!0},_focusByType:{tree:function(e){var t=e.readAttribute("id"),i=dynamicTree.trees[t];if(i){var n=i.selectedNodes.last();n=n||(i.bShowRoot?i.getRootNode():i.getRootNode().getFirstChild()),n&&(n.isSelected()||n.select(),accessibilityModule._doFocus(n))}},list:function(e){var t=e.readAttribute("id"),i=dynamicList.lists[t];if(i){var n=i.getSelectedItems().last();n=n||i.getItems().first(),n&&(n.isSelected()||n.select(),accessibilityModule._doFocus(n))}},search:function(e){var t=e.down("input");t&&t.select(),accessibilityModule._doFocus(t)},navigation:function(e){var t=e.down("#main_home");buttonManager.over(t.down(layoutModule.BUTTON_PATTERN)),accessibilityModule._doFocus(t)},linkList:function(e){buttonManager.over(e.down("a")),accessibilityModule._doFocus(e)}},_blurByType:{navigation:function(e){actionModel.hideMenu(),e.select(".over").each(function(e){buttonManager.out(e)})},linkList:function(e){e.select("a.over").each(function(e){buttonManager.out(e)})}},_doFocus:function(e){setTimeout(function(){e.focus()},this.delayTime)},_focusComponent:function(e){var t=e&&this.getType(e)&&this._focusByType[this.getType(e)];return t&&t(e)},_blurComponent:function(e){var t=e&&this.getType(e)&&this._blurByType[this.getType(e)];return t&&t(e)},findTabComponent:function(e){for(var t;e&&!t;)t=e.hasAttribute&&e.hasAttribute(this.ATTR_TAB_INDEX)&&e,e=$(e.parentNode);return t},getTabIndex:function(e){var t=-1;if(e&&e.hasAttribute){e.hasAttribute(this.ATTR_TAB_INDEX)||(e=accessibilityModule.findTabComponent(e));var i=e?e.readAttribute(this.ATTR_TAB_INDEX):this.currentTabIndex;try{i&&i.length>0&&(t=parseInt(i))}catch(n){}}return t},getType:function(e){return e&&e.hasAttribute(this.ATTR_COMPONENT_TYPE)?e.readAttribute(this.ATTR_COMPONENT_TYPE):void 0},getNext:function(e){var t=-1;if(this.components.length>0)for(e||(e=this.currentTabIndex),0>e&&(e=0),t=e+1;Object.isUndefined(this.components[t])&&t!=e;)t++,t<this.components.length||(t=0);return t},getPrevious:function(e){var t=-1;if(this.components.length>0)for(e||(e=this.currentTabIndex),0>e&&(e=0),t=e-1;Object.isUndefined(this.components[t])&&t!=e;)t--,t>-1||(t=this.components.length-1);return t},focusNext:function(e){this.focusByIndex(this.getNext(e))},focusPrevious:function(e){this.focusByIndex(this.getPrevious(e))},focusByIndex:function(e){e>-1&&(this.currentTabIndex=e)&&this._focusComponent(this.components[e])},blurCurrent:function(){var e=this.components[this.currentTabIndex];e&&this._blurComponent(e)},blurByIndex:function(e){var t=this.components[e];t&&this._blurComponent(t)}};document.observe("key:tab",function(e){if(!accessibilityModule.disabled){if(!t)var t=window.event;var i=accessibilityModule.getTabIndex(e.element());return accessibilityModule.blurCurrent(),isShiftHeld(e)?accessibilityModule.focusPrevious(i):accessibilityModule.focusNext(i),e.stop(),!1}}),define("core.accessibility",["prototype","components.list","actionModel.modelGenerator","core.events.bis"],function(e){return function(){var t;return t||e.accessibilityModule}}(this));var keyManager={ignoreKeyDown:[Keys.DOM_VK_SHIFT,Keys.DOM_VK_CONTROL,Keys.DOM_VK_ALT],noBubbleOnKeyUp:[Keys.DOM_VK_F10]};document.observe("keyup",function(e){keyManager.noBubbleOnKeyUp.include(e.keyCode)&&Event.stop(e)}),document.observe("keydown",function(e){if(!keyManager.ignoreKeyDown.include(e.keyCode)){var t=e.element();return e.keyCode==Event.KEY_RETURN?void t.fire("key:enter",{targetEvent:e,node:t}):e.shiftKey&&e.keyCode==Keys.DOM_VK_F10?(Event.stop(e),void t.fire("key:contextMenu",{targetEvent:e,node:t})):e.keyCode==Event.KEY_LEFT?void t.fire("key:left",{targetEvent:e,node:t}):e.keyCode==Event.KEY_RIGHT?void t.fire("key:right",{targetEvent:e,node:t}):e.keyCode==Event.KEY_UP?void t.fire("key:up",{targetEvent:e,node:t}):e.keyCode==Event.KEY_DOWN?void t.fire("key:down",{targetEvent:e,node:t}):isMetaHeld(e)&&89==e.keyCode?void t.fire("key:redo",{targetEvent:e,node:t}):isMetaHeld(e)&&90==e.keyCode?void t.fire("key:undo",{targetEvent:e,node:t}):e.keyCode==Event.KEY_ESC?void t.fire("key:escape",{targetEvent:e,node:t}):e.keyCode==Event.KEY_TAB?void t.fire("key:tab",{targetEvent:e,node:t}):e.keyCode==Event.KEY_DELETE?void t.fire("key:delete",{targetEvent:e,node:t}):65==e.keyCode&&isMetaHeld(e)?void t.fire("key:selectAll",{targetEvent:e,node:t}):83==e.keyCode&&isMetaHeld(e)&&!isShiftHeld(e)?void t.fire("key:save",{targetEvent:e,node:t}):76==e.keyCode&&isMetaHeld(e)&&isShiftHeld(e)?void t.fire("key:chartZoomIn",{targetEvent:e,node:t}):79==e.keyCode&&isMetaHeld(e)&&isShiftHeld(e)?void t.fire("key:chartZoomOut",{targetEvent:e,node:t}):void 0}}),document.observe("key:esc",function(){actionModel.isMenuShowing()&&actionModel.hideActionModelMenu()}),document.observe("key:enter",function(e){var t,i=e.element(),n=$(layoutModule.MENU_ID);if(layoutModule.isVisible(n)){Event.stop(e);var s=n.select("."+layoutModule.HOVERED_CLASS)[0];if(s){var o=s.up(layoutModule.MENU_LIST_PATTERN);setTimeout(o.onmouseup.curry(e.memo.targetEvent),0)}}t=matchMeOrUp(i,layoutModule.NAVIGATION_PATTERN),t&&(t.identify()==layoutModule.MAIN_NAVIGATION_HOME_ITEM_ID?(Event.stop(e),primaryNavModule.navigationOption("home")):t.identify()==layoutModule.MAIN_NAVIGATION_LIBRARY_ITEM_ID&&(Event.stop(e),primaryNavModule.navigationOption("library")))}),document.observe("key:down",function(e){{var t;e.element()}if(layoutModule.isVisible(layoutModule.MENU_ID)){Event.stop(e);var i=$(layoutModule.MENU_ID).select("."+layoutModule.HOVERED_CLASS)[0];if(i){var n=i.up(layoutModule.MENU_LIST_PATTERN),s=getNextNonMatchingSibling(n,layoutModule.SEPARATOR_PATTERN);return void(s&&(buttonManager.out(i),buttonManager.over(s.down(layoutModule.BUTTON_PATTERN)),s.focus()))}}(t=matchAny(e.element(),[layoutModule.NAVIGATION_MUTTON_PATTERN],!0))&&(buttonManager.out(t.down(layoutModule.BUTTON_PATTERN)),buttonManager.over(actionModel.getFirstMenuButton()),actionModel.focusMenu())}),document.observe("key:up",function(e){e.element();if(layoutModule.isVisible(layoutModule.MENU_ID)){Event.stop(e);var t=$(layoutModule.MENU_ID).select("."+layoutModule.HOVERED_CLASS)[0];if(t){var i=t.up(layoutModule.MENU_LIST_PATTERN),n=getPreviousNonMatchingSibling(i,layoutModule.SEPARATOR_PATTERN)||actionModel.getMenuParent();n&&(buttonManager.out(t),buttonManager.over(n.down(layoutModule.BUTTON_PATTERN)),n.focus())}}}),document.observe("key:left",function(e){var t,i=(e.element(),$(layoutModule.MAIN_NAVIGATION_ID)),n=i&&i.select("."+layoutModule.HOVERED_CLASS)[0];if(n){Event.stop(e);var s=n.up(layoutModule.NAVIGATION_PATTERN),o=getPreviousMatchingSibling(s,layoutModule.NAVIGATION_PATTERN);o&&(actionModel.hideMenu(),buttonManager.out(n),buttonManager.over(o.down(layoutModule.BUTTON_PATTERN)),o.focus(),t=matchMeOrUp(o,layoutModule.NAVIGATION_MUTTON_PATTERN),t&&primaryNavModule.showNavButtonMenu(e,t))}}),document.observe("key:right",function(e){var t,i=(e.element(),$(layoutModule.MAIN_NAVIGATION_ID)),n=i&&i.select("."+layoutModule.HOVERED_CLASS)[0];if(n){Event.stop(e);var s=n.up(layoutModule.NAVIGATION_PATTERN),o=getNextMatchingSibling(s,layoutModule.NAVIGATION_PATTERN);o&&(actionModel.hideMenu(),buttonManager.out(n),buttonManager.over(o.down(layoutModule.BUTTON_PATTERN)),o.focus(),t=matchMeOrUp(o,layoutModule.NAVIGATION_MUTTON_PATTERN),t&&primaryNavModule.showNavButtonMenu(e,t))}}),define("core.key.events",["jquery","prototype","utils.common","core.layout"],function(e){return function(){var t;return t||e.keyManager}}(this));var dynamicTree={trees:{},nodes:{},treeNodeEdited:null,editaborted:!1,activeTreeId:null,Tree:function(e,t){this.id=e,t?(this.setRootNode(t.root),this.bShowRoot=!!t.bShowRoot,this.handleNodeOnDblclick=void 0!==t.handleNodeOnDblclick?t.handleNodeOnDblclick:!0,this.multiSelectEnabled=!!t.multiSelectEnabled,this.showAllNodesOnStartup=!!t.showAllNodesOnStartup,this.treeClassName=t.treeClassName?t.treeClassName:"",this.dragPattern=t.dragPattern,this.dragClasses=t.dragClasses,this.dropClasses=t.dropClasses,this.selectOnMousedown=t.selectOnMousedown,this.regionID=t.regionID,this.scroll=t.scroll,this.templateDomId=t.templateDomId?t.templateDomId:this.DEFAULT_TREE_TEMPLATE_ID):(this.templateDomId=this.DEFAULT_TREE_TEMPLATE_ID,this.handleNodeOnDblclick=!0),this.stateObject={},this.sortNodes=!0,this.sorters=[this.sortByOrder,this.sortByName],this.selectedNodes=[],this.TREE_NN_ITEMS_SELECTED="#{count} items selected",dynamicTree.trees[this.id]=this,this._createFromTemplate(),this.refreshStyle(),this._registerEvents(),this._registerCustomScroll()},getNextId:function(){var e=1;return function(){return e++}}(),getActiveTree:function(){return dynamicTree.trees[dynamicTree.activeTreeId]},getTreeNode:function(e){return dynamicTree.nodes[e]},getStorageVal:function(e){var t=JSON.parse(window.localStorage.getItem("dynamicTree"))||{};return t[e]||null},setStorageVal:function(e,t){var i=window.localStorage,n=JSON.parse(i.getItem("dynamicTree"))||{};n[e]=t;try{i.setItem("dynamicTree",JSON.stringify(n))}catch(s){window.console&&console.log(s)}},_templateHash:{}};dynamicTree.Tree.addVar("DEFAULT_TREE_TEMPLATE_ID","list_responsive_collapsible"),dynamicTree.Tree.addVar("HIDE_ROOT_CLASS_NAME","hideRoot"),dynamicTree.Tree.addMethod("getId",function(){return this.id}),dynamicTree.Tree.addMethod("_getElement",function(){return this._element||(this._element=$(this.id)),this._element}),dynamicTree.Tree.addMethod("_createFromTemplate",function(){this._getElement()&&(this._getElement().insert({after:this._getTemplateElement(this._getElement())}),this._getElement().remove(),this._element=null,this._getElement().update())}),dynamicTree.Tree.addMethod("_registerCustomScroll",function(){if(!this.scroll&&this._getElement()){var e=this._getElement().up(layoutModule.SWIPE_SCROLL_PATTERN);if(e){var t=layoutModule.scrolls.get(e.identify());t&&(this.scroll=t)}}}),dynamicTree.Tree.addMethod("setRootNode",function(e){this.rootNode=e,this.rootNode&&(this.rootNode.treeId=this.id)}),dynamicTree.Tree.addMethod("getRootNode",function(){return this.rootNode}),dynamicTree.Tree.addMethod("refreshStyle",function(){var e=this._getElement();e.templateClassName&&(e.className=e.templateClassName),this.treeClassName&&e.addClassName(this.treeClassName),this.bShowRoot?e.removeClassName(this.HIDE_ROOT_CLASS_NAME):e.addClassName(this.HIDE_ROOT_CLASS_NAME)}),dynamicTree.Tree.addMethod("resetSelected",function(){this._prevSelectedNodes=this.selectedNodes.clone(),this.selectedNodes=[]}),dynamicTree.Tree.addMethod("revertSelection",function(){var e=this._prevSelectedNodes.clone();e=e.concat(this.selectedNodes),this.selectedNodes=this._prevSelectedNodes.clone();for(var t=0;t<e.length;t++)e[t].refreshStyle()}),dynamicTree.Tree.addMethod("getSelectedNode",function(){return 0==this.selectedNodes.length?null:this.selectedNodes[0]}),dynamicTree.Tree.addMethod("addNodeToSelected",function(e){this.selectedNodes.push(e),this._prevSelectedNodes=this.selectedNodes.clone()}),dynamicTree.Tree.addMethod("removeNodeFromSelected",function(e){for(var t=0;t<this.selectedNodes.length;t++)if(this.selectedNodes[t]==e)return this._prevSelectedNodes=this.selectedNodes.clone(),void this.selectedNodes.splice(t,1)}),dynamicTree.Tree.addMethod("isNodeSelected",function(e){var t=this.selectedNodes&&this.selectedNodes.length;if(t)for(var i=0;t>i;i++)if(this.selectedNodes[i]==e)return!0;return!1}),dynamicTree.Tree.addMethod("resortSubtree",function(e){if(e){e.resortChilds();for(var t=0;t<e.childs.length;t++)this.resortSubtree(e.childs[t])}}),dynamicTree.Tree.addMethod("resortTree",function(){this.sortNodes&&this.resortSubtree(this.rootNode)}),dynamicTree.Tree.addMethod("readStates",function(){var e=dynamicTree.getStorageVal("tree"+this.id);if(e)for(var t in e)this.stateObject[t]=e[t]}),dynamicTree.Tree.addMethod("getState",function(e){var t,i=this.stateObject;return i[e]?(t=i[e],(null==t||""==t)&&(t=dynamicTree.TreeNode.State.CLOSED),t):dynamicTree.TreeNode.State.CLOSED}),dynamicTree.Tree.addMethod("writeStates",function(e,t){var i={},n=this.stateObject;for(var s in n)i[s]=n[s];n[e]=t,null!=t&&(i[e]=t),dynamicTree.setStorageVal("tree"+this.id,i)}),dynamicTree.Tree.addMethod("resetStates",function(){this.stateObject={},dynamicTree.setStorageVal("tree"+this.id,"")}),dynamicTree.Tree.addMethod("comparer",function(e,t){var i,n;if(this.sorters&&this.sorters.length)for(i=0;i<this.sorters.length;i++)if(n=this.sorters[i](e,t),0!=n)return n;return 0}),dynamicTree.Tree.addMethod("renderTree",function(){this.readStates(),this.stopWaiting(),this.refreshStyle();var e=this._getElement();this.rootNode&&(this.writeStates(this.rootNode.id,dynamicTree.TreeNode.State.OPEN),this.rootNode.showNode(),this.rootNode.render(e),this.refreshScroll())}),dynamicTree.Tree.addMethod("refreshScroll",function(e){e?setTimeout(function(){this.scroll&&this.scroll.refresh()}.bind(this),e):this.scroll&&this.scroll.refresh()}),dynamicTree.Tree.addMethod("binarySearchOfNode",function(e,t){for(var i=0,n=e.length-1;n>=i;){var s=Math.round((i+n)/2),o=e[s];if(this.comparer(o,t)<0)i=s+1;else{if(!(this.comparer(o,t)>0))return s;n=s-1}}return-(i+1)}),dynamicTree.Tree.addMethod("_deselectAllNodes",function(e){if(this.selectedNodes.length>0){var t=this.selectedNodes.clone();this.resetSelected();for(var i=0;i<t.length;i++)t[i].refreshStyle();if(e){var n=dynamicTree.trees[this.id];n.fireUnSelectAllEvent(e)}}}),dynamicTree.Tree.addMethod("_selectOrEditNode",function(e,t,i,n,s){var o=t.isSelected()&&s,r=this.multiSelectEnabled&&t.isSelected()&&i&&!o,a=t.isSelected()&&dynamicTree.treeNodeEdited!==t&&!this.multiSelectEnabled&&!i&&!o,l=null!=dynamicTree.treeNodeEdited&&(d||r),c=this.multiSelectEnabled&&!t.isSelected()&&n&&isNotNullORUndefined(this._lastSelectedNode)&&this._lastSelectedNode.parent===t.parent,u=this.multiSelectEnabled&&t.isSelected()&&n&&isNotNullORUndefined(this._lastSelectedNode)&&this._lastSelectedNode.parent===t.parent,d=!this.multiSelectEnabled&&!t.isSelected()||this.multiSelectEnabled&&!i&&!t.isSelected(),h=!t.isSelected()||d&&this.selectedNodes.length>1;if(n&&this._lastSelectedNode||(this._lastSelectedNode=t),r&&t.deselect(e),d&&this._deselectAllNodes(e),a)return void t.edit(e);if(l&&dynamicTree.treeNodeEdited.doEndEdit(e),c||u)var p=t.parent,f=p.childs.indexOf(this._lastSelectedNode),m=p.childs.indexOf(t),g=Math.min(f,m),v=Math.max(f,m);if(c)if(g>-1)for(var _=g;v>=_;_++)p.childs[_].select(e);else p.childs[v].select(e);else if(u){for(var _=0;g>_;_++)p.childs[_].deselect(e);for(var _=v+1;_<p.childs.length;_++)p.childs[_].deselect(e)}else h&&t.select(e,t.nofocus)}),dynamicTree.Tree.addMethod("_deselectOthers",function(e,t,i,n,s){var o=this.multiSelectEnabled&&this.selectedNodes.length>1&&t.isSelected()&&!(i||n||s);o&&this.selectedNodes.findAll(function(e){return e!=t}.bind(this)).invoke("deselect",e)}),dynamicTree.Tree.addMethod("_selectNextNode",function(e,t){function i(e){return e=e.parent,!e&&null||e.nextSibling||i(e)}var n=e.isOpen()&&e.getFirstChild()||e.nextSibling||i(e);n&&e.deselect()&&n.select(t)}),dynamicTree.Tree.addMethod("_selectPreviousNode",function(e,t){function i(e){return!(e.isOpen()&&e.hasChilds())&&e||i(e.getLastChild())}var n=e.prevSibling&&i(e.prevSibling)||e.parent;n&&e.deselect()&&n.select(t)}),dynamicTree.Tree.addMethod("_selectInwards",function(e,t){var i=e.isOpen()&&e.getFirstChild();i?e.deselect()&&i.select(t):e.handleNode(t)}),dynamicTree.Tree.addMethod("_selectOutwards",function(e,t){if(!e.isHiddenRootNode()){var i=e.isOpen()?null:e.parent;i?e.deselect()&&i.select(t):e.handleNode(t)}}),dynamicTree.Tree.addMethod("sortByOrder",function(e,t){var i=e.orderNumber,n=t.orderNumber;return null==i&&null==n?0:null==i?1:null==n?-1:i-n}),dynamicTree.Tree.addMethod("sortByName",function(e,t){var i=e.name.toLowerCase(),n=t.name.toLowerCase();return i>n?1:n>i?-1:0}),dynamicTree.Tree.addVar("TREE_WAIT_TEMPLATE_DOM_ID","list_responsive_collapsible:loading"),dynamicTree.Tree.addMethod("wait",function(){$(this.id).update($(this.TREE_WAIT_TEMPLATE_DOM_ID).cloneNode(!0))}),dynamicTree.Tree.addMethod("stopWaiting",function(){$(this.id).update("")}),dynamicTree.Tree.addMethod("_getTemplateElement",function(e){var t=this.templateDomId,i=$(t).cloneNode(!0);return i.writeAttribute("id",this.getId()),i.templateId=t,i.templateClassName=i.className,cloneCustomAttributes(e,i),i}),define("dynamicTree.tree",["prototype","dragdrop.extra","touchcontroller","utils.common","core.layout","json3"],function(e){return function(){var t;return t||e.dynamicTree}}(this)),dynamicTree.TreeNode=function(e){this.id=dynamicTree.getNextId(),this.treeId=null,this.name=null!=e.name?e.name:this.DEFAULT_NAME,this.param=null!=e.param?e.param:{},this.orderNumber=null!=e.orderNumber?e.orderNumber:null,this.childs=[],this.parent=null,this.Types={Folder:new dynamicTree.TreeNode.Type(this.FOLDER_TYPE_NAME)},this.isloaded=!1,this.delayedRendering=!0,this.haschilds=!1,this.editable=!1,this.isWaiting=!1,this.hidden=!1,this.isDropTarget=!1,dynamicTree.nodes[this.id]=this},dynamicTree.TreeNode.Type=function(e,t){this.name=e,t&&(this.cssClassName=t.cssClassName,this.templateDomId=t.templateDomId)},dynamicTree.TreeNode.State={OPEN:"open",CLOSED:"closed"},dynamicTree.TreeNode.addVar("FOLDER_TYPE_NAME","com.jaspersoft.jasperserver.api.metadata.common.domain.Folder"),dynamicTree.TreeNode.addVar("DEFAULT_NAME","unset name"),dynamicTree.TreeNode.addVar("NODE_ID_PREFIX","node"),dynamicTree.TreeNode.addVar("SUB_NODE_ID_SUFFIX","sub"),dynamicTree.TreeNode.addVar("HANDLER_ID_PREFIX","handler"),dynamicTree.TreeNode.addVar("NODE_CLASS_NAME","node").addVar("LEAF_CLASS_NAME","leaf").addVar("OPEN_CLASS_NAME","open").addVar("CLOSED_CLASS_NAME","closed").addVar("SELECTED_CLASS_NAME","selected").addVar("LOADING_CLASS_NAME","loading").addVar("ROOTS_CLASS_NAME","roots"),dynamicTree.TreeNode.addVar("nodeHeaderTemplateDomId","list_responsive_collapsible:leaf"),dynamicTree.TreeNode.addVar("nodeFooterTemplateDomId","list_responsive_collapsible"),dynamicTree.TreeNode.addVar("nodeInputTemplateDomId","list_responsive_collapsible:input"),dynamicTree.TreeNode.addVar("isSelectable",!1),dynamicTree.TreeNode.addMethod("getTreeId",function(){return this.treeId||this.parent&&this.parent.getTreeId()}),dynamicTree.TreeNode.addMethod("getState",function(){return dynamicTree.trees[this.getTreeId()].getState(this.id)}),dynamicTree.TreeNode.addMethod("isParent",function(){return this.param.type==this.Types.Folder.name}),dynamicTree.TreeNode.addMethod("addChild",function(e){if(this.isParent()){var t=this.childs[this.childs.length-1];t&&(t.nextSibling=e,e.prevSibling=t),this.childs.push(e),e.parent=this,this.resortChilds(),this.delayedRendering||(e.showNode(),e.render(this._getChildrenElement(),e.nextSibling))}}),dynamicTree.TreeNode.addMethod("removeChild",function(e){for(var t=0;t<this.childs.length;t++)if(this.childs[t]==e){this.childs.splice(t,1);break}if(e.deselect(),!this.delayedRendering){var i=e._getElement();i&&i.remove()}}),dynamicTree.TreeNode.addMethod("resortChilds",function(){var e=this.getTreeId(),t=dynamicTree.trees[e];if(t&&t.sortNodes&&isArray(this.childs)){this.childs.sort(function(e,i){return t.comparer(e,i)});for(var i=this.childs.length;i--;){var n=this.childs[i];n.prevSibling=this.childs[i-1],n.nextSibling=this.childs[i+1]}}}),dynamicTree.TreeNode.addMethod("resetChilds",function(){this.childs=[]}),dynamicTree.TreeNode.addMethod("setHasChilds",function(e){this.haschilds=e}),dynamicTree.TreeNode.addMethod("hasChilds",function(){return this.haschilds?!0:this.getChildCount()>0}),dynamicTree.TreeNode.addMethod("getChildCount",function(){return this.childs.length}),dynamicTree.TreeNode.addMethod("getFirstChild",function(){return this.hasChilds()?this.childs[0]:null}),dynamicTree.TreeNode.addMethod("getLastChild",function(){return this.hasChilds()?this.childs[this.childs.length-1]:null}),dynamicTree.TreeNode.addMethod("_getElement",function(){return this._element||(this._element=$(this.NODE_ID_PREFIX+this.id)),this._element}),dynamicTree.TreeNode.addMethod("_getTitle",function(){var e=this._getElement().childElements()[0];e.cleanWhitespace();var t=e.childNodes[e.childNodes.length-1];return"#text"!==t.nodeName&&(t=document.createTextNode(""),e.appendChild(t)),t}),dynamicTree.TreeNode.addMethod("_getTitleInputElement",function(){return $(this._getElement().getElementsByTagName("input")[0])}),dynamicTree.TreeNode.addMethod("_getChildrenElement",function(){return this._childrenElement||(this._childrenElement=$(this.NODE_ID_PREFIX+this.id+this.SUB_NODE_ID_SUFFIX)),this._childrenElement}),dynamicTree.TreeNode.addMethod("isOpen",function(){return this.getState()===dynamicTree.TreeNode.State.OPEN}),dynamicTree.TreeNode.addMethod("changeName",function(e){this.name=e,this._getTitle().data=this.name}),dynamicTree.TreeNode.addMethod("getType",function(){for(var e in this.Types)if(this.param.type===this.Types[e].name)return this.Types[e];return void 0}),dynamicTree.TreeNode.addMethod("refreshStyle",function(e){if(e=$(e)||this._getElement()){e.templateClassName&&(e.className=e.templateClassName),this.isParent()?(e.addClassName(this.NODE_CLASS_NAME).removeClassName(this.LEAF_CLASS_NAME),this.isWaiting||(this.isOpen()?e.addClassName(this.OPEN_CLASS_NAME).removeClassName(this.CLOSED_CLASS_NAME):e.addClassName(this.CLOSED_CLASS_NAME).removeClassName(this.OPEN_CLASS_NAME))):e.addClassName(this.LEAF_CLASS_NAME).removeClassName(this.NODE_CLASS_NAME),this.isWaiting?e.addClassName(this.LOADING_CLASS_NAME):e.removeClassName(this.LOADING_CLASS_NAME),this.isSelected()?e.addClassName(this.SELECTED_CLASS_NAME):e.removeClassName(this.SELECTED_CLASS_NAME),this.hidden?e.addClassName(layoutModule.HIDDEN_CLASS):e.removeClassName(layoutModule.HIDDEN_CLASS),this.param.cssClass&&e.addClassName(this.param.cssClass);
  var t=this.getType();t&&t.cssClassName&&e.addClassName(t.cssClassName);var i=e.down();this.isDropTarget&&i&&i.addClassName(layoutModule.DROP_TARGET_CLASS),!this.isDropTarget&&i&&i.removeClassName(layoutModule.DROP_TARGET_CLASS)}}),dynamicTree.TreeNode.addMethod("_createNode",function(){var e=this.id,t=dynamicTree.trees[this.getTreeId()],i=this._getHeaderTemplateElement();i.id=this.NODE_ID_PREFIX+e,i.tabIndex=-1,this.refreshStyle(i),this.treeId=t.id,i.treeNode=this;var n=i.childElements()[0];n.insert(this.name),null!=this.tooltip&&this.tooltip.length>0&&(n.title=this.tooltip),n.childElements().each(function(t,i){0===i&&(t.id=this.HANDLER_ID_PREFIX+e);var n=this.iconTooltip;n&&(t.title=isArray(n)?n[i]:n)}.bind(this)),this._element=i}),dynamicTree.TreeNode.addMethod("_createNodeChildren",function(){var e=this._getFooterTemplateElement();e.id=this.NODE_ID_PREFIX+this.id+this.SUB_NODE_ID_SUFFIX,this._childrenElement=e}),dynamicTree.TreeNode.addMethod("showNode",function(e){var t=dynamicTree.trees[this.getTreeId()];if(this._createNode(),this.isParent()){var i=this.isOpen()||t.showAllNodesOnStartup;if(i){this._createNodeChildren();for(var n=0;n<this.getChildCount();n++)this.childs[n].showNode(this._getChildrenElement());this.delayedRendering=!1,t.fireOpenEvent(this)}}this.render(e)}),dynamicTree.TreeNode.addMethod("render",function(e,t){if(!Object.isUndefined(e)){var i=$(e);i&&(this._getChildrenElement()&&this._getElement().insert(this._getChildrenElement()),t?i.insert(this._getElement(),{before:t._getElement()}):i.insert(this._getElement()))}}),dynamicTree.TreeNode.addMethod("_renderChildren",function(){var e=this._getElement();e&&this._getChildrenElement()&&e.insert(this._getChildrenElement())}),dynamicTree.TreeNode.addMethod("refreshNode",function(){if(this.refreshStyle(),this.isParent()&&this.isOpen()&&this.isloaded){this.delayedRendering?(this._createNodeChildren(),this._renderChildren()):this._getChildrenElement().update("");for(var e=0;e<this.getChildCount();e++)this.childs[e].showNode(this._getChildrenElement());this.delayedRendering=!1}var t=dynamicTree.trees[this.getTreeId()];t.refreshScroll()}),dynamicTree.TreeNode.addMethod("wait",function(){this.isWaiting=!0,this.refreshStyle()}),dynamicTree.TreeNode.addMethod("stopWaiting",function(){this.isWaiting=!1,this.refreshStyle()}),dynamicTree.TreeNode.addMethod("isHiddenRootNode",function(){var e=dynamicTree.trees[this.getTreeId()];return e.rootNode==this&&!e.bShowRoot}),dynamicTree.TreeNode.addMethod("deselect",function(e){var t=dynamicTree.trees[this.getTreeId()];return t&&this.isSelected()?(t.removeNodeFromSelected(this),this.refreshStyle(),e&&t.fireUnSelectEvent(this,e),!0):!1}),dynamicTree.TreeNode.addMethod("select",function(e,t){if(!t&&this.focus(),this.isSelected())return!1;var i=dynamicTree.trees[this.getTreeId()];return i.addNodeToSelected(this),this.refreshStyle(),i.fireSelectEvent(this,e),!0}),dynamicTree.TreeNode.addMethod("focus",function(){!isIPad()&&this._getElement()&&this._getElement().focus()}),dynamicTree.TreeNode.addMethod("isSelected",function(){var e=dynamicTree.trees[this.getTreeId()];return e&&e.isNodeSelected(this)}),dynamicTree.TreeNode.addMethod("_removeTitle",function(){var e=this._getTitle();e.data="",$(e.parentNode).cleanWhitespace()}),dynamicTree.TreeNode.addMethod("edit",function(e){if(this.editable){if(dynamicTree.treeNodeEdited==this)return;dynamicTree.treeNodeEdited=this;var t=this.name,i=$(this._getTitle().parentNode),n=this._getInputTemplateElement();this._getTitle().data="",i.cleanWhitespace(),i.insert(n),n.value=this.name,n.focus(),n.select(e),n.onclick=function(e){cancelEventBubbling(e)},n.ondblclick=function(e){cancelEventBubbling(e)},n.onmousedown=function(e){cancelEventBubbling(e)},n.onmouseup=function(e){cancelEventBubbling(e)},n.onkeydown=function(e){var i=window.event?window.event:e;13==i.keyCode?(n.onblur=null,this.doEndEdit(i)):27==i.keyCode&&(n.onblur=null,n.value=t,this.doEndEdit(i))}.bindAsEventListener(this),n.onblur=function(e){this.doEndEdit(e)}.bindAsEventListener(this),dynamicTree.trees[this.getTreeId()].fireStartEditEvent(this,n)}}),dynamicTree.TreeNode.addMethod("doEndEdit",function(){this.editEnded(),dynamicTree.trees[this.getTreeId()].fireEndEditEvent(this)}),dynamicTree.TreeNode.addMethod("editEnded",function(){var e=dynamicTree.trees[this.getTreeId()];if(null!=dynamicTree.treeNodeEdited){var t=this._getTitleInputElement(),i=($(t.parentNode),t.value);if(i==dynamicTree.treeNodeEdited.name)return t.remove(),this._getTitle().data=dynamicTree.treeNodeEdited.name,void(dynamicTree.treeNodeEdited=null);e.fireEditEvent(dynamicTree.treeNodeEdited,i),dynamicTree.editaborted||(dynamicTree.treeNodeEdited.name=i,t.remove(),this._getTitle().data=i),dynamicTree.treeNodeEdited=null}}),dynamicTree.TreeNode.addMethod("scroll",function(e){var t=dynamicTree.trees[this.getTreeId()].rootNode._getElement(),i=$(e?e:t.parentNode),n=this._getElement();if(i){var s=i.clientHeight,o=i.clientWidth,r=i.scrollTop,a=i.scrollLeft,l=n.cumulativeOffset().top-i.cumulativeOffset().top,c=n.offsetLeft,u=n.clientHeight,d=n.clientWidth;l>r+s?i.scrollTop=l-(s/2-u/2):r>l+u&&(i.scrollTop=l-(s/2-u/2)),c>a+o?i.scrollLeft=c-(o/2-d/2):a>c+d&&(i.scrollTop=c-(o/2-d/2))}}),dynamicTree.TreeNode.addMethod("handleNode",function(e){if(this.isParent()){var t=dynamicTree.trees[this.getTreeId()];this.isOpen()?t.writeStates(this.id,dynamicTree.TreeNode.State.CLOSED):(t.writeStates(this.id,dynamicTree.TreeNode.State.OPEN),t.fireOpenEvent(this,e)),this.refreshNode()}}),dynamicTree.TreeNode.addMethod("openNode",function(e){if(this.isParent()){var t=dynamicTree.trees[this.getTreeId()];this.isOpen()||(t.writeStates(this.id,dynamicTree.TreeNode.State.OPEN),t.fireOpenEvent(this,e)),this.refreshNode()}}),dynamicTree.TreeNode.addMethod("_getHeaderTemplateElement",function(){var e=this.getType(),t=e&&e.templateDomId?e.templateDomId:this.nodeHeaderTemplateDomId,i=$(t).cloneNode(!0);return i.templateId=t,i.templateClassName=i.className,i}),dynamicTree.TreeNode.addMethod("_getFooterTemplateElement",function(){var e=this.nodeFooterTemplateDomId,t=$(e).cloneNode(!0);return t.templateId=e,t.update(""),t}),dynamicTree.TreeNode.addMethod("_getInputTemplateElement",function(){var e=this.nodeInputTemplateDomId,t=$(e).cloneNode(!0);return t.templateId=e,t}),define("dynamicTree.treenode",["prototype","dynamicTree.tree"],function(e){return function(){var t;return t||e.dynamicTree}}(this)),dynamicTree.Tree.addVar("NODE_PATTERN",".node").addVar("NODE_WRAPPER_PATTERN",".node > .wrap").addVar("NODE_ICON_PATTERN",".node > .wrap .icon").addVar("NODE_CUSTOM_PATTERNS",[]),dynamicTree.Tree.addVar("LEAF_PATTERN",".leaf").addVar("LEAF_WRAPPER_PATTERN",".leaf > .wrap").addVar("LEAF_ICON_PATTERN",".leaf > .wrap .icon").addVar("LEAF_CUSTOM_PATTERNS",[]),dynamicTree.Tree.addVar("EXPANDING_TIME",1e3),dynamicTree.Tree.addVar("draggables",[]),dynamicTree.Tree.addMethod("getTreeNodeByEvent",function(e){var t=Event.element(e);return this.getTreeNodeByElement(t)}),dynamicTree.Tree.addMethod("getTreeNodeByElement",function(e){for(;e&&e.readAttribute&&e.readAttribute("id")!==this.id;){var t=e.treeNode;if(t&&t.getTreeId()===this.getId())return t;e=$(e.parentNode)}return null}),dynamicTree.Tree.addMethod("isNodeEvent",function(e){var t=matchMeOrUp(e.element().parentNode,"LI");return t&&t.hasClassName(layoutModule.NODE_CLASS)}),dynamicTree.Tree.addMethod("isLeafEvent",function(e){var t=matchMeOrUp(e.element().parentNode,"LI");return t&&t.hasClassName(layoutModule.LEAF_CLASS)}),dynamicTree.Tree.addMethod("isIconEvent",function(e){return e.element().hasClassName(layoutModule.ICON_CLASS)}),dynamicTree.Tree.addMethod("_registerEvents",function(){this._cleanUpListeners(),this._registerClickEvents(),this._registerCustomEvents(),this._registerKeyEvents(),this._registerMouseEvents()}),dynamicTree.Tree.addMethod("_cleanUpListeners",function(){var e=this._getElement();e.stopObserving("click"),e.stopObserving("dblclick"),isSupportsTouch()?(e.stopObserving("touchstart"),e.stopObserving("drag:touchstart"),e.stopObserving("touchend")):(e.stopObserving("mousedown"),e.stopObserving("drag:mousedown"),e.stopObserving("mouseup")),e.stopObserving("mouseover"),e.stopObserving("mouseout")}),dynamicTree.Tree.addMethod("_registerClickEvents",function(){var e=this._getElement();e.observe("click",function(t){var i=matchMeOrUp(t.element(),layoutModule.BUTTON_PATTERN)&&this.getTreeNodeByEvent(t);if(i){var n=this.isIconEvent(t),s=this.isNodeEvent(t),o=this.isLeafEvent(t);s?(n&&e.fire("nodeIcon:click",{targetEvent:t,node:i}),e.fire("node:click",{targetEvent:t,node:i})):o&&(n&&e.fire("nodeIcon:click",{targetEvent:t,node:i}),e.fire("leaf:click",{targetEvent:t,node:i})),!isIPad()&&s&&n&&i.handleNode(t)}}.bindAsEventListener(this)),e.observe("dblclick",function(t){var i=matchMeOrUp(t.element(),layoutModule.BUTTON_PATTERN)&&this.getTreeNodeByEvent(t);if(i){var n=this.isIconEvent(t),s=this.isNodeEvent(t),o=this.isLeafEvent(t);s?(n&&e.fire("nodeIcon:dblclick",{targetEvent:t,node:i}),e.fire("node:dblclick",{targetEvent:t,node:i})):o&&(n&&e.fire("leafIcon:dblclick",{targetEvent:t,node:i}),e.fire("leaf:dblclick",{targetEvent:t,node:i})),this.handleNodeOnDblclick&&(s||o)&&!n&&i.handleNode(t)}}.bindAsEventListener(this))}),dynamicTree.Tree.addMethod("_registerMouseEvents",function(){var e=this._getElement();e.observe(isSupportsTouch()?"touchstart":"mousedown",function(t){var i=t.element(),n=matchMeOrUp(i,layoutModule.BUTTON_PATTERN)&&this.getTreeNodeByEvent(t);if(n){t.treeEvent=!0;var s=this.isIconEvent(t),o=this.isNodeEvent(t),r=this.isLeafEvent(t);if(isSupportsTouch())if(JRS.vars.ajax_in_progress)alert("please wait");else if(this.twofingers=!1,2==t.touches.length&&(this.twofingers=!0,this._selectOrEditNode(t,n,isMetaHeld(t),isShiftHeld(t),isRightClick(t)),n.isSelected()||designerBase&&designerBase.isInSelection(n))){var a=jQuery(i).parents("li:first");return void(a.hasClass("selected")&&document.fire(layoutModule.ELEMENT_CONTEXTMENU,{targetEvent:t,node:i}))}isSupportsTouch()&&JRS.vars.ajax_in_progress||(!this.selectOnMousedown||isSupportsTouch()&&1!=t.touches.length||this._selectOrEditNode(t,n,isMetaHeld(t),isShiftHeld(t),isRightClick(t)),o?(s&&e.fire("nodeIcon:mousedown",{targetEvent:t,node:n}),e.fire("node:mousedown",{targetEvent:t,node:n})):r&&(s&&e.fire("leafIcon:mousedown",{targetEvent:t,node:n}),e.fire("leaf:mousedown",{targetEvent:t,node:n})))}}.bindAsEventListener(this)),e.observe(isSupportsTouch()?"drag:touchstart":"drag:mousedown",function(t){var i=t.memo.targetEvent,n=matchMeOrUp(i.element(),layoutModule.BUTTON_PATTERN)&&this.getTreeNodeByEvent(i);if(n){i.treeEvent=!0;var s=this.isIconEvent(i),o=this.isNodeEvent(i),r=this.isLeafEvent(i);this.selectOnMousedown&&!isRightClick(i)&&this._selectOrEditNode(i,n,isMetaHeld(i),isShiftHeld(i),isRightClick(i)),o?(s&&e.fire("nodeIcon.drag:mousedown",{targetEvent:i,node:n}),e.fire("node.drag:mousedown",{targetEvent:i,node:n})):r&&(s&&e.fire("leafIcon.drag:mousedown",{targetEvent:i,node:n}),e.fire("leaf.drag:mousedown",{targetEvent:i,node:n}))}}.bindAsEventListener(this)),e.observe(isSupportsTouch()?"touchend":"mouseup",function(t){var i=matchMeOrUp(t.element(),layoutModule.BUTTON_PATTERN)&&this.getTreeNodeByEvent(t);if(i){t.treeEvent=!0;var n=this.isIconEvent(t),s=this.isNodeEvent(t),o=this.isLeafEvent(t);if(this.twofingers&&(t.isEmulatedRightClick=!0),isSupportsTouch()&&!this.twofingers&&(this.clickid==i.id&&!JRS.vars.ajax_in_progress&&t.timeStamp-this.clicktime<700&&(s?(n&&e.fire("nodeIcon:dblclick",{targetEvent:t,node:i}),e.fire("node:dblclick",{targetEvent:t,node:i})):o&&(n&&e.fire("leafIcon:dblclick",{targetEvent:t,node:i}),e.fire("leaf:dblclick",{targetEvent:t,node:i})),this.handleNodeOnDblclick&&(s||o)&&!n&&i.handleNode(t)),this.clicktime=t.timeStamp,this.clickid=i.id),!isSupportsTouch()||!JRS.vars.ajax_in_progress){this.selectOnMousedown||TouchController.element_scrolled||isSupportsTouch()&&1!=t.changedTouches.length||this._selectOrEditNode(t,i,isMetaHeld(t),isShiftHeld(t),isRightClick(t)),this._deselectOthers(t,i,isMetaHeld(t),isShiftHeld(t),isRightClick(t));s?(n&&e.fire("nodeIcon:mouseup",{targetEvent:t,node:i}),e.fire("node:mouseup",{targetEvent:t,node:i})):o&&(n&&e.fire("leafIcon:mouseup",{targetEvent:t,node:i}),e.fire("leaf:mouseup",{targetEvent:t,node:i})),isSupportsTouch()&&s&&n&&!TouchController.element_scrolled&&i.handleNode(t)}}}.bindAsEventListener(this)),"createTouch"in document||(e.observe("mouseover",function(t){var i=t.element(),n=matchMeOrUp(i,layoutModule.BUTTON_PATTERN)&&this.getTreeNodeByEvent(t);n&&(Draggables.dragging&&(clearTimeout(this.timeout_id),this.timeout_id=setTimeout(function(e){n.openNode(e)},this.EXPANDING_TIME)),this.createDraggableIfNeeded(t,n),!isIE7()&&e.fire("tree:mouseover",{targetEvent:t,node:n}))}.bindAsEventListener(this)),isIE7()||e.observe("mouseout",function(t){var i=matchMeOrUp(t.element(),layoutModule.BUTTON_PATTERN)&&this.getTreeNodeByEvent(t);i&&e.fire("tree:mouseout",{targetEvent:t,node:i})}.bindAsEventListener(this))),Droppables.add(e,{accept:this.dropClasses,onDrop:function(e){this.elementDropped=e}.bind(this)})}),dynamicTree.Tree.addMethod("_registerKeyEvents",function(){var e=this._getElement();e.observe("key:down",function(e){var t=this.getTreeNodeByEvent(e);dynamicTree.treeNodeEdited!==t&&t&&this._selectNextNode(t,e.memo.targetEvent)}.bindAsEventListener(this)),e.observe("key:up",function(e){var t=this.getTreeNodeByEvent(e);dynamicTree.treeNodeEdited!==t&&t&&this._selectPreviousNode(t,e.memo.targetEvent)}.bindAsEventListener(this)),e.observe("key:right",function(e){var t=this.getTreeNodeByEvent(e);dynamicTree.treeNodeEdited!==t&&t&&this._selectInwards(t,e.memo.targetEvent)}.bindAsEventListener(this)),e.observe("key:left",function(e){var t=this.getTreeNodeByEvent(e);dynamicTree.treeNodeEdited!==t&&t&&this._selectOutwards(t,e.memo.targetEvent)}.bindAsEventListener(this))}),dynamicTree.Tree.addMethod("_registerCustomEvents",function(){var e=this._getElement();e.observe("mousedown",function(t){dynamicTree.activeTreeId&&dynamicTree.activeTreeId===this.getId()||(e.fire("tree:blur",{targetEvent:t,tree:dynamicTree.getActiveTree()}),dynamicTree.activeTreeId=this.getId(),e.fire("tree:focus",{targetEvent:t,tree:dynamicTree.getActiveTree()}))}.bindAsEventListener(this)),e.observe("mouseover",function(t){var i=this.getTreeNodeByEvent(t);i||e.fire("tree:mouseover",{targetEvent:t,tree:this})}.bindAsEventListener(this)),e.observe("mouseout",function(t){var i=this.getTreeNodeByEvent(t);i||e.fire("tree:mouseout",{targetEvent:t,tree:this})}.bindAsEventListener(this))}),dynamicTree.Tree.addMethod("fireOpenEvent",function(e,t){var i=this._getElement();i.fire("node:open",{node:e,targetEvent:t})}),dynamicTree.Tree.addMethod("fireSelectEvent",function(e,t){var i=this._getElement();i.fire(e.isParent()?"node:selected":"leaf:selected",{node:e,targetEvent:t})}),dynamicTree.Tree.addMethod("fireUnSelectEvent",function(e,t){var i=this._getElement();i.fire(e.isParent()?"node:unselected":"leaf:unselected",{node:e,targetEvent:t})}),dynamicTree.Tree.addMethod("fireUnSelectAllEvent",function(e){var t=this._getElement();t.fire("items:unselected",{targetEvent:e})}),dynamicTree.Tree.addMethod("fireEditEvent",function(e,t){var i=this._getElement();i.fire(e.isParent()?"node:edit":"leaf:edit",{node:e,newValue:t})}),dynamicTree.Tree.addMethod("fireStartEditEvent",function(e,t){var i=this._getElement();i.fire(e.isParent()?"node:startEdit":"leaf:startEdit",{node:e,input:t})}),dynamicTree.Tree.addMethod("fireEndEditEvent",function(e){var t=this._getElement();t.fire(e.isParent()?"node:endEdit":"leaf:endEdit",{node:e})}),dynamicTree.Tree.addMethod("observe",function(e,t){this._getElement().observe(e,t)}),dynamicTree.Tree.addMethod("stopObserving",function(e,t){this._getElement().stopObserving(e,t)}),dynamicTree.Tree.addMethod("createDraggableIfNeeded",function(e,t){var i=e?e.element():t._getElement().down(this.dragPattern),n=this.draggables[i.identify()];if(this.dragPattern&&!n){var s=matchAny(i,[this.dragPattern],!0);if(s&&i.className.toLowerCase().indexOf("icon")<0&&!this.draggables[s.identify()])return this.draggables[s.identify()]=new Draggable(i,{superghosting:!0,mouseOffset:!0,delay:isIE()||isSupportsTouch()?200:0,onStart:this.setDragStartState.bind(this,t),onEnd:this.setDragEndState.bind(this,t)}),this.draggables[s.identify()]}return null}),dynamicTree.Tree.addMethod("setDragStartState",function(e,t){var i=e._getElement().templateClassName;i&&t.element.addClassName(i),t.element.setStyle({width:null,height:null}),t.element.addClassName(layoutModule.DRAGGING_CLASS).addClassName(this.getId()),this.dragClasses&&t.element.addClassName(this.dragClasses),this.selectedNodes.length>1&&t.element.update(new Template(this.TREE_NN_ITEMS_SELECTED).evaluate({count:this.selectedNodes.length})),t.element.node=e,t.element.nodes=this.selectedNodes,t.options.scroll=this._getElement(),t.options.scrollSensitivity=layoutModule.SCROLL_SENSITIVITY,Draggables.dragging=this.regionID||!0}),dynamicTree.Tree.addMethod("setDragEndState",function(){delete Draggables.dragging}),define("dynamicTree.events",["prototype","dynamicTree.tree"],function(e){return function(){var t;return t||e.dynamicTree}}(this)),dynamicTree.TreeSupport=function(e,t){if(dynamicTree.Tree.call(this,e,t),this.providerId=t.providerId,this.hideLoader=t.hideLoader,this.rootUri=Object.isUndefined(t.rootUri)?"/":t.rootUri,this.nodeClass=t.nodeClass&&Object.isFunction(t.nodeClass)?t.nodeClass:dynamicTree.TreeNode,t.rootObjectModifier&&(this.modifyRootObject=t.rootObjectModifier),this.resetStatesOnShow=Object.isUndefined(t.resetStatesOnShow)||t.resetStatesOnShow,this.inInit=!0,this.ajaxBufferId="ajaxbuffer",this.nodeTextId="treeNodeText",this.urlGetNode=t.urlGetNode?t.urlGetNode:this._getFlowUrl("getNode"),this.urlGetChildren=t.urlGetChildren?t.urlGetChildren:this._getFlowUrl("getChildren"),this.urlGetMultipleChildren=t.urlGetMultipleChildren?t.urlGetMultipleChildren:this._getFlowUrl("getMultipleChildren"),this.urlGetMessage=t.urlGetMessage?t.urlGetMessage:this._getFlowUrl("getMessage"),this.additionalParams=t.additionalParams?t.additionalParams:{},null==this.TREE_NN_ITEMS_SELECTED){var i=function(e){this.TREE_NN_ITEMS_SELECTED=e}.bind(this);this.getMessage("TREE_NN_ITEMS_SELECTED",i,null)}this._initOpenListener()},dynamicTree.TreeSupport.prototype=deepClone(dynamicTree.Tree.prototype),dynamicTree.TreeSupport.addMethod("_initOpenListener",function(){this.observe("node:open",function(e){var t=e.memo.node;t&&!t.isloaded&&this.getTreeNodeChildren(t)}.bindAsEventListener(this))}),dynamicTree.TreeSupport.addMethod("stopObserving",function(e,t){this._getElement().stopObserving(e,t),"node:open"!==e||t||this._initOpenListener()}),dynamicTree.TreeSupport.addMethod("_getFlowUrl",function(e){return __jrsConfigs__.contextPath+"/flow.html?_flowId=treeFlow&method="+e}),dynamicTree.TreeSupport.addMethod("showTree",function(e,t,i,n){var s=this.urlGetNode+"&provider="+this.providerId+"&uri="+this.rootUri+"&depth="+e;n&&(s+="&forceHtmlEscape=true"),s+="&"+this._evaluateAdditionalParams(),this._showTree(s,t,i)}),dynamicTree.TreeSupport.addMethod("_evaluateAdditionalParams",function(){var e=this.additionalParams;return _.isFunction(e)&&(e=e.call(null)),_.isObject(e)?Object.toQueryString(e):null}),dynamicTree.TreeSupport.addMethod("showTreePrefetchNodes",function(e,t,i){var n=this.urlGetNode+"&provider="+this.providerId+"&uri="+this.rootUri;e&&(n+="&prefetch="+encodeURIComponent(e)),n+="&"+this._evaluateAdditionalParams(),this._showTree(n,t,i)}),dynamicTree.TreeSupport.addMethod("_showTree",function(e,t,i){this.inInit=!0,this.wait();var n=function(e,t,i){return function(){return e.showTreeCallback(t,i)}}(this,t,i);ajaxTargettedUpdate(e,{fillLocation:this.ajaxBufferId,callback:n,errorHandler:baseErrorHandler,hideLoader:this.hideLoader})}),dynamicTree.TreeSupport.addMethod("showTreeCallback",function(e,t){var i=document.getElementById(this.nodeTextId);if(null==i)return void(t?t():this.fireServerErrorEvent());var n=i.innerHTML.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").evalJSON();this.modifyRootObject&&(n=this.modifyRootObject(n,!1)),i=document.getElementById(this.ajaxBufferId),i.innerHTML="",this.setRootNode(this.processNode(n)),this.resortTree(),this.resetStatesOnShow&&this.resetStates(),this.renderTree(),this.inInit=!1,e?e():this.fireTreeLoadedEvent({tree:this})}),dynamicTree.TreeSupport.addMethod("processNode",function(e){var t={};t.id=e.id,t.type=e.type,t.uri=e.uri,t.extra=deepClone(e.extra),e.cssClass&&(t.cssClass=e.cssClass);var i=this.nodeClass,n=new i({name:unescapeBackslash(e.label),param:t,orderNumber:e.order});e.tooltip&&(n.tooltip=e.tooltip);var s=e.children;if(null!=s){var o=s.length;if(0==o)n.setHasChilds(!1);else for(var r=0;o>r;r++){var a=s[r];if(a){var l=this.processNode(a);n.addChild(l)}}n.isloaded=!0}return n}),dynamicTree.TreeSupport.addMethod("getTreeNodeChildren",function(e,t,i){var n=e.param.uri,s=function(e,t,i,n){return function(){return e.getTreeNodeChildrenCallback(t,i,n)}}(this,e.id,t,i),o=function(t){(500==t.status||t.getResponseHeader("JasperServerError"))&&e.stopWaiting(),baseErrorHandler(t)};ajaxTargettedUpdate(this.urlGetChildren+"&provider="+this.providerId+"&uri="+encodeURIComponent(encodeURIComponent(n))+"&"+this._evaluateAdditionalParams(),{fillLocation:this.ajaxBufferId,callback:s,errorHandler:o,hideLoader:this.hideLoader}),this.inInit||e.wait()}),dynamicTree.TreeSupport.addMethod("getTreeNodeChildrenCallback",function(e,t,i){var n=document.getElementById(this.nodeTextId);if(null==n)return void(i?i():this.fireServerErrorEvent());var s=window.eval("("+n.innerHTML.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")+")"),o=dynamicTree.nodes[e];this.modifyRootObject&&(s=this.modifyRootObject(s,!0,o)),n=document.getElementById(this.ajaxBufferId),n.innerHTML="",o.resetChilds(),o.stopWaiting();var r=s.length;if(0==r)o.setHasChilds(!1);else{var a=o.getTreeId(),l=a?dynamicTree.trees[a]:null,c=l?l.sortNodes:null;l&&(l.sortNodes=!1);for(var u=0;r>u;u++){var d=this.processNode(s[u]);o.addChild(d)}l&&(l.sortNodes=c,o.resortChilds())}o.isloaded=!0,o.refreshNode(),t?t(o.childs):this.fireChildrenLoadedEvent(o.childs)}),dynamicTree.TreeSupport.addMethod("getTreeMultipleNodesChildren",function(e,t,i){var n,s="",o=[];if(e&&e.length)for(n=0;n<e.length;n++)n>0&&(s+=","),s+=encodeURIComponent(encodeURIComponent(e[n].param.uri)),o[n]=e[n].id;if(s.length){var r=function(e,t,i,n){return function(){return e.getTreeMultipleNodesChildrenCallback(t,i,n)}}(this,o,t,i);if(ajaxTargettedUpdate(this.urlGetMultipleChildren+"&provider="+this.providerId,{fillLocation:this.ajaxBufferId,callback:r,postData:"uris="+s,errorHandler:baseErrorHandler,hideLoader:this.hideLoader}),!this.inInit)for(n=0;n<e.length;n++)e[n].wait()}}),dynamicTree.TreeSupport.addMethod("getTreeMultipleNodesChildrenCallback",function(e,t,i){var n=document.getElementById(this.nodeTextId);if(null==n)return void(i?i():this.fireServerErrorEvent());var s=window.eval("("+n.innerHTML.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")+")");n=document.getElementById(this.ajaxBufferId),n.innerHTML="",t?t(e,s):(this.setMultipleNodesChilden(e,s),this.fireMultipleChildrenLoadedEvent(e,s))}),dynamicTree.TreeSupport.addMethod("setMultipleNodesChilden",function(e,t,i){if(e&&t)for(var n=0;n<t.length;n++){for(var s=t[n],o=s.children,r=null,a=0;a<e.length;a++){var l=dynamicTree.nodes[e[a]];if(l.param.uri==s.parentUri){r=l;break}}if(r){r.resetChilds(),r.stopWaiting();var c=o.length;if(0==c)r.setHasChilds(!1);else{var u=r.getTreeId(),d=u?dynamicTree.trees[u]:null,h=d?d.sortNodes:null;d&&(d.sortNodes=!1);for(var p=0;c>p;p++){var f=this.processNode(o[p]);r.addChild(f)}d&&(d.sortNodes=h,r.resortChilds())}r.isloaded=!0,i||r.refreshNode()}}}),dynamicTree.TreeSupport.addMethod("getTreeNodeChildrenPrefetched",function(e,t,i,n,s,o,r){var a=e.param.uri,l=this.urlGetNode+"&provider="+this.providerId+"&uri="+a,c="";t&&(c="&prefetch="+t),s&&(l+="&depth="+s);var u=function(e,t,i,n,s,o){return function(){return e.getTreeNodeChildrenPrefetchedCallback(t,i,n,s,o)}}(this,e.id,i,n,o,r);ajaxTargettedUpdate(l,{fillLocation:this.ajaxBufferId,callback:u,postData:c,errorHandler:baseErrorHandler,hideLoader:this.hideLoader}),this.inInit||e.wait()}),dynamicTree.TreeSupport.addMethod("getTreeNodeChildrenPrefetchedCallback",function(e,t,i,n,s){var o=document.getElementById(this.nodeTextId);if(null==o)return void(i?i():this.fireServerErrorEvent());var r=window.eval("("+o.innerHTML.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")+")");o=document.getElementById(this.ajaxBufferId),o.innerHTML="";var a=dynamicTree.nodes[e];if(a.resetChilds(),a.stopWaiting(),r.children){var l=a.getTreeId(),c=l?dynamicTree.trees[l]:null,u=c?c.sortNodes:null;c&&(c.sortNodes=!1);for(var d=0;d<r.children.length;d++){var h=this.processNode(r.children[d]);a.addChild(h)}c&&(c.sortNodes=u,n||a.resortChilds())}a.isloaded=!0,s||a.refreshNode(),t?t():this.fireChildredPrefetchedLoadedEvent(a.childs)}),dynamicTree.TreeSupport.addMethod("openAndSelectNode",function(e,t,i){var n=function(e){if(e.parent){var t=dynamicTree.trees[e.getTreeId()];t&&t.rootNode!=e.parent&&t.getState(e.parent.id)==dynamicTree.TreeNode.State.CLOSED&&e.parent.handleNode()}e&&jQuery("#dataChooserSource").length&&(e.nofocus=!0),t._selectOrEditNode(void 0,e,!1)};this.processNodePath(e,n,i);var s=this.getSelectedNode();s&&s.scroll(),t&&t()}),dynamicTree.TreeSupport.addMethod("processNodePath",function(e,t,i){var n,s=e.split("/"),o=this.getRootNode();for(n=0;n<s.length;n++)if(s[n]){var r=o;if(o=this.findNodeChildByMetaName(o,s[n]),!o){if(!i)return;if(o=this.findNodeFirstNodeChildByAlphabeticalOrder(r),!o)return}t(o)}}),dynamicTree.TreeSupport.addMethod("findLastLoadedNode",function(e){var t={node:null},i=function(e){return function(t){e.node=t}}(t);return this.processNodePath(e,i),t.node}),dynamicTree.TreeSupport.addMethod("findNodeChildByMetaName",function(e,t){if(e.hasChilds())for(var i=0;i<e.childs.length;i++)if(e.childs[i].param.id==t)return e.childs[i];return null}),dynamicTree.TreeSupport.addMethod("findNodeFirstNodeChildByAlphabeticalOrder",function(e){var t=null,i=null;if(e.childs.length>0){t=e.childs[0].param.id,i=0;for(var n=null,s=null,o=1;o<e.childs.length;o++){n=e.childs[o].param.id,s=o;for(var r=n.length<t.length?n.length:t.length,a=0;r>a;a++){if(n.charCodeAt(a)<t.charCodeAt(a)){t=n,i=s;break}if(n.charCodeAt(a)>t.charCodeAt(a))break}}return e.childs[i]}return null}),dynamicTree.TreeSupport.addMethod("findNodeById",function(e,t){return function i(e,t){if(!t||!e)return null;if(t.param.id===e)return t;if(t.hasChilds())for(var n=0;n<t.childs.length;++n){var s=i(e,t.childs[n]);if(s)return s}return null}(e,t?t:this.getRootNode())}),dynamicTree.TreeSupport.addMethod("hasVisibleFolders",function(e){if(this.bShowRoot)return!0;var t=e.children;if(t)for(var i=0;i<t.length;i++){var n=e.children[i].children;if(n&&n.length>0)return!0}return!1}),dynamicTree.TreeSupport.addMethod("getMessage",function(e,t,i){var n=this.urlGetMessage+"&messageId="+e,s=function(e,t,i){return function(){return e.getMessageCallback(t,i)}}(this,t,i);ajaxTargettedUpdate(n,{fillLocation:this.ajaxBufferId,callback:s,errorHandler:baseErrorHandler,hideLoader:this.hideLoader})}),dynamicTree.TreeSupport.addMethod("getMessageCallback",function(e,t){var i=document.getElementById(this.ajaxBufferId);if(null==i)return void(t&&t());var n=trim(i.innerHTML);i.innerHTML="",e&&e(n)}),dynamicTree.TreeSupport.addMethod("fireServerErrorEvent",function(){this._getElement().fire("server:error",{})}),dynamicTree.TreeSupport.addMethod("fireTreeLoadedEvent",function(e){this._getElement().fire("tree:loaded",{tree:e})}),dynamicTree.TreeSupport.addMethod("fireChildrenLoadedEvent",function(e){this._getElement().fire("children:loaded",{nodes:e})}),dynamicTree.TreeSupport.addMethod("fireMultipleChildrenLoadedEvent",function(e,t){this._getElement().fire("multipleChildren:loaded",{parentNodeIds:e,metaNodes:t})}),dynamicTree.TreeSupport.addMethod("fireChildredPrefetchedLoadedEvent",function(e){this._getElement().fire("childredPrefetched:loaded",{nodes:e})}),define("components.dynamicTree",["prototype","dynamicTree.tree","dynamicTree.treenode","dynamicTree.events","core.ajax"],function(e){return function(){var t;return t||e.dynamicTree}}(this)),dynamicTree.RepositoryFolder=function(e){dynamicTree.TreeNode.call(this,e),this.Types={Folder:new dynamicTree.TreeNode.Type("com.jaspersoft.jasperserver.api.metadata.common.domain.Folder"),SuperRoot:new dynamicTree.TreeNode.Type("superroot"),Root:new dynamicTree.TreeNode.Type("root")},this.nodeHeaderTemplateDomId="list_responsive_collapsible_folders:folders",this.param.extra&&this.param.extra.isActiveThemeFolder&&(this.param.cssClass=this.ACTIVE_THEME_CLASS)},dynamicTree.TreeNode&&(dynamicTree.RepositoryFolder.prototype=deepClone(dynamicTree.TreeNode.prototype)),dynamicTree.RepositoryFolder.addVar("ACTIVE_THEME_CLASS","activeTheme"),dynamicTree.RepositoryFolder.addMethod("isParent",function(){return this.param.type==this.Types.Folder.name||this.param.type==this.Types.SuperRoot.name||this.param.type==this.Types.Root.name}),dynamicTree.RepositoryFolder.addMethod("isSuperRoot",function(){return this.param.type==this.Types.SuperRoot.name}),dynamicTree.RepositoryFolder.addMethod("isPublic",function(){return"public"===this.param.id}),dynamicTree.createRepositoryTree=function(e,t){var i=null!=t.organizationId&&""!==t.organizationId;null==t.bShowRoot&&(t.bShowRoot=!i),t.nodeClass||(t.nodeClass=dynamicTree.RepositoryFolder),t.templateDomId="list_responsive_collapsible_folders";var n=new dynamicTree.TreeSupport(e,t);if(n.organizationId=t.organizationId,n.publicFolderUri=t.publicFolderUri,n.orgMode=i,n.modifyRootObject=function(e,t,i){var n;if(t){n=[];for(var s=0;s<e.length;s++)e[s].uri==this.publicFolderUri&&i&&"/"!=i.param.uri||n.push(e[s])}else if(this.orgMode&&null!=e.children){for(var o,r=e.children,a=[],s=0;s<r.length;s++)r[s].uri==this.publicFolderUri?o=r[s]:a.push(r[s]);e.children=a,n={type:"superroot",label:"",extra:{}},n.children=[e,o]}else n=e;return n},n.getRootNode=function(){var e=this.rootNode;return e.isSuperRoot()?e.childs[0].isPublic()?e.childs[1]:e.childs[0]:e},n.findNodeChildByMetaName=function(e,t){if(e.isSuperRoot()){var i,s;if(e.childs[0].isPublic()?(i=e.childs[0],s=e.childs[1]):(i=e.childs[1],s=e.childs[0]),"public"===t)return i;e=s}if(e.hasChilds())for(var o=0;o<e.childs.length;o++)if(e.childs[o].param.id==t)return e.childs[o];return"public"==t&&e.parent&&e.parent.isSuperRoot()?n.findNodeChildByMetaName(e.parent,t):null},isIPad()){var s=$(e);n.touchController=new TouchController(s,s.up(1),{absolute:!0})}return n},define("dynamicTree.utils",["components.dynamicTree","touchcontroller","dynamicTree.treenode"],function(e){return function(){var t;return t||e.dynamicTree}}(this)),JRS.ViewQueryDialog=function(e){var t=function(t){this.template=e(t.id),this.selectionContainer=t.selectionContainer,this.updateContent(t.content),this.registerEvents()};return t.fn=t.prototype,t.fn.close=function(){disableSelectionWithoutCursorStyle(this.selectionContainer),dialogs.popup.hide(this.template.get(0))},t.fn.show=function(){enableSelection(this.selectionContainer),dialogs.popup.show(this.template.get(0))},t.fn.updateContent=function(t){e(".content .body textarea",this.template).html(t)},t.fn.registerEvents=function(){e(".button",this.template).on("click",e.proxy(this.close,this))},t}(jQuery),JRS.SaveAsDialog=function(e,t){return function(i){function n(t){var i=e(t.templateMatcher);return u.cloneTemplate&&(i=i.clone()),u.cloneTemplate&&u.elementId&&i.attr("id",t.elementId),e(u.insertAfterMatcher).append(i),i.on("keydown",function(e){u.grabKeydownEvents&&e.stopPropagation(),e.keyCode==Event.KEY_ESC&&d.close()}),i}function s(e,t){var i={};for(inputName in t.inputMatchers)t.inputMatchers.hasOwnProperty(inputName)&&(i[inputName]=e.find(t.inputMatchers[inputName]));
  return i}function o(e){for(inputName in p)p.hasOwnProperty(inputName)&&(e[inputName]=p[inputName].val());if(m){var t=m.getSelectedNode();t?(e.folder=t.param.uri,e.isFolderWritable=t.param.extra?t.param.extra.isWritable:!0):e.folder=null}g&&(t=g.getSelectedNode(),t?(e.reportFolder=t.param.uri,e.isReportFolderWritable=t.param.extra?t.param.extra.isWritable:!0):e.reportFolder=null)}function r(e){e.stopPropagation(),o(f),u.prepareState&&u.prepareState(f),u.validator(f)&&u.saveHandler(f).then(function(){d.close()})}function a(e){e.stopPropagation(),d.close()}function l(e){var i=e.attr("id"),n=t.createRepositoryTree(i,{providerId:"adhocRepositoryTreeFoldersProvider",rootUri:"/",organizationId:u.organizationId,publicFolderUri:u.publicFolderUri,urlGetNode:"flow.html?_flowId=adhocTreeFlow&method=getNode",urlGetChildren:"flow.html?_flowId=adhocTreeFlow&method=getChildren",treeErrorHandlerFn:function(){}}),s=n.modifyRootObject;return n.modifyRootObject=function(e,t,i,o){for(var r=t?e:e.children,a=0,l=r.length;l>a;a++)r[a].extra.isWritable||(r[a].cssClass="readonly"),r[a].children&&n.modifyRootObject(r[a],!1,r[a],!0);return t?e=r:e.children=r,o?void 0:s.call(this,e,t,i)},n}var c={templateMatcher:"#saveAs",insertAfterMatcher:"#frame",cloneTemplate:!1,elementId:null,okButtonMatcher:".saveButton",cancelButtonMatcher:".cancelButton",inputMatchers:{name:".resourceName",description:".resourceDescription"},foldersTreeMatcher:"#saveDataViewFoldersTree",reportFoldersTreeMatcher:"#saveReportFoldersTree",organizationId:"",publicFolderUri:"/public",grabKeydownEvents:!0,validator:function(){return!0},saveHandler:function(){var t=e.Deferred();return t.resolve(),t}},u=e.extend({},c,i),d=this,h=n(u);this.dialogElement=h;var p=s(h,u);this.inputElements=p;var f={folder:null,isFolderWritable:!1,reportFolder:null,isReportFolderWritable:!1},m=null,g=null,v=h.find(u.foldersTreeMatcher),y=h.find(u.reportFoldersTreeMatcher);this.foldersTree=v,this.reportFoldersTree=y,this.open=function(t){f=t,dialogs.popup.show(h.get(0));for(inputName in p)if(p.hasOwnProperty(inputName)){var i=p[inputName],n=f[inputName];if(i[0]&&"SELECT"==i[0].tagName.toUpperCase()&&_.isArray(n)){i.empty();var s;_.each(n,function(e){s=new Option(e.label,e.id),s.id=e.id,i.append(s)})}else i.val(f[inputName])}h.find(u.okButtonMatcher).click(r),h.find(u.cancelButtonMatcher).click(a);var o=e.Deferred(),c=f.folder&&f.reportFolder?0:1;return f.folder&&(m=l(v),m.showTreePrefetchNodes(f.folder,function(){c++,f.folder&&m.openAndSelectNode(f.folder),2==c&&o.resolve()})),f.reportFolder&&y.length>0&&(g=l(y),g.showTreePrefetchNodes(f.reportFolder,function(){c++,g.openAndSelectNode(f.reportFolder),2==c&&o.resolve()})),o},this.close=function(){h.find(u.okButtonMatcher).unbind("click",r),h.find(u.cancelButtonMatcher).unbind("click",a),dialogs.popup.hide(h.get(0))}}}(jQuery,dynamicTree),JRS.RepositorySelectionDialog=function(e,t){var i={idsPrefix:"repSelDialog_",templateMatcher:"#repositorySelectionDialog",insertAfterMatcher:"#frame",okButtonMatcher:".okButton",cancelButtonMatcher:".cancelButton",repositoryTreeMatcher:"ul.repositoryTree",organizationId:"",publicFolderUri:"/public",treeFlowId:"treeFlow",treeProviderId:"repositoryExplorerTreeFoldersProvider",uriOnCancel:null,selectionValidationMessage:"Item not selected",acceptOnlyLeaf:!0,okHandler:function(){var t=e.Deferred();return t.resolve(),t}};return function(n){function s(t){var i=e(t.templateMatcher).clone();return a.elementId&&i.attr("id",t.elementId),e(a.insertAfterMatcher).append(i),i}function o(e){e.stopPropagation();var t=l._repositoryTree.getSelectedNode();if(!t||a.acceptOnlyLeaf&&t.isParent())return void alert(a.selectionValidationMessage);var i=a.okHandler(t.param.uri);i?i.then(function(){l.close()}):l.close()}function r(e){e.stopPropagation(),l.close(),a.uriOnCancel&&(document.location=a.uriOnCancel)}var a=e.extend({},i,n),l=this;this._createRepositoryTree=function(){var e=a.idsPrefix+"repTree";this.$repositoryTree.attr("id",e);var i=t.createRepositoryTree(e,{providerId:a.treeProviderId,rootUri:"/",organizationId:a.organizationId,publicFolderUri:a.publicFolderUri,urlGetNode:"flow.html?_flowId="+a.treeFlowId+"&method=getNode",urlGetChildren:"flow.html?_flowId="+a.treeFlowId+"&method=getChildren",treeErrorHandlerFn:function(){}});return i},this.init=function(){this.$dialogElement=s(a),this.$repositoryTree=this.$dialogElement.find(a.repositoryTreeMatcher),this.$dialogElement.find(a.okButtonMatcher).click(o),this.$dialogElement.find(a.cancelButtonMatcher).click(r)},this.open=function(){function t(e){if(e.isParent())for(var i=0;i<e.childs.length;i++)t(e.childs[i]);else"com.jaspersoft.ji.adhoc.AdhocDataView"==e.param.type&&(e.param.cssClass="adhocDataView",e.refreshStyle())}dialogs.popup.show(this.$dialogElement.get(0),!0),this._repositoryTree=this._createRepositoryTree();var i=e.Deferred();return this._repositoryTree.observe("children:loaded",function(e){var i=e.memo.nodes;i.each(function(e){t(e)})}),this._repositoryTree.showTreePrefetchNodes("/",function(){l._repositoryTree.openAndSelectNode("/"),i.resolve()}),this._repositoryTree.observe("leaf:dblclick",o),i},this.close=function(){dialogs.popup.hide(this.$dialogElement.get(0))},this.init()}}(jQuery,dynamicTree),JRS.GeneratorPropertiesDialog=function(e,t){function i(e){var t=dynamicTree.createRepositoryTree(e.treeId,{providerId:e.treeProviderId,rootUri:"/",organizationId:e.organizationId,publicFolderUri:e.publicFolderUri,urlGetNode:"flow.html?_flowId="+e.treeFlowId+"&method=getNode",urlGetChildren:"flow.html?_flowId="+e.treeFlowId+"&method=getChildren",treeErrorHandlerFn:function(){}});return t}var n={id:"reportGeneratorProperties",treeId:"advLocationTree",treeFlowId:"adhocTreeFlow",treeProviderId:"adhocDataViewsTreeDataProvider",organizationId:t.organizationId,publicFolderUri:t.publicFolderUri,advUri:void 0,reportGenerators:null,messages:{}},s=function(o){this.opts=jQuery.extend({},n,o),this.template=e("#"+this.opts.id),this.customGenerators=t.commonReportGeneratorsMetadata||[],this.registerEvents(),_.isUndefined(this.opts.advUri)?(e("#advTreePanel").removeClass(layoutModule.HIDDEN_CLASS),e("#reportGeneratorProperties").addClass(s.WITH_TREE_CLASS),this._tree=i(this.opts)):e("#reportGeneratorProperties").removeClass(s.WITH_TREE_CLASS),this._generatorSelect=new JRS.generatorSelect({id:"commonGeneratorSelect",parent:this.template.get(0),reportGenerators:this.customGenerators})};s.WITH_TREE_CLASS="withTree",s.NO_GENERATORS_CLASS=layoutModule.NO_GENERATORS_CLASS,s.fn=s.prototype,s.fn.show=function(){enableSelection(this.selectionContainer),0==this.customGenerators.length&&this.template.addClass(s.NO_GENERATORS_CLASS),dialogs.popup.show(this.template.get(0),!0);var e=o();e&&(e.template?this._generatorSelect.val(e.template,"TEMPLATE"):e.generator&&this._generatorSelect.val(e.generator,"GENERATOR"));var t=e&&e.sourceURI?e.sourceURI:"/",i=this._tree;i&&i.showTreePrefetchNodes(t,function(){e&&i.openAndSelectNode(t)})};var o=s.fn.store=function(e){var t=window.localStorage;if(!t)return null;if(!e){var i=t.getItem("reportGenerator");return i?JSON.parse(i):null}t.setItem("reportGenerator",JSON.stringify(e))},r=s.fn.ok=function(){var e=this.getValue();_.isUndefined(e.sourceURI)?alert(this.getMessage("advNotSelected")):_.isEmpty(e.template)&&"TEMPLATE"===this._generatorSelect.state?alert(this.getMessage("templateNotSelected")):(o(e),this.opts.okHandler&&this.opts.okHandler(e),this.close())},a=s.fn.close=function(){return disableSelectionWithoutCursorStyle(this.selectionContainer),dialogs.popup.hide(this.template.get(0)),this};return s.fn.getMessage=function(e){return this.opts.messages[e]},s.fn.getValue=function(){var e=this.opts.advUri;if(_.isUndefined(e)){var t=this._tree.getSelectedNode(),i=t&&"com.jaspersoft.ji.adhoc.AdhocDataView"==t.param.type;i&&(e=t.param.uri)}var n={sourceURI:e};return"TEMPLATE"===this._generatorSelect.state&&(n.template=this._generatorSelect.val()),"GENERATOR"===this._generatorSelect.state&&(n.generator=this._generatorSelect.val()),n},s.fn.registerEvents=function(){e("#reportGeneratorPropertiesBtnOk",this.template).on("click",e.proxy(r,this)),e("#reportGeneratorPropertiesBtnCancel",this.template).on("click",e.proxy(a,this))},s}(jQuery,__jrsConfigs__),JRS.generatorSelect=function(e,t,i){function n(t){return e("#"+t.options.id)}function s(t){t._radios=e("#"+t.options.id+" input[type="+_+"]").get();var i=t._radios.length;t._inputs=new Array(i);for(var n=0;i>n;n++){var s=t._radios[n].id,o=s.replace(g(_),""),r=e("#"+o);r.length>0&&(t._inputs[n]=r[0])}}function o(e){e.StateContract={},e._states=new Array(e._radios.length);var i=0;for(var n in y.StateContractPrototype){var s=t.clone(y.StateContractPrototype[n],!0);s.index=i,e.StateContract[n]=s,e._states[i]=n,i++}}function r(i,n){var s=i.StateContract.GENERATOR,o=e(i._inputs[s.index]);n&&n.length>0?(o.parents("li").removeClass("hidden"),t.each(n,function(t){o.append(e("<option />").val(t.id).text(t.label))})):o.parents("li").addClass("hidden")}function a(e){e.template.on("click",function(t){l(t.target)?e.refresh():c(t.target)&&m(e)})}function l(e){return e.type?"radio"==e.type:e.control&&"radio"==e.control.type}function c(e){return e.type&&"button"==e.type||"SPAN"==e.tagName&&"button"==e.parentNode.type}function u(t){e(t).attr("checked","checked")}function d(t){t=e(t);var i=t.parent();t.attr("disabled","disabled"),i.find("button").attr("disabled","disabled")}function h(t){t=e(t);var i=t.parent();t.attr("disabled",null),i.find("button").attr("disabled",null)}function p(t,i){e(t).val(i)}function f(t){return e(t).val()}function m(e){var t=e.StateContract[e.state],i=e._inputs[t.index];e._dialog||(e._dialog=new JRS.TemplateDialog({id:e.options.id+"TemplateDialog",parent:e.options.parent,okHandler:function(e){p(i,e)}})),e._dialog&&e._dialog.show(f(i))}function g(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}var v={id:"generatorSelect",defaultRadioIdPrefix:"DefaultTemplateRadio",customTemplateRadioIdPrefix:"CustomTemplateRadio",customGeneratorRadioIdPrefix:"CustomGeneratorRadio",reportGenerators:[{id:"custom",label:"Custom"}],treeId:"templateLocationTree",treeFlowId:"adhocTreeFlow",treeProviderId:"templateTreeDataProvider",organizationId:i.organizationId,publicFolderUri:i.publicFolderUri},_="radio",y=function(e){this.StateContract={},this.options=jQuery.extend({},v,e),this.template=n(this),this.state="DEFAULT",s(this),o(this),r(this,this.options.reportGenerators),a(this),this.refresh()};return y.fn=y.prototype,y.StateContractPrototype={DEFAULT:{index:0},TEMPLATE:{index:1},GENERATOR:{index:2}},y.fn.val=function(e,i){var n=this.StateContract[this.state];return t.isString(e)?(t.isString(i)&&t.has(this.StateContract,i)&&(n=this.StateContract[i]),u(this._radios[n.index]),p(this._inputs[n.index],e),this.refresh(),void 0):f(this._inputs[n.index])},y.fn.refresh=function(){for(var e=0;e<this._radios.length;e++)this._radios[e].checked?(h(this._inputs[e]),this.state=this._states[e]):d(this._inputs[e])},y.fn.hide=function(){this.template.addClass("hidden")},y.fn.show=function(){this.template.removeClass("hidden")},y}(jQuery,window._,__jrsConfigs__),JRS.TemplateDialog=function(e,t){function i(e){var t=dynamicTree.createRepositoryTree(e.treeId,{providerId:e.treeProviderId,rootUri:"/",organizationId:e.organizationId,publicFolderUri:e.publicFolderUri,urlGetNode:"flow.html?_flowId="+e.treeFlowId+"&method=getNode",urlGetChildren:"flow.html?_flowId="+e.treeFlowId+"&method=getChildren",treeErrorHandlerFn:function(){}});return t}var n=function(){return{treeId:"TemplateTree",treeFlowId:"adhocTreeFlow",treeProviderId:"templateTreeDataProvider",organizationId:t.organizationId,publicFolderUri:t.publicFolderUri,defaultTemplateUri:t.defaultTemplateUri}},s=function(t){this.opts=jQuery.extend({},n(),t),this.opts.treeId=this.opts.id+"Tree",this.template=e("#"+this.opts.id),this.registerEvents(),this._tree=i(this.opts)};s.fn=s.prototype,s.fn.show=function(e){dialogs.childPopup.show(this.template.get(0),!0,this.opts.parent);var t=this.opts.defaultTemplateUri||"/",i=this._tree;i.showTreePrefetchNodes(e||t,function(){i.openAndSelectNode(e||t)})};var o=s.fn.ok=function(){var e=this._tree.getSelectedNode(),t=e&&"com.jaspersoft.jasperserver.api.metadata.common.domain.FileResource"==e.param.type;t&&(this.opts.okHandler&&this.opts.okHandler(e.param.uri),this.close())},r=s.fn.close=function(){return disableSelectionWithoutCursorStyle(this.selectionContainer),dialogs.childPopup.hide(this.template.get(0)),this};return s.fn.registerEvents=function(){e("#"+this.opts.id+"OkTemplate",this.template).on("click",e.proxy(o,this)),e("#"+this.opts.id+"CloseTemplate",this.template).on("click",e.proxy(r,this))},s}(jQuery,__jrsConfigs__),define("dialog.definitions",["namespace","jquery","dynamicTree.utils"],function(e){return function(){var t;return t||e.JRS.RepositorySelectionDialog}}(this)),JRS.CreateReport=function(e,t){var i=null;return getDialog=function(e){return i||(i=new JRS.GeneratorPropertiesDialog({advUri:e,okHandler:JRS.CreateReport.showGeneratedReport,messages:t})),i},{showGeneratedReport:function(t){var i=e("#reportGeneratorForm");i.find("input[name=advUri]").val(t.sourceURI),i.find("input[name=template]").val(t.template||""),i.find("input[name=generator]").val(t.generator||""),i.submit()},selectADV:function(){getDialog().show()},selectGenerator:function(e){getDialog(e).show()}}}(jQuery,__jrsConfigs__),jQuery(function(){0==jQuery("#ajaxbuffer").length&&jQuery("body").append(jQuery('<div id="ajaxbuffer" style="display:none"></div>'))}),define("create.report",["namespace","jrs.configs","jquery","dialog.definitions"],function(e){return function(){var t;return t||e.JRS.CreateReport}}(this));var primaryNavModule={NAVIGATION_MENU_CLASS:"menu vertical dropDown",ACTION_MODEL_TAG:"navigationActionModel",CONTEXT_POSTFIX:"_mutton",NAVIGATION_MUTTON_DOM_ID:"navigation_mutton",NAVIGATION_MENU_PARENT_DOM_ID:"navigationOptions",JSON:null,navigationPaths:{browse:{url:"flow.html",params:"_flowId=searchFlow"},home:{url:"home.html"},library:{url:"flow.html",params:"_flowId=searchFlow&mode=library"},logOut:{url:"exituser.html"},search:{url:"flow.html",params:"_flowId=searchFlow&mode=search"},report:{url:"flow.html",params:"_flowId=searchFlow&mode=search&filterId=resourceTypeFilter&filterOption=resourceTypeFilter-reports&searchText="},olap:{url:"flow.html",params:"_flowId=searchFlow&mode=search&filterId=resourceTypeFilter&filterOption=resourceTypeFilter-view&searchText="},event:{url:"flow.html",params:"_flowId=logEventFlow"},samples:{url:"flow.html",params:"_flowId=sampleFlow&page=dialogs"},adminHome:{url:"flow.html",params:"_flowId=adminHomeFlow"},organization:{url:"flow.html",params:"_flowId=tenantFlow"},etl:{url:"etl"},mondrianProperties:{url:"olap/properties.html"},flush:{url:"olap/flush.html"},user:{url:"flow.html",params:"_flowId=userListFlow"},role:{url:"flow.html",params:"_flowId=roleListFlow"},analysisOptions:{url:"flow.html",params:"_flowId=mondrianPropertiesFlow"},designerOptions:{url:"flow.html",params:"_flowId=designerOptionsFlow"},designerCache:{url:"flow.html",params:"_flowId=designerCacheFlow"},awsSettings:{url:"flow.html",params:"_flowId=awsSettingsFlow"},designer:{url:"flow.html",params:"_flowId=adhocFlow"},dashboard:{url:"dashboard/designer.html"},legacyDashboard:{url:"flow.html",params:"_flowId=dashboardDesignerFlow&createNew=true"},domain:{url:"flow.html",params:"_flowId=createSLDatasourceFlow&ParentFolderUri="},dataSource:{url:"flow.html",params:"_flowId=addDataSourceFlow&ParentFolderUri="+encodeURIComponent("/datasources")},logSettings:{url:"log_settings.html"},createReport:{url:"view/view/modules/adhoc/createReport"}},bodyIds:{designer:"designerBase.confirmAndLeave",dashboardDesigner:"designerBase.confirmAndLeave",repoBrowse:"repositorySearch.confirmAndLeave",repoSearch:"repositorySearch.confirmAndLeave",manage_users:"orgModule.confirmAndLeave",manage_roles:"orgModule.confirmAndLeave",manage_orgs:"orgModule.confirmAndLeave",domainDesigner_tables:"domain.designer.confirmAndLeave",domainDesigner_derivedTables:"domain.designer.confirmAndLeave",domainDesigner_joins:"domain.designer.confirmAndLeave",domainDesigner_calculatedFields:"domain.designer.confirmAndLeave",domainDesigner_filters:"domain.designer.confirmAndLeave",domainDesigner_display:"domain.designer.confirmAndLeave",dataChooserDisplay:"domain.chooser.confirmAndLeave",dataChooserFields:"domain.chooser.confirmAndLeave",dataChooserPreFilters:"domain.chooser.confirmAndLeave",dataChooserSaveAsTopic:"domain.chooser.confirmAndLeave",reportViewer:"Report.confirmAndLeave"},globalActions:{logOut:function(e){return primaryNavModule.bodyIds[e]}},initializeNavigation:function(){var e,t,i;this.JSON=$("navigationActionModel").text?$("navigationActionModel").text.evalJSON():{};var n=/[A-Za-z]+[_]{1}[A-Za-z]+/;for(e in this.JSON)t=n.exec(e)[0],i=this.JSON[e][0],isNotNullORUndefined(i)&&this.createMutton(t,i.text)},createMutton:function(e,t){var i=$(this.NAVIGATION_MUTTON_DOM_ID).cloneNode("true"),n=$(i).down(".button");$(i).setAttribute("id",e);var s=document.createTextNode(t);n.appendChild(s);var o=$(this.NAVIGATION_MENU_PARENT_DOM_ID);o&&o.appendChild(i)},showNavButtonMenu:function(e,t){var i=jQuery(t).attr("id");actionModel.showDropDownMenu(e,t,i+this.CONTEXT_POSTFIX,this.NAVIGATION_MENU_CLASS,this.ACTION_MODEL_TAG),$("menu").parentId=i},isNavButton:function(e){return $(e).hasClassName("mutton")||$(e).hasClassName("icon")},setNewLocation:function(e,t){var i=this.navigationPaths[e],n=t||i.params;i&&(n=n?"?"+n:"",window.location.href=__jrsConfigs__.urlContext+"/"+i.url+n)},navigationOption:function(e){var t=$(document.body).readAttribute("id"),i=null;if(primaryNavModule.globalActions[e]?i=primaryNavModule.globalActions[e](t):primaryNavModule.bodyIds[t]&&(i=primaryNavModule.bodyIds[t]),i){var n=getAsFunction(i),s=n();if("function"==typeof s)return void s(function(){primaryNavModule.setNewLocation(e)});if(!s)return}primaryNavModule.setNewLocation(e)}};define("actionModel.primaryNavigation",["actionModel.modelGenerator"],function(e){return function(){var t;return t||e.primaryNavModule}}(this));var SearchBox=function(e){this._id=e.id,this._dom=$(this._id),this._enabled=!0,this._process(),this._assignHandlers()};SearchBox.addMethod("_process",function(){this._input=this._dom.select("input")[0],this._clearButton=this._dom.select(".button.searchClear")[0],this._searchButton=this._dom.select(".button.search")[0]}),SearchBox.addMethod("_assignHandlers",function(){this._dom.observe("submit",function(e){Event.stop(e)}),this._input.observe("keypress",this._keyPressHandler.bindAsEventListener(this)),this._clearButton.observe("click",this._clearHandler.bindAsEventListener(this)),this._searchButton.observe("click",this._searchHandler.bindAsEventListener(this))}),SearchBox.addMethod("_keyPressHandler",function(e){this._enabled&&Event.KEY_RETURN==e.keyCode&&(this._doSearch(),Event.stop(e))}),SearchBox.addMethod("_updateClearButtonVisibility",function(){this.getText().blank()?this._clearButton.removeClassName(layoutModule.UP_CLASS):this._clearButton.addClassName(layoutModule.UP_CLASS)}),SearchBox.addMethod("_clearHandler",function(){this._enabled&&(this.setText(""),this._doSearch())}),SearchBox.addMethod("_searchHandler",function(){this._enabled&&this._doSearch()}),SearchBox.addMethod("getText",function(){return this._input.getValue()}),SearchBox.addMethod("setText",function(e){this._input.setValue(e),this._updateClearButtonVisibility()}),SearchBox.addMethod("enable",function(){buttonManager.enable(this._clearButton),buttonManager.enable(this._searchButton),this._input.writeAttribute(layoutModule.READONLY_ATTR_NAME,null),this._dom.writeAttribute(layoutModule.DISABLED_ATTR_NAME,null),this._enabled=!0}),SearchBox.addMethod("disable",function(){buttonManager.disable(this._clearButton),buttonManager.disable(this._searchButton),this._input.writeAttribute(layoutModule.READONLY_ATTR_NAME,layoutModule.READONLY_ATTR_NAME),this._dom.writeAttribute(layoutModule.DISABLED_ATTR_NAME,layoutModule.DISABLED_ATTR_NAME),this._enabled=!1}),SearchBox.addMethod("_doSearch",function(){this._updateClearButtonVisibility(),this.onSearch(this.getText())}),SearchBox.addMethod("onSearch",function(){}),define("components.searchBox",["prototype","utils.common","core.events.bis"],function(e){return function(){var t;return t||e.SearchBox}}(this));var globalSearchBox={_searchBox:null,_containerId:"globalSearch",_searchInputId:"searchInput",initialize:function(){this._searchBox=new SearchBox({id:this._containerId}),this._searchBox.onSearch=function(e){$(this._searchInputId).setValue(e),primaryNavModule.navigationPaths.search.params+="&searchText="+encodeUriParameter(e),primaryNavModule.navigationOption("search")}.bind(this)},setText:function(e){this._searchBox.setText(e)}};define("repository.search.globalSearchBoxInit",["prototype","actionModel.primaryNavigation","components.searchBox"],function(e){return function(){var t;return t||e.globalSearchBox}}(this)),define("commons.main",["require","!domReady","json3","commons.minimal.main","namespace","core.accessibility","core.events.bis","core.key.events","create.report","actionModel.modelGenerator","actionModel.primaryNavigation","repository.search.globalSearchBoxInit","core.layout","jrs.configs"],function(e){var t=e("!domReady");e("json3"),e("commons.minimal.main"),e("namespace"),e("core.accessibility"),e("core.events.bis"),e("core.key.events"),e("create.report");var i=e("actionModel.modelGenerator"),n=e("actionModel.primaryNavigation"),s=e("repository.search.globalSearchBoxInit"),o=e("core.layout"),r=e("jrs.configs");t(function(){o.initialize(),n.initializeNavigation(),i.initializeOneTimeMenuHandlers(),r.initAdditionalUIComponents&&s.initialize(),document.fire("dom:loaded")})});var bWidth=1,bHeight=1,sWidth=0,sHeight=0,posX=0,posY=0,subobj,i,j,k,k0,nl,al,al0,n,a,a0,t,argv,childWin,saveAsViewName,images,links,helpElement,inputs;document.observe("dom:loaded",function(){if(initialize(),webHelpModule.setCurrentContext("analysis"),isIPad()){var e=$("olapViewForm");new TouchController(e,e.up(),{absolute:!0})}}),define("jpivot.jaPro",["prototype","utils.common"],function(e){return function(){var t;return t||e.bWidth}}(this)),define("olap.view.main",["require","wcf.scroll","jpivot.jaPro"],function(e){e("wcf.scroll"),e("jpivot.jaPro")}),define("olap.view.page",["require","commons.main","olap.view.main"],function(e){e("commons.main"),e("olap.view.main")});