Melissa_Plugin - Version 1.2.3

Version Notes

Download this release

Release Info

Developer Sebastian Enger
Extension Melissa_Plugin
Version 1.2.3
Comparing to
See all releases


Code changes from version 1.2 to 1.2.3

app/code/local/Melissa/Plugin/Helper/Data.php~ ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ class Melissa_Plugin_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+ }
5
+ ?>
app/code/local/Melissa/Plugin/controllers/IndexController.php~ ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Melissa_Plugin_IndexController extends Mage_Core_Controller_Front_Action{
3
+ public function indexAction(){
4
+ $this->loadLayout();
5
+ $this->renderLayout();
6
+ }
7
+ public function mamethodeAction(){
8
+ echo ‘test mamethode’;
9
+ }
10
+ }
11
+ ?>
app/code/local/Melissa/Plugin/etc/config.xml CHANGED
@@ -6,14 +6,14 @@ Melissa Data Plugin for Magento: Config XML Library
6
  Author: Sebastian Enger, M.Sc. //"Liebe besiegt Alles".
7
  Contact: Sebastian.Enger@MelissaData.com
8
  Phone: +49 30 80 933 178-2
9
- Last Modified: 2016-08-03//14:30pm
10
  */
11
  -->
12
 
13
  <config>
14
  <modules>
15
  <Melissa_Plugin>
16
- <version>1.2</version>
17
  <depends>
18
  <!-- no dependencies -->
19
  </depends>
@@ -22,7 +22,7 @@ Last Modified: 2016-08-03//14:30pm
22
  <default>
23
  <catalog>
24
  <backend>
25
- <version>1.2</version>
26
  <gaws>1</gaws>
27
  <gee>1</gee>
28
  <email>1</email>
6
  Author: Sebastian Enger, M.Sc. //"Liebe besiegt Alles".
7
  Contact: Sebastian.Enger@MelissaData.com
8
  Phone: +49 30 80 933 178-2
9
+ Last Modified: 2016-08-17//11:30pm
10
  */
11
  -->
12
 
13
  <config>
14
  <modules>
15
  <Melissa_Plugin>
16
+ <version>1.2.3</version>
17
  <depends>
18
  <!-- no dependencies -->
19
  </depends>
22
  <default>
23
  <catalog>
24
  <backend>
25
+ <version>1.2.3</version>
26
  <gaws>1</gaws>
27
  <gee>1</gee>
28
  <email>1</email>
app/code/local/Melissa/Plugin/etc/config.xml~ ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+
3
+ <!--
4
+ /**
5
+ * Melissa Data - Magento Plugin
6
+ *
7
+ * @category MelissaData
8
+ * @package MelissaData
9
+ * @copyright MelissaData.com
10
+ * @copyright 2016 - Sebastian Enger / Melissa Data
11
+ */
12
+ -->
13
+
14
+ <config>
15
+ <modules>
16
+ <Melissa_Plugin>
17
+ <version>1.0.0</version>
18
+ </Melissa_Plugin>
19
+ </modules>
20
+
21
+ <frontend>
22
+ <layout>
23
+ <updates>
24
+ <show_melissaglobaladdress module="Melissa_Plugin">
25
+ <file>show_melissaglobaladdress.xml</file>
26
+ </show_melissaglobaladdress>
27
+ </updates>
28
+ </layout>
29
+ <routers>
30
+ <melissaglobaladdress>
31
+ <use>standard</use>
32
+ <args>
33
+ <module>Melissa_Plugin</module>
34
+ <frontName>melissaglobaladdress</frontName>
35
+ </args>
36
+ </melissaglobaladdress>
37
+ </routers>
38
+ </frontend>
39
+ <!--
40
+ <frontend>
41
+ <layout>
42
+ <updates>
43
+ <melissa_plugin module="Melissa_Plugin">
44
+ <file>layout.xml</file>
45
+ </melissa_plugin>
46
+ </updates>
47
+ </layout>
48
+ </frontend>
49
+ -->
50
+ </config>
app/code/local/Melissa/Plugin/etc/system.xml CHANGED
@@ -5,7 +5,7 @@ Melissa Data Plugin for Magento: System XML Library
5
  Author: Sebastian Enger, M.Sc. //"Liebe besiegt Alles".
6
  Contact: Sebastian.Enger@MelissaData.com
7
  Phone: +49 30 80 933 178-2
8
- Last Modified: 2016-08-03//14:30pm
9
  */
10
  -->
11
  <config>
5
  Author: Sebastian Enger, M.Sc. //"Liebe besiegt Alles".
6
  Contact: Sebastian.Enger@MelissaData.com
7
  Phone: +49 30 80 933 178-2
8
+ Last Modified: 2016-08-17//11:30pm
9
  */
10
  -->
11
  <config>
app/design/frontend/base/default/layout/layout.xml~ ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * Global Layout Overrides to add custom structure blocks to layout template files
5
+ *
6
+ * @category My
7
+ * @package My_LayoutMods
8
+ * @copyright Copyright (c) 2013 August Ash, Inc. (http://www.augustash.com)
9
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
10
+ */
11
+ -->
12
+ <layout version="0.1.0">
13
+ <!--==============================================
14
+ Default layout, loads most of the pages
15
+ ===============================================-->
16
+ <default>
17
+ <reference name="root">
18
+ <!-- <block type="core/template" name="custom_title" template="page/melissa_plugin.phtml" /> --> <!-- Token Server Support -->
19
+ <block type="core/text_list" name="newreference" as="newreference"/>
20
+ </reference>
21
+ <reference name="newreference">
22
+ <block type="core/template" name="newReferenceBlock" template="page/melissa_plugin.phtml" />
23
+ </reference>
24
+ </default>
25
+ <!--==============================================
26
+ END Default
27
+ ===============================================-->
28
+ </layout>
29
+
30
+
app/design/frontend/base/default/layout/local.xml CHANGED
@@ -9,7 +9,10 @@
9
  <script>melissadata/Magento.js</script>
10
  <params><![CDATA[name="js9999_last"]]></params>
11
  </action>
12
- <block type="core/template" name="newReferenceBlock" template="page/melissa_plugin.phtml" />
 
 
 
13
  </reference>
14
  <!--
15
  <reference name="root">
9
  <script>melissadata/Magento.js</script>
10
  <params><![CDATA[name="js9999_last"]]></params>
11
  </action>
12
+ <action method="addCss">
13
+ <script>melissadata/Magento.css</script>
14
+ </action>
15
+ <block type="core/template" name="newReferenceBlock" template="page/melissa_plugin.phtml" />
16
  </reference>
17
  <!--
18
  <reference name="root">
app/design/frontend/base/default/layout/local.xml~ ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="1.0.0">
3
+ <default>
4
+ <reference name="head">
5
+ <!-- <action method="addJs"><script>melissadata/jquery.min.js</script></action> -->
6
+ <!-- <action method="addJs"><script>melissadata/jquery-ui.min.js</script></action> -->
7
+ <!-- <action method="addJs"><script>melissadata/js.cookie.min.js</script></action> -->
8
+ <action method="addJs">
9
+ <script>melissadata/Magento.js</script>
10
+ <params><![CDATA[name="js9999_last"]]></params>
11
+ </action>
12
+ </reference>
13
+ <!--
14
+ <reference name="root">
15
+ <block type="core/text_list" name="newreference" as="newreference"/>
16
+ </reference>
17
+ <reference name="newreference">
18
+ <block type="core/template" name="newReferenceBlock" template="page/melissa_plugin.phtml" />
19
+ </reference>
20
+ -->
21
+ </default>
22
+ </layout>
app/design/frontend/base/default/layout/my_layoutmods.xml~ ADDED
File without changes
app/design/frontend/base/default/layout/page.xml~ ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * Global Layout Overrides to add custom structure blocks to layout template files
5
+ *
6
+ * @category My
7
+ * @package My_LayoutMods
8
+ * @copyright Copyright (c) 2013 August Ash, Inc. (http://www.augustash.com)
9
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
10
+ */
11
+ -->
12
+ <layout version="0.1.0">
13
+ <!--==============================================
14
+ Default layout, loads most of the pages
15
+ ===============================================-->
16
+ <default>
17
+ <reference name="root">
18
+ <block type="core/template" name="custom_title" template="page/melissa_plugin.phtml" /> <!-- Token Server Support -->
19
+ </reference>
20
+ </default>
21
+ <!--==============================================
22
+ END Default
23
+ ===============================================-->
24
+ </layout>
25
+
26
+
app/design/frontend/base/default/layout/show_melissaglobaladdress.xml~ ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ *
5
+ * @category Extension
6
+ * @copyright Copyright (c) 2009-2015 Crafty Clicks (https://craftyclicks.co.uk)
7
+ * @author Sebastian Enger / Melissa Data / MelissaData.com
8
+ */
9
+ -->
10
+
11
+ <layout>
12
+ <!-- Ajax Time -->
13
+ <!- <melissaglobaladdress_ajax_index>
14
+ <block type="melissaglobaladdress/ajaxblock" name="root" template="page/melissa_plugin.phtml" />
15
+ </melissaglobaladdress_ajax_index> -->
16
+ <!-- after checkout validation -->
17
+ <!--
18
+ <checkout_onepage_success>
19
+ <reference name="head">
20
+ <block type="page/html" name="cc_melissa_postcheck" template="craftyclicks/melissaglobaladdress/post_checkout.phtml"/>
21
+ </reference>
22
+ </checkout_onepage_success>
23
+ -->
24
+ <!-- checkout/registration autocomplete -->
25
+ <!--
26
+ <checkout_onepage_index>
27
+ <reference name="head">
28
+ <action method="addJs"><script>craftyclicks/melissaglobaladdress/melissadata_magento.js</script></action>
29
+ <action method="addCss"><stylesheet>css/craftyclicks/melissaglobaladdress/melissa_autocomplete.css</stylesheet></action>
30
+ <block type="page/html" name="cc_melissa_config" template="craftyclicks/melissaglobaladdress/common_config.phtml"/>
31
+ </reference>
32
+ </checkout_onepage_index>
33
+ -->
34
+ </layout>
app/design/frontend/base/default/layout/test.xml~ ADDED
File without changes
app/design/frontend/base/default/template/afficher.phtml~ ADDED
File without changes
app/design/frontend/base/default/template/page/melissa_plugin.phtml CHANGED
@@ -4,7 +4,21 @@ Melissa Data Plugin for Magento: PHP Library
4
  Author: Sebastian Enger, M.Sc. //"Liebe besiegt Alles".
5
  Contact: Sebastian.Enger@MelissaData.com
6
  Phone: +49 30 80 933 178-2
7
- Last Modified: 2016-08-03//14:30pm
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  */
9
 
10
  // read gee related config options
4
  Author: Sebastian Enger, M.Sc. //"Liebe besiegt Alles".
5
  Contact: Sebastian.Enger@MelissaData.com
6
  Phone: +49 30 80 933 178-2
7
+ Last Modified: 2016-08-17//11:30pm
8
+ */
9
+
10
+ /*
11
+ $states = Mage::getModel('directory/country')->load("CA")->getRegions()->toOptionArray();
12
+ $arr = array();
13
+ $t_arr = array();
14
+ foreach($states as $region){
15
+ array_push($arr, $region['title']."#".$region['value']);
16
+ }
17
+
18
+ print_r($states);
19
+
20
+ setcookie('states_CA_Collection', '', time()-300);
21
+ setcookie('states_CA_Collection', json_encode($arr), time() + 86400, "/");
22
  */
23
 
24
  // read gee related config options
app/design/frontend/base/default/template/page/melissa_plugin.phtml~ ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Melissa Data Plugin for Magento
4
+ Author: Sebastian Enger
5
+ Contact: Sebastian.Enger@MelissaData.com
6
+ Phone: +49 30 80 933 178-2
7
+ Last Modified: 2016-06-03::12am
8
+ */
9
+
10
+ /*
11
+ $1 = Mage::getStoreConfig('melissa_plugin/customerid'); // get Melissa Data customer ID
12
+
13
+ $2 = Mage::getStoreConfig('melissa_plugin/singlerow_enabled'); // enable Single Row Autocompletion?
14
+ $3 = Mage::getStoreConfig('melissa_plugin/fielded_enabled'); // enable Fielded Autocompletion?
15
+
16
+ $4 = Mage::getStoreConfig('melissa_plugin/singlerow_countries'); // define singlerow countries
17
+ $3 = Mage::getStoreConfig('melissa_plugin/fielded_countries'); // define fielded countries
18
+
19
+ $4 = Mage::getStoreConfig('melissa_plugin/service_gaws_enabled'); // enable Address Verification?
20
+ $3 = Mage::getStoreConfig('melissa_plugin/service_gee_enabled'); // enable Autocompletion?
21
+ $4 = Mage::getStoreConfig('melissa_plugin/service_email_enabled'); // enable Email Check?
22
+ $4 = Mage::getStoreConfig('melissa_plugin/service_phone_enabled'); // enable Phone Check?
23
+
24
+ $4 = Mage::getStoreConfig('melissa_plugin/service_email_premium_enabled'); // enable Email Premium Check?
25
+ $4 = Mage::getStoreConfig('melissa_plugin/service_phone_premium_enabled'); // enable Phone Premium Check?
26
+ */
27
+
28
+ $customer_id = "111466882"; // Melissa Data Customer ID of Sebastian Enger
29
+
30
+ $intEmail = "pkgIntEmail"; // email token server option
31
+ $intName = "pkgIntNameCheck"; // name token server option
32
+ $intPhone = "pkgIntPhoneCheck"; // phone token server option
33
+ $intGAddr = "pkgIntAddressCheck"; // gaws address token server option
34
+ $intGeo = "pkgIntGeoCode"; // geocode token server option
35
+ $intGee = "pkgExpressEntry"; // gee token server option
36
+ $myGeoGawsOption = $intGAddr+","+$intGeo;
37
+
38
+ // set the Token Server HTTPS endpoint
39
+ $TokenServerEndpoint = "https://token.melissadata.net/v3/WEB/service.svc/RequestToken?L=".$customer_id;
40
+
41
+ // build the request uri for the separate tokens
42
+ $TokenReqGee = $TokenServerEndpoint."&P=".$intGee;
43
+ $TokenReqGaws = $TokenServerEndpoint."&P=".$intGAddr;
44
+
45
+ // get the GEE token XML content
46
+ $TokenContentGee = url_get_contents($TokenReqGee);
47
+ $tokenGeeRaw = new SimpleXMLElement($TokenContentGee);
48
+
49
+ // store the reals GEE Token Content as string
50
+ $tokenGee = (string)$tokenGeeRaw->Token;
51
+
52
+ // get the GAWS token XML content
53
+ $TokenContentGaws = url_get_contents($TokenReqGaws);
54
+ $tokenGawsRaw = new SimpleXMLElement($TokenContentGaws);
55
+
56
+ // store the reals GAWS Token Content as string
57
+ $tokenGaws = (string)$tokenGawsRaw->Token;
58
+
59
+ setcookie('MelissaDataMagento_GEE_Token', $tokenGee, time() + (86400 * 0.75), "/"); // 80400 = 0.75 day
60
+ setcookie('MelissaDataMagento_GAWS_Token', $tokenGaws, time() + (86400 * 30), "/"); // 80400 = 0.75 day
61
+
62
+ $date = date('m/d/Y h:i:s a', time());
63
+ file_put_contents("/tmp/md_tokenserver.log", "$date :: tokensever request sent to GAWS & GEE: $tokenGaws\n", FILE_APPEND | LOCK_EX);
64
+
65
+ /*
66
+ echo <<<END
67
+ <script>
68
+ alert('<?php echo "$tokenGee"; ?>');
69
+ </script>
70
+ <script>
71
+ //alert("token server gaws kommt"+$tokenGaws);
72
+ console.log("token from Token Server MD Backend:"+$tokenGee);
73
+ </script>
74
+ END;
75
+ */
76
+
77
+ function url_get_contents ($url) {
78
+ if (function_exists('curl_exec')){
79
+ $url_get_contents_data = get_web_page( $url );
80
+ }elseif(function_exists('file_get_contents')){
81
+ $url_get_contents_data = file_get_contents($url);
82
+ }elseif(function_exists('fopen') && function_exists('stream_get_contents')){
83
+ $handle = fopen ($url, "r");
84
+ $url_get_contents_data = stream_get_contents($handle);
85
+ }else{
86
+ $url_get_contents_data = false;
87
+ }
88
+ return $url_get_contents_data;
89
+ } // function url_get_contents ($url) {
90
+
91
+
92
+ function get_web_page( $url ){
93
+ $options = array(
94
+ CURLOPT_RETURNTRANSFER => true, // return web page
95
+ CURLOPT_HEADER => false, // don't return headers
96
+ CURLOPT_FOLLOWLOCATION => true, // follow redirects
97
+ CURLOPT_ENCODING => "utf-8", // handle all encodings
98
+ CURLOPT_USERAGENT => "Magento Plugin/MelissaData/TokenServerAccess/v0.0.1", // who am i
99
+ CURLOPT_AUTOREFERER => true, // set referer on redirect
100
+ CURLOPT_CONNECTTIMEOUT => 3, // timeout on connect
101
+ CURLOPT_TIMEOUT => 3, // timeout on response
102
+ CURLOPT_MAXREDIRS => 10, // stop after 10 redirects
103
+ CURLOPT_SSL_VERIFYPEER => true, // Enable SSL Cert checks
104
+ );
105
+
106
+ $ch = curl_init( $url );
107
+ curl_setopt_array( $ch, $options );
108
+ $content = curl_exec( $ch );
109
+ $err = curl_errno( $ch );
110
+ $errmsg = curl_error( $ch );
111
+ $header = curl_getinfo( $ch );
112
+ curl_close( $ch );
113
+ return $content;
114
+ }
115
+
116
+
117
+ ?>
app/etc/modules/Melissa_plugin.xml~ ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version = "1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Melissa_Plugin>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </Melissa_Plugin>
8
+ </modules>
9
+ </config>
js/melissadata/Magento.js CHANGED
@@ -3,7 +3,7 @@ Melissa Data Javascript Library for Magento Plugin
3
  Author: Sebastian Enger, M.Sc. //"Liebe besiegt Alles".
4
  Contact: Sebastian.Enger@MelissaData.com
5
  Phone: +49 30 80 933 178-2
6
- Last Modified: 2016-08-03//14:30pm
7
  */
8
 
9
  //$.noConflict();
@@ -36,7 +36,6 @@ this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-cle
36
  // to find out to create a new namespace to not collide with Magento standards jquery implementation has cost me 15 fucking minutes -> DAMN BASDARD ;-)
37
  var z = jQuery.noConflict( true );
38
 
39
-
40
  z(document).ready(function() {
41
  /*
42
  var pGress = setInterval(function() {
@@ -96,10 +95,18 @@ z(document).ready(function() {
96
  var insert_string_single = '<br /><p><table id="autocomplete_melissadata_singlerow" border="0px;"><tr style="font-weight: bold; font-size: 140%;"><b id="singleShow">Melissa Data Single Row Autocompletion</b></tr><tr width="" style="clear:both;"><td><br /></td></tr><tr style="clear:both;"><td width="'+MAX_LENGTH_GEE_FIELDED_BLOCK+'px"><input type="text" value="" placeholder="1. Type Country" title="Start typing a country name to get Suggestions" id="CountrySuggestionsSingleRow" style="width: '+MAX_LENGTH_GEE_FIELDED_BLOCK+'px;" /><span id="showCountryResultsSingleRow" style="height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+MAX_LENGTH_GEE_SINGLELINE_BLOCK+'px"><input type="text" value="" placeholder="2. Type Address" title="Start typing a Postal code & Address to get Suggestions from within that Country" id="AddressSuggestionsSingleRow" style="width: '+MAX_LENGTH_GEE_SINGLELINE_BLOCK+'px;" /><span id="showAddressResultsSingleRow" style="width: '+MAX_LENGTH_GEE_SINGLELINE_BLOCK+'px; height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+MAX_LENGTH_GEE_FIELDED_BLOCK+'px"><input type="text" value="" placeholder="3. Choose Suite" title="Choose an Apartment Number for that Address" id="SubBuildingSingleRow" style="width: '+MAX_LENGTH_GEE_FIELDED_BLOCK+'px;" /><span id="showAddressSubPremise" style="width: '+MAX_LENGTH_GEE_SINGLELINE_BLOCK+'px; height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td></tr></table></p><br /><br />';
97
 
98
  var insert_string_multi = '<br /><p><table id="autocomplete_melissadata_fielded" border="0px;"><tr style="font-weight: bold; font-size: 140%;"><b id="multiShow">Melissa Data Fielded Autocompletion</b></tr><tr width="'+(3*MAX_LENGTH_GEE_FIELDED_BLOCK)+'px"><td><br /></td></tr><tr style="clear:both;"><td width="'+MAX_LENGTH_GEE_FIELDED_BLOCK+'px"><input type="text" value="" placeholder="1. Type Country" title="Start typing a country name to get Suggestions" id="CountrySuggestions" style="width: '+MAX_LENGTH_GEE_FIELDED_BLOCK+'px;" /><span id="showCountryResults" style="width:150px;height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+MAX_LENGTH_GEE_FIELDED_BLOCK+'px"><input type="text" value="" placeholder="2. Type Postal Code" title="Start typing a Postal code to get Suggestions from within that Country" id="PostalCodeSuggestions" style="width: '+MAX_LENGTH_GEE_FIELDED_BLOCK+'px;" /><span id="showPostalCodeResults" style="width:150px;height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+MAX_LENGTH_GEE_FIELDED_BLOCK+'px"><input type="text" value="" placeholder="3. Type Street Address" title="Start typing a street name to get suggestions for them within that Postal code range in that country" id="StreetSuggestions" style="width: '+MAX_LENGTH_GEE_FIELDED_BLOCK+'px;" /><span id="showStreetResults" style="height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+MAX_LENGTH_GEE_FIELDED_BLOCK+'px"><input type="text" value="" placeholder="4. Choose Suite" title="Choose an Apartment Number for that Address" id="SubBuildingSuggestions" style="width: '+MAX_LENGTH_GEE_FIELDED_BLOCK+'px;" /><span id="showSubPremise" style="width: '+MAX_LENGTH_GEE_SINGLELINE_BLOCK+'px; height:75px;line-height:3em;overflow:auto;padding:5px;"></tr></table></p><br /><br /><p>';
 
 
 
 
 
 
99
 
 
 
100
  // SubBuildingSuggestions
101
  // showSubPremise
102
-
103
  // set the sub premise field to not visible
104
  z("#showAddressSubPremise").hide();
105
  z("#showAddressSubPremise").css("display", "none");
@@ -112,7 +119,8 @@ z(document).ready(function() {
112
 
113
  z("#showSubPremise").hide();
114
  z("#showSubPremise").css("display", "none");
115
-
 
116
  if (n_gee === true){
117
  // set display to SHOW content
118
  z("#checkout-step-billing").css("display", "inline");
@@ -132,7 +140,6 @@ z(document).ready(function() {
132
  z("#multiShow").css("display", "none");
133
 
134
  if ( n_gee_single === true && n_gee_multi === true) {
135
-
136
  // both enabled?
137
  z("#multiShow").show();
138
  z("#multiShow").css("display", "inline");
@@ -142,8 +149,7 @@ z(document).ready(function() {
142
  z("#singleShow").show();
143
  z("#singleShow").css("display", "inline");
144
  z("#autocomplete_melissadata_singlerow").show();
145
- z("#autocomplete_melissadata_singlerow").css("display", "inline");
146
-
147
  } else if (n_gee_single === true ){
148
  // z( insert_string_single ).insertBefore("#checkout-step-billing");
149
  z("#singleShow").show();
@@ -166,10 +172,24 @@ z(document).ready(function() {
166
  z("#autocomplete_melissadata_fielded").css("display", "none");
167
  }// if n_gee_multi
168
  } // if (n_gee === true){
169
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
 
171
- if (n_gaws === true && n_email === true){
172
 
 
173
  var insert_top_gawsresults = '<form id="formaction"><input type="button" id="submitCheck" title="Verify now the Input Address Values" value=" Verify "></form><br /><span id="gawsresults_top" style="display:none;"></span><br /><span id="errorresults_top" style="display:none;"></span>';
174
  z( insert_top_gawsresults ).insertBefore("#checkout-step-billing");
175
  // set display to SHOW content
@@ -189,6 +209,7 @@ z(document).ready(function() {
189
  // set display to SHOW content
190
  z("#checkout-step-billing").css("display", "inline");
191
  z("#billing\\:region_id").css("display", "inline");
 
192
  } // if (n_gaws === true){
193
 
194
 
@@ -218,7 +239,7 @@ z(document).ready(function() {
218
 
219
  if (singleLineFlag == 1){
220
 
221
- z("#billing\\:country_id").html(html_country);
222
  z("#autocomplete_melissadata_singlerow").show();
223
 
224
  // disable multi line entry / disable fielded Entry
@@ -245,7 +266,7 @@ z(document).ready(function() {
245
 
246
  } else {
247
 
248
- z("#billing\\:country_id").html(html_country);
249
 
250
  // on field click of Country Iso Search field, put the results in the top of the country search box
251
  z("#CountrySuggestions").val("");
@@ -439,7 +460,7 @@ z(document).ready(function() {
439
  z("#PostalCodeSuggestions").html("");
440
  z("#PostalCodeSuggestions").val(postalcode+", "+locality);
441
 
442
- z("#billing\\:country_id").html(html_country);
443
  z("#billing\\:city").val(locality);
444
  z("#billing\\:postcode").val(postalcode);
445
 
@@ -509,9 +530,7 @@ z(document).ready(function() {
509
  var subbuilding_tmp = z("#showStreetResults").find(":selected").attr("subbuilding");
510
  var subbuilding = subbuilding_tmp.split(",");
511
  var pc_sec = pc_sec_tmp.toString().split(",");
512
-
513
- console.log("Postalcode: #showStreetResults " + postalcode);
514
-
515
  var iso2Code = z("#showCountryResults").find(":selected").val();
516
  var isoName = z("#showCountryResults").find(":selected").text();
517
  var html_country = '<option selected value="'+iso2Code+'">'+isoName+'</option>';
@@ -541,8 +560,7 @@ z(document).ready(function() {
541
  //b = z.grep(b,function(n){ return n == 0 || n });
542
  b = b.filter(function(e){return e});
543
  var b_html = b.join(",");
544
-
545
-
546
  console.log("GB Postalcode: #showStreetResults " + postalcode);
547
 
548
  z("#billing\\:street1").val(a_html);
@@ -550,7 +568,7 @@ z(document).ready(function() {
550
 
551
  z("#billing\\:city").val(locality);
552
  z("#billing\\:postcode").val(postalcode);
553
- z("#billing\\:country_id").html(html_country);
554
 
555
  //z("#billing\\:region_id").html(adminarea);
556
  //z("#billing\\:region").html(adminarea);
@@ -564,7 +582,7 @@ z(document).ready(function() {
564
  z("#billing\\:postcode").val(postalcode);
565
  z("#billing\\:street1").val(deliveryaddr);
566
  z("#billing\\:street2").val("");
567
- z("#billing\\:country_id").html(html_country);
568
  //z("#billing\\:region_id").html(html_state);
569
  //z("#billing\\:region").html(html_state);
570
  //z("#billing\\:region_id").html(adminarea);
@@ -663,16 +681,24 @@ z(document).ready(function() {
663
  var subbuilding = subbuilding_tmp.split(",");
664
  var pc_sec = pc_sec_tmp.toString().split(",");
665
  //console.log("PC SEC VALUES: "+pc_sec);
666
-
667
  var iso2Code = z("#showCountryResultsSingleRow").find(":selected").val();
668
  var isoName = z("#showCountryResultsSingleRow").find(":selected").text();
669
  var html_country = '<option selected value="'+iso2Code+'">'+isoName+'</option>';
670
  var html_state = '<option selected value="'+adminarea+'">'+adminarea+'</option>';
671
-
 
 
 
 
 
 
 
 
672
  // GB related
673
  var organization = z("#showAddressResultsSingleRow").find(":selected").attr("organization");
674
  var building = z("#showAddressResultsSingleRow").find(":selected").attr("building");
675
- //var subbuild = z("#showAddressResultsSingleRow").find(":selected").attr("subbuilding");
676
  var premise = z("#showAddressResultsSingleRow").find(":selected").attr("premise");
677
  var thoroughfare = z("#showAddressResultsSingleRow").find(":selected").attr("thoroughfare");
678
 
@@ -697,7 +723,7 @@ z(document).ready(function() {
697
 
698
  z("#billing\\:city").val(locality);
699
  z("#billing\\:postcode").val(postalcode);
700
- z("#billing\\:country_id").html(html_country);
701
 
702
  //z("#billing\\:region_id").html(adminarea);
703
  //z("#billing\\:region").html(adminarea);
@@ -709,7 +735,7 @@ z(document).ready(function() {
709
  z("#billing\\:postcode").val(postalcode);
710
  z("#billing\\:street1").val(deliveryaddr);
711
  z("#billing\\:street2").val("");
712
- z("#billing\\:country_id").html(html_country);
713
  //z("#billing\\:region_id").html(html_state);
714
  //z("#billing\\:region").html(html_state);
715
  //z("#billing\\:region_id").html(adminarea);
@@ -759,7 +785,7 @@ z(document).ready(function() {
759
  z.each(subbuilding, function( index, value ) {
760
  value = value.trim();
761
  var pc_sec_val = postalcode+"-"+pc_sec[index];
762
- console.log("PC SEC VAL of INDEX: "+pc_sec_val + " INDEX:" + index);
763
 
764
  if (((typeof value != "undefined") && (typeof value.valueOf() == "string")) && (value.length >= 1)) {
765
  if (parts_addr_count >= 0){
@@ -1295,8 +1321,20 @@ z(document).ready(function() {
1295
  var content_postalcode = z("#billing\\:postcode").val();
1296
  var content_street = z("#billing\\:street1").val();
1297
  var content_street2 = z("#billing\\:street2").val();
1298
- var content_country = z("#billing\\:country_id").val();
1299
- var content_region = z("#billing\\:region_id").val();
 
 
 
 
 
 
 
 
 
 
 
 
1300
  //var content_subpremise = z("#showAddressSubPremise").find(":selected").val();
1301
 
1302
  content_locality = z.trim(content_locality);
@@ -1306,7 +1344,7 @@ z(document).ready(function() {
1306
  content_country = z.trim(content_country);
1307
  content_region = z.trim(content_region);
1308
 
1309
- console.log("doGawsWebCall [Live]: Locality:"+content_locality+" Street: "+content_street +" Street2: "+content_street2+" PostalCode: "+content_postalcode+" Country: "+content_country);
1310
  z.ajax({
1311
  type: "GET",
1312
  url: urlGaws_Real,
@@ -1326,6 +1364,8 @@ z(document).ready(function() {
1326
  success: function( data ){
1327
  var string = JSON.stringify(data);
1328
  var obj = z.parseJSON(string);
 
 
1329
 
1330
  var string2 = JSON.stringify(obj.Records);
1331
  var obj2 = z.parseJSON(string2);
@@ -1354,13 +1394,13 @@ z(document).ready(function() {
1354
  var PremisesNumber = obj2[0].PremisesNumber;
1355
  var SubPremisesNumber = obj2[0].SubPremisesNumber;
1356
 
1357
- // console.log("doGawsWebCall [live][tid: "+randIdent+"] ResultCodes:" + ResultCodes + " FormAddr: "+ FormAddr);
1358
  if ( ResultCodes.match(/(AV23|AV24|AV25)/ig) != null ){
1359
  resultquality = "Address: <span style=\"text-decoration: underline;\">"+FormAddr+"</span> is a good address.";
1360
  html_result_gaws = '<span style="color: green; font-weight:bold;">'+resultquality+'</span>';
1361
 
1362
  // if full verified GAWS address, then take that values and write them back
1363
- z("#billing\\:country_id").val(CountryISO3166_1_Alpha2);
1364
  z("#billing\\:street1").val(AddressLine1);
1365
  z("#billing\\:postcode").val(PostalCode);
1366
  z("#billing\\:city").val(Locality);
@@ -1544,4 +1584,32 @@ z(document).ready(function() {
1544
  } // if check
1545
  }); // z("#submitCheck").click(function(){
1546
 
 
1547
  }); // $(document).ready(function() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  Author: Sebastian Enger, M.Sc. //"Liebe besiegt Alles".
4
  Contact: Sebastian.Enger@MelissaData.com
5
  Phone: +49 30 80 933 178-2
6
+ Last Modified: 2016-08-17//11:30pm
7
  */
8
 
9
  //$.noConflict();
36
  // to find out to create a new namespace to not collide with Magento standards jquery implementation has cost me 15 fucking minutes -> DAMN BASDARD ;-)
37
  var z = jQuery.noConflict( true );
38
 
 
39
  z(document).ready(function() {
40
  /*
41
  var pGress = setInterval(function() {
95
  var insert_string_single = '<br /><p><table id="autocomplete_melissadata_singlerow" border="0px;"><tr style="font-weight: bold; font-size: 140%;"><b id="singleShow">Melissa Data Single Row Autocompletion</b></tr><tr width="" style="clear:both;"><td><br /></td></tr><tr style="clear:both;"><td width="'+MAX_LENGTH_GEE_FIELDED_BLOCK+'px"><input type="text" value="" placeholder="1. Type Country" title="Start typing a country name to get Suggestions" id="CountrySuggestionsSingleRow" style="width: '+MAX_LENGTH_GEE_FIELDED_BLOCK+'px;" /><span id="showCountryResultsSingleRow" style="height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+MAX_LENGTH_GEE_SINGLELINE_BLOCK+'px"><input type="text" value="" placeholder="2. Type Address" title="Start typing a Postal code & Address to get Suggestions from within that Country" id="AddressSuggestionsSingleRow" style="width: '+MAX_LENGTH_GEE_SINGLELINE_BLOCK+'px;" /><span id="showAddressResultsSingleRow" style="width: '+MAX_LENGTH_GEE_SINGLELINE_BLOCK+'px; height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+MAX_LENGTH_GEE_FIELDED_BLOCK+'px"><input type="text" value="" placeholder="3. Choose Suite" title="Choose an Apartment Number for that Address" id="SubBuildingSingleRow" style="width: '+MAX_LENGTH_GEE_FIELDED_BLOCK+'px;" /><span id="showAddressSubPremise" style="width: '+MAX_LENGTH_GEE_SINGLELINE_BLOCK+'px; height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td></tr></table></p><br /><br />';
96
 
97
  var insert_string_multi = '<br /><p><table id="autocomplete_melissadata_fielded" border="0px;"><tr style="font-weight: bold; font-size: 140%;"><b id="multiShow">Melissa Data Fielded Autocompletion</b></tr><tr width="'+(3*MAX_LENGTH_GEE_FIELDED_BLOCK)+'px"><td><br /></td></tr><tr style="clear:both;"><td width="'+MAX_LENGTH_GEE_FIELDED_BLOCK+'px"><input type="text" value="" placeholder="1. Type Country" title="Start typing a country name to get Suggestions" id="CountrySuggestions" style="width: '+MAX_LENGTH_GEE_FIELDED_BLOCK+'px;" /><span id="showCountryResults" style="width:150px;height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+MAX_LENGTH_GEE_FIELDED_BLOCK+'px"><input type="text" value="" placeholder="2. Type Postal Code" title="Start typing a Postal code to get Suggestions from within that Country" id="PostalCodeSuggestions" style="width: '+MAX_LENGTH_GEE_FIELDED_BLOCK+'px;" /><span id="showPostalCodeResults" style="width:150px;height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+MAX_LENGTH_GEE_FIELDED_BLOCK+'px"><input type="text" value="" placeholder="3. Type Street Address" title="Start typing a street name to get suggestions for them within that Postal code range in that country" id="StreetSuggestions" style="width: '+MAX_LENGTH_GEE_FIELDED_BLOCK+'px;" /><span id="showStreetResults" style="height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+MAX_LENGTH_GEE_FIELDED_BLOCK+'px"><input type="text" value="" placeholder="4. Choose Suite" title="Choose an Apartment Number for that Address" id="SubBuildingSuggestions" style="width: '+MAX_LENGTH_GEE_FIELDED_BLOCK+'px;" /><span id="showSubPremise" style="width: '+MAX_LENGTH_GEE_SINGLELINE_BLOCK+'px; height:75px;line-height:3em;overflow:auto;padding:5px;"></tr></table></p><br /><br /><p>';
98
+
99
+
100
+
101
+ var insert_string_single_tabs = '<div id="London" class="tabcontent"><br /><p><table id="autocomplete_melissadata_singlerow" border="0px;"><tr style="font-weight: bold; font-size: 140%;"><b id="singleShow">Melissa Data Single Row Autocompletion</b></tr><tr width="" style="clear:both;"><td><br /></td></tr><tr style="clear:both;"><td width="'+MAX_LENGTH_GEE_FIELDED_BLOCK+'px"><input type="text" value="" placeholder="1. Type Country" title="Start typing a country name to get Suggestions" id="CountrySuggestionsSingleRow" style="width: '+MAX_LENGTH_GEE_FIELDED_BLOCK+'px;" /><span id="showCountryResultsSingleRow" style="height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+MAX_LENGTH_GEE_SINGLELINE_BLOCK+'px"><input type="text" value="" placeholder="2. Type Address" title="Start typing a Postal code & Address to get Suggestions from within that Country" id="AddressSuggestionsSingleRow" style="width: '+MAX_LENGTH_GEE_SINGLELINE_BLOCK+'px;" /><span id="showAddressResultsSingleRow" style="width: '+MAX_LENGTH_GEE_SINGLELINE_BLOCK+'px; height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+MAX_LENGTH_GEE_FIELDED_BLOCK+'px"><input type="text" value="" placeholder="3. Choose Suite" title="Choose an Apartment Number for that Address" id="SubBuildingSingleRow" style="width: '+MAX_LENGTH_GEE_FIELDED_BLOCK+'px;" /><span id="showAddressSubPremise" style="width: '+MAX_LENGTH_GEE_SINGLELINE_BLOCK+'px; height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td></tr></table></p><br /><br /></div>';
102
+
103
+ var insert_string_multi_tabs = '<div id="Paris" class="tabcontent"><br /><p><table id="autocomplete_melissadata_fielded" border="0px;"><tr style="font-weight: bold; font-size: 140%;"><b id="multiShow">Melissa Data Fielded Autocompletion</b></tr><tr width="'+(3*MAX_LENGTH_GEE_FIELDED_BLOCK)+'px"><td><br /></td></tr><tr style="clear:both;"><td width="'+MAX_LENGTH_GEE_FIELDED_BLOCK+'px"><input type="text" value="" placeholder="1. Type Country" title="Start typing a country name to get Suggestions" id="CountrySuggestions" style="width: '+MAX_LENGTH_GEE_FIELDED_BLOCK+'px;" /><span id="showCountryResults" style="width:150px;height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+MAX_LENGTH_GEE_FIELDED_BLOCK+'px"><input type="text" value="" placeholder="2. Type Postal Code" title="Start typing a Postal code to get Suggestions from within that Country" id="PostalCodeSuggestions" style="width: '+MAX_LENGTH_GEE_FIELDED_BLOCK+'px;" /><span id="showPostalCodeResults" style="width:150px;height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+MAX_LENGTH_GEE_FIELDED_BLOCK+'px"><input type="text" value="" placeholder="3. Type Street Address" title="Start typing a street name to get suggestions for them within that Postal code range in that country" id="StreetSuggestions" style="width: '+MAX_LENGTH_GEE_FIELDED_BLOCK+'px;" /><span id="showStreetResults" style="height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+MAX_LENGTH_GEE_FIELDED_BLOCK+'px"><input type="text" value="" placeholder="4. Choose Suite" title="Choose an Apartment Number for that Address" id="SubBuildingSuggestions" style="width: '+MAX_LENGTH_GEE_FIELDED_BLOCK+'px;" /><span id="showSubPremise" style="width: '+MAX_LENGTH_GEE_SINGLELINE_BLOCK+'px; height:75px;line-height:3em;overflow:auto;padding:5px;"></tr></table></p><br /><br /><p></div>';
104
 
105
+ var show_tabs = "<ul class=\"tab\"><li><a href=\"#\" class=\"tablinks\" onclick=\"openMDElement(event, 'London')\">Single Row Autocompletion</a></li><li><a href=\"#\" class=\"tablinks\" onclick=\"openMDElement(event, 'Paris')\">Fielded Autocompletion</a></li></ul>";
106
+
107
  // SubBuildingSuggestions
108
  // showSubPremise
109
+ /*
110
  // set the sub premise field to not visible
111
  z("#showAddressSubPremise").hide();
112
  z("#showAddressSubPremise").css("display", "none");
119
 
120
  z("#showSubPremise").hide();
121
  z("#showSubPremise").css("display", "none");
122
+ */
123
+ /*
124
  if (n_gee === true){
125
  // set display to SHOW content
126
  z("#checkout-step-billing").css("display", "inline");
140
  z("#multiShow").css("display", "none");
141
 
142
  if ( n_gee_single === true && n_gee_multi === true) {
 
143
  // both enabled?
144
  z("#multiShow").show();
145
  z("#multiShow").css("display", "inline");
149
  z("#singleShow").show();
150
  z("#singleShow").css("display", "inline");
151
  z("#autocomplete_melissadata_singlerow").show();
152
+ z("#autocomplete_melissadata_singlerow").css("display", "inline");
 
153
  } else if (n_gee_single === true ){
154
  // z( insert_string_single ).insertBefore("#checkout-step-billing");
155
  z("#singleShow").show();
172
  z("#autocomplete_melissadata_fielded").css("display", "none");
173
  }// if n_gee_multi
174
  } // if (n_gee === true){
175
+ */
176
+
177
+ if (n_gee === true){
178
+ // set display to SHOW content
179
+ z("#checkout-step-billing").css("display", "inline");
180
+ z( show_tabs ).insertBefore("#checkout-step-billing");
181
+
182
+ if ( n_gee_single === true) {
183
+ z( insert_string_single_tabs ).insertBefore("#checkout-step-billing");
184
+ }
185
+ if (n_gee_multi === true ){
186
+ z( insert_string_multi_tabs ).insertBefore("#checkout-step-billing");
187
+ }
188
+ } // if (n_gee === true){
189
+
190
 
 
191
 
192
+ if (n_gaws === true && n_email === true){
193
  var insert_top_gawsresults = '<form id="formaction"><input type="button" id="submitCheck" title="Verify now the Input Address Values" value=" Verify "></form><br /><span id="gawsresults_top" style="display:none;"></span><br /><span id="errorresults_top" style="display:none;"></span>';
194
  z( insert_top_gawsresults ).insertBefore("#checkout-step-billing");
195
  // set display to SHOW content
209
  // set display to SHOW content
210
  z("#checkout-step-billing").css("display", "inline");
211
  z("#billing\\:region_id").css("display", "inline");
212
+
213
  } // if (n_gaws === true){
214
 
215
 
239
 
240
  if (singleLineFlag == 1){
241
 
242
+ // removed because of state bug: z("#billing\\:country_id").html(html_country);
243
  z("#autocomplete_melissadata_singlerow").show();
244
 
245
  // disable multi line entry / disable fielded Entry
266
 
267
  } else {
268
 
269
+ // removed because of state bug: z("#billing\\:country_id").html(html_country);
270
 
271
  // on field click of Country Iso Search field, put the results in the top of the country search box
272
  z("#CountrySuggestions").val("");
460
  z("#PostalCodeSuggestions").html("");
461
  z("#PostalCodeSuggestions").val(postalcode+", "+locality);
462
 
463
+ // removed because of state bug: z("#billing\\:country_id").html(html_country);
464
  z("#billing\\:city").val(locality);
465
  z("#billing\\:postcode").val(postalcode);
466
 
530
  var subbuilding_tmp = z("#showStreetResults").find(":selected").attr("subbuilding");
531
  var subbuilding = subbuilding_tmp.split(",");
532
  var pc_sec = pc_sec_tmp.toString().split(",");
533
+
 
 
534
  var iso2Code = z("#showCountryResults").find(":selected").val();
535
  var isoName = z("#showCountryResults").find(":selected").text();
536
  var html_country = '<option selected value="'+iso2Code+'">'+isoName+'</option>';
560
  //b = z.grep(b,function(n){ return n == 0 || n });
561
  b = b.filter(function(e){return e});
562
  var b_html = b.join(",");
563
+
 
564
  console.log("GB Postalcode: #showStreetResults " + postalcode);
565
 
566
  z("#billing\\:street1").val(a_html);
568
 
569
  z("#billing\\:city").val(locality);
570
  z("#billing\\:postcode").val(postalcode);
571
+ // removed because of state bug: z("#billing\\:country_id").html(html_country);
572
 
573
  //z("#billing\\:region_id").html(adminarea);
574
  //z("#billing\\:region").html(adminarea);
582
  z("#billing\\:postcode").val(postalcode);
583
  z("#billing\\:street1").val(deliveryaddr);
584
  z("#billing\\:street2").val("");
585
+ // removed because of state bug: z("#billing\\:country_id").html(html_country);
586
  //z("#billing\\:region_id").html(html_state);
587
  //z("#billing\\:region").html(html_state);
588
  //z("#billing\\:region_id").html(adminarea);
681
  var subbuilding = subbuilding_tmp.split(",");
682
  var pc_sec = pc_sec_tmp.toString().split(",");
683
  //console.log("PC SEC VALUES: "+pc_sec);
684
+
685
  var iso2Code = z("#showCountryResultsSingleRow").find(":selected").val();
686
  var isoName = z("#showCountryResultsSingleRow").find(":selected").text();
687
  var html_country = '<option selected value="'+iso2Code+'">'+isoName+'</option>';
688
  var html_state = '<option selected value="'+adminarea+'">'+adminarea+'</option>';
689
+
690
+
691
+ // removed because of state bug: var getsd = Cookies.get('states_CA_Collection');
692
+ // removed because of state bug: console.log("States:" + getsd + " -> GEE Admin Area: "+adminarea);
693
+
694
+ //console.log("setting region and region_id to: "+html_state);
695
+ // removed because of state bug: z("#billing\\:region_id").val(html_state);
696
+ // removed because of state bug: z("#billing\\:region").val(html_state);
697
+
698
  // GB related
699
  var organization = z("#showAddressResultsSingleRow").find(":selected").attr("organization");
700
  var building = z("#showAddressResultsSingleRow").find(":selected").attr("building");
701
+ var subbuild = z("#showAddressResultsSingleRow").find(":selected").attr("subbuilding");
702
  var premise = z("#showAddressResultsSingleRow").find(":selected").attr("premise");
703
  var thoroughfare = z("#showAddressResultsSingleRow").find(":selected").attr("thoroughfare");
704
 
723
 
724
  z("#billing\\:city").val(locality);
725
  z("#billing\\:postcode").val(postalcode);
726
+ // removed because of state bug: z("#billing\\:country_id").html(html_country);
727
 
728
  //z("#billing\\:region_id").html(adminarea);
729
  //z("#billing\\:region").html(adminarea);
735
  z("#billing\\:postcode").val(postalcode);
736
  z("#billing\\:street1").val(deliveryaddr);
737
  z("#billing\\:street2").val("");
738
+ // removed because of state bug: z("#billing\\:country_id").html(html_country);
739
  //z("#billing\\:region_id").html(html_state);
740
  //z("#billing\\:region").html(html_state);
741
  //z("#billing\\:region_id").html(adminarea);
785
  z.each(subbuilding, function( index, value ) {
786
  value = value.trim();
787
  var pc_sec_val = postalcode+"-"+pc_sec[index];
788
+ //console.log("PC SEC VAL of INDEX: "+pc_sec_val + " INDEX:" + index);
789
 
790
  if (((typeof value != "undefined") && (typeof value.valueOf() == "string")) && (value.length >= 1)) {
791
  if (parts_addr_count >= 0){
1321
  var content_postalcode = z("#billing\\:postcode").val();
1322
  var content_street = z("#billing\\:street1").val();
1323
  var content_street2 = z("#billing\\:street2").val();
1324
+ var content_country; //= z("#billing\\:country_id").val();
1325
+ var content_region; //= z("#billing\\:region_id").val();
1326
+
1327
+ var c1 = z("#showCountryResults").find(":selected").val();
1328
+ var c2 = z("#showCountryResultsSingleRow").find(":selected").val();
1329
+
1330
+ console.log("c1: "+c1 + " -> c2: " +c2);
1331
+
1332
+ if (((typeof c1 != "undefined") && (typeof c1.valueOf() == "string")) && (c1.length == 2 || c1.length == 3)) {
1333
+ content_country = c1;
1334
+ } else if (((typeof c2 != "undefined") && (typeof c2.valueOf() == "string")) && (c2.length == 2 || c2.length == 3)) {
1335
+ content_country = c2;
1336
+ }
1337
+
1338
  //var content_subpremise = z("#showAddressSubPremise").find(":selected").val();
1339
 
1340
  content_locality = z.trim(content_locality);
1344
  content_country = z.trim(content_country);
1345
  content_region = z.trim(content_region);
1346
 
1347
+ console.log("doGawsWebCall [Live Input]: Locality:"+content_locality+" - Street: "+content_street +" - Street2: "+content_street2+" - PostalCode: "+content_postalcode+" - Country: "+content_country);
1348
  z.ajax({
1349
  type: "GET",
1350
  url: urlGaws_Real,
1364
  success: function( data ){
1365
  var string = JSON.stringify(data);
1366
  var obj = z.parseJSON(string);
1367
+
1368
+ console.log("Data: "+string);
1369
 
1370
  var string2 = JSON.stringify(obj.Records);
1371
  var obj2 = z.parseJSON(string2);
1394
  var PremisesNumber = obj2[0].PremisesNumber;
1395
  var SubPremisesNumber = obj2[0].SubPremisesNumber;
1396
 
1397
+ console.log("doGawsWebCall [live] ResultCodes:" + obj2[0].Results + " - FormAddr: "+ FormAddr);
1398
  if ( ResultCodes.match(/(AV23|AV24|AV25)/ig) != null ){
1399
  resultquality = "Address: <span style=\"text-decoration: underline;\">"+FormAddr+"</span> is a good address.";
1400
  html_result_gaws = '<span style="color: green; font-weight:bold;">'+resultquality+'</span>';
1401
 
1402
  // if full verified GAWS address, then take that values and write them back
1403
+ // removed because of state bug: z("#billing\\:country_id").val(CountryISO3166_1_Alpha2);
1404
  z("#billing\\:street1").val(AddressLine1);
1405
  z("#billing\\:postcode").val(PostalCode);
1406
  z("#billing\\:city").val(Locality);
1584
  } // if check
1585
  }); // z("#submitCheck").click(function(){
1586
 
1587
+ //billingRegionUpdater.update();
1588
  }); // $(document).ready(function() {
1589
+
1590
+ function openMDElement(evt, cityName) {
1591
+ //console.log("I work with: " + cityName);
1592
+ var i, tabcontent, tablinks;
1593
+ tabcontent = document.getElementsByClassName("tabcontent");
1594
+ for (i = 0; i < tabcontent.length; i++) {
1595
+ tabcontent[i].style.display = "none";
1596
+ }
1597
+ tablinks = document.getElementsByClassName("tablinks");
1598
+ for (i = 0; i < tablinks.length; i++) {
1599
+ tablinks[i].className = tablinks[i].className.replace(" active", "");
1600
+ }
1601
+
1602
+ var p_show = cityName.includes("Paris");
1603
+ var l_show = cityName.includes("London");
1604
+
1605
+ if (p_show === true){
1606
+ z("#Paris").css("display", "block");
1607
+ } else if (l_show === true){
1608
+ z("#London").css("display", "block");
1609
+ }
1610
+
1611
+ //document.getElementById(cityName).style.display = "block";
1612
+ evt.currentTarget.className += " active";
1613
+ //var ids = document.getElementById(cityName);
1614
+ //console.log("I work with ids: " + ids);
1615
+ } // function openMDElement(evt, cityName) {
js/melissadata/Magento.min.js CHANGED
@@ -3,18 +3,18 @@ Melissa Data Javascript Library for Magento Plugin
3
  Author: Sebastian Enger, M.Sc. //"Liebe besiegt Alles".
4
  Contact: Sebastian.Enger@MelissaData.com
5
  Phone: +49 30 80 933 178-2
6
- Last Modified: 2016-08-01//10:30pm
7
  */
8
 
9
- !function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){function i(t){var e=!!t&&"length"in t&&t.length,i=ot.type(t);return"function"===i||ot.isWindow(t)?!1:"array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t}function s(t,e,i){if(ot.isFunction(e))return ot.grep(t,function(t,s){return!!e.call(t,s,t)!==i});if(e.nodeType)return ot.grep(t,function(t){return t===e!==i});if("string"==typeof e){if(gt.test(e))return ot.filter(e,t,i);e=ot.filter(e,t)}return ot.grep(t,function(t){return Z.call(e,t)>-1!==i})}function n(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function o(t){var e={};return ot.each(t.match(wt)||[],function(t,i){e[i]=!0}),e}function r(){X.removeEventListener("DOMContentLoaded",r),t.removeEventListener("load",r),ot.ready()}function a(){this.expando=ot.expando+a.uid++}function l(t,e,i){var s;if(void 0===i&&1===t.nodeType)if(s="data-"+e.replace(zt,"-$&").toLowerCase(),i=t.getAttribute(s),"string"==typeof i){try{i="true"===i?!0:"false"===i?!1:"null"===i?null:+i+""===i?+i:Tt.test(i)?ot.parseJSON(i):i}catch(n){}St.set(t,e,i)}else i=void 0;return i}function h(t,e,i,s){var n,o=1,r=20,a=s?function(){return s.cur()}:function(){return ot.css(t,e,"")},l=a(),h=i&&i[3]||(ot.cssNumber[e]?"":"px"),u=(ot.cssNumber[e]||"px"!==h&&+l)&&At.exec(ot.css(t,e));if(u&&u[3]!==h){h=h||u[3],i=i||[],u=+l||1;do o=o||".5",u/=o,ot.style(t,e,u+h);while(o!==(o=a()/l)&&1!==o&&--r)}return i&&(u=+u||+l||0,n=i[1]?u+(i[1]+1)*i[2]:+i[2],s&&(s.unit=h,s.start=u,s.end=n)),n}function u(t,e){var i="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):[];return void 0===e||e&&ot.nodeName(t,e)?ot.merge([t],i):i}function c(t,e){for(var i=0,s=t.length;s>i;i++)Dt.set(t[i],"globalEval",!e||Dt.get(e[i],"globalEval"))}function d(t,e,i,s,n){for(var o,r,a,l,h,d,p=e.createDocumentFragment(),f=[],g=0,m=t.length;m>g;g++)if(o=t[g],o||0===o)if("object"===ot.type(o))ot.merge(f,o.nodeType?[o]:o);else if(Ot.test(o)){for(r=r||p.appendChild(e.createElement("div")),a=(Nt.exec(o)||["",""])[1].toLowerCase(),l=Ht[a]||Ht._default,r.innerHTML=l[1]+ot.htmlPrefilter(o)+l[2],d=l[0];d--;)r=r.lastChild;ot.merge(f,r.childNodes),r=p.firstChild,r.textContent=""}else f.push(e.createTextNode(o));for(p.textContent="",g=0;o=f[g++];)if(s&&ot.inArray(o,s)>-1)n&&n.push(o);else if(h=ot.contains(o.ownerDocument,o),r=u(p.appendChild(o),"script"),h&&c(r),i)for(d=0;o=r[d++];)Rt.test(o.type||"")&&i.push(o);return p}function p(){return!0}function f(){return!1}function g(){try{return X.activeElement}catch(t){}}function m(t,e,i,s,n,o){var r,a;if("object"==typeof e){"string"!=typeof i&&(s=s||i,i=void 0);for(a in e)m(t,a,i,s,e[a],o);return t}if(null==s&&null==n?(n=i,s=i=void 0):null==n&&("string"==typeof i?(n=s,s=void 0):(n=s,s=i,i=void 0)),n===!1)n=f;else if(!n)return t;return 1===o&&(r=n,n=function(t){return ot().off(t),r.apply(this,arguments)},n.guid=r.guid||(r.guid=ot.guid++)),t.each(function(){ot.event.add(this,e,n,s,i)})}function v(t,e){return ot.nodeName(t,"table")&&ot.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function b(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function y(t){var e=Yt.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function _(t,e){var i,s,n,o,r,a,l,h;if(1===e.nodeType){if(Dt.hasData(t)&&(o=Dt.access(t),r=Dt.set(e,o),h=o.events)){delete r.handle,r.events={};for(n in h)for(i=0,s=h[n].length;s>i;i++)ot.event.add(e,n,h[n][i])}St.hasData(t)&&(a=St.access(t),l=ot.extend({},a),St.set(e,l))}}function w(t,e){var i=e.nodeName.toLowerCase();"input"===i&&Et.test(t.type)?e.checked=t.checked:"input"!==i&&"textarea"!==i||(e.defaultValue=t.defaultValue)}function x(t,e,i,s){e=J.apply([],e);var n,o,r,a,l,h,c=0,p=t.length,f=p-1,g=e[0],m=ot.isFunction(g);if(m||p>1&&"string"==typeof g&&!st.checkClone&&Bt.test(g))return t.each(function(n){var o=t.eq(n);m&&(e[0]=g.call(this,n,o.html())),x(o,e,i,s)});if(p&&(n=d(e,t[0].ownerDocument,!1,t,s),o=n.firstChild,1===n.childNodes.length&&(n=o),o||s)){for(r=ot.map(u(n,"script"),b),a=r.length;p>c;c++)l=n,c!==f&&(l=ot.clone(l,!0,!0),a&&ot.merge(r,u(l,"script"))),i.call(t[c],l,c);if(a)for(h=r[r.length-1].ownerDocument,ot.map(r,y),c=0;a>c;c++)l=r[c],Rt.test(l.type||"")&&!Dt.access(l,"globalEval")&&ot.contains(h,l)&&(l.src?ot._evalUrl&&ot._evalUrl(l.src):ot.globalEval(l.textContent.replace(Ut,"")))}return t}function C(t,e,i){for(var s,n=e?ot.filter(e,t):t,o=0;null!=(s=n[o]);o++)i||1!==s.nodeType||ot.cleanData(u(s)),s.parentNode&&(i&&ot.contains(s.ownerDocument,s)&&c(u(s,"script")),s.parentNode.removeChild(s));return t}function k(t,e){var i=ot(e.createElement(t)).appendTo(e.body),s=ot.css(i[0],"display");return i.detach(),s}function D(t){var e=X,i=$t[t];return i||(i=k(t,e),"none"!==i&&i||(Vt=(Vt||ot("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement),e=Vt[0].contentDocument,e.write(),e.close(),i=k(t,e),Vt.detach()),$t[t]=i),i}function S(t,e,i){var s,n,o,r,a=t.style;return i=i||Gt(t),r=i?i.getPropertyValue(e)||i[e]:void 0,""!==r&&void 0!==r||ot.contains(t.ownerDocument,t)||(r=ot.style(t,e)),i&&!st.pixelMarginRight()&&Xt.test(r)&&Kt.test(e)&&(s=a.width,n=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=i.width,a.width=s,a.minWidth=n,a.maxWidth=o),void 0!==r?r+"":r}function T(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}function z(t){if(t in se)return t;for(var e=t[0].toUpperCase()+t.slice(1),i=ie.length;i--;)if(t=ie[i]+e,t in se)return t}function I(t,e,i){var s=At.exec(e);return s?Math.max(0,s[2]-(i||0))+(s[3]||"px"):e}function A(t,e,i,s,n){for(var o=i===(s?"border":"content")?4:"width"===e?1:0,r=0;4>o;o+=2)"margin"===i&&(r+=ot.css(t,i+Pt[o],!0,n)),s?("content"===i&&(r-=ot.css(t,"padding"+Pt[o],!0,n)),"margin"!==i&&(r-=ot.css(t,"border"+Pt[o]+"Width",!0,n))):(r+=ot.css(t,"padding"+Pt[o],!0,n),"padding"!==i&&(r+=ot.css(t,"border"+Pt[o]+"Width",!0,n)));return r}function P(t,e,i){var s=!0,n="width"===e?t.offsetWidth:t.offsetHeight,o=Gt(t),r="border-box"===ot.css(t,"boxSizing",!1,o);if(0>=n||null==n){if(n=S(t,e,o),(0>n||null==n)&&(n=t.style[e]),Xt.test(n))return n;s=r&&(st.boxSizingReliable()||n===t.style[e]),n=parseFloat(n)||0}return n+A(t,e,i||(r?"border":"content"),s,o)+"px"}function M(t,e){for(var i,s,n,o=[],r=0,a=t.length;a>r;r++)s=t[r],s.style&&(o[r]=Dt.get(s,"olddisplay"),i=s.style.display,e?(o[r]||"none"!==i||(s.style.display=""),""===s.style.display&&Mt(s)&&(o[r]=Dt.access(s,"olddisplay",D(s.nodeName)))):(n=Mt(s),"none"===i&&n||Dt.set(s,"olddisplay",n?i:ot.css(s,"display"))));for(r=0;a>r;r++)s=t[r],s.style&&(e&&"none"!==s.style.display&&""!==s.style.display||(s.style.display=e?o[r]||"":"none"));return t}function E(t,e,i,s,n){return new E.prototype.init(t,e,i,s,n)}function N(){return t.setTimeout(function(){ne=void 0}),ne=ot.now()}function R(t,e){var i,s=0,n={height:t};for(e=e?1:0;4>s;s+=2-e)i=Pt[s],n["margin"+i]=n["padding"+i]=t;return e&&(n.opacity=n.width=t),n}function H(t,e,i){for(var s,n=(j.tweeners[e]||[]).concat(j.tweeners["*"]),o=0,r=n.length;r>o;o++)if(s=n[o].call(i,e,t))return s}function O(t,e,i){var s,n,o,r,a,l,h,u,c=this,d={},p=t.style,f=t.nodeType&&Mt(t),g=Dt.get(t,"fxshow");i.queue||(a=ot._queueHooks(t,"fx"),null==a.unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,c.always(function(){c.always(function(){a.unqueued--,ot.queue(t,"fx").length||a.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(i.overflow=[p.overflow,p.overflowX,p.overflowY],h=ot.css(t,"display"),u="none"===h?Dt.get(t,"olddisplay")||D(t.nodeName):h,"inline"===u&&"none"===ot.css(t,"float")&&(p.display="inline-block")),i.overflow&&(p.overflow="hidden",c.always(function(){p.overflow=i.overflow[0],p.overflowX=i.overflow[1],p.overflowY=i.overflow[2]}));for(s in e)if(n=e[s],re.exec(n)){if(delete e[s],o=o||"toggle"===n,n===(f?"hide":"show")){if("show"!==n||!g||void 0===g[s])continue;f=!0}d[s]=g&&g[s]||ot.style(t,s)}else h=void 0;if(ot.isEmptyObject(d))"inline"===("none"===h?D(t.nodeName):h)&&(p.display=h);else{g?"hidden"in g&&(f=g.hidden):g=Dt.access(t,"fxshow",{}),o&&(g.hidden=!f),f?ot(t).show():c.done(function(){ot(t).hide()}),c.done(function(){var e;Dt.remove(t,"fxshow");for(e in d)ot.style(t,e,d[e])});for(s in d)r=H(f?g[s]:0,s,c),s in g||(g[s]=r.start,f&&(r.end=r.start,r.start="width"===s||"height"===s?1:0))}}function W(t,e){var i,s,n,o,r;for(i in t)if(s=ot.camelCase(i),n=e[s],o=t[i],ot.isArray(o)&&(n=o[1],o=t[i]=o[0]),i!==s&&(t[s]=o,delete t[i]),r=ot.cssHooks[s],r&&"expand"in r){o=r.expand(o),delete t[s];for(i in o)i in t||(t[i]=o[i],e[i]=n)}else e[s]=n}function j(t,e,i){var s,n,o=0,r=j.prefilters.length,a=ot.Deferred().always(function(){delete l.elem}),l=function(){if(n)return!1;for(var e=ne||N(),i=Math.max(0,h.startTime+h.duration-e),s=i/h.duration||0,o=1-s,r=0,l=h.tweens.length;l>r;r++)h.tweens[r].run(o);return a.notifyWith(t,[h,o,i]),1>o&&l?i:(a.resolveWith(t,[h]),!1)},h=a.promise({elem:t,props:ot.extend({},e),opts:ot.extend(!0,{specialEasing:{},easing:ot.easing._default},i),originalProperties:e,originalOptions:i,startTime:ne||N(),duration:i.duration,tweens:[],createTween:function(e,i){var s=ot.Tween(t,h.opts,e,i,h.opts.specialEasing[e]||h.opts.easing);return h.tweens.push(s),s},stop:function(e){var i=0,s=e?h.tweens.length:0;if(n)return this;for(n=!0;s>i;i++)h.tweens[i].run(1);return e?(a.notifyWith(t,[h,1,0]),a.resolveWith(t,[h,e])):a.rejectWith(t,[h,e]),this}}),u=h.props;for(W(u,h.opts.specialEasing);r>o;o++)if(s=j.prefilters[o].call(h,t,u,h.opts))return ot.isFunction(s.stop)&&(ot._queueHooks(h.elem,h.opts.queue).stop=ot.proxy(s.stop,s)),s;return ot.map(u,H,h),ot.isFunction(h.opts.start)&&h.opts.start.call(t,h),ot.fx.timer(ot.extend(l,{elem:t,anim:h,queue:h.opts.queue})),h.progress(h.opts.progress).done(h.opts.done,h.opts.complete).fail(h.opts.fail).always(h.opts.always)}function L(t){return t.getAttribute&&t.getAttribute("class")||""}function F(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var s,n=0,o=e.toLowerCase().match(wt)||[];if(ot.isFunction(i))for(;s=o[n++];)"+"===s[0]?(s=s.slice(1)||"*",(t[s]=t[s]||[]).unshift(i)):(t[s]=t[s]||[]).push(i)}}function q(t,e,i,s){function n(a){var l;return o[a]=!0,ot.each(t[a]||[],function(t,a){var h=a(e,i,s);return"string"!=typeof h||r||o[h]?r?!(l=h):void 0:(e.dataTypes.unshift(h),n(h),!1)}),l}var o={},r=t===Se;return n(e.dataTypes[0])||!o["*"]&&n("*")}function B(t,e){var i,s,n=ot.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((n[i]?t:s||(s={}))[i]=e[i]);return s&&ot.extend(!0,t,s),t}function Y(t,e,i){for(var s,n,o,r,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===s&&(s=t.mimeType||e.getResponseHeader("Content-Type"));if(s)for(n in a)if(a[n]&&a[n].test(s)){l.unshift(n);break}if(l[0]in i)o=l[0];else{for(n in i){if(!l[0]||t.converters[n+" "+l[0]]){o=n;break}r||(r=n)}o=o||r}return o?(o!==l[0]&&l.unshift(o),i[o]):void 0}function U(t,e,i,s){var n,o,r,a,l,h={},u=t.dataTypes.slice();if(u[1])for(r in t.converters)h[r.toLowerCase()]=t.converters[r];for(o=u.shift();o;)if(t.responseFields[o]&&(i[t.responseFields[o]]=e),!l&&s&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(r=h[l+" "+o]||h["* "+o],!r)for(n in h)if(a=n.split(" "),a[1]===o&&(r=h[l+" "+a[0]]||h["* "+a[0]])){r===!0?r=h[n]:h[n]!==!0&&(o=a[0],u.unshift(a[1]));break}if(r!==!0)if(r&&t["throws"])e=r(e);else try{e=r(e)}catch(c){return{state:"parsererror",error:r?c:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}function V(t,e,i,s){var n;if(ot.isArray(e))ot.each(e,function(e,n){i||Ae.test(t)?s(t,n):V(t+"["+("object"==typeof n&&null!=n?e:"")+"]",n,i,s)});else if(i||"object"!==ot.type(e))s(t,e);else for(n in e)V(t+"["+n+"]",e[n],i,s)}function $(t){return ot.isWindow(t)?t:9===t.nodeType&&t.defaultView}var K=[],X=t.document,G=K.slice,J=K.concat,Q=K.push,Z=K.indexOf,tt={},et=tt.toString,it=tt.hasOwnProperty,st={},nt="2.2.4",ot=function(t,e){return new ot.fn.init(t,e)},rt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,at=/^-ms-/,lt=/-([\da-z])/gi,ht=function(t,e){return e.toUpperCase()};ot.fn=ot.prototype={jquery:nt,constructor:ot,selector:"",length:0,toArray:function(){return G.call(this)},get:function(t){return null!=t?0>t?this[t+this.length]:this[t]:G.call(this)},pushStack:function(t){var e=ot.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t){return ot.each(this,t)},map:function(t){return this.pushStack(ot.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return this.pushStack(G.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,i=+t+(0>t?e:0);return this.pushStack(i>=0&&e>i?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:Q,sort:K.sort,splice:K.splice},ot.extend=ot.fn.extend=function(){var t,e,i,s,n,o,r=arguments[0]||{},a=1,l=arguments.length,h=!1;for("boolean"==typeof r&&(h=r,r=arguments[a]||{},a++),"object"==typeof r||ot.isFunction(r)||(r={}),a===l&&(r=this,a--);l>a;a++)if(null!=(t=arguments[a]))for(e in t)i=r[e],s=t[e],r!==s&&(h&&s&&(ot.isPlainObject(s)||(n=ot.isArray(s)))?(n?(n=!1,o=i&&ot.isArray(i)?i:[]):o=i&&ot.isPlainObject(i)?i:{},r[e]=ot.extend(h,o,s)):void 0!==s&&(r[e]=s));return r},ot.extend({expando:"jQuery"+(nt+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===ot.type(t)},isArray:Array.isArray,isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){var e=t&&t.toString();return!ot.isArray(t)&&e-parseFloat(e)+1>=0},isPlainObject:function(t){var e;if("object"!==ot.type(t)||t.nodeType||ot.isWindow(t))return!1;if(t.constructor&&!it.call(t,"constructor")&&!it.call(t.constructor.prototype||{},"isPrototypeOf"))return!1;for(e in t);return void 0===e||it.call(t,e)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?tt[et.call(t)]||"object":typeof t},globalEval:function(t){var e,i=eval;t=ot.trim(t),t&&(1===t.indexOf("use strict")?(e=X.createElement("script"),e.text=t,X.head.appendChild(e).parentNode.removeChild(e)):i(t))},camelCase:function(t){return t.replace(at,"ms-").replace(lt,ht)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e){var s,n=0;if(i(t))for(s=t.length;s>n&&e.call(t[n],n,t[n])!==!1;n++);else for(n in t)if(e.call(t[n],n,t[n])===!1)break;return t},trim:function(t){return null==t?"":(t+"").replace(rt,"")},makeArray:function(t,e){var s=e||[];return null!=t&&(i(Object(t))?ot.merge(s,"string"==typeof t?[t]:t):Q.call(s,t)),s},inArray:function(t,e,i){return null==e?-1:Z.call(e,t,i)},merge:function(t,e){for(var i=+e.length,s=0,n=t.length;i>s;s++)t[n++]=e[s];return t.length=n,t},grep:function(t,e,i){for(var s,n=[],o=0,r=t.length,a=!i;r>o;o++)s=!e(t[o],o),s!==a&&n.push(t[o]);return n},map:function(t,e,s){var n,o,r=0,a=[];if(i(t))for(n=t.length;n>r;r++)o=e(t[r],r,s),null!=o&&a.push(o);else for(r in t)o=e(t[r],r,s),null!=o&&a.push(o);return J.apply([],a)},guid:1,proxy:function(t,e){var i,s,n;return"string"==typeof e&&(i=t[e],e=t,t=i),ot.isFunction(t)?(s=G.call(arguments,2),n=function(){return t.apply(e||this,s.concat(G.call(arguments)))},n.guid=t.guid=t.guid||ot.guid++,n):void 0},now:Date.now,support:st}),"function"==typeof Symbol&&(ot.fn[Symbol.iterator]=K[Symbol.iterator]),ot.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){tt["[object "+e+"]"]=e.toLowerCase()});var ut=function(t){function e(t,e,i,s){var n,o,r,a,l,h,c,p,f=e&&e.ownerDocument,g=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==g&&9!==g&&11!==g)return i;if(!s&&((e?e.ownerDocument||e:L)!==M&&P(e),e=e||M,N)){if(11!==g&&(h=vt.exec(t)))if(n=h[1]){if(9===g){if(!(r=e.getElementById(n)))return i;if(r.id===n)return i.push(r),i}else if(f&&(r=f.getElementById(n))&&W(e,r)&&r.id===n)return i.push(r),i}else{if(h[2])return Q.apply(i,e.getElementsByTagName(t)),i;if((n=h[3])&&w.getElementsByClassName&&e.getElementsByClassName)return Q.apply(i,e.getElementsByClassName(n)),i}if(w.qsa&&!U[t+" "]&&(!R||!R.test(t))){if(1!==g)f=e,p=t;else if("object"!==e.nodeName.toLowerCase()){for((a=e.getAttribute("id"))?a=a.replace(yt,"\\$&"):e.setAttribute("id",a=j),c=D(t),o=c.length,l=dt.test(a)?"#"+a:"[id='"+a+"']";o--;)c[o]=l+" "+d(c[o]);p=c.join(","),f=bt.test(t)&&u(e.parentNode)||e}if(p)try{return Q.apply(i,f.querySelectorAll(p)),i}catch(m){}finally{a===j&&e.removeAttribute("id")}}}return T(t.replace(at,"$1"),e,i,s)}function i(){function t(i,s){return e.push(i+" ")>x.cacheLength&&delete t[e.shift()],t[i+" "]=s}var e=[];return t}function s(t){return t[j]=!0,t}function n(t){var e=M.createElement("div");try{return!!t(e)}catch(i){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var i=t.split("|"),s=i.length;s--;)x.attrHandle[i[s]]=e}function r(t,e){var i=e&&t,s=i&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||$)-(~t.sourceIndex||$);if(s)return s;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function a(t){return function(e){var i=e.nodeName.toLowerCase();return"input"===i&&e.type===t}}function l(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function h(t){return s(function(e){return e=+e,s(function(i,s){for(var n,o=t([],i.length,e),r=o.length;r--;)i[n=o[r]]&&(i[n]=!(s[n]=i[n]))})})}function u(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function c(){}function d(t){for(var e=0,i=t.length,s="";i>e;e++)s+=t[e].value;return s}function p(t,e,i){var s=e.dir,n=i&&"parentNode"===s,o=q++;return e.first?function(e,i,o){for(;e=e[s];)if(1===e.nodeType||n)return t(e,i,o)}:function(e,i,r){var a,l,h,u=[F,o];if(r){for(;e=e[s];)if((1===e.nodeType||n)&&t(e,i,r))return!0}else for(;e=e[s];)if(1===e.nodeType||n){if(h=e[j]||(e[j]={}),l=h[e.uniqueID]||(h[e.uniqueID]={}),(a=l[s])&&a[0]===F&&a[1]===o)return u[2]=a[2];if(l[s]=u,u[2]=t(e,i,r))return!0}}}function f(t){return t.length>1?function(e,i,s){for(var n=t.length;n--;)if(!t[n](e,i,s))return!1;return!0}:t[0]}function g(t,i,s){for(var n=0,o=i.length;o>n;n++)e(t,i[n],s);return s}function m(t,e,i,s,n){for(var o,r=[],a=0,l=t.length,h=null!=e;l>a;a++)(o=t[a])&&(i&&!i(o,s,n)||(r.push(o),h&&e.push(a)));return r}function v(t,e,i,n,o,r){return n&&!n[j]&&(n=v(n)),o&&!o[j]&&(o=v(o,r)),s(function(s,r,a,l){var h,u,c,d=[],p=[],f=r.length,v=s||g(e||"*",a.nodeType?[a]:a,[]),b=!t||!s&&e?v:m(v,d,t,a,l),y=i?o||(s?t:f||n)?[]:r:b;if(i&&i(b,y,a,l),n)for(h=m(y,p),n(h,[],a,l),u=h.length;u--;)(c=h[u])&&(y[p[u]]=!(b[p[u]]=c));if(s){if(o||t){if(o){for(h=[],u=y.length;u--;)(c=y[u])&&h.push(b[u]=c);o(null,y=[],h,l)}for(u=y.length;u--;)(c=y[u])&&(h=o?tt(s,c):d[u])>-1&&(s[h]=!(r[h]=c))}}else y=m(y===r?y.splice(f,y.length):y),o?o(null,r,y,l):Q.apply(r,y)})}function b(t){for(var e,i,s,n=t.length,o=x.relative[t[0].type],r=o||x.relative[" "],a=o?1:0,l=p(function(t){return t===e},r,!0),h=p(function(t){return tt(e,t)>-1},r,!0),u=[function(t,i,s){var n=!o&&(s||i!==z)||((e=i).nodeType?l(t,i,s):h(t,i,s));return e=null,n}];n>a;a++)if(i=x.relative[t[a].type])u=[p(f(u),i)];else{if(i=x.filter[t[a].type].apply(null,t[a].matches),i[j]){for(s=++a;n>s&&!x.relative[t[s].type];s++);return v(a>1&&f(u),a>1&&d(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(at,"$1"),i,s>a&&b(t.slice(a,s)),n>s&&b(t=t.slice(s)),n>s&&d(t))}u.push(i)}return f(u)}function y(t,i){var n=i.length>0,o=t.length>0,r=function(s,r,a,l,h){var u,c,d,p=0,f="0",g=s&&[],v=[],b=z,y=s||o&&x.find.TAG("*",h),_=F+=null==b?1:Math.random()||.1,w=y.length;for(h&&(z=r===M||r||h);f!==w&&null!=(u=y[f]);f++){if(o&&u){for(c=0,r||u.ownerDocument===M||(P(u),a=!N);d=t[c++];)if(d(u,r||M,a)){l.push(u);break}h&&(F=_)}n&&((u=!d&&u)&&p--,s&&g.push(u))}if(p+=f,n&&f!==p){for(c=0;d=i[c++];)d(g,v,r,a);if(s){if(p>0)for(;f--;)g[f]||v[f]||(v[f]=G.call(l));v=m(v)}Q.apply(l,v),h&&!s&&v.length>0&&p+i.length>1&&e.uniqueSort(l)}return h&&(F=_,z=b),g};return n?s(r):r}var _,w,x,C,k,D,S,T,z,I,A,P,M,E,N,R,H,O,W,j="sizzle"+1*new Date,L=t.document,F=0,q=0,B=i(),Y=i(),U=i(),V=function(t,e){return t===e&&(A=!0),0},$=1<<31,K={}.hasOwnProperty,X=[],G=X.pop,J=X.push,Q=X.push,Z=X.slice,tt=function(t,e){for(var i=0,s=t.length;s>i;i++)if(t[i]===e)return i;return-1},et="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",it="[\\x20\\t\\r\\n\\f]",st="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",nt="\\["+it+"*("+st+")(?:"+it+"*([*^$|!~]?=)"+it+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+st+"))|)"+it+"*\\]",ot=":("+st+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+nt+")*)|.*)\\)|)",rt=new RegExp(it+"+","g"),at=new RegExp("^"+it+"+|((?:^|[^\\\\])(?:\\\\.)*)"+it+"+$","g"),lt=new RegExp("^"+it+"*,"+it+"*"),ht=new RegExp("^"+it+"*([>+~]|"+it+")"+it+"*"),ut=new RegExp("="+it+"*([^\\]'\"]*?)"+it+"*\\]","g"),ct=new RegExp(ot),dt=new RegExp("^"+st+"$"),pt={ID:new RegExp("^#("+st+")"),CLASS:new RegExp("^\\.("+st+")"),TAG:new RegExp("^("+st+"|[*])"),ATTR:new RegExp("^"+nt),PSEUDO:new RegExp("^"+ot),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+it+"*(even|odd|(([+-]|)(\\d*)n|)"+it+"*(?:([+-]|)"+it+"*(\\d+)|))"+it+"*\\)|)","i"),bool:new RegExp("^(?:"+et+")$","i"),needsContext:new RegExp("^"+it+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+it+"*((?:-\\d)?\\d*)"+it+"*\\)|)(?=[^-]|$)","i")},ft=/^(?:input|select|textarea|button)$/i,gt=/^h\d$/i,mt=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,bt=/[+~]/,yt=/'|\\/g,_t=new RegExp("\\\\([\\da-f]{1,6}"+it+"?|("+it+")|.)","ig"),wt=function(t,e,i){var s="0x"+e-65536;return s!==s||i?e:0>s?String.fromCharCode(s+65536):String.fromCharCode(s>>10|55296,1023&s|56320)},xt=function(){P()};try{Q.apply(X=Z.call(L.childNodes),L.childNodes),X[L.childNodes.length].nodeType}catch(Ct){Q={apply:X.length?function(t,e){J.apply(t,Z.call(e))}:function(t,e){for(var i=t.length,s=0;t[i++]=e[s++];);t.length=i-1}}}w=e.support={},k=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return e?"HTML"!==e.nodeName:!1},P=e.setDocument=function(t){var e,i,s=t?t.ownerDocument||t:L;return s!==M&&9===s.nodeType&&s.documentElement?(M=s,E=M.documentElement,N=!k(M),(i=M.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",xt,!1):i.attachEvent&&i.attachEvent("onunload",xt)),w.attributes=n(function(t){return t.className="i",!t.getAttribute("className")}),w.getElementsByTagName=n(function(t){return t.appendChild(M.createComment("")),!t.getElementsByTagName("*").length}),w.getElementsByClassName=mt.test(M.getElementsByClassName),w.getById=n(function(t){return E.appendChild(t).id=j,!M.getElementsByName||!M.getElementsByName(j).length}),w.getById?(x.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&N){var i=e.getElementById(t);return i?[i]:[]}},x.filter.ID=function(t){var e=t.replace(_t,wt);return function(t){return t.getAttribute("id")===e}}):(delete x.find.ID,x.filter.ID=function(t){var e=t.replace(_t,wt);return function(t){var i="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}}),x.find.TAG=w.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):w.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,s=[],n=0,o=e.getElementsByTagName(t);if("*"===t){for(;i=o[n++];)1===i.nodeType&&s.push(i);return s}return o},x.find.CLASS=w.getElementsByClassName&&function(t,e){return"undefined"!=typeof e.getElementsByClassName&&N?e.getElementsByClassName(t):void 0},H=[],R=[],(w.qsa=mt.test(M.querySelectorAll))&&(n(function(t){E.appendChild(t).innerHTML="<a id='"+j+"'></a><select id='"+j+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&R.push("[*^$]="+it+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||R.push("\\["+it+"*(?:value|"+et+")"),t.querySelectorAll("[id~="+j+"-]").length||R.push("~="),t.querySelectorAll(":checked").length||R.push(":checked"),t.querySelectorAll("a#"+j+"+*").length||R.push(".#.+[+~]")}),n(function(t){var e=M.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&R.push("name"+it+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||R.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),R.push(",.*:")})),(w.matchesSelector=mt.test(O=E.matches||E.webkitMatchesSelector||E.mozMatchesSelector||E.oMatchesSelector||E.msMatchesSelector))&&n(function(t){w.disconnectedMatch=O.call(t,"div"),O.call(t,"[s!='']:x"),H.push("!=",ot)}),R=R.length&&new RegExp(R.join("|")),H=H.length&&new RegExp(H.join("|")),e=mt.test(E.compareDocumentPosition),W=e||mt.test(E.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,s=e&&e.parentNode;return t===s||!(!s||1!==s.nodeType||!(i.contains?i.contains(s):t.compareDocumentPosition&&16&t.compareDocumentPosition(s)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},V=e?function(t,e){if(t===e)return A=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i?i:(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&i||!w.sortDetached&&e.compareDocumentPosition(t)===i?t===M||t.ownerDocument===L&&W(L,t)?-1:e===M||e.ownerDocument===L&&W(L,e)?1:I?tt(I,t)-tt(I,e):0:4&i?-1:1)}:function(t,e){if(t===e)return A=!0,0;var i,s=0,n=t.parentNode,o=e.parentNode,a=[t],l=[e];if(!n||!o)return t===M?-1:e===M?1:n?-1:o?1:I?tt(I,t)-tt(I,e):0;if(n===o)return r(t,e);for(i=t;i=i.parentNode;)a.unshift(i);for(i=e;i=i.parentNode;)l.unshift(i);for(;a[s]===l[s];)s++;return s?r(a[s],l[s]):a[s]===L?-1:l[s]===L?1:0},M):M},e.matches=function(t,i){return e(t,null,null,i)},e.matchesSelector=function(t,i){if((t.ownerDocument||t)!==M&&P(t),i=i.replace(ut,"='$1']"),w.matchesSelector&&N&&!U[i+" "]&&(!H||!H.test(i))&&(!R||!R.test(i)))try{var s=O.call(t,i);if(s||w.disconnectedMatch||t.document&&11!==t.document.nodeType)return s}catch(n){}return e(i,M,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==M&&P(t),W(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==M&&P(t);var i=x.attrHandle[e.toLowerCase()],s=i&&K.call(x.attrHandle,e.toLowerCase())?i(t,e,!N):void 0;return void 0!==s?s:w.attributes||!N?t.getAttribute(e):(s=t.getAttributeNode(e))&&s.specified?s.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,i=[],s=0,n=0;if(A=!w.detectDuplicates,I=!w.sortStable&&t.slice(0),t.sort(V),A){for(;e=t[n++];)e===t[n]&&(s=i.push(n));for(;s--;)t.splice(i[s],1)}return I=null,t},C=e.getText=function(t){var e,i="",s=0,n=t.nodeType;if(n){if(1===n||9===n||11===n){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=C(t)}else if(3===n||4===n)return t.nodeValue}else for(;e=t[s++];)i+=C(e);return i},x=e.selectors={cacheLength:50,createPseudo:s,match:pt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(_t,wt),t[3]=(t[3]||t[4]||t[5]||"").replace(_t,wt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return pt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&ct.test(i)&&(e=D(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(_t,wt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=B[t+" "];return e||(e=new RegExp("(^|"+it+")"+t+"("+it+"|$)"))&&B(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,i,s){return function(n){var o=e.attr(n,t);return null==o?"!="===i:i?(o+="","="===i?o===s:"!="===i?o!==s:"^="===i?s&&0===o.indexOf(s):"*="===i?s&&o.indexOf(s)>-1:"$="===i?s&&o.slice(-s.length)===s:"~="===i?(" "+o.replace(rt," ")+" ").indexOf(s)>-1:"|="===i?o===s||o.slice(0,s.length+1)===s+"-":!1):!0}},CHILD:function(t,e,i,s,n){var o="nth"!==t.slice(0,3),r="last"!==t.slice(-4),a="of-type"===e;return 1===s&&0===n?function(t){return!!t.parentNode}:function(e,i,l){var h,u,c,d,p,f,g=o!==r?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),b=!l&&!a,y=!1;if(m){if(o){for(;g;){for(d=e;d=d[g];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[r?m.firstChild:m.lastChild],r&&b){for(d=m,c=d[j]||(d[j]={}),u=c[d.uniqueID]||(c[d.uniqueID]={}),h=u[t]||[],p=h[0]===F&&h[1],y=p&&h[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(y=p=0)||f.pop();)if(1===d.nodeType&&++y&&d===e){u[t]=[F,p,y];break}}else if(b&&(d=e,c=d[j]||(d[j]={}),u=c[d.uniqueID]||(c[d.uniqueID]={}),h=u[t]||[],p=h[0]===F&&h[1],y=p),y===!1)for(;(d=++p&&d&&d[g]||(y=p=0)||f.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++y||(b&&(c=d[j]||(d[j]={}),u=c[d.uniqueID]||(c[d.uniqueID]={}),u[t]=[F,y]),d!==e)););return y-=n,y===s||y%s===0&&y/s>=0}}},PSEUDO:function(t,i){var n,o=x.pseudos[t]||x.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[j]?o(i):o.length>1?(n=[t,t,"",i],x.setFilters.hasOwnProperty(t.toLowerCase())?s(function(t,e){for(var s,n=o(t,i),r=n.length;r--;)s=tt(t,n[r]),t[s]=!(e[s]=n[r])}):function(t){return o(t,0,n)}):o}},pseudos:{not:s(function(t){var e=[],i=[],n=S(t.replace(at,"$1"));return n[j]?s(function(t,e,i,s){for(var o,r=n(t,null,s,[]),a=t.length;a--;)(o=r[a])&&(t[a]=!(e[a]=o))}):function(t,s,o){return e[0]=t,n(e,null,o,i),e[0]=null,!i.pop()}}),has:s(function(t){return function(i){return e(t,i).length>0}}),contains:s(function(t){return t=t.replace(_t,wt),function(e){return(e.textContent||e.innerText||C(e)).indexOf(t)>-1}}),lang:s(function(t){return dt.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(_t,wt).toLowerCase(),function(e){var i;do if(i=N?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return i=i.toLowerCase(),i===t||0===i.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===E},focus:function(t){return t===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!x.pseudos.empty(t)},header:function(t){return gt.test(t.nodeName)},input:function(t){return ft.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:h(function(){return[0]}),last:h(function(t,e){return[e-1]}),eq:h(function(t,e,i){return[0>i?i+e:i]}),even:h(function(t,e){for(var i=0;e>i;i+=2)t.push(i);return t}),odd:h(function(t,e){
10
- for(var i=1;e>i;i+=2)t.push(i);return t}),lt:h(function(t,e,i){for(var s=0>i?i+e:i;--s>=0;)t.push(s);return t}),gt:h(function(t,e,i){for(var s=0>i?i+e:i;++s<e;)t.push(s);return t})}},x.pseudos.nth=x.pseudos.eq;for(_ in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})x.pseudos[_]=a(_);for(_ in{submit:!0,reset:!0})x.pseudos[_]=l(_);return c.prototype=x.filters=x.pseudos,x.setFilters=new c,D=e.tokenize=function(t,i){var s,n,o,r,a,l,h,u=Y[t+" "];if(u)return i?0:u.slice(0);for(a=t,l=[],h=x.preFilter;a;){s&&!(n=lt.exec(a))||(n&&(a=a.slice(n[0].length)||a),l.push(o=[])),s=!1,(n=ht.exec(a))&&(s=n.shift(),o.push({value:s,type:n[0].replace(at," ")}),a=a.slice(s.length));for(r in x.filter)!(n=pt[r].exec(a))||h[r]&&!(n=h[r](n))||(s=n.shift(),o.push({value:s,type:r,matches:n}),a=a.slice(s.length));if(!s)break}return i?a.length:a?e.error(t):Y(t,l).slice(0)},S=e.compile=function(t,e){var i,s=[],n=[],o=U[t+" "];if(!o){for(e||(e=D(t)),i=e.length;i--;)o=b(e[i]),o[j]?s.push(o):n.push(o);o=U(t,y(n,s)),o.selector=t}return o},T=e.select=function(t,e,i,s){var n,o,r,a,l,h="function"==typeof t&&t,c=!s&&D(t=h.selector||t);if(i=i||[],1===c.length){if(o=c[0]=c[0].slice(0),o.length>2&&"ID"===(r=o[0]).type&&w.getById&&9===e.nodeType&&N&&x.relative[o[1].type]){if(e=(x.find.ID(r.matches[0].replace(_t,wt),e)||[])[0],!e)return i;h&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(n=pt.needsContext.test(t)?0:o.length;n--&&(r=o[n],!x.relative[a=r.type]);)if((l=x.find[a])&&(s=l(r.matches[0].replace(_t,wt),bt.test(o[0].type)&&u(e.parentNode)||e))){if(o.splice(n,1),t=s.length&&d(o),!t)return Q.apply(i,s),i;break}}return(h||S(t,c))(s,e,!N,i,!e||bt.test(t)&&u(e.parentNode)||e),i},w.sortStable=j.split("").sort(V).join("")===j,w.detectDuplicates=!!A,P(),w.sortDetached=n(function(t){return 1&t.compareDocumentPosition(M.createElement("div"))}),n(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,i){return i?void 0:t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),w.attributes&&n(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,i){return i||"input"!==t.nodeName.toLowerCase()?void 0:t.defaultValue}),n(function(t){return null==t.getAttribute("disabled")})||o(et,function(t,e,i){var s;return i?void 0:t[e]===!0?e.toLowerCase():(s=t.getAttributeNode(e))&&s.specified?s.value:null}),e}(t);ot.find=ut,ot.expr=ut.selectors,ot.expr[":"]=ot.expr.pseudos,ot.uniqueSort=ot.unique=ut.uniqueSort,ot.text=ut.getText,ot.isXMLDoc=ut.isXML,ot.contains=ut.contains;var ct=function(t,e,i){for(var s=[],n=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(n&&ot(t).is(i))break;s.push(t)}return s},dt=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},pt=ot.expr.match.needsContext,ft=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,gt=/^.[^:#\[\.,]*$/;ot.filter=function(t,e,i){var s=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===s.nodeType?ot.find.matchesSelector(s,t)?[s]:[]:ot.find.matches(t,ot.grep(e,function(t){return 1===t.nodeType}))},ot.fn.extend({find:function(t){var e,i=this.length,s=[],n=this;if("string"!=typeof t)return this.pushStack(ot(t).filter(function(){for(e=0;i>e;e++)if(ot.contains(n[e],this))return!0}));for(e=0;i>e;e++)ot.find(t,n[e],s);return s=this.pushStack(i>1?ot.unique(s):s),s.selector=this.selector?this.selector+" "+t:t,s},filter:function(t){return this.pushStack(s(this,t||[],!1))},not:function(t){return this.pushStack(s(this,t||[],!0))},is:function(t){return!!s(this,"string"==typeof t&&pt.test(t)?ot(t):t||[],!1).length}});var mt,vt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,bt=ot.fn.init=function(t,e,i){var s,n;if(!t)return this;if(i=i||mt,"string"==typeof t){if(s="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:vt.exec(t),!s||!s[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(s[1]){if(e=e instanceof ot?e[0]:e,ot.merge(this,ot.parseHTML(s[1],e&&e.nodeType?e.ownerDocument||e:X,!0)),ft.test(s[1])&&ot.isPlainObject(e))for(s in e)ot.isFunction(this[s])?this[s](e[s]):this.attr(s,e[s]);return this}return n=X.getElementById(s[2]),n&&n.parentNode&&(this.length=1,this[0]=n),this.context=X,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):ot.isFunction(t)?void 0!==i.ready?i.ready(t):t(ot):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),ot.makeArray(t,this))};bt.prototype=ot.fn,mt=ot(X);var yt=/^(?:parents|prev(?:Until|All))/,_t={children:!0,contents:!0,next:!0,prev:!0};ot.fn.extend({has:function(t){var e=ot(t,this),i=e.length;return this.filter(function(){for(var t=0;i>t;t++)if(ot.contains(this,e[t]))return!0})},closest:function(t,e){for(var i,s=0,n=this.length,o=[],r=pt.test(t)||"string"!=typeof t?ot(t,e||this.context):0;n>s;s++)for(i=this[s];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(r?r.index(i)>-1:1===i.nodeType&&ot.find.matchesSelector(i,t))){o.push(i);break}return this.pushStack(o.length>1?ot.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?Z.call(ot(t),this[0]):Z.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(ot.uniqueSort(ot.merge(this.get(),ot(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),ot.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return ct(t,"parentNode")},parentsUntil:function(t,e,i){return ct(t,"parentNode",i)},next:function(t){return n(t,"nextSibling")},prev:function(t){return n(t,"previousSibling")},nextAll:function(t){return ct(t,"nextSibling")},prevAll:function(t){return ct(t,"previousSibling")},nextUntil:function(t,e,i){return ct(t,"nextSibling",i)},prevUntil:function(t,e,i){return ct(t,"previousSibling",i)},siblings:function(t){return dt((t.parentNode||{}).firstChild,t)},children:function(t){return dt(t.firstChild)},contents:function(t){return t.contentDocument||ot.merge([],t.childNodes)}},function(t,e){ot.fn[t]=function(i,s){var n=ot.map(this,e,i);return"Until"!==t.slice(-5)&&(s=i),s&&"string"==typeof s&&(n=ot.filter(s,n)),this.length>1&&(_t[t]||ot.uniqueSort(n),yt.test(t)&&n.reverse()),this.pushStack(n)}});var wt=/\S+/g;ot.Callbacks=function(t){t="string"==typeof t?o(t):ot.extend({},t);var e,i,s,n,r=[],a=[],l=-1,h=function(){for(n=t.once,s=e=!0;a.length;l=-1)for(i=a.shift();++l<r.length;)r[l].apply(i[0],i[1])===!1&&t.stopOnFalse&&(l=r.length,i=!1);t.memory||(i=!1),e=!1,n&&(r=i?[]:"")},u={add:function(){return r&&(i&&!e&&(l=r.length-1,a.push(i)),function s(e){ot.each(e,function(e,i){ot.isFunction(i)?t.unique&&u.has(i)||r.push(i):i&&i.length&&"string"!==ot.type(i)&&s(i)})}(arguments),i&&!e&&h()),this},remove:function(){return ot.each(arguments,function(t,e){for(var i;(i=ot.inArray(e,r,i))>-1;)r.splice(i,1),l>=i&&l--}),this},has:function(t){return t?ot.inArray(t,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return n=a=[],r=i="",this},disabled:function(){return!r},lock:function(){return n=a=[],i||(r=i=""),this},locked:function(){return!!n},fireWith:function(t,i){return n||(i=i||[],i=[t,i.slice?i.slice():i],a.push(i),e||h()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!s}};return u},ot.extend({Deferred:function(t){var e=[["resolve","done",ot.Callbacks("once memory"),"resolved"],["reject","fail",ot.Callbacks("once memory"),"rejected"],["notify","progress",ot.Callbacks("memory")]],i="pending",s={state:function(){return i},always:function(){return n.done(arguments).fail(arguments),this},then:function(){var t=arguments;return ot.Deferred(function(i){ot.each(e,function(e,o){var r=ot.isFunction(t[e])&&t[e];n[o[1]](function(){var t=r&&r.apply(this,arguments);t&&ot.isFunction(t.promise)?t.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[o[0]+"With"](this===s?i.promise():this,r?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?ot.extend(t,s):s}},n={};return s.pipe=s.then,ot.each(e,function(t,o){var r=o[2],a=o[3];s[o[1]]=r.add,a&&r.add(function(){i=a},e[1^t][2].disable,e[2][2].lock),n[o[0]]=function(){return n[o[0]+"With"](this===n?s:this,arguments),this},n[o[0]+"With"]=r.fireWith}),s.promise(n),t&&t.call(n,n),n},when:function(t){var e,i,s,n=0,o=G.call(arguments),r=o.length,a=1!==r||t&&ot.isFunction(t.promise)?r:0,l=1===a?t:ot.Deferred(),h=function(t,i,s){return function(n){i[t]=this,s[t]=arguments.length>1?G.call(arguments):n,s===e?l.notifyWith(i,s):--a||l.resolveWith(i,s)}};if(r>1)for(e=new Array(r),i=new Array(r),s=new Array(r);r>n;n++)o[n]&&ot.isFunction(o[n].promise)?o[n].promise().progress(h(n,i,e)).done(h(n,s,o)).fail(l.reject):--a;return a||l.resolveWith(s,o),l.promise()}});var xt;ot.fn.ready=function(t){return ot.ready.promise().done(t),this},ot.extend({isReady:!1,readyWait:1,holdReady:function(t){t?ot.readyWait++:ot.ready(!0)},ready:function(t){(t===!0?--ot.readyWait:ot.isReady)||(ot.isReady=!0,t!==!0&&--ot.readyWait>0||(xt.resolveWith(X,[ot]),ot.fn.triggerHandler&&(ot(X).triggerHandler("ready"),ot(X).off("ready"))))}}),ot.ready.promise=function(e){return xt||(xt=ot.Deferred(),"complete"===X.readyState||"loading"!==X.readyState&&!X.documentElement.doScroll?t.setTimeout(ot.ready):(X.addEventListener("DOMContentLoaded",r),t.addEventListener("load",r))),xt.promise(e)},ot.ready.promise();var Ct=function(t,e,i,s,n,o,r){var a=0,l=t.length,h=null==i;if("object"===ot.type(i)){n=!0;for(a in i)Ct(t,e,a,i[a],!0,o,r)}else if(void 0!==s&&(n=!0,ot.isFunction(s)||(r=!0),h&&(r?(e.call(t,s),e=null):(h=e,e=function(t,e,i){return h.call(ot(t),i)})),e))for(;l>a;a++)e(t[a],i,r?s:s.call(t[a],a,e(t[a],i)));return n?t:h?e.call(t):l?e(t[0],i):o},kt=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};a.uid=1,a.prototype={register:function(t,e){var i=e||{};return t.nodeType?t[this.expando]=i:Object.defineProperty(t,this.expando,{value:i,writable:!0,configurable:!0}),t[this.expando]},cache:function(t){if(!kt(t))return{};var e=t[this.expando];return e||(e={},kt(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,i){var s,n=this.cache(t);if("string"==typeof e)n[e]=i;else for(s in e)n[s]=e[s];return n},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][e]},access:function(t,e,i){var s;return void 0===e||e&&"string"==typeof e&&void 0===i?(s=this.get(t,e),void 0!==s?s:this.get(t,ot.camelCase(e))):(this.set(t,e,i),void 0!==i?i:e)},remove:function(t,e){var i,s,n,o=t[this.expando];if(void 0!==o){if(void 0===e)this.register(t);else{ot.isArray(e)?s=e.concat(e.map(ot.camelCase)):(n=ot.camelCase(e),e in o?s=[e,n]:(s=n,s=s in o?[s]:s.match(wt)||[])),i=s.length;for(;i--;)delete o[s[i]]}(void 0===e||ot.isEmptyObject(o))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!ot.isEmptyObject(e)}};var Dt=new a,St=new a,Tt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,zt=/[A-Z]/g;ot.extend({hasData:function(t){return St.hasData(t)||Dt.hasData(t)},data:function(t,e,i){return St.access(t,e,i)},removeData:function(t,e){St.remove(t,e)},_data:function(t,e,i){return Dt.access(t,e,i)},_removeData:function(t,e){Dt.remove(t,e)}}),ot.fn.extend({data:function(t,e){var i,s,n,o=this[0],r=o&&o.attributes;if(void 0===t){if(this.length&&(n=St.get(o),1===o.nodeType&&!Dt.get(o,"hasDataAttrs"))){for(i=r.length;i--;)r[i]&&(s=r[i].name,0===s.indexOf("data-")&&(s=ot.camelCase(s.slice(5)),l(o,s,n[s])));Dt.set(o,"hasDataAttrs",!0)}return n}return"object"==typeof t?this.each(function(){St.set(this,t)}):Ct(this,function(e){var i,s;if(o&&void 0===e){if(i=St.get(o,t)||St.get(o,t.replace(zt,"-$&").toLowerCase()),void 0!==i)return i;if(s=ot.camelCase(t),i=St.get(o,s),void 0!==i)return i;if(i=l(o,s,void 0),void 0!==i)return i}else s=ot.camelCase(t),this.each(function(){var i=St.get(this,s);St.set(this,s,e),t.indexOf("-")>-1&&void 0!==i&&St.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){St.remove(this,t)})}}),ot.extend({queue:function(t,e,i){var s;return t?(e=(e||"fx")+"queue",s=Dt.get(t,e),i&&(!s||ot.isArray(i)?s=Dt.access(t,e,ot.makeArray(i)):s.push(i)),s||[]):void 0},dequeue:function(t,e){e=e||"fx";var i=ot.queue(t,e),s=i.length,n=i.shift(),o=ot._queueHooks(t,e),r=function(){ot.dequeue(t,e)};"inprogress"===n&&(n=i.shift(),s--),n&&("fx"===e&&i.unshift("inprogress"),delete o.stop,n.call(t,r,o)),!s&&o&&o.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return Dt.get(t,i)||Dt.access(t,i,{empty:ot.Callbacks("once memory").add(function(){Dt.remove(t,[e+"queue",i])})})}}),ot.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length<i?ot.queue(this[0],t):void 0===e?this:this.each(function(){var i=ot.queue(this,t,e);ot._queueHooks(this,t),"fx"===t&&"inprogress"!==i[0]&&ot.dequeue(this,t)})},dequeue:function(t){return this.each(function(){ot.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var i,s=1,n=ot.Deferred(),o=this,r=this.length,a=function(){--s||n.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";r--;)i=Dt.get(o[r],t+"queueHooks"),i&&i.empty&&(s++,i.empty.add(a));return a(),n.promise(e)}});var It=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,At=new RegExp("^(?:([+-])=|)("+It+")([a-z%]*)$","i"),Pt=["Top","Right","Bottom","Left"],Mt=function(t,e){return t=e||t,"none"===ot.css(t,"display")||!ot.contains(t.ownerDocument,t)},Et=/^(?:checkbox|radio)$/i,Nt=/<([\w:-]+)/,Rt=/^$|\/(?:java|ecma)script/i,Ht={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ht.optgroup=Ht.option,Ht.tbody=Ht.tfoot=Ht.colgroup=Ht.caption=Ht.thead,Ht.th=Ht.td;var Ot=/<|&#?\w+;/;!function(){var t=X.createDocumentFragment(),e=t.appendChild(X.createElement("div")),i=X.createElement("input");i.setAttribute("type","radio"),i.setAttribute("checked","checked"),i.setAttribute("name","t"),e.appendChild(i),st.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",st.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var Wt=/^key/,jt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Lt=/^([^.]*)(?:\.(.+)|)/;ot.event={global:{},add:function(t,e,i,s,n){var o,r,a,l,h,u,c,d,p,f,g,m=Dt.get(t);if(m)for(i.handler&&(o=i,i=o.handler,n=o.selector),i.guid||(i.guid=ot.guid++),(l=m.events)||(l=m.events={}),(r=m.handle)||(r=m.handle=function(e){return"undefined"!=typeof ot&&ot.event.triggered!==e.type?ot.event.dispatch.apply(t,arguments):void 0}),e=(e||"").match(wt)||[""],h=e.length;h--;)a=Lt.exec(e[h])||[],p=g=a[1],f=(a[2]||"").split(".").sort(),p&&(c=ot.event.special[p]||{},p=(n?c.delegateType:c.bindType)||p,c=ot.event.special[p]||{},u=ot.extend({type:p,origType:g,data:s,handler:i,guid:i.guid,selector:n,needsContext:n&&ot.expr.match.needsContext.test(n),namespace:f.join(".")},o),(d=l[p])||(d=l[p]=[],d.delegateCount=0,c.setup&&c.setup.call(t,s,f,r)!==!1||t.addEventListener&&t.addEventListener(p,r)),c.add&&(c.add.call(t,u),u.handler.guid||(u.handler.guid=i.guid)),n?d.splice(d.delegateCount++,0,u):d.push(u),ot.event.global[p]=!0)},remove:function(t,e,i,s,n){var o,r,a,l,h,u,c,d,p,f,g,m=Dt.hasData(t)&&Dt.get(t);if(m&&(l=m.events)){for(e=(e||"").match(wt)||[""],h=e.length;h--;)if(a=Lt.exec(e[h])||[],p=g=a[1],f=(a[2]||"").split(".").sort(),p){for(c=ot.event.special[p]||{},p=(s?c.delegateType:c.bindType)||p,d=l[p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=o=d.length;o--;)u=d[o],!n&&g!==u.origType||i&&i.guid!==u.guid||a&&!a.test(u.namespace)||s&&s!==u.selector&&("**"!==s||!u.selector)||(d.splice(o,1),u.selector&&d.delegateCount--,c.remove&&c.remove.call(t,u));r&&!d.length&&(c.teardown&&c.teardown.call(t,f,m.handle)!==!1||ot.removeEvent(t,p,m.handle),delete l[p])}else for(p in l)ot.event.remove(t,p+e[h],i,s,!0);ot.isEmptyObject(l)&&Dt.remove(t,"handle events")}},dispatch:function(t){t=ot.event.fix(t);var e,i,s,n,o,r=[],a=G.call(arguments),l=(Dt.get(this,"events")||{})[t.type]||[],h=ot.event.special[t.type]||{};if(a[0]=t,t.delegateTarget=this,!h.preDispatch||h.preDispatch.call(this,t)!==!1){for(r=ot.event.handlers.call(this,t,l),e=0;(n=r[e++])&&!t.isPropagationStopped();)for(t.currentTarget=n.elem,i=0;(o=n.handlers[i++])&&!t.isImmediatePropagationStopped();)t.rnamespace&&!t.rnamespace.test(o.namespace)||(t.handleObj=o,t.data=o.data,s=((ot.event.special[o.origType]||{}).handle||o.handler).apply(n.elem,a),void 0!==s&&(t.result=s)===!1&&(t.preventDefault(),t.stopPropagation()));return h.postDispatch&&h.postDispatch.call(this,t),t.result}},handlers:function(t,e){var i,s,n,o,r=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==t.type)){for(s=[],i=0;a>i;i++)o=e[i],n=o.selector+" ",void 0===s[n]&&(s[n]=o.needsContext?ot(n,this).index(l)>-1:ot.find(n,this,null,[l]).length),s[n]&&s.push(o);s.length&&r.push({elem:l,handlers:s})}return a<e.length&&r.push({elem:this,handlers:e.slice(a)}),r},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var i,s,n,o=e.button;return null==t.pageX&&null!=e.clientX&&(i=t.target.ownerDocument||X,s=i.documentElement,n=i.body,t.pageX=e.clientX+(s&&s.scrollLeft||n&&n.scrollLeft||0)-(s&&s.clientLeft||n&&n.clientLeft||0),t.pageY=e.clientY+(s&&s.scrollTop||n&&n.scrollTop||0)-(s&&s.clientTop||n&&n.clientTop||0)),t.which||void 0===o||(t.which=1&o?1:2&o?3:4&o?2:0),t}},fix:function(t){if(t[ot.expando])return t;var e,i,s,n=t.type,o=t,r=this.fixHooks[n];for(r||(this.fixHooks[n]=r=jt.test(n)?this.mouseHooks:Wt.test(n)?this.keyHooks:{}),s=r.props?this.props.concat(r.props):this.props,t=new ot.Event(o),e=s.length;e--;)i=s[e],t[i]=o[i];return t.target||(t.target=X),3===t.target.nodeType&&(t.target=t.target.parentNode),r.filter?r.filter(t,o):t},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==g()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===g()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&ot.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(t){return ot.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},ot.removeEvent=function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i)},ot.Event=function(t,e){return this instanceof ot.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&t.returnValue===!1?p:f):this.type=t,e&&ot.extend(this,e),this.timeStamp=t&&t.timeStamp||ot.now(),void(this[ot.expando]=!0)):new ot.Event(t,e)},ot.Event.prototype={constructor:ot.Event,isDefaultPrevented:f,isPropagationStopped:f,isImmediatePropagationStopped:f,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=p,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=p,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=p,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},ot.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){ot.event.special[t]={delegateType:e,bindType:e,handle:function(t){var i,s=this,n=t.relatedTarget,o=t.handleObj;return n&&(n===s||ot.contains(s,n))||(t.type=o.origType,i=o.handler.apply(this,arguments),t.type=e),i}}}),ot.fn.extend({on:function(t,e,i,s){return m(this,t,e,i,s)},one:function(t,e,i,s){return m(this,t,e,i,s,1)},off:function(t,e,i){var s,n;if(t&&t.preventDefault&&t.handleObj)return s=t.handleObj,ot(t.delegateTarget).off(s.namespace?s.origType+"."+s.namespace:s.origType,s.selector,s.handler),this;if("object"==typeof t){for(n in t)this.off(n,e,t[n]);return this}return e!==!1&&"function"!=typeof e||(i=e,e=void 0),i===!1&&(i=f),this.each(function(){ot.event.remove(this,t,i,e)})}});var Ft=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,qt=/<script|<style|<link/i,Bt=/checked\s*(?:[^=]|=\s*.checked.)/i,Yt=/^true\/(.*)/,Ut=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;ot.extend({htmlPrefilter:function(t){return t.replace(Ft,"<$1></$2>")},clone:function(t,e,i){var s,n,o,r,a=t.cloneNode(!0),l=ot.contains(t.ownerDocument,t);if(!(st.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||ot.isXMLDoc(t)))for(r=u(a),o=u(t),s=0,n=o.length;n>s;s++)w(o[s],r[s]);if(e)if(i)for(o=o||u(t),r=r||u(a),s=0,n=o.length;n>s;s++)_(o[s],r[s]);else _(t,a);return r=u(a,"script"),r.length>0&&c(r,!l&&u(t,"script")),a},cleanData:function(t){for(var e,i,s,n=ot.event.special,o=0;void 0!==(i=t[o]);o++)if(kt(i)){if(e=i[Dt.expando]){if(e.events)for(s in e.events)n[s]?ot.event.remove(i,s):ot.removeEvent(i,s,e.handle);i[Dt.expando]=void 0}i[St.expando]&&(i[St.expando]=void 0)}}}),ot.fn.extend({domManip:x,detach:function(t){return C(this,t,!0)},remove:function(t){return C(this,t)},text:function(t){return Ct(this,function(t){return void 0===t?ot.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return x(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=v(this,t);e.appendChild(t)}})},prepend:function(){return x(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=v(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return x(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return x(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(ot.cleanData(u(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null==t?!1:t,e=null==e?t:e,this.map(function(){return ot.clone(this,t,e)})},html:function(t){return Ct(this,function(t){var e=this[0]||{},i=0,s=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!qt.test(t)&&!Ht[(Nt.exec(t)||["",""])[1].toLowerCase()]){t=ot.htmlPrefilter(t);try{for(;s>i;i++)e=this[i]||{},1===e.nodeType&&(ot.cleanData(u(e,!1)),e.innerHTML=t);e=0}catch(n){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return x(this,arguments,function(e){var i=this.parentNode;ot.inArray(this,t)<0&&(ot.cleanData(u(this)),i&&i.replaceChild(e,this))},t)}}),ot.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){ot.fn[t]=function(t){for(var i,s=[],n=ot(t),o=n.length-1,r=0;o>=r;r++)i=r===o?this:this.clone(!0),ot(n[r])[e](i),Q.apply(s,i.get());return this.pushStack(s)}});var Vt,$t={HTML:"block",BODY:"block"},Kt=/^margin/,Xt=new RegExp("^("+It+")(?!px)[a-z%]+$","i"),Gt=function(e){var i=e.ownerDocument.defaultView;return i&&i.opener||(i=t),i.getComputedStyle(e)},Jt=function(t,e,i,s){var n,o,r={};for(o in e)r[o]=t.style[o],t.style[o]=e[o];n=i.apply(t,s||[]);for(o in e)t.style[o]=r[o];return n},Qt=X.documentElement;!function(){function e(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",a.innerHTML="",Qt.appendChild(r);var e=t.getComputedStyle(a);i="1%"!==e.top,o="2px"===e.marginLeft,s="4px"===e.width,a.style.marginRight="50%",n="4px"===e.marginRight,Qt.removeChild(r)}var i,s,n,o,r=X.createElement("div"),a=X.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",st.clearCloneStyle="content-box"===a.style.backgroundClip,r.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",r.appendChild(a),ot.extend(st,{pixelPosition:function(){return e(),i},boxSizingReliable:function(){return null==s&&e(),s},pixelMarginRight:function(){return null==s&&e(),n},reliableMarginLeft:function(){return null==s&&e(),o},reliableMarginRight:function(){var e,i=a.appendChild(X.createElement("div"));return i.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",a.style.width="1px",Qt.appendChild(r),e=!parseFloat(t.getComputedStyle(i).marginRight),Qt.removeChild(r),a.removeChild(i),e}}))}();var Zt=/^(none|table(?!-c[ea]).+)/,te={position:"absolute",visibility:"hidden",display:"block"},ee={letterSpacing:"0",fontWeight:"400"},ie=["Webkit","O","Moz","ms"],se=X.createElement("div").style;ot.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=S(t,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(t,e,i,s){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var n,o,r,a=ot.camelCase(e),l=t.style;return e=ot.cssProps[a]||(ot.cssProps[a]=z(a)||a),r=ot.cssHooks[e]||ot.cssHooks[a],void 0===i?r&&"get"in r&&void 0!==(n=r.get(t,!1,s))?n:l[e]:(o=typeof i,"string"===o&&(n=At.exec(i))&&n[1]&&(i=h(t,e,n),o="number"),void(null!=i&&i===i&&("number"===o&&(i+=n&&n[3]||(ot.cssNumber[a]?"":"px")),st.clearCloneStyle||""!==i||0!==e.indexOf("background")||(l[e]="inherit"),r&&"set"in r&&void 0===(i=r.set(t,i,s))||(l[e]=i))))}},css:function(t,e,i,s){var n,o,r,a=ot.camelCase(e);return e=ot.cssProps[a]||(ot.cssProps[a]=z(a)||a),r=ot.cssHooks[e]||ot.cssHooks[a],r&&"get"in r&&(n=r.get(t,!0,i)),void 0===n&&(n=S(t,e,s)),"normal"===n&&e in ee&&(n=ee[e]),""===i||i?(o=parseFloat(n),i===!0||isFinite(o)?o||0:n):n}}),ot.each(["height","width"],function(t,e){ot.cssHooks[e]={get:function(t,i,s){return i?Zt.test(ot.css(t,"display"))&&0===t.offsetWidth?Jt(t,te,function(){return P(t,e,s)}):P(t,e,s):void 0},set:function(t,i,s){var n,o=s&&Gt(t),r=s&&A(t,e,s,"border-box"===ot.css(t,"boxSizing",!1,o),o);return r&&(n=At.exec(i))&&"px"!==(n[3]||"px")&&(t.style[e]=i,i=ot.css(t,e)),I(t,i,r)}}}),ot.cssHooks.marginLeft=T(st.reliableMarginLeft,function(t,e){return e?(parseFloat(S(t,"marginLeft"))||t.getBoundingClientRect().left-Jt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px":void 0}),ot.cssHooks.marginRight=T(st.reliableMarginRight,function(t,e){return e?Jt(t,{display:"inline-block"},S,[t,"marginRight"]):void 0}),ot.each({margin:"",padding:"",border:"Width"},function(t,e){ot.cssHooks[t+e]={expand:function(i){for(var s=0,n={},o="string"==typeof i?i.split(" "):[i];4>s;s++)n[t+Pt[s]+e]=o[s]||o[s-2]||o[0];return n}},Kt.test(t)||(ot.cssHooks[t+e].set=I)}),ot.fn.extend({css:function(t,e){return Ct(this,function(t,e,i){var s,n,o={},r=0;if(ot.isArray(e)){for(s=Gt(t),n=e.length;n>r;r++)o[e[r]]=ot.css(t,e[r],!1,s);return o}return void 0!==i?ot.style(t,e,i):ot.css(t,e)},t,e,arguments.length>1)},show:function(){return M(this,!0)},hide:function(){return M(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Mt(this)?ot(this).show():ot(this).hide()})}}),ot.Tween=E,E.prototype={constructor:E,init:function(t,e,i,s,n,o){this.elem=t,this.prop=i,this.easing=n||ot.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=s,this.unit=o||(ot.cssNumber[i]?"":"px")},cur:function(){var t=E.propHooks[this.prop];return t&&t.get?t.get(this):E.propHooks._default.get(this)},run:function(t){var e,i=E.propHooks[this.prop];return this.options.duration?this.pos=e=ot.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):E.propHooks._default.set(this),this}},E.prototype.init.prototype=E.prototype,E.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=ot.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){ot.fx.step[t.prop]?ot.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[ot.cssProps[t.prop]]&&!ot.cssHooks[t.prop]?t.elem[t.prop]=t.now:ot.style(t.elem,t.prop,t.now+t.unit)}}},E.propHooks.scrollTop=E.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},ot.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},ot.fx=E.prototype.init,ot.fx.step={};var ne,oe,re=/^(?:toggle|show|hide)$/,ae=/queueHooks$/;ot.Animation=ot.extend(j,{tweeners:{"*":[function(t,e){var i=this.createTween(t,e);return h(i.elem,t,At.exec(e),i),i}]},tweener:function(t,e){ot.isFunction(t)?(e=t,t=["*"]):t=t.match(wt);for(var i,s=0,n=t.length;n>s;s++)i=t[s],j.tweeners[i]=j.tweeners[i]||[],j.tweeners[i].unshift(e)},prefilters:[O],prefilter:function(t,e){e?j.prefilters.unshift(t):j.prefilters.push(t)}}),ot.speed=function(t,e,i){var s=t&&"object"==typeof t?ot.extend({},t):{complete:i||!i&&e||ot.isFunction(t)&&t,duration:t,easing:i&&e||e&&!ot.isFunction(e)&&e};return s.duration=ot.fx.off?0:"number"==typeof s.duration?s.duration:s.duration in ot.fx.speeds?ot.fx.speeds[s.duration]:ot.fx.speeds._default,null!=s.queue&&s.queue!==!0||(s.queue="fx"),s.old=s.complete,s.complete=function(){ot.isFunction(s.old)&&s.old.call(this),s.queue&&ot.dequeue(this,s.queue)},s},ot.fn.extend({fadeTo:function(t,e,i,s){return this.filter(Mt).css("opacity",0).show().end().animate({opacity:e},t,i,s)},animate:function(t,e,i,s){var n=ot.isEmptyObject(t),o=ot.speed(e,i,s),r=function(){var e=j(this,ot.extend({},t),o);(n||Dt.get(this,"finish"))&&e.stop(!0)};return r.finish=r,n||o.queue===!1?this.each(r):this.queue(o.queue,r)},stop:function(t,e,i){var s=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,n=null!=t&&t+"queueHooks",o=ot.timers,r=Dt.get(this);if(n)r[n]&&r[n].stop&&s(r[n]);else for(n in r)r[n]&&r[n].stop&&ae.test(n)&&s(r[n]);for(n=o.length;n--;)o[n].elem!==this||null!=t&&o[n].queue!==t||(o[n].anim.stop(i),e=!1,o.splice(n,1));!e&&i||ot.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,i=Dt.get(this),s=i[t+"queue"],n=i[t+"queueHooks"],o=ot.timers,r=s?s.length:0;for(i.finish=!0,ot.queue(this,t,[]),n&&n.stop&&n.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;r>e;e++)s[e]&&s[e].finish&&s[e].finish.call(this);delete i.finish})}}),ot.each(["toggle","show","hide"],function(t,e){var i=ot.fn[e];ot.fn[e]=function(t,s,n){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(R(e,!0),t,s,n)}}),ot.each({slideDown:R("show"),slideUp:R("hide"),slideToggle:R("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){ot.fn[t]=function(t,i,s){return this.animate(e,t,i,s)}}),ot.timers=[],ot.fx.tick=function(){var t,e=0,i=ot.timers;for(ne=ot.now();e<i.length;e++)t=i[e],t()||i[e]!==t||i.splice(e--,1);
11
- i.length||ot.fx.stop(),ne=void 0},ot.fx.timer=function(t){ot.timers.push(t),t()?ot.fx.start():ot.timers.pop()},ot.fx.interval=13,ot.fx.start=function(){oe||(oe=t.setInterval(ot.fx.tick,ot.fx.interval))},ot.fx.stop=function(){t.clearInterval(oe),oe=null},ot.fx.speeds={slow:600,fast:200,_default:400},ot.fn.delay=function(e,i){return e=ot.fx?ot.fx.speeds[e]||e:e,i=i||"fx",this.queue(i,function(i,s){var n=t.setTimeout(i,e);s.stop=function(){t.clearTimeout(n)}})},function(){var t=X.createElement("input"),e=X.createElement("select"),i=e.appendChild(X.createElement("option"));t.type="checkbox",st.checkOn=""!==t.value,st.optSelected=i.selected,e.disabled=!0,st.optDisabled=!i.disabled,t=X.createElement("input"),t.value="t",t.type="radio",st.radioValue="t"===t.value}();var le,he=ot.expr.attrHandle;ot.fn.extend({attr:function(t,e){return Ct(this,ot.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){ot.removeAttr(this,t)})}}),ot.extend({attr:function(t,e,i){var s,n,o=t.nodeType;return 3!==o&&8!==o&&2!==o?"undefined"==typeof t.getAttribute?ot.prop(t,e,i):(1===o&&ot.isXMLDoc(t)||(e=e.toLowerCase(),n=ot.attrHooks[e]||(ot.expr.match.bool.test(e)?le:void 0)),void 0!==i?null===i?void ot.removeAttr(t,e):n&&"set"in n&&void 0!==(s=n.set(t,i,e))?s:(t.setAttribute(e,i+""),i):n&&"get"in n&&null!==(s=n.get(t,e))?s:(s=ot.find.attr(t,e),null==s?void 0:s)):void 0},attrHooks:{type:{set:function(t,e){if(!st.radioValue&&"radio"===e&&ot.nodeName(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,s,n=0,o=e&&e.match(wt);if(o&&1===t.nodeType)for(;i=o[n++];)s=ot.propFix[i]||i,ot.expr.match.bool.test(i)&&(t[s]=!1),t.removeAttribute(i)}}),le={set:function(t,e,i){return e===!1?ot.removeAttr(t,i):t.setAttribute(i,i),i}},ot.each(ot.expr.match.bool.source.match(/\w+/g),function(t,e){var i=he[e]||ot.find.attr;he[e]=function(t,e,s){var n,o;return s||(o=he[e],he[e]=n,n=null!=i(t,e,s)?e.toLowerCase():null,he[e]=o),n}});var ue=/^(?:input|select|textarea|button)$/i,ce=/^(?:a|area)$/i;ot.fn.extend({prop:function(t,e){return Ct(this,ot.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[ot.propFix[t]||t]})}}),ot.extend({prop:function(t,e,i){var s,n,o=t.nodeType;return 3!==o&&8!==o&&2!==o?(1===o&&ot.isXMLDoc(t)||(e=ot.propFix[e]||e,n=ot.propHooks[e]),void 0!==i?n&&"set"in n&&void 0!==(s=n.set(t,i,e))?s:t[e]=i:n&&"get"in n&&null!==(s=n.get(t,e))?s:t[e]):void 0},propHooks:{tabIndex:{get:function(t){var e=ot.find.attr(t,"tabindex");return e?parseInt(e,10):ue.test(t.nodeName)||ce.test(t.nodeName)&&t.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),st.optSelected||(ot.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),ot.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ot.propFix[this.toLowerCase()]=this});var de=/[\t\r\n\f]/g;ot.fn.extend({addClass:function(t){var e,i,s,n,o,r,a,l=0;if(ot.isFunction(t))return this.each(function(e){ot(this).addClass(t.call(this,e,L(this)))});if("string"==typeof t&&t)for(e=t.match(wt)||[];i=this[l++];)if(n=L(i),s=1===i.nodeType&&(" "+n+" ").replace(de," ")){for(r=0;o=e[r++];)s.indexOf(" "+o+" ")<0&&(s+=o+" ");a=ot.trim(s),n!==a&&i.setAttribute("class",a)}return this},removeClass:function(t){var e,i,s,n,o,r,a,l=0;if(ot.isFunction(t))return this.each(function(e){ot(this).removeClass(t.call(this,e,L(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(wt)||[];i=this[l++];)if(n=L(i),s=1===i.nodeType&&(" "+n+" ").replace(de," ")){for(r=0;o=e[r++];)for(;s.indexOf(" "+o+" ")>-1;)s=s.replace(" "+o+" "," ");a=ot.trim(s),n!==a&&i.setAttribute("class",a)}return this},toggleClass:function(t,e){var i=typeof t;return"boolean"==typeof e&&"string"===i?e?this.addClass(t):this.removeClass(t):ot.isFunction(t)?this.each(function(i){ot(this).toggleClass(t.call(this,i,L(this),e),e)}):this.each(function(){var e,s,n,o;if("string"===i)for(s=0,n=ot(this),o=t.match(wt)||[];e=o[s++];)n.hasClass(e)?n.removeClass(e):n.addClass(e);else void 0!==t&&"boolean"!==i||(e=L(this),e&&Dt.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||t===!1?"":Dt.get(this,"__className__")||""))})},hasClass:function(t){var e,i,s=0;for(e=" "+t+" ";i=this[s++];)if(1===i.nodeType&&(" "+L(i)+" ").replace(de," ").indexOf(e)>-1)return!0;return!1}});var pe=/\r/g,fe=/[\x20\t\r\n\f]+/g;ot.fn.extend({val:function(t){var e,i,s,n=this[0];return arguments.length?(s=ot.isFunction(t),this.each(function(i){var n;1===this.nodeType&&(n=s?t.call(this,i,ot(this).val()):t,null==n?n="":"number"==typeof n?n+="":ot.isArray(n)&&(n=ot.map(n,function(t){return null==t?"":t+""})),e=ot.valHooks[this.type]||ot.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,n,"value")||(this.value=n))})):n?(e=ot.valHooks[n.type]||ot.valHooks[n.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(i=e.get(n,"value"))?i:(i=n.value,"string"==typeof i?i.replace(pe,""):null==i?"":i)):void 0}}),ot.extend({valHooks:{option:{get:function(t){var e=ot.find.attr(t,"value");return null!=e?e:ot.trim(ot.text(t)).replace(fe," ")}},select:{get:function(t){for(var e,i,s=t.options,n=t.selectedIndex,o="select-one"===t.type||0>n,r=o?null:[],a=o?n+1:s.length,l=0>n?a:o?n:0;a>l;l++)if(i=s[l],(i.selected||l===n)&&(st.optDisabled?!i.disabled:null===i.getAttribute("disabled"))&&(!i.parentNode.disabled||!ot.nodeName(i.parentNode,"optgroup"))){if(e=ot(i).val(),o)return e;r.push(e)}return r},set:function(t,e){for(var i,s,n=t.options,o=ot.makeArray(e),r=n.length;r--;)s=n[r],(s.selected=ot.inArray(ot.valHooks.option.get(s),o)>-1)&&(i=!0);return i||(t.selectedIndex=-1),o}}}}),ot.each(["radio","checkbox"],function(){ot.valHooks[this]={set:function(t,e){return ot.isArray(e)?t.checked=ot.inArray(ot(t).val(),e)>-1:void 0}},st.checkOn||(ot.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var ge=/^(?:focusinfocus|focusoutblur)$/;ot.extend(ot.event,{trigger:function(e,i,s,n){var o,r,a,l,h,u,c,d=[s||X],p=it.call(e,"type")?e.type:e,f=it.call(e,"namespace")?e.namespace.split("."):[];if(r=a=s=s||X,3!==s.nodeType&&8!==s.nodeType&&!ge.test(p+ot.event.triggered)&&(p.indexOf(".")>-1&&(f=p.split("."),p=f.shift(),f.sort()),h=p.indexOf(":")<0&&"on"+p,e=e[ot.expando]?e:new ot.Event(p,"object"==typeof e&&e),e.isTrigger=n?2:3,e.namespace=f.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=s),i=null==i?[e]:ot.makeArray(i,[e]),c=ot.event.special[p]||{},n||!c.trigger||c.trigger.apply(s,i)!==!1)){if(!n&&!c.noBubble&&!ot.isWindow(s)){for(l=c.delegateType||p,ge.test(l+p)||(r=r.parentNode);r;r=r.parentNode)d.push(r),a=r;a===(s.ownerDocument||X)&&d.push(a.defaultView||a.parentWindow||t)}for(o=0;(r=d[o++])&&!e.isPropagationStopped();)e.type=o>1?l:c.bindType||p,u=(Dt.get(r,"events")||{})[e.type]&&Dt.get(r,"handle"),u&&u.apply(r,i),u=h&&r[h],u&&u.apply&&kt(r)&&(e.result=u.apply(r,i),e.result===!1&&e.preventDefault());return e.type=p,n||e.isDefaultPrevented()||c._default&&c._default.apply(d.pop(),i)!==!1||!kt(s)||h&&ot.isFunction(s[p])&&!ot.isWindow(s)&&(a=s[h],a&&(s[h]=null),ot.event.triggered=p,s[p](),ot.event.triggered=void 0,a&&(s[h]=a)),e.result}},simulate:function(t,e,i){var s=ot.extend(new ot.Event,i,{type:t,isSimulated:!0});ot.event.trigger(s,null,e)}}),ot.fn.extend({trigger:function(t,e){return this.each(function(){ot.event.trigger(t,e,this)})},triggerHandler:function(t,e){var i=this[0];return i?ot.event.trigger(t,e,i,!0):void 0}}),ot.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){ot.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}),ot.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),st.focusin="onfocusin"in t,st.focusin||ot.each({focus:"focusin",blur:"focusout"},function(t,e){var i=function(t){ot.event.simulate(e,t.target,ot.event.fix(t))};ot.event.special[e]={setup:function(){var s=this.ownerDocument||this,n=Dt.access(s,e);n||s.addEventListener(t,i,!0),Dt.access(s,e,(n||0)+1)},teardown:function(){var s=this.ownerDocument||this,n=Dt.access(s,e)-1;n?Dt.access(s,e,n):(s.removeEventListener(t,i,!0),Dt.remove(s,e))}}});var me=t.location,ve=ot.now(),be=/\?/;ot.parseJSON=function(t){return JSON.parse(t+"")},ot.parseXML=function(e){var i;if(!e||"string"!=typeof e)return null;try{i=(new t.DOMParser).parseFromString(e,"text/xml")}catch(s){i=void 0}return i&&!i.getElementsByTagName("parsererror").length||ot.error("Invalid XML: "+e),i};var ye=/#.*$/,_e=/([?&])_=[^&]*/,we=/^(.*?):[ \t]*([^\r\n]*)$/gm,xe=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ce=/^(?:GET|HEAD)$/,ke=/^\/\//,De={},Se={},Te="*/".concat("*"),ze=X.createElement("a");ze.href=me.href,ot.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:me.href,type:"GET",isLocal:xe.test(me.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Te,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ot.parseJSON,"text xml":ot.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?B(B(t,ot.ajaxSettings),e):B(ot.ajaxSettings,t)},ajaxPrefilter:F(De),ajaxTransport:F(Se),ajax:function(e,i){function s(e,i,s,a){var h,c,b,y,w,C=i;2!==_&&(_=2,l&&t.clearTimeout(l),n=void 0,r=a||"",x.readyState=e>0?4:0,h=e>=200&&300>e||304===e,s&&(y=Y(d,x,s)),y=U(d,y,x,h),h?(d.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(ot.lastModified[o]=w),w=x.getResponseHeader("etag"),w&&(ot.etag[o]=w)),204===e||"HEAD"===d.type?C="nocontent":304===e?C="notmodified":(C=y.state,c=y.data,b=y.error,h=!b)):(b=C,!e&&C||(C="error",0>e&&(e=0))),x.status=e,x.statusText=(i||C)+"",h?g.resolveWith(p,[c,C,x]):g.rejectWith(p,[x,C,b]),x.statusCode(v),v=void 0,u&&f.trigger(h?"ajaxSuccess":"ajaxError",[x,d,h?c:b]),m.fireWith(p,[x,C]),u&&(f.trigger("ajaxComplete",[x,d]),--ot.active||ot.event.trigger("ajaxStop")))}"object"==typeof e&&(i=e,e=void 0),i=i||{};var n,o,r,a,l,h,u,c,d=ot.ajaxSetup({},i),p=d.context||d,f=d.context&&(p.nodeType||p.jquery)?ot(p):ot.event,g=ot.Deferred(),m=ot.Callbacks("once memory"),v=d.statusCode||{},b={},y={},_=0,w="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(2===_){if(!a)for(a={};e=we.exec(r);)a[e[1].toLowerCase()]=e[2];e=a[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===_?r:null},setRequestHeader:function(t,e){var i=t.toLowerCase();return _||(t=y[i]=y[i]||t,b[t]=e),this},overrideMimeType:function(t){return _||(d.mimeType=t),this},statusCode:function(t){var e;if(t)if(2>_)for(e in t)v[e]=[v[e],t[e]];else x.always(t[x.status]);return this},abort:function(t){var e=t||w;return n&&n.abort(e),s(0,e),this}};if(g.promise(x).complete=m.add,x.success=x.done,x.error=x.fail,d.url=((e||d.url||me.href)+"").replace(ye,"").replace(ke,me.protocol+"//"),d.type=i.method||i.type||d.method||d.type,d.dataTypes=ot.trim(d.dataType||"*").toLowerCase().match(wt)||[""],null==d.crossDomain){h=X.createElement("a");try{h.href=d.url,h.href=h.href,d.crossDomain=ze.protocol+"//"+ze.host!=h.protocol+"//"+h.host}catch(C){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=ot.param(d.data,d.traditional)),q(De,d,i,x),2===_)return x;u=ot.event&&d.global,u&&0===ot.active++&&ot.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Ce.test(d.type),o=d.url,d.hasContent||(d.data&&(o=d.url+=(be.test(o)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=_e.test(o)?o.replace(_e,"$1_="+ve++):o+(be.test(o)?"&":"?")+"_="+ve++)),d.ifModified&&(ot.lastModified[o]&&x.setRequestHeader("If-Modified-Since",ot.lastModified[o]),ot.etag[o]&&x.setRequestHeader("If-None-Match",ot.etag[o])),(d.data&&d.hasContent&&d.contentType!==!1||i.contentType)&&x.setRequestHeader("Content-Type",d.contentType),x.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Te+"; q=0.01":""):d.accepts["*"]);for(c in d.headers)x.setRequestHeader(c,d.headers[c]);if(d.beforeSend&&(d.beforeSend.call(p,x,d)===!1||2===_))return x.abort();w="abort";for(c in{success:1,error:1,complete:1})x[c](d[c]);if(n=q(Se,d,i,x)){if(x.readyState=1,u&&f.trigger("ajaxSend",[x,d]),2===_)return x;d.async&&d.timeout>0&&(l=t.setTimeout(function(){x.abort("timeout")},d.timeout));try{_=1,n.send(b,s)}catch(C){if(!(2>_))throw C;s(-1,C)}}else s(-1,"No Transport");return x},getJSON:function(t,e,i){return ot.get(t,e,i,"json")},getScript:function(t,e){return ot.get(t,void 0,e,"script")}}),ot.each(["get","post"],function(t,e){ot[e]=function(t,i,s,n){return ot.isFunction(i)&&(n=n||s,s=i,i=void 0),ot.ajax(ot.extend({url:t,type:e,dataType:n,data:i,success:s},ot.isPlainObject(t)&&t))}}),ot._evalUrl=function(t){return ot.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},ot.fn.extend({wrapAll:function(t){var e;return ot.isFunction(t)?this.each(function(e){ot(this).wrapAll(t.call(this,e))}):(this[0]&&(e=ot(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this)},wrapInner:function(t){return ot.isFunction(t)?this.each(function(e){ot(this).wrapInner(t.call(this,e))}):this.each(function(){var e=ot(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=ot.isFunction(t);return this.each(function(i){ot(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(){return this.parent().each(function(){ot.nodeName(this,"body")||ot(this).replaceWith(this.childNodes)}).end()}}),ot.expr.filters.hidden=function(t){return!ot.expr.filters.visible(t)},ot.expr.filters.visible=function(t){return t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0};var Ie=/%20/g,Ae=/\[\]$/,Pe=/\r?\n/g,Me=/^(?:submit|button|image|reset|file)$/i,Ee=/^(?:input|select|textarea|keygen)/i;ot.param=function(t,e){var i,s=[],n=function(t,e){e=ot.isFunction(e)?e():null==e?"":e,s[s.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=ot.ajaxSettings&&ot.ajaxSettings.traditional),ot.isArray(t)||t.jquery&&!ot.isPlainObject(t))ot.each(t,function(){n(this.name,this.value)});else for(i in t)V(i,t[i],e,n);return s.join("&").replace(Ie,"+")},ot.fn.extend({serialize:function(){return ot.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=ot.prop(this,"elements");return t?ot.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!ot(this).is(":disabled")&&Ee.test(this.nodeName)&&!Me.test(t)&&(this.checked||!Et.test(t))}).map(function(t,e){var i=ot(this).val();return null==i?null:ot.isArray(i)?ot.map(i,function(t){return{name:e.name,value:t.replace(Pe,"\r\n")}}):{name:e.name,value:i.replace(Pe,"\r\n")}}).get()}}),ot.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(e){}};var Ne={0:200,1223:204},Re=ot.ajaxSettings.xhr();st.cors=!!Re&&"withCredentials"in Re,st.ajax=Re=!!Re,ot.ajaxTransport(function(e){var i,s;return st.cors||Re&&!e.crossDomain?{send:function(n,o){var r,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)a[r]=e.xhrFields[r];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(r in n)a.setRequestHeader(r,n[r]);i=function(t){return function(){i&&(i=s=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Ne[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=i(),s=a.onerror=i("error"),void 0!==a.onabort?a.onabort=s:a.onreadystatechange=function(){4===a.readyState&&t.setTimeout(function(){i&&s()})},i=i("abort");try{a.send(e.hasContent&&e.data||null)}catch(l){if(i)throw l}},abort:function(){i&&i()}}:void 0}),ot.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return ot.globalEval(t),t}}}),ot.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),ot.ajaxTransport("script",function(t){if(t.crossDomain){var e,i;return{send:function(s,n){e=ot("<script>").prop({charset:t.scriptCharset,src:t.url}).on("load error",i=function(t){e.remove(),i=null,t&&n("error"===t.type?404:200,t.type)}),X.head.appendChild(e[0])},abort:function(){i&&i()}}}});var He=[],Oe=/(=)\?(?=&|$)|\?\?/;ot.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=He.pop()||ot.expando+"_"+ve++;return this[t]=!0,t}}),ot.ajaxPrefilter("json jsonp",function(e,i,s){var n,o,r,a=e.jsonp!==!1&&(Oe.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Oe.test(e.data)&&"data");return a||"jsonp"===e.dataTypes[0]?(n=e.jsonpCallback=ot.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Oe,"$1"+n):e.jsonp!==!1&&(e.url+=(be.test(e.url)?"&":"?")+e.jsonp+"="+n),e.converters["script json"]=function(){return r||ot.error(n+" was not called"),r[0]},e.dataTypes[0]="json",o=t[n],t[n]=function(){r=arguments},s.always(function(){void 0===o?ot(t).removeProp(n):t[n]=o,e[n]&&(e.jsonpCallback=i.jsonpCallback,He.push(n)),r&&ot.isFunction(o)&&o(r[0]),r=o=void 0}),"script"):void 0}),ot.parseHTML=function(t,e,i){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(i=e,e=!1),e=e||X;var s=ft.exec(t),n=!i&&[];return s?[e.createElement(s[1])]:(s=d([t],e,n),n&&n.length&&ot(n).remove(),ot.merge([],s.childNodes))};var We=ot.fn.load;ot.fn.load=function(t,e,i){if("string"!=typeof t&&We)return We.apply(this,arguments);var s,n,o,r=this,a=t.indexOf(" ");return a>-1&&(s=ot.trim(t.slice(a)),t=t.slice(0,a)),ot.isFunction(e)?(i=e,e=void 0):e&&"object"==typeof e&&(n="POST"),r.length>0&&ot.ajax({url:t,type:n||"GET",dataType:"html",data:e}).done(function(t){o=arguments,r.html(s?ot("<div>").append(ot.parseHTML(t)).find(s):t)}).always(i&&function(t,e){r.each(function(){i.apply(this,o||[t.responseText,e,t])})}),this},ot.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){ot.fn[e]=function(t){return this.on(e,t)}}),ot.expr.filters.animated=function(t){return ot.grep(ot.timers,function(e){return t===e.elem}).length},ot.offset={setOffset:function(t,e,i){var s,n,o,r,a,l,h,u=ot.css(t,"position"),c=ot(t),d={};"static"===u&&(t.style.position="relative"),a=c.offset(),o=ot.css(t,"top"),l=ot.css(t,"left"),h=("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1,h?(s=c.position(),r=s.top,n=s.left):(r=parseFloat(o)||0,n=parseFloat(l)||0),ot.isFunction(e)&&(e=e.call(t,i,ot.extend({},a))),null!=e.top&&(d.top=e.top-a.top+r),null!=e.left&&(d.left=e.left-a.left+n),"using"in e?e.using.call(t,d):c.css(d)}},ot.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ot.offset.setOffset(this,t,e)});var e,i,s=this[0],n={top:0,left:0},o=s&&s.ownerDocument;return o?(e=o.documentElement,ot.contains(e,s)?(n=s.getBoundingClientRect(),i=$(o),{top:n.top+i.pageYOffset-e.clientTop,left:n.left+i.pageXOffset-e.clientLeft}):n):void 0},position:function(){if(this[0]){var t,e,i=this[0],s={top:0,left:0};return"fixed"===ot.css(i,"position")?e=i.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),ot.nodeName(t[0],"html")||(s=t.offset()),s.top+=ot.css(t[0],"borderTopWidth",!0),s.left+=ot.css(t[0],"borderLeftWidth",!0)),{top:e.top-s.top-ot.css(i,"marginTop",!0),left:e.left-s.left-ot.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===ot.css(t,"position");)t=t.offsetParent;return t||Qt})}}),ot.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var i="pageYOffset"===e;ot.fn[t]=function(s){return Ct(this,function(t,s,n){var o=$(t);return void 0===n?o?o[e]:t[s]:void(o?o.scrollTo(i?o.pageXOffset:n,i?n:o.pageYOffset):t[s]=n)},t,s,arguments.length)}}),ot.each(["top","left"],function(t,e){ot.cssHooks[e]=T(st.pixelPosition,function(t,i){return i?(i=S(t,e),Xt.test(i)?ot(t).position()[e]+"px":i):void 0})}),ot.each({Height:"height",Width:"width"},function(t,e){ot.each({padding:"inner"+t,content:e,"":"outer"+t},function(i,s){ot.fn[s]=function(s,n){var o=arguments.length&&(i||"boolean"!=typeof s),r=i||(s===!0||n===!0?"margin":"border");return Ct(this,function(e,i,s){var n;return ot.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(n=e.documentElement,Math.max(e.body["scroll"+t],n["scroll"+t],e.body["offset"+t],n["offset"+t],n["client"+t])):void 0===s?ot.css(e,i,r):ot.style(e,i,s,r)},e,o?s:void 0,o,null)}})}),ot.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,s){return this.on(e,t,i,s)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)},size:function(){return this.length}}),ot.fn.andSelf=ot.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ot});var je=t.jQuery,Le=t.$;return ot.noConflict=function(e){return t.$===ot&&(t.$=Le),e&&t.jQuery===ot&&(t.jQuery=je),ot},e||(t.jQuery=t.$=ot),ot}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(e,s){var n,o,r,a=e.nodeName.toLowerCase();return"area"===a?(n=e.parentNode,o=n.name,e.href&&o&&"map"===n.nodeName.toLowerCase()?(r=t("img[usemap='#"+o+"']")[0],!!r&&i(r)):!1):(/^(input|select|textarea|button|object)$/.test(a)?!e.disabled:"a"===a?e.href||s:s)&&i(e)}function i(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}function s(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={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},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=o(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function o(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",r)}function r(){t.datepicker._isDisabledDatepicker(v.inline?v.dpDiv.parent()[0]:v.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function a(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}function l(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.extend(t.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({scrollParent:function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])},focusable:function(i){return e(i,!isNaN(t.attr(i,"tabindex")))},tabbable:function(i){var s=t.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&&e(i,!n)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),r={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?r["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?r["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.fn.extend({focus:function(e){return function(i,s){return"number"==typeof i?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),s&&s.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(e){if(void 0!==e)return this.css("zIndex",e);if(this.length)for(var i,s,n=t(this[0]);n.length&&n[0]!==document;){if(i=n.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}};var h=0,u=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(r){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,r,a,l={},h=e.split(".")[0];return e=e.split(".")[1],n=h+"-"+e,s||(s=i,i=t.Widget),t.expr[":"][n.toLowerCase()]=function(e){return!!t.data(e,n)},t[h]=t[h]||{},o=t[h][e],r=t[h][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new r(t,e)},t.extend(r,o,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?void(l[e]=function(){var t=function(){return i.prototype[e].apply(this,arguments)},n=function(t){return i.prototype[e].apply(this,t)};return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}()):void(l[e]=s)}),r.prototype=t.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix||e:e},l,{constructor:r,namespace:h,widgetName:e,widgetFullName:n}),o?(t.each(o._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete o._childConstructors):i._childConstructors.push(r),t.widget.bridge(e,r),r},t.widget.extend=function(e){for(var i,s,n=u.call(arguments,1),o=0,r=n.length;r>o;o++)for(i in n[o])s=n[o][i],n[o].hasOwnProperty(i)&&void 0!==s&&(e[i]=t.isPlainObject(s)?t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(n){var o="string"==typeof n,r=u.call(arguments,1),a=this;return o?this.each(function(){var i,o=t.data(this,s);return"instance"===n?(a=o,!1):o?t.isFunction(o[n])&&"_"!==n.charAt(0)?(i=o[n].apply(o,r),i!==o&&void 0!==i?(a=i&&i.jquery?a.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+n+"'")}):(r.length&&(n=t.widget.extend.apply(null,[n].concat(r))),this.each(function(){var e=t.data(this,s);e?(e.option(n||{}),e._init&&e._init()):t.data(this,s,new i(n,this))})),a}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=h++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),
12
- this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(t.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:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,r=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(r={},s=e.split("."),e=s.shift(),s.length){for(n=r[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];r[e]=i}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!e),e&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,r){function a(){return e||o.options.disabled!==!0&&!t(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||t.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,u=l[2];u?n.delegate(u,h,a):i.bind(h,a)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(i).undelegate(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,r=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var r,a=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),r=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),r&&t.effects&&t.effects.effect[a]?s[e](n):a!==e&&s[a]?s[a](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget;var c=!1;t(document).mouseup(function(){c=!1}),t.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!c){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,n="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),c=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),c=!1,!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),function(){function e(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var n,o,r=Math.max,a=Math.abs,l=Math.round,h=/left|center|right/,u=/top|center|bottom/,c=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s||n?i.width():i.outerWidth(),height:s||n?i.height():i.outerHeight()}}},t.fn.position=function(n){if(!n||!n.of)return f.apply(this,arguments);n=t.extend({},n);var p,g,m,v,b,y,_=t(n.of),w=t.position.getWithinInfo(n.within),x=t.position.getScrollInfo(w),C=(n.collision||"flip").split(" "),k={};return y=s(_),_[0].preventDefault&&(n.at="left top"),g=y.width,m=y.height,v=y.offset,b=t.extend({},v),t.each(["my","at"],function(){var t,e,i=(n[this]||"").split(" ");1===i.length&&(i=h.test(i[0])?i.concat(["center"]):u.test(i[0])?["center"].concat(i):["center","center"]),i[0]=h.test(i[0])?i[0]:"center",i[1]=u.test(i[1])?i[1]:"center",t=c.exec(i[0]),e=c.exec(i[1]),k[this]=[t?t[0]:0,e?e[0]:0],n[this]=[d.exec(i[0])[0],d.exec(i[1])[0]]}),1===C.length&&(C[1]=C[0]),"right"===n.at[0]?b.left+=g:"center"===n.at[0]&&(b.left+=g/2),"bottom"===n.at[1]?b.top+=m:"center"===n.at[1]&&(b.top+=m/2),p=e(k.at,g,m),b.left+=p[0],b.top+=p[1],this.each(function(){var s,h,u=t(this),c=u.outerWidth(),d=u.outerHeight(),f=i(this,"marginLeft"),y=i(this,"marginTop"),D=c+f+i(this,"marginRight")+x.width,S=d+y+i(this,"marginBottom")+x.height,T=t.extend({},b),z=e(k.my,u.outerWidth(),u.outerHeight());"right"===n.my[0]?T.left-=c:"center"===n.my[0]&&(T.left-=c/2),"bottom"===n.my[1]?T.top-=d:"center"===n.my[1]&&(T.top-=d/2),T.left+=z[0],T.top+=z[1],o||(T.left=l(T.left),T.top=l(T.top)),s={marginLeft:f,marginTop:y},t.each(["left","top"],function(e,i){t.ui.position[C[e]]&&t.ui.position[C[e]][i](T,{targetWidth:g,targetHeight:m,elemWidth:c,elemHeight:d,collisionPosition:s,collisionWidth:D,collisionHeight:S,offset:[p[0]+z[0],p[1]+z[1]],my:n.my,at:n.at,within:w,elem:u})}),n.using&&(h=function(t){var e=v.left-T.left,i=e+g-c,s=v.top-T.top,o=s+m-d,l={target:{element:_,left:v.left,top:v.top,width:g,height:m},element:{element:u,left:T.left,top:T.top,width:c,height:d},horizontal:0>i?"left":e>0?"right":"center",vertical:0>o?"top":s>0?"bottom":"middle"};c>g&&g>a(e+i)&&(l.horizontal="center"),d>m&&m>a(s+o)&&(l.vertical="middle"),l.important=r(a(e),a(i))>r(a(s),a(o))?"horizontal":"vertical",n.using.call(this,t,l)}),u.offset(t.extend(T,{using:h}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,o=s.width,a=t.left-e.collisionPosition.marginLeft,l=n-a,h=a+e.collisionWidth-o-n;e.collisionWidth>o?l>0&&0>=h?(i=t.left+l+e.collisionWidth-o-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+o-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=r(t.left-a,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,o=e.within.height,a=t.top-e.collisionPosition.marginTop,l=n-a,h=a+e.collisionHeight-o-n;e.collisionHeight>o?l>0&&0>=h?(i=t.top+l+e.collisionHeight-o-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+o-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=r(t.top-a,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,u=h-l,c=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>u?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(u)>i)&&(t.left+=d+p+f)):c>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||c>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,u=h-l,c=h+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>u?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(u)>s)&&(t.top+=p+f+g)):c>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,(i>0||c>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,r,a=document.getElementsByTagName("body")[0],l=document.createElement("div");e=document.createElement(a?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},a&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(r in s)e.style[r]=s[r];e.appendChild(l),i=a||document.documentElement,i.insertBefore(e,i.firstChild),l.style.cssText="position: absolute; left: 10.7432222px;",n=t(l).offset().left,o=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()}(),t.ui.position,t.widget("ui.accordion",{version:"1.11.4",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},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active 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").removeUniqueId(),this._destroyIcons(),t=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?void this._activate(e):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),void("disabled"===t&&(this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e))))},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),o.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.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(){var e=t(this),i=e.uniqueId().attr("id"),s=e.next(),n=s.uniqueId().attr("id");e.attr("aria-controls",n),s.attr("aria-labelledby",i)}).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(i.event),"fill"===s?(e=n.height(),this.element.siblings(":visible").each(function(){var i=t(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===s&&(e=0,this.headers.next().each(function(){e=Math.max(e,t(this).css("height","").height())}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_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(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n[0]===s[0],r=o&&i.collapsible,a=r?t():n.next(),l=s.next(),h={oldHeader:s,oldPanel:l,newHeader:r?t():n,newPanel:a};e.preventDefault(),o&&!i.collapsible||this._trigger("beforeActivate",e,h)===!1||(i.active=r?!1:this.headers.index(n),this.active=o?t():n,this._toggle(h),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),o||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var s,n,o,r=this,a=0,l=t.css("box-sizing"),h=t.length&&(!e.length||t.index()<e.index()),u=this.options.animate||{},c=h&&u.down||u,d=function(){r._toggleComplete(i)};return"number"==typeof c&&(o=c),"string"==typeof c&&(n=c),n=n||c.easing||u.easing,o=o||c.duration||u.duration,e.length?t.length?(s=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:n,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:o,easing:n,complete:d,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===l&&(a+=i.now):"content"!==r.options.heightStyle&&(i.now=Math.round(s-e.outerHeight()-a),a=0)}})):e.animate(this.hideProps,o,n,d):t.animate(this.showProps,o,n,d)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 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").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target);!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&t(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(e){if(!this.previousFilter){var i=t(e.currentTarget);i.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&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-menu-icons ui-front").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").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){var i,s,n,o,r=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:r=!1,s=this.previousFilter||"",n=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}r&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(t):this.select(t))},refresh:function(){var e,i,s=this,n=this.options.icons.submenu,o=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),o.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.parent(),s=t("<span>").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),e=o.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);s._isDivider(e)&&e.addClass("ui-widget-content ui-menu-divider")}),i.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,r,a;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),r=this.activeMenu.height(),a=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+a>r&&this.activeMenu.scrollTop(o+n-r+a))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},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(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?void(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(e)},previousPage:function(e){var i,s,n;return this.active?void(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first()))):void this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(t.trim(t(this).text()))})}}),t.widget("ui.autocomplete",{version:"1.11.4",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 e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,r="input"===n;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(n){if(this.element.prop("readOnly"))return e=!0,s=!0,void(i=!0);e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault());if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,void t.preventDefault()):void this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),
13
- this.close(t),void this._change(t))}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(s){s.target===e.element[0]||s.target===i||t.contains(i,s.target)||e.close()})})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)})):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,void(s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("<div>").text(s).appendTo(this.liveRegion))))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),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(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").text(i.label).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e):void this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete;var d,p="ui-button ui-widget ui-state-default ui-corner-all",f="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",g=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},m=function(e){var i=e.name,s=e.form,n=t([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?t(s).find("[name='"+i+"'][type=radio]"):t("[name='"+i+"'][type=radio]",e.ownerDocument).filter(function(){return!this.form})),n};t.widget("ui.button",{version:"1.11.4",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,g),"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 e=this,i=this.options,s="checkbox"===this.type||"radio"===this.type,n=s?"":"ui-state-active";null===i.label&&(i.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(p).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){i.disabled||this===d&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){i.disabled||t(this).removeClass(n)}).bind("click"+this.eventNamespace,function(t){i.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),s&&this.element.bind("change"+this.eventNamespace,function(){e.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return i.disabled?!1:void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(i.disabled)return!1;t(this).addClass("ui-state-active"),e.buttonElement.attr("aria-pressed","true");var s=e.element[0];m(s).not(s).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return i.disabled?!1:(t(this).addClass("ui-state-active"),d=this,void e.document.one("mouseup",function(){d=null}))}).bind("mouseup"+this.eventNamespace,function(){return i.disabled?!1:void t(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(e){return i.disabled?!1:void((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",i.disabled),this._resetButton()},_determineButtonType:function(){var t,e,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?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),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(p+" ui-state-active "+f).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?(this.widget().toggleClass("ui-state-disabled",!!e),this.element.prop("disabled",!!e),void(e&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active")))):void this._resetButton()},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?m(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(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 e=this.buttonElement.removeClass(f),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,o=[];s.primary||s.secondary?(this.options.text&&o.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(o.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):o.push("ui-button-text-only"),e.addClass(o.join(" "))}}),t.widget("ui.buttonset",{version:"1.11.4",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(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction"),i=this.element.find(this.options.items),s=i.filter(":ui-button");i.not(":ui-button").button(),s.button("refresh"),this.buttons=i.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}}),t.ui.button,t.extend(t.ui,{datepicker:{version:"1.11.4"}});var v;t.extend(n.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return a(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var s=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?o(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,r=this._get(i,"appendText"),a=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=t("<span class='"+this._appendClass+"'>"+r+"</span>"),e[a?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[a?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),r=this._get(t,"dateFormat");r.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,r.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,n,o){var r,l,h,u,c,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),a(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(l=document.documentElement.clientWidth,h=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,c=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+u,h/2-150+c]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),v===n&&(v=null))},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,s){var n,o,r,l,h=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):h?"all"===i?t.extend({},h.settings):this._get(h,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),void(h&&(this._curInst===h&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(h,"min"),l=this._getMinMaxDate(h,"max"),a(h.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(h.settings.minDate=this._formatDate(h,r)),null!==l&&void 0!==n.dateFormat&&void 0===n.maxDate&&(h.settings.maxDate=this._formatDate(h,l)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),h),this._autoSize(h),this._setDate(h,o),this._updateAlternate(h),this._updateDatepicker(h))))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),r=!0,a=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),r=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),r=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),r=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?1:-1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),r=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?-1:1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),r=e.ctrlKey||e.metaKey;break;default:r=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):r=!1;r&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);return t.datepicker._get(n,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,n,o,r,l,h,u;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(i,"beforeShow"),o=n?n.apply(e,[e,i]):{},o!==!1&&(a(i.settings,o),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),l={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),l=t.datepicker._checkOffset(i,l,r),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),i.inline||(h=t.datepicker._get(i,"showAnim"),u=t.datepicker._get(i,"duration"),i.dpDiv.css("z-index",s(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?i.dpDiv.show(h,t.datepicker._get(i,"showOptions"),u):i.dpDiv[h||"show"](h?u:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,v=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,s=this._getNumberOfMonths(e),n=s[1],o=17,a=e.dpDiv.find("."+this._dayOverClass+" a");a.length>0&&r.apply(a.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",o*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),r=e.input?e.input.outerWidth():0,a=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),h=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-r:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+a?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>l&&l>n?Math.abs(i.left+n-l):0),i.top-=Math.min(i.top,i.top+o>h&&h>o?Math.abs(o+a):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,r=this._curInst;!r||e&&r!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(r,"showAnim"),s=this._get(r,"duration"),n=function(){t.datepicker._tidyDialog(r)},t.effects&&(t.effects.effect[i]||t.effects[i])?r.dpDiv.hide(i,t.datepicker._get(r,"showOptions"),s,n):r.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(r,"onClose"),o&&o.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,r=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(o=this._getInst(r[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.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(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).each(function(){t(this).val(n)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,o,r,a,l=0,h=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),c=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,v=-1,b=-1,y=!1,_=function(t){var i=e.length>n+1&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=_(t),s="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n="y"===t?s:1,o=RegExp("^\\d{"+n+","+s+"}"),r=i.substring(l).match(o);if(!r)throw"Missing number at position "+l;return l+=r[0].length,parseInt(r[0],10)},x=function(e,s,n){var o=-1,r=t.map(_(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(r,function(t,e){var s=e[1];return i.substr(l,s.length).toLowerCase()===s.toLowerCase()?(o=e[0],l+=s.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+l},C=function(){if(i.charAt(l)!==e.charAt(n))throw"Unexpected literal at position "+l;l++};for(n=0;e.length>n;n++)if(y)"'"!==e.charAt(n)||_("'")?C():y=!1;else switch(e.charAt(n)){case"d":v=w("d");break;case"D":x("D",c,d);break;case"o":b=w("o");break;case"m":m=w("m");break;case"M":m=x("M",p,f);break;case"y":g=w("y");break;case"@":a=new Date(w("@")),g=a.getFullYear(),m=a.getMonth()+1,v=a.getDate();break;case"!":a=new Date((w("!")-this._ticksTo1970)/1e4),g=a.getFullYear(),m=a.getMonth()+1,v=a.getDate();break;case"'":_("'")?C():y=!0;break;default:C()}if(i.length>l&&(r=i.substr(l),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=g?0:-100)),b>-1)for(m=1,v=b;o=this._getDaysInMonth(g,m-1),!(o>=v);)m++,v-=o;if(a=this._daylightSavingAdjust(new Date(g,m-1,v)),a.getFullYear()!==g||a.getMonth()+1!==m||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:864e9*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(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(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},h=function(t,e,i){var s=""+e;if(l(t))for(;i>s.length;)s="0"+s;return s},u=function(t,e,i,s){return l(t)?s[e]:i[e]},c="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||l("'")?c+=t.charAt(s):d=!1;else switch(t.charAt(s)){
14
- case"d":c+=h("d",e.getDate(),2);break;case"D":c+=u("D",e.getDay(),n,o);break;case"o":c+=h("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":c+=h("m",e.getMonth()+1,2);break;case"M":c+=u("M",e.getMonth(),r,a);break;case"y":c+=l("y")?e.getFullYear():(10>e.getYear()%100?"0":"")+e.getYear()%100;break;case"@":c+=e.getTime();break;case"!":c+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?c+="'":d=!0;break;default:c+=t.charAt(s)}return c},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,r=this._getFormatConfig(t);try{o=this.parseDate(i,s,r)||n}catch(a){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),r=n.getMonth(),a=n.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,h=l.exec(i);h;){switch(h[2]||"d"){case"d":case"D":a+=parseInt(h[1],10);break;case"w":case"W":a+=7*parseInt(h[1],10);break;case"m":case"M":r+=parseInt(h[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(o,r));break;case"y":case"Y":o+=parseInt(h[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(o,r))}h=l.exec(i)}return new Date(o,r,a)},r=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return r=r&&"Invalid Date"==""+r?s:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,r=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=r.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=r.getMonth(),t.drawYear=t.selectedYear=t.currentYear=r.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,r,a,l,h,u,c,d,p,f,g,m,v,b,y,_,w,x,C,k,D,S,T,z,I,A,P,M,E,N,R,H,O,W,j,L=new Date,F=this._daylightSavingAdjust(new Date(L.getFullYear(),L.getMonth(),L.getDate())),q=this._get(t,"isRTL"),B=this._get(t,"showButtonPanel"),Y=this._get(t,"hideIfNoPrevNext"),U=this._get(t,"navigationAsDateFormat"),V=this._getNumberOfMonths(t),$=this._get(t,"showCurrentAtPos"),K=this._get(t,"stepMonths"),X=1!==V[0]||1!==V[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),J=this._getMinMaxDate(t,"min"),Q=this._getMinMaxDate(t,"max"),Z=t.drawMonth-$,tt=t.drawYear;if(0>Z&&(Z+=12,tt--),Q)for(e=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-V[0]*V[1]+1,Q.getDate())),e=J&&J>e?J:e;this._daylightSavingAdjust(new Date(tt,Z,1))>e;)Z--,0>Z&&(Z=11,tt--);for(t.drawMonth=Z,t.drawYear=tt,i=this._get(t,"prevText"),i=U?this.formatDate(i,this._daylightSavingAdjust(new Date(tt,Z-K,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,tt,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-"+(q?"e":"w")+"'>"+i+"</span></a>":Y?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(q?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=U?this.formatDate(n,this._daylightSavingAdjust(new Date(tt,Z+K,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,tt,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(q?"w":"e")+"'>"+n+"</span></a>":Y?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(q?"w":"e")+"'>"+n+"</span></a>",r=this._get(t,"currentText"),a=this._get(t,"gotoCurrent")&&t.currentDay?G:F,r=U?this.formatDate(r,a,this._getFormatConfig(t)):r,l=t.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(t,"closeText")+"</button>",h=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(q?l:"")+(this._isInRange(t,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>":"")+(q?"":l)+"</div>":"",u=parseInt(this._get(t,"firstDay"),10),u=isNaN(u)?0:u,c=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),b=this._get(t,"selectOtherMonths"),y=this._getDefaultDate(t),_="",x=0;V[0]>x;x++){for(C="",this.maxRows=4,k=0;V[1]>k;k++){if(D=this._daylightSavingAdjust(new Date(tt,Z,t.selectedDay)),S=" ui-corner-all",T="",X){if(T+="<div class='ui-datepicker-group",V[1]>1)switch(k){case 0:T+=" ui-datepicker-group-first",S=" ui-corner-"+(q?"right":"left");break;case V[1]-1:T+=" ui-datepicker-group-last",S=" ui-corner-"+(q?"left":"right");break;default:T+=" ui-datepicker-group-middle",S=""}T+="'>"}for(T+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+S+"'>"+(/all|left/.test(S)&&0===x?q?o:s:"")+(/all|right/.test(S)&&0===x?q?s:o:"")+this._generateMonthYearHeader(t,Z,tt,J,Q,x>0||k>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",z=c?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)I=(w+u)%7,z+="<th scope='col'"+((w+u+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[I]+"'>"+p[I]+"</span></th>";for(T+=z+"</tr></thead><tbody>",A=this._getDaysInMonth(tt,Z),tt===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,A)),P=(this._getFirstDayOfMonth(tt,Z)-u+7)%7,M=Math.ceil((P+A)/7),E=X&&this.maxRows>M?this.maxRows:M,this.maxRows=E,N=this._daylightSavingAdjust(new Date(tt,Z,1-P)),R=0;E>R;R++){for(T+="<tr>",H=c?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(N)+"</td>":"",w=0;7>w;w++)O=m?m.apply(t.input?t.input[0]:null,[N]):[!0,""],W=N.getMonth()!==Z,j=W&&!b||!O[0]||J&&J>N||Q&&N>Q,H+="<td class='"+((w+u+6)%7>=5?" ui-datepicker-week-end":"")+(W?" ui-datepicker-other-month":"")+(N.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||y.getTime()===N.getTime()&&y.getTime()===D.getTime()?" "+this._dayOverClass:"")+(j?" "+this._unselectableClass+" ui-state-disabled":"")+(W&&!v?"":" "+O[1]+(N.getTime()===G.getTime()?" "+this._currentClass:"")+(N.getTime()===F.getTime()?" ui-datepicker-today":""))+"'"+(W&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"&#39;")+"'")+(j?"":" data-handler='selectDay' data-event='click' data-month='"+N.getMonth()+"' data-year='"+N.getFullYear()+"'")+">"+(W&&!v?"&#xa0;":j?"<span class='ui-state-default'>"+N.getDate()+"</span>":"<a class='ui-state-default"+(N.getTime()===F.getTime()?" ui-state-highlight":"")+(N.getTime()===G.getTime()?" ui-state-active":"")+(W?" ui-priority-secondary":"")+"' href='#'>"+N.getDate()+"</a>")+"</td>",N.setDate(N.getDate()+1),N=this._daylightSavingAdjust(N);T+=H+"</tr>"}Z++,Z>11&&(Z=0,tt++),T+="</tbody></table>"+(X?"</div>"+(V[0]>0&&k===V[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),C+=T}_+=C}return _+=h,t._keyEvent=!1,_},_generateMonthYearHeader:function(t,e,i,s,n,o,r,a){var l,h,u,c,d,p,f,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),b=this._get(t,"showMonthAfterYear"),y="<div class='ui-datepicker-title'>",_="";if(o||!m)_+="<span class='ui-datepicker-month'>"+r[e]+"</span>";else{for(l=s&&s.getFullYear()===i,h=n&&n.getFullYear()===i,_+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",u=0;12>u;u++)(!l||u>=s.getMonth())&&(!h||n.getMonth()>=u)&&(_+="<option value='"+u+"'"+(u===e?" selected='selected'":"")+">"+a[u]+"</option>");_+="</select>"}if(b||(y+=_+(!o&&m&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!v)y+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(c=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(c[0]),g=Math.max(f,p(c[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",y+=t.yearshtml,t.yearshtml=null}return y+=this._get(t,"yearSuffix"),b&&(y+=(!o&&m&&v?"":"&#xa0;")+_),y+="</div>"},_adjustInstDate:function(t,e,i){var s=t.drawYear+("Y"===i?e:0),n=t.drawMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),r=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=r.getDate(),t.drawMonth=t.selectedMonth=r.getMonth(),t.drawYear=t.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),r=null,a=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),s=(new Date).getFullYear(),r=parseInt(i[0],10),a=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=s),i[1].match(/[+\-].*/)&&(a+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!r||e.getFullYear()>=r)&&(!a||a>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new n,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.11.4",t.datepicker,t.widget("ui.draggable",t.ui.mouse,{version:"1.11.4",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&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(e){var i=this.options;return this._blurActiveElement(e),this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=this.document[0];if(this.handleElement.is(e.target))try{i.activeElement&&"body"!==i.activeElement.nodeName.toLowerCase()&&t(i.activeElement).blur()}catch(s){}},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._normalizeRightBottom(),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.focus(),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),n=s?t(i.helper.apply(this.element[0],[e])):"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),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_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 e,i,s,n=this.options,o=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?void(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===n.containment?void(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):n.containment.constructor===Array?void(this.containment=n.containment):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],void(s&&(e=/(scroll|auto)/.test(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),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i))):void(this.containment=null)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,r=this.options,a=this._isRootNode(this.scrollParent[0]),l=t.pageX,h=t.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(h=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]&&(h=i[3]+this.offset.click.top)),r.grid&&(n=r.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,h=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-r.grid[1]:n+r.grid[1]:n,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),"y"===r.axis&&(l=this.originalPageX),"x"===r.axis&&(h=this.originalPageY)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0: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,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,s._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("toSortable",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,r=s.scrollParentNotHidden[0],a=s.document[0];r!==a&&"HTML"!==r.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+r.offsetHeight-e.pageY<n.scrollSensitivity?r.scrollTop=o=r.scrollTop+n.scrollSpeed:e.pageY-s.overflowOffset.top<n.scrollSensitivity&&(r.scrollTop=o=r.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+r.offsetWidth-e.pageX<n.scrollSensitivity?r.scrollLeft=o=r.scrollLeft+n.scrollSpeed:e.pageX-s.overflowOffset.left<n.scrollSensitivity&&(r.scrollLeft=o=r.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(e.pageY-t(a).scrollTop()<n.scrollSensitivity?o=t(a).scrollTop(t(a).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(a).scrollTop())<n.scrollSensitivity&&(o=t(a).scrollTop(t(a).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(e.pageX-t(a).scrollLeft()<n.scrollSensitivity?o=t(a).scrollLeft(t(a).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(a).scrollLeft())<n.scrollSensitivity&&(o=t(a).scrollLeft(t(a).scrollLeft()+n.scrollSpeed)))),o!==!1&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,s){var n=s.options;s.snapElements=[],t(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var e=t(this),i=e.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,s){var n,o,r,a,l,h,u,c,d,p,f=s.options,g=f.snapTolerance,m=i.offset.left,v=m+s.helperProportions.width,b=i.offset.top,y=b+s.helperProportions.height;for(d=s.snapElements.length-1;d>=0;d--)l=s.snapElements[d].left-s.margins.left,h=l+s.snapElements[d].width,u=s.snapElements[d].top-s.margins.top,c=u+s.snapElements[d].height,l-g>v||m>h+g||u-g>y||b>c+g||!t.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=g>=Math.abs(u-y),o=g>=Math.abs(c-b),r=g>=Math.abs(l-v),a=g>=Math.abs(h-m),n&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left)),p=n||o||r||a,"outer"!==f.snapMode&&(n=g>=Math.abs(u-b),o=g>=Math.abs(c-y),r=g>=Math.abs(l-m),a=g>=Math.abs(h-v),n&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||o||r||a||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||o||r||a||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,o=s.options,r=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});r.length&&(n=parseInt(t(r[0]).css("zIndex"),10)||0,
15
- t(r).each(function(e){t(this).css("zIndex",n+e)}),this.css("zIndex",n+r.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}}),t.ui.draggable,t.widget("ui.resizable",t.ui.mouse,{version:"1.11.4",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},_num:function(t){return parseInt(t,10)||0},_isNumber:function(t){return!isNaN(parseInt(t,10))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i,s,n,o,r=this,a=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<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.resizable("instance")),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=a.handles||(t(".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=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length>i;i++)s=t.trim(e[i]),o="ui-resizable-"+s,n=t("<div class='ui-resizable-handle "+o+"'></div>"),n.css({zIndex:a.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.mouseover(function(){r.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=n&&n[1]?n[1]:"se")}),a.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){a.disabled||(t(this).removeClass("ui-resizable-autohide"),r._handles.show())}).mouseleave(function(){a.disabled||r.resizing||(t(this).addClass("ui-resizable-autohide"),r._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).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),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,r=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:r.width(),height:r.height()},this.originalSize=this._helper?{width:r.outerWidth(),height:r.outerHeight()}:{width:r.width(),height:r.height()},this.sizeDiff={width:r.outerWidth()-r.width(),height:r.outerHeight()-r.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),r.addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,r=e.pageX-n.left||0,a=e.pageY-n.top||0,l=this._change[o];return this._updatePrevProperties(),l?(i=l.apply(this,[e,r,a]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,r,a,l,h=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:u.sizeDiff.height,o=s?0:u.sizeDiff.width,r={width:u.helper.width()-o,height:u.helper.height()-n},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,h.animate||this.element.css(t.extend(r,{top:l,left:a})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!h.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,r=this.options;o={minWidth:this._isNumber(r.minWidth)?r.minWidth:0,maxWidth:this._isNumber(r.maxWidth)?r.maxWidth:1/0,minHeight:this._isNumber(r.minHeight)?r.minHeight:0,maxHeight:this._isNumber(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,r=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,h=/sw|nw|w/.test(i),u=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),r&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&h&&(t.left=a-e.minWidth),s&&h&&(t.left=a-e.maxWidth),r&&u&&(t.top=l-e.minHeight),n&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseInt(s[e],10)||0,i[e]+=parseInt(n[e],10)||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<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(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,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}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),r=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,a=o?0:i.sizeDiff.width,l={width:i.size.width-a,height:i.size.height-r},h=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(t.extend(l,u&&h?{top:u,left:h}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={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)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,r,a,l=t(this).resizable("instance"),h=l.options,u=l.element,c=h.containment,d=c instanceof t?c.get(0):/parent/.test(c)?u.parent().get(0):c;d&&(l.containerElement=t(d),/document/.test(c)||c===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=l._num(e.css("padding"+s))}),l.containerOffset=e.offset(),l.containerPosition=e.position(),l.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=l.containerOffset,n=l.containerSize.height,o=l.containerSize.width,r=l._hasScroll(d,"left")?d.scrollWidth:o,a=l._hasScroll(d)?d.scrollHeight:n,l.parentData={element:d,left:s.left,top:s.top,width:r,height:a}))},resize:function(e){var i,s,n,o,r=t(this).resizable("instance"),a=r.options,l=r.containerOffset,h=r.position,u=r._aspectRatio||e.shiftKey,c={top:0,left:0},d=r.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(c=l),h.left<(r._helper?l.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-l.left:r.position.left-c.left),u&&(r.size.height=r.size.width/r.aspectRatio,p=!1),r.position.left=a.helper?l.left:0),h.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,p=!1),r.position.top=r._helper?l.top:0),n=r.containerElement.get(0)===r.element.parent().get(0),o=/relative|absolute/.test(r.containerElement.css("position")),n&&o?(r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top):(r.offset.left=r.element.offset().left,r.offset.top=r.element.offset().top),i=Math.abs(r.sizeDiff.width+(r._helper?r.offset.left-c.left:r.offset.left-l.left)),s=Math.abs(r.sizeDiff.height+(r._helper?r.offset.top-c.top:r.offset.top-l.top)),i+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-i,u&&(r.size.height=r.size.width/r.aspectRatio,p=!1)),s+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-s,u&&(r.size.width=r.size.height*r.aspectRatio,p=!1)),p||(r.position.left=r.prevPosition.left,r.position.top=r.prevPosition.top,r.size.width=r.prevSize.width,r.size.height=r.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,r=t(e.helper),a=r.offset(),l=r.outerWidth()-e.sizeDiff.width,h=r.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:a.left-n.left-s.left,width:l,height:h}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:a.left-n.left-s.left,width:l,height:h})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,r=s.originalPosition,a={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-r.top||0,left:s.position.left-r.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(a[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,r=i.originalPosition,a=i.axis,l="number"==typeof s.grid?[s.grid,s.grid]:s.grid,h=l[0]||1,u=l[1]||1,c=Math.round((n.width-o.width)/h)*h,d=Math.round((n.height-o.height)/u)*u,p=o.width+c,f=o.height+d,g=s.maxWidth&&p>s.maxWidth,m=s.maxHeight&&f>s.maxHeight,v=s.minWidth&&s.minWidth>p,b=s.minHeight&&s.minHeight>f;s.grid=l,v&&(p+=h),b&&(f+=u),g&&(p-=h),m&&(f-=u),/^(se|s|e)$/.test(a)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(a)?(i.size.width=p,i.size.height=f,i.position.top=r.top-d):/^(sw)$/.test(a)?(i.size.width=p,i.size.height=f,i.position.left=r.left-c):((0>=f-u||0>=p-h)&&(e=i._getPaddingPlusBorderDimensions(this)),f-u>0?(i.size.height=f,i.position.top=r.top-d):(f=u-e.height,i.size.height=f,i.position.top=r.top+o.height-f),p-h>0?(i.size.width=p,i.position.left=r.left-c):(p=h-e.width,i.size.width=p,i.position.left=r.left+o.width-p))}}),t.ui.resizable,t.widget("ui.dialog",{version:"1.11.4",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(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.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},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_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&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),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),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i,s=this;if(this._isOpen&&this._trigger("beforeClose",e)!==!1){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement,i&&"body"!==i.nodeName.toLowerCase()&&t(i).blur()}catch(n){}this._hide(this.uiDialog,this.options.hide,function(){s._trigger("close",e)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,n);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),s=!0),s&&!i&&this._trigger("focus",e),s},open:function(){var e=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),void this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<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(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),void this.close(e);if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){n.focus()}),e.preventDefault()):(this._delay(function(){s.focus()}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<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(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html("&#160;"),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?void this.uiDialog.removeClass("ui-dialog-buttons"):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(e.element[0],arguments)},o={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,t("<button></button>",s).button(o).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){var r=o.offset.left-i.document.scrollLeft(),a=o.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" top"+(a>=0?"+":"")+a,of:i.window},t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),r="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:r,start:function(s,n){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){var r=i.uiDialog.offset(),a=r.left-i.document.scrollLeft(),l=r.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" top"+(l>=0?"+":"")+l,of:i.window},t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);-1!==i&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,s=!1,n={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(t,e){var i,s,n=this.uiDialog;"dialogClass"===t&&n.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=n.is(":data(ui-draggable)"),i&&!e&&n.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(s=n.is(":data(ui-resizable)"),s&&!e&&n.resizable("destroy"),s&&"string"==typeof e&&n.resizable("option","handles",e),s||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):this.document.unbind("focusin").removeData("ui-dialog-overlays"),this.overlay.remove(),this.overlay=null}}}),t.widget("ui.droppable",{version:"1.11.4",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 e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?void(e=arguments[0]):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;t.length>e;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var s=t.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.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",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;
16
- 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",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=t(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(){function t(t,e,i){return t>=e&&e+i>t}return function(e,i,s,n){if(!i.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,r=(e.positionAbs||e.position.absolute).top+e.margins.top,a=o+e.helperProportions.width,l=r+e.helperProportions.height,h=i.offset.left,u=i.offset.top,c=h+i.proportions().width,d=u+i.proportions().height;switch(s){case"fit":return o>=h&&c>=a&&r>=u&&d>=l;case"intersect":return o+e.helperProportions.width/2>h&&c>a-e.helperProportions.width/2&&r+e.helperProportions.height/2>u&&d>l-e.helperProportions.height/2;case"pointer":return t(n.pageY,u,i.proportions().height)&&t(n.pageX,h,i.proportions().width);case"touch":return(r>=u&&d>=r||l>=u&&d>=l||u>r&&l>d)&&(o>=h&&c>=o||a>=h&&c>=a||h>o&&a>c);default:return!1}}}(),t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],r=i?i.type:null,a=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;a.length>n;n++)if(a[n]===o[s].element[0]){o[s].proportions().height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===r&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions({width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,r=t.ui.intersect(e,this,this.options.tolerance,i),a=!r&&this.isover?"isout":r&&!this.isover?"isover":null;a&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===n}),o.length&&(s=t(o[0]).droppable("instance"),s.greedyChild="isover"===a)),s&&"isover"===a&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,i),s&&"isout"===a&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},t.ui.droppable;var b="ui-effects-",y=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var s=c[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=h(),n=s._rgba=[];return i=i.toLowerCase(),f(l,function(t,o){var r,a=o.re.exec(i),l=a&&o.parse(a),h=o.space||"rgba";return l?(r=s[h](l),s[u[h].cache]=r[u[h].cache],n=s._rgba=r._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}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(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},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"}}}},c={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=h.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(u,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),h.fn=t.extend(h.prototype,{parse:function(n,r,a,l){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(r),r=e);var c=this,d=t.type(n),p=this._rgba=[];return r!==e&&(n=[n,r,a,l],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(u.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof h?f(u,function(t,e){n[e.cache]&&(c[e.cache]=n[e.cache].slice())}):f(u,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!c[o]&&s.to){if("alpha"===t||null==n[t])return;c[o]=s.to(c._rgba)}c[o][e.idx]=i(n[t],e,!0)}),c[o]&&0>t.inArray(null,c[o].slice(0,3))&&(c[o][3]=1,s.from&&(c._rgba=s.from(c[o])))}),this):e},is:function(t){var i=h(t),s=!0,n=this;return f(u,function(t,o){var r,a=i[o.cache];return a&&(r=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=a[i.idx]?s=a[i.idx]===r[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(u,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=h(t),n=s._space(),o=u[n],r=0===this.alpha()?h("transparent"):this,a=r[o.cache]||o.to(r._rgba),l=a.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,r=a[o],h=s[o],u=c[n.type]||{};null!==h&&(null===r?l[o]=h:(u.mod&&(h-r>u.mod/2?r+=u.mod:r-h>u.mod/2&&(r-=u.mod)),l[o]=i((h-r)*e+r,n)))}),this[n](l)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=h(e)._rgba;return h(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,u.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,r=t[3],a=Math.max(s,n,o),l=Math.min(s,n,o),h=a-l,u=a+l,c=.5*u;return e=l===a?0:s===a?60*(n-o)/h+360:n===a?60*(o-s)/h+120:60*(s-n)/h+240,i=0===h?0:.5>=c?h/u:h/(2-u),[Math.round(e)%360,i,c,null==r?1:r]},u.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],r=.5>=s?s*(1+i):s+i-s*i,a=2*s-r;return[Math.round(255*n(a,r,e+1/3)),Math.round(255*n(a,r,e)),Math.round(255*n(a,r,e-1/3)),o]},f(u,function(s,n){var o=n.props,r=n.cache,l=n.to,u=n.from;h.fn[s]=function(s){if(l&&!this[r]&&(this[r]=l(this._rgba)),s===e)return this[r].slice();var n,a=t.type(s),c="array"===a||"object"===a?s:arguments,d=this[r].slice();return f(o,function(t,e){var s=c["object"===a?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),u?(n=h(u(d)),n[r]=d,n):h(d)},f(o,function(e,i){h.fn[e]||(h.fn[e]=function(n){var o,r=t.type(n),l="alpha"===e?this._hsla?"hsla":"rgba":s,h=this[l](),u=h[i.idx];return"undefined"===r?u:("function"===r&&(n=n.call(this,u),r=t.type(n)),null==n&&i.empty?this:("string"===r&&(o=a.exec(n),o&&(n=u+parseFloat(o[2])*("+"===o[1]?1:-1))),h[i.idx]=n,this[l](h)))})})}),h.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,r,a="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=h(o||n),!d.rgba&&1!==n._rgba[3]){for(r="backgroundColor"===i?e.parentNode:e;(""===a||"transparent"===a)&&r&&r.style;)try{a=t.css(r,"backgroundColor"),r=r.parentNode}catch(l){}n=n.blend(a&&"transparent"!==a?a:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(l){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=h(e.elem,i),e.end=h(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},h.hook(r),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.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"}}(y),function(){function e(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function i(e,i){var s,o,r={};for(s in i)o=i[s],e[s]!==o&&(n[s]||(t.fx.step[s]||!isNaN(parseFloat(o)))&&(r[s]=o));return r}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(y.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(n,o,r,a){var l=t.speed(o,r,a);return this.queue(function(){var o,r=t(this),a=r.attr("class")||"",h=l.children?r.find("*").addBack():r;h=h.map(function(){var i=t(this);return{el:i,start:e(this)}}),o=function(){t.each(s,function(t,e){n[e]&&r[e+"Class"](n[e])})},o(),h=h.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),r.attr("class",a),h=h.map(function(){var e=this,i=t.Deferred(),s=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,h.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(r[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,s,n,o,r){return"boolean"==typeof s||void 0===s?n?t.effects.animateClass.call(this,s?{add:i}:{remove:i},n,o,r):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},s,n,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function e(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function i(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.11.4",save:function(t,e){for(var i=0;e.length>i;i++)null!==e[i]&&t.data(b+e[i],t[0].style[e[i]])},restore:function(t,e){var i,s;for(s=0;e.length>s;s++)null!==e[s]&&(i=t.data(b+e[s]),void 0===i&&(i=""),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(r){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function i(e){function i(){t.isFunction(o)&&o.call(n[0]),t.isFunction(e)&&e()}var n=t(this),o=s.complete,a=s.mode;(n.is(":hidden")?"hide"===a:"show"===a)?(n[a](),i()):r.call(n[0],s,i)}var s=e.apply(this,arguments),n=s.mode,o=s.queue,r=t.effects.effect[s.effect];return t.fx.off||!r?n?this[n](s.duration,s.complete):this.each(function(){s.complete&&s.complete.call(this)}):o===!1?this.each(i):this.queue(o||"fx",i)},show:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="show",this.effect.call(this,n)}}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||"boolean"==typeof s)return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}(),t.effects,t.effects.effect.blind=function(e,i){var s,n,o,r=t(this),a=/up|down|vertical/,l=/up|left|vertical|horizontal/,h=["position","top","bottom","left","right","height","width"],u=t.effects.setMode(r,e.mode||"hide"),c=e.direction||"up",d=a.test(c),p=d?"height":"width",f=d?"top":"left",g=l.test(c),m={},v="show"===u;r.parent().is(".ui-effects-wrapper")?t.effects.save(r.parent(),h):t.effects.save(r,h),r.show(),s=t.effects.createWrapper(r).css({overflow:"hidden"}),n=s[p](),o=parseFloat(s.css(f))||0,m[p]=v?n:0,g||(r.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),m[f]=v?o:n+o),v&&(s.css(p,0),g||s.css(f,o+n)),s.animate(m,{duration:e.duration,easing:e.easing,queue:!1,complete:function(){"hide"===u&&r.hide(),t.effects.restore(r,h),t.effects.removeWrapper(r),i()}})},t.effects.effect.bounce=function(e,i){var s,n,o,r=t(this),a=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(r,e.mode||"effect"),h="hide"===l,u="show"===l,c=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(u||h?1:0),g=e.duration/f,m=e.easing,v="up"===c||"down"===c?"top":"left",b="up"===c||"left"===c,y=r.queue(),_=y.length;for((u||h)&&a.push("opacity"),t.effects.save(r,a),r.show(),t.effects.createWrapper(r),d||(d=r["top"===v?"outerHeight":"outerWidth"]()/3),u&&(o={opacity:1},o[v]=0,r.css("opacity",0).css(v,b?2*-d:2*d).animate(o,g,m)),h&&(d/=Math.pow(2,p-1)),o={},o[v]=0,s=0;p>s;s++)n={},n[v]=(b?"-=":"+=")+d,r.animate(n,g,m).animate(o,g,m),d=h?2*d:d/2;h&&(n={opacity:0},n[v]=(b?"-=":"+=")+d,r.animate(n,g,m)),r.queue(function(){h&&r.hide(),t.effects.restore(r,a),t.effects.removeWrapper(r),i()}),_>1&&y.splice.apply(y,[1,0].concat(y.splice(_,f+1))),r.dequeue()},t.effects.effect.clip=function(e,i){var s,n,o,r=t(this),a=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(r,e.mode||"hide"),h="show"===l,u=e.direction||"vertical",c="vertical"===u,d=c?"height":"width",p=c?"top":"left",f={};t.effects.save(r,a),r.show(),s=t.effects.createWrapper(r).css({overflow:"hidden"}),n="IMG"===r[0].tagName?s:r,o=n[d](),h&&(n.css(d,0),n.css(p,o/2)),f[d]=h?o:0,f[p]=h?0:o/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){h||r.hide(),t.effects.restore(r,a),t.effects.removeWrapper(r),i()}})},t.effects.effect.drop=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","opacity","height","width"],r=t.effects.setMode(n,e.mode||"hide"),a="show"===r,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",u="up"===l||"left"===l?"pos":"neg",c={opacity:a?1:0};t.effects.save(n,o),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,a&&n.css("opacity",0).css(h,"pos"===u?-s:s),c[h]=(a?"pos"===u?"+=":"-=":"pos"===u?"-=":"+=")+s,n.animate(c,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===r&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})},t.effects.effect.explode=function(e,i){function s(){y.push(this),y.length===c*d&&n()}function n(){p.css({visibility:"visible"}),t(y).remove(),g||p.hide(),i()}var o,r,a,l,h,u,c=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=c,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),b=Math.ceil(p.outerHeight()/c),y=[];for(o=0;c>o;o++)for(l=m.top+o*b,u=o-(c-1)/2,r=0;d>r;r++)a=m.left+r*v,h=r-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-r*v,top:-o*b}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:b,left:a+(g?h*v:0),top:l+(g?u*b:0),opacity:g?0:1}).animate({left:a+(g?0:h*v),top:l+(g?0:u*b),opacity:g?1:0},e.duration||500,e.easing,s)},t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})},t.effects.effect.fold=function(e,i){var s,n,o=t(this),r=["position","top","bottom","left","right","height","width"],a=t.effects.setMode(o,e.mode||"hide"),l="show"===a,h="hide"===a,u=e.size||15,c=/([0-9]+)%/.exec(u),d=!!e.horizFirst,p=l!==d,f=p?["width","height"]:["height","width"],g=e.duration/2,m={},v={};t.effects.save(o,r),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],c&&(u=parseInt(c[1],10)/100*n[h?0:1]),l&&s.css(d?{height:0,width:u}:{height:u,width:0}),m[f[0]]=l?n[0]:u,v[f[1]]=l?n[1]:0,s.animate(m,g,e.easing).animate(v,g,e.easing,function(){h&&o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()})},t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],o=t.effects.setMode(s,e.mode||"show"),r={backgroundColor:s.css("backgroundColor")};"hide"===o&&(r.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&s.hide(),t.effects.restore(s,n),i()}})},t.effects.effect.size=function(e,i){var s,n,o,r=t(this),a=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],u=["fontSize"],c=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(r,e.mode||"effect"),f=e.restore||"effect"!==p,g=e.scale||"both",m=e.origin||["middle","center"],v=r.css("position"),b=f?a:l,y={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&r.show(),s={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()},"toggle"===e.mode&&"show"===p?(r.from=e.to||y,r.to=e.from||s):(r.from=e.from||("show"===p?y:s),r.to=e.to||("hide"===p?y:s)),o={from:{y:r.from.height/s.height,x:r.from.width/s.width},to:{y:r.to.height/s.height,x:r.to.width/s.width}},("box"===g||"both"===g)&&(o.from.y!==o.to.y&&(b=b.concat(c),r.from=t.effects.setTransition(r,c,o.from.y,r.from),r.to=t.effects.setTransition(r,c,o.to.y,r.to)),o.from.x!==o.to.x&&(b=b.concat(d),r.from=t.effects.setTransition(r,d,o.from.x,r.from),r.to=t.effects.setTransition(r,d,o.to.x,r.to))),("content"===g||"both"===g)&&o.from.y!==o.to.y&&(b=b.concat(u).concat(h),r.from=t.effects.setTransition(r,u,o.from.y,r.from),r.to=t.effects.setTransition(r,u,o.to.y,r.to)),t.effects.save(r,b),r.show(),t.effects.createWrapper(r),r.css("overflow","hidden").css(r.from),m&&(n=t.effects.getBaseline(m,s),r.from.top=(s.outerHeight-r.outerHeight())*n.y,r.from.left=(s.outerWidth-r.outerWidth())*n.x,r.to.top=(s.outerHeight-r.to.outerHeight)*n.y,r.to.left=(s.outerWidth-r.to.outerWidth)*n.x),r.css(r.from),("content"===g||"both"===g)&&(c=c.concat(["marginTop","marginBottom"]).concat(u),d=d.concat(["marginLeft","marginRight"]),h=a.concat(c).concat(d),r.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,h),i.from={height:s.height*o.from.y,width:s.width*o.from.x,outerHeight:s.outerHeight*o.from.y,outerWidth:s.outerWidth*o.from.x},i.to={height:s.height*o.to.y,width:s.width*o.to.x,outerHeight:s.height*o.to.y,outerWidth:s.width*o.to.x},o.from.y!==o.to.y&&(i.from=t.effects.setTransition(i,c,o.from.y,i.from),i.to=t.effects.setTransition(i,c,o.to.y,i.to)),o.from.x!==o.to.x&&(i.from=t.effects.setTransition(i,d,o.from.x,i.from),i.to=t.effects.setTransition(i,d,o.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,h)})})),r.animate(r.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===r.to.opacity&&r.css("opacity",r.from.opacity),"hide"===p&&r.hide(),t.effects.restore(r,b),f||("static"===v?r.css({position:"relative",top:r.to.top,left:r.to.left}):t.each(["top","left"],function(t,e){r.css(e,function(e,i){var s=parseInt(i,10),n=t?r.to.left:r.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(r),i()}})},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),o=t.effects.setMode(s,e.mode||"effect"),r=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===o?0:100),a=e.direction||"both",l=e.origin,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},u={y:"horizontal"!==a?r/100:1,x:"vertical"!==a?r/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==o&&(n.origin=l||["middle","center"],n.restore=!0),n.from=e.from||("show"===o?{height:0,width:0,outerHeight:0,outerWidth:0}:h),n.to={height:h.height*u.y,width:h.width*u.x,outerHeight:h.outerHeight*u.y,outerWidth:h.outerWidth*u.x},n.fade&&("show"===o&&(n.from.opacity=0,n.to.opacity=1),"hide"===o&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),o="hide"===n,r=parseInt(e.percent,10)||150,a=r/100,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,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}}),s.effect(e)},t.effects.effect.pulsate=function(e,i){var s,n=t(this),o=t.effects.setMode(n,e.mode||"show"),r="show"===o,a="hide"===o,l=r||"hide"===o,h=2*(e.times||5)+(l?1:0),u=e.duration/h,c=0,d=n.queue(),p=d.length;for((r||!n.is(":visible"))&&(n.css("opacity",0).show(),c=1),s=1;h>s;s++)n.animate({opacity:c},u,e.easing),c=1-c;n.animate({opacity:c},u,e.easing),n.queue(function(){a&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,h+1))),n.dequeue()},t.effects.effect.shake=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(n,e.mode||"effect"),a=e.direction||"left",l=e.distance||20,h=e.times||3,u=2*h+1,c=Math.round(e.duration/u),d="up"===a||"down"===a?"top":"left",p="up"===a||"left"===a,f={},g={},m={},v=n.queue(),b=v.length;for(t.effects.save(n,o),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+l,g[d]=(p?"+=":"-=")+2*l,m[d]=(p?"-=":"+=")+2*l,n.animate(f,c,e.easing),s=1;h>s;s++)n.animate(g,c,e.easing).animate(m,c,e.easing);n.animate(g,c,e.easing).animate(f,c/2,e.easing).queue(function(){"hide"===r&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}),b>1&&v.splice.apply(v,[1,0].concat(v.splice(b,u+1))),n.dequeue()},t.effects.effect.slide=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","width","height"],r=t.effects.setMode(n,e.mode||"show"),a="show"===r,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",u="up"===l||"left"===l,c={};t.effects.save(n,o),n.show(),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),a&&n.css(h,u?isNaN(s)?"-"+s:-s:s),c[h]=(a?u?"+=":"-=":u?"-=":"+=")+s,n.animate(c,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===r&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})},t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),r=t("body"),a=o?r.scrollTop():0,l=o?r.scrollLeft():0,h=n.offset(),u={top:h.top-a,left:h.left-l,height:n.innerHeight(),width:n.innerWidth()},c=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:c.top-a,left:c.left-l,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(u,e.duration,e.easing,function(){d.remove(),i()})},t.widget("ui.progressbar",{version:"1.11.4",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=t("<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(t){return void 0===t?this.options.value:(this.options.value=this._constrainedValue(t),void this._refreshValue())},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===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=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),t.widget("ui.selectable",t.ui.mouse,{version:"1.11.4",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 e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<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(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(s.$element.removeClass("ui-selected"),
17
- s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],r=this.opos[1],a=e.pageX,l=e.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=t.data(this,"selectable-item"),h=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?h=!(i.left>a||o>i.right||i.top>l||r>i.bottom):"fit"===n.tolerance&&(h=i.left>o&&a>i.right&&i.top>r&&l>i.bottom),h?(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,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.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),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.selectmenu",{version:"1.11.4",defaultElement:"<select>",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var t=this.element.uniqueId().attr("id");this.ids={element:t,button:t+"-button",menu:t+"-menu"},this._drawButton(),this._drawMenu(),this.options.disabled&&this.disable()},_drawButton:function(){var e=this;this.label=t("label[for='"+this.ids.element+"']").attr("for",this.ids.button),this._on(this.label,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{"class":"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element),t("<span>",{"class":"ui-icon "+this.options.icons.button}).prependTo(this.button),this.buttonText=t("<span>",{"class":"ui-selectmenu-text"}).appendTo(this.button),this._setText(this.buttonText,this.element.find("option:selected").text()),this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){e.menuItems||e._refreshMenu()}),this._hoverable(this.button),this._focusable(this.button)},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>",{"class":"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo()),this.menuInstance=this.menu.menu({role:"listbox",select:function(t,i){t.preventDefault(),e._setSelection(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var s=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&s.index!==e.focusIndex&&(e._trigger("focus",t,{item:s}),e.isOpen||e._select(s,t)),e.focusIndex=s.index,e.button.attr("aria-activedescendant",e.menuItems.eq(s.index).attr("id"))}}).menu("instance"),this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this._setText(this.buttonText,this._getSelectedItem().text()),this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var t,e=this.element.find("option");e.length&&(this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(e,i){var s=this,n="";t.each(i,function(i,o){o.optgroup!==n&&(t("<li>",{"class":"ui-selectmenu-optgroup ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:o.optgroup}).appendTo(e),n=o.optgroup),s._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var s=t("<li>");return i.disabled&&s.addClass("ui-state-disabled"),this._setText(s,i.label),s.appendTo(e)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,s,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex):(i=this.menuItems.eq(this.element[0].selectedIndex),n+=":not(.ui-state-disabled)"),s="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](n).eq(-1):i[t+"All"](n).eq(0),s.length&&this.menuInstance.focus(e,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex);e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this._setText(this.buttonText,t.label),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){"icons"===t&&this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(e.button),this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"disabled"===t&&(this.menuInstance.option("disabled",e),this.button.toggleClass("ui-state-disabled",e).attr("aria-disabled",e),this.element.prop("disabled",e),e?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)),"width"===t&&this._resizeButton()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.toggleClass("ui-corner-top",this.isOpen).toggleClass("ui-corner-all",!this.isOpen).attr("aria-expanded",this.isOpen),this.menuWrap.toggleClass("ui-selectmenu-open",this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;t||(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop("disabled")}},_parseOptions:function(e){var i=[];e.each(function(e,s){var n=t(s),o=n.parent("optgroup");i.push({element:n,index:e,value:n.val(),label:n.text(),optgroup:o.attr("label")||"",disabled:o.prop("disabled")||n.prop("disabled")})}),this.items=i},_destroy:function(){this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.label.attr("for",this.ids.element)}}),t.widget("ui.slider",t.ui.mouse,{version:"1.11.4",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},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),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 e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",r=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)r.push(o);this.handles=n.add(t(r.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.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=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_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(e){var i,s,n,o,r,a,l,h,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastChangedValue||u.values(e)===c.min))&&(n=i,o=t(this),r=e)}),a=this._start(e,r),a===!1?!1:(this._mouseSliding=!0,this._handleIndex=r,o.addClass("ui-state-active").focus(),l=o.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-o.width()/2,top:e.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(e,r,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,o;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,o=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),o!==!1&&this.values(e,i))):i!==this.value()&&(o=this._trigger("slide",t,{handle:this.handles[e],value:i}),o!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&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)),t.isArray(this.options.values)&&(n=this.options.values.length),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!i),this._super(e,i),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step,s=Math.floor(+(t-e).toFixed(this._precision())/i)*i;t=s+e,this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var e,i,s,n,o,r=this.options.range,a=this.options,l=this,h=this._animateOff?!1:a.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())),u["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](u,a.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},a.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},a.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](u,a.animate),"min"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},a.animate),"max"===r&&"horizontal"===this.orientation&&this.range[h?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:a.animate}),"min"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},a.animate),"max"===r&&"vertical"===this.orientation&&this.range[h?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:a.animate}))},_handleEvents:{keydown:function(e){var i,s,n,o,r=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(e.target).addClass("ui-state-active"),i=this._start(e,r),i===!1))return}switch(o=this.options.step,s=n=this.options.values&&this.options.values.length?this.values(r):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-o)}this._slide(e,r,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.11.4",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},_isOverAxis:function(t,e,i){return t>=e&&e+i>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),t.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s&&(!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n))?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1)},_mouseStart:function(e,i,s){var n,o,r=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),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},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.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(e),this.originalPageX=e.pageX,this.originalPageY=e.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=t("<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]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,r=this.options,a=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<r.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+r.scrollSpeed:e.pageY-this.overflowOffset.top<r.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-r.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<r.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+r.scrollSpeed:e.pageX-this.overflowOffset.left<r.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-r.scrollSpeed)):(e.pageY-this.document.scrollTop()<r.scrollSensitivity?a=this.document.scrollTop(this.document.scrollTop()-r.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<r.scrollSensitivity&&(a=this.document.scrollTop(this.document.scrollTop()+r.scrollSpeed)),e.pageX-this.document.scrollLeft()<r.scrollSensitivity?a=this.document.scrollLeft(this.document.scrollLeft()-r.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<r.scrollSensitivity&&(a=this.document.scrollLeft(this.document.scrollLeft()+r.scrollSpeed))),a!==!1&&t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),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(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,r={};o&&"x"!==o||(r.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(r.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(r,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,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 e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].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(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,r=o+t.width,a=t.top,l=a+t.height,h=this.offset.click.top,u=this.offset.click.left,c="x"===this.options.axis||s+h>a&&l>s+h,d="y"===this.options.axis||e+u>o&&r>e+u,p=c&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&r>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>a&&l>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var e="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),i="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),s=e&&i,n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return s?this.floating?o&&"right"===o||"down"===n?2:1:n&&("down"===n?2:1):!1},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){a.push(this)}var s,n,o,r,a=[],l=[],h=this._connectWith();if(h&&e)for(s=h.length-1;s>=0;s--)for(o=t(h[s],this.document[0]),n=o.length-1;n>=0;n--)r=t.data(o[n],this.widgetFullName),r&&r!==this&&!r.options.disabled&&l.push([t.isFunction(r.options.items)?r.options.items.call(r.element):t(r.options.items,r.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),r]);for(l.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),
18
- s=l.length-1;s>=0;s--)l[s][0].each(i);return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,r,a,l,h,u=this.items,c=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i],this.document[0]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(c.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=c.length-1;i>=0;i--)for(r=c[i][1],a=c[i][0],s=0,h=a.length;h>s;s++)l=t(a[s]),l.data(this.widgetName+"-item",r),u.push({item:l,instance:r,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.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(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(n)):"tr"===s?e._createTrPlaceholder(e.currentItem,n):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each(function(){t("<td>&#160;</td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,s,n,o,r,a,l,h,u,c,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,o=null,u=d.floating||this._isFloating(this.currentItem),r=u?"left":"top",a=u?"width":"height",c=u?"clientX":"clientY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(l=this.items[s].item.offset()[r],h=!1,e[c]-l>this.items[s][a]/2&&(h=!0),n>Math.abs(e[c]-l)&&(n=Math.abs(e[c]-l),o=this.items[s],this.direction=h?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return void(this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[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")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.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 e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,r=e.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.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]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(r=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((r-this.originalPageY)/n.grid[1])*n.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-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{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(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].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,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),t.widget("ui.spinner",{version:"1.11.4",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 e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",t)))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=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=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!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(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,void this.element.val(this._format(i))}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(this.widget().toggleClass("ui-state-disabled",!!e),this.element.prop("disabled",!!e),this.buttons.button(e?"disable":"enable"))},_setOptions:l(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null===t?!1:t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),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:l(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:l(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:l(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:l(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?void l(this._value).call(this,t):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),t.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var i,s;e=e.cloneNode(!1),i=e.href.replace(t,""),s=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return e.hash.length>1&&i===s}}(),_create:function(){var e=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),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===e&&(s&&this.tabs.each(function(i,n){return t(n).attr("aria-controls")===s?(e=i,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=this.tabs.length?0:!1)),e!==!1&&(e=this.tabs.index(this.tabs.eq(e)),-1===e&&(e=i?!1:0)),!i&&e===!1&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(this.document[0].activeElement).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:n=!1,s--;break;case t.ui.keyCode.END:s=this.anchors.length-1;break;case t.ui.keyCode.HOME:s=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),void this._activate(s);case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),void this._activate(s===this.options.active?!1:s);default:return}e.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,e){return"active"===t?void this._activate(e):"disabled"===t?void this._setupDisabled(e):(this._super(t,e),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",e),e||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(e),void("heightStyle"===t&&this._setupHeightStyle(e)))},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),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","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),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 t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,s){var n,o,r,a=t(s).uniqueId().attr("id"),l=t(s).closest("li"),h=l.attr("aria-controls");e._isLocal(s)?(n=s.hash,r=n.substring(1),o=e.element.find(e._sanitizeSelector(n))):(r=l.attr("aria-controls")||t({}).uniqueId()[0].id,n="#"+r,o=e.element.find(n),o.length||(o=e._createPanel(r),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),h&&l.data("ui-tabs-aria-controls",h),l.attr({"aria-controls":r,"aria-labelledby":a}),o.attr("aria-labelledby",a)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),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(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),r=o[0]===s[0],a=r&&i.collapsible,l=a?t():this._getPanelForTab(o),h=s.length?this._getPanelForTab(s):t(),u={oldTab:s,oldPanel:h,newTab:a?t():o,newPanel:l};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||r&&!i.collapsible||this._trigger("beforeActivate",e,u)===!1||(i.active=a?!1:this.tabs.index(o),this.active=r?t():o,this.xhr&&this.xhr.abort(),h.length||l.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(o),e),this._toggle(e,u))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),r.length&&o.options.show?o._show(r,o.options.show,s):(r.show(),s())}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"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),a.hide(),n()),a.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),r.length&&a.length?i.oldTab.attr("tabIndex",-1):r.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),r.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_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.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(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 e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;i!==!1&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setupDisabled(i))},disable:function(e){var i=this.options.disabled;if(i!==!0){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setupDisabled(i)}},load:function(e,i){e=this._getIndex(e);var s=this,n=this.tabs.eq(e),o=n.find(".ui-tabs-anchor"),r=this._getPanelForTab(n),a={tab:n,panel:r},l=function(t,e){"abort"===e&&s.panels.stop(!1,!0),n.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===s.xhr&&delete s.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,a)),this.xhr&&"canceled"!==this.xhr.statusText&&(n.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.done(function(t,e,n){setTimeout(function(){r.html(t),s._trigger("load",i,a),l(n,e)},1)}).fail(function(t,e){setTimeout(function(){l(t,e)},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),t.widget("ui.tooltip",{version:"1.11.4",options:{
19
- content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).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},_addDescribedBy:function(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),void(this.options[e]=i)):(this._super(e,i),void("content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e.element)})))},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s.element[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(e,s),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){n._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}),void(i&&this._open(e,t,i)))},_open:function(e,i,s){function n(t){h.of=t,r.is(":hidden")||r.position(h)}var o,r,a,l,h=t.extend({},this.options.position);if(s){if(o=this._find(i))return void o.tooltip.find(".ui-tooltip-content").html(s);i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),o=this._tooltip(i),r=o.tooltip,this._addDescribedBy(i,r.attr("id")),r.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),s.clone?(l=s.clone(),l.removeAttr("id").find("[id]").removeAttr("id")):l=s,t("<div>").html(l).appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:n}),n(e)):r.position(t.extend({of:i},this.options.position)),r.hide(),this._show(r,this.options.show),this.options.show&&this.options.show.delay&&(a=this.delayedShow=setInterval(function(){r.is(":visible")&&(n(h.of),clearInterval(a))},t.fx.interval)),this._trigger("open",e,{tooltip:r})}},_registerCloseHandlers:function(e,i){var s={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var s=t.Event(e);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(s.mouseleave="close"),e&&"focusin"!==e.type||(s.focusout="close"),this._on(!0,i,s)},close:function(e){var i,s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);return o?(i=o.tooltip,void(o.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1)))):void n.removeData("ui-tooltip-open")},_tooltip:function(e){var i=t("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),s=i.uniqueId().attr("id");return t("<div>").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[s]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur"),o=s.element;n.target=n.currentTarget=o[0],e.close(n,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}})}),!function(t){if("function"==typeof define&&define.amd)define(t);else if("object"==typeof exports)module.exports=t();else{var e=window.Cookies,i=window.Cookies=t();i.noConflict=function(){return window.Cookies=e,i}}}(function(){function t(){for(var t=0,e={};t<arguments.length;t++){var i=arguments[t];for(var s in i)e[s]=i[s]}return e}function e(i){function s(e,n,o){var r;if("undefined"!=typeof document){if(arguments.length>1){if(o=t({path:"/"},s.defaults,o),"number"==typeof o.expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*o.expires),o.expires=a}try{r=JSON.stringify(n),/^[\{\[]/.test(r)&&(n=r)}catch(l){}return n=i.write?i.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)),e=e.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),e=e.replace(/[\(\)]/g,escape),document.cookie=[e,"=",n,o.expires&&"; expires="+o.expires.toUTCString(),o.path&&"; path="+o.path,o.domain&&"; domain="+o.domain,o.secure?"; secure":""].join("")}e||(r={});for(var h=document.cookie?document.cookie.split("; "):[],u=/(%[0-9A-Z]{2})+/g,c=0;c<h.length;c++){var d=h[c].split("="),p=d[0].replace(u,decodeURIComponent),f=d.slice(1).join("=");'"'===f.charAt(0)&&(f=f.slice(1,-1));try{if(f=i.read?i.read(f,p):i(f,p)||f.replace(u,decodeURIComponent),this.json)try{f=JSON.parse(f)}catch(l){}if(e===p){r=f;break}e||(r[p]=f)}catch(l){}}return r}}return s.set=s,s.get=function(t){return s(t)},s.getJSON=function(){return s.apply({json:!0},[].slice.call(arguments))},s.defaults={},s.remove=function(e,i){s(e,"",t(i,{expires:-1}))},s.withConverter=e,s}return e(function(){})});var z=jQuery.noConflict(!0);z(document).ready(function(){function t(){if(b!==!0){var t="Global Address Verification is not enabled.";return z("#errorresults_top").append(t),z("#errorresults_top").css("display","block"),void z("#errorresults_top").fadeOut(6800)}var e="",i=z("#billing\\:city").val(),s=z("#billing\\:postcode").val(),n=z("#billing\\:street1").val(),o=z("#billing\\:street2").val(),r=z("#billing\\:country_id").val(),l=z("#billing\\:region_id").val();return i=z.trim(i),s=z.trim(s),n=z.trim(n),o=z.trim(o),r=z.trim(r),l=z.trim(l),console.log("doGawsWebCall [Live]: Locality:"+i+" Street: "+n+" Street2: "+o+" PostalCode: "+s+" Country: "+r),z.ajax({type:"GET",url:D,dataType:"jsonp",async:!0,cache:!1,data:{id:a,t:"Melissa Data Magento Plugin - Address Check (SE)",format:"json",ctry:r,a1:n,a2:o,postal:s,loc:i},success:function(t){var i=JSON.stringify(t),s=z.parseJSON(i),n=JSON.stringify(s.Records),o=z.parseJSON(n),r=o[0].Results,a=(r.split(","),o[0].FormattedAddress),l=(o[0].Latitude,o[0].Longitude,o[0].Locality),h=o[0].PostalCode,u=o[0].AddressLine1,c=o[0].AddressLine2,d=(o[0].AddressLine3,o[0].AddressLine4,o[0].AddressLine5,o[0].Thoroughfare,o[0].CountryName,o[0].AdministrativeArea,o[0].SubNationalArea,o[0].CountryISO3166_1_Alpha3,o[0].CountryISO3166_1_Alpha2);o[0].PremisesNumber,o[0].SubPremisesNumber;null!=r.match(/(AV23|AV24|AV25)/gi)?(e='Address: <span style="text-decoration: underline;">'+a+"</span> is a good address.",html_result_gaws='<span style="color: green; font-weight:bold;">'+e+"</span>",z("#billing\\:country_id").val(d),z("#billing\\:street1").val(u),z("#billing\\:postcode").val(h),z("#billing\\:city").val(l),z.each(_,function(t,e){e=e.trim();var i=d.toLowerCase();-1!=e.toLowerCase().indexOf(i)&&z("#billing\\:street2").val(c)})):null!=r.match(/(AV1|AE05|AV21|AV22)/gi)?(e='Address: <span style="text-decoration: underline;">'+a+"</span> may or may not be a deliverable. <br> Please verify the address input.",html_result_gaws='<span style="color: orange; font-weight:bold;">'+e+"</span>"):null!=r.match(/(AE..)/gi)&&null==r.match(/(AE05)/gi)&&(e='Address: <span style="text-decoration: underline;">'+a+"</span> is a bad address. <br> Please double check the address input.",html_result_gaws='<span style="color: red; font-weight:bold;">'+e+"</span>"),z("#gawsresults_top").html(""),z("#gawsresults_top").html(html_result_gaws),z("#gawsresults_top").css("display","block")}}),0}function e(){if(y!==!0){var t="Global Email Validation is not enabled.";return z("#errorresults_top").append(t),z("#errorresults_top").css("display","block"),void z("#errorresults_top").fadeOut(6800)}var e="",i=z("#billing\\:email").val();i=z.trim(i);i.includes("@"),i.includes(".");return z.ajax({type:"GET",url:S,dataType:"jsonp",async:!0,cache:!1,data:{id:l,t:"Melissa Data Magento Plugin - Email Check (SE)",opt:"VERIFYMAILBOX:Express,DomainCorrection:On",format:"json",email:i},success:function(t){var i=JSON.stringify(t),s=z.parseJSON(i),n=JSON.stringify(s.Records),o=z.parseJSON(n),r=o[0].Results,a=r.split(","),l=o[0].EmailAddress,h=(o[0].MailboxName,o[0].DomainName,o[0].TopLevelDomain,o[0].TopLevelDomainName,""),u=0;z.each(a,function(t,e){e=e.trim(),null!=e.match(/ES01/gi)&&u++,null!=e.match(/ES20/gi)&&u++});var c=0;return null!=r.match(/(EE01|EE02|EE03|EE04|ES02|ES03|ES04|ES05|ES06|ES09)/gi)?(e='eMail: <span style="text-decoration: underline;">'+l+"</span> is not a deliverable Email address.",h=' <span style="color: red; font-weight:bold;">'+e+"</span>",c=0):null!=r.match(/(ES07|ES08)/gi)||2==u?(e='eMail: <span style="text-decoration: underline;">'+l+"</span> may or may not be deliverable. <br> The ISP is an accept-all or does not allow real-time verification.",h=' <span style="color: orange; font-weight:bold;">'+e+"</span>",c=0):null!=r.match(/(ES01|ES20|ES21|ES22)/gi)&&2!=u&&(e='eMail: <span style="text-decoration: underline;">'+l+"</span> is found to be deliverable.",h=' <span style="color: green; font-weight:bold;">'+e+"</span>",c=1),z("#gawsresults_top").append(h),z("#gawsresults_top").css("display","block"),c}}),0}var s=25,n=225,o=450,r=Cookies.get("MelissaDataMagento_GEE_Token"),a=Cookies.get("MelissaDataMagento_GAWS_Token"),l=Cookies.get("MelissaDataMagento_EMAIL_Token"),h=Cookies.get("MelissaDataMagento_EMAIL_ENABLED"),u=Cookies.get("MelissaDataMagento_GAWS_ENABLED"),c=Cookies.get("MelissaDataMagento_GEE_ENABLED"),d=Cookies.get("MelissaDataMagento_GEE_SINGLEROWCOUNTRIES"),p=Cookies.get("MelissaDataMagento_GEE_SINGLEROW_ENABLED"),f=Cookies.get("MelissaDataMagento_GEE_MULTIROW_ENABLED"),g=p.includes("1"),m=f.includes("1"),v=c.includes("1"),b=u.includes("1"),y=h.includes("1"),_=d.split(","),w="https://expressentry.melissadata.net/jsonp/GlobalExpressPostalCode",x="https://expressentry.melissadata.net/jsonp/GlobalExpressCountry",w="https://expressentry.melissadata.net/jsonp/GlobalExpressPostalCode",C="https://expressentry.melissadata.net/jsonp/GlobalExpressAddress",k="https://expressentry.melissadata.net/jsonp/GlobalExpressFreeForm",D="https://address.melissadata.net/V3/WEB/GlobalAddress/doGlobalAddress",S="https://globalemail.melissadata.net/v3/WEB/GlobalEmail/doGlobalEmail",T='<br /><p><table id="autocomplete_melissadata_singlerow" border="0px;"><tr style="font-weight: bold; font-size: 140%;"><b id="singleShow">Melissa Data Single Row Autocompletion</b></tr><tr width="" style="clear:both;"><td><br /></td></tr><tr style="clear:both;"><td width="'+n+'px"><input type="text" value="" placeholder="1. Type Country" title="Start typing a country name to get Suggestions" id="CountrySuggestionsSingleRow" style="width: '+n+'px;" /><span id="showCountryResultsSingleRow" style="height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+o+'px"><input type="text" value="" placeholder="2. Type Address" title="Start typing a Postal code & Address to get Suggestions from within that Country" id="AddressSuggestionsSingleRow" style="width: '+o+'px;" /><span id="showAddressResultsSingleRow" style="width: '+o+'px; height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+n+'px"><input type="text" value="" placeholder="3. Choose Suite" title="Choose an Apartment Number for that Address" id="SubBuildingSingleRow" style="width: '+n+'px;" /><span id="showAddressSubPremise" style="width: '+o+'px; height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td></tr></table></p><br /><br />',I='<br /><p><table id="autocomplete_melissadata_fielded" border="0px;"><tr style="font-weight: bold; font-size: 140%;"><b id="multiShow">Melissa Data Fielded Autocompletion</b></tr><tr width="'+3*n+'px"><td><br /></td></tr><tr style="clear:both;"><td width="'+n+'px"><input type="text" value="" placeholder="1. Type Country" title="Start typing a country name to get Suggestions" id="CountrySuggestions" style="width: '+n+'px;" /><span id="showCountryResults" style="width:150px;height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+n+'px"><input type="text" value="" placeholder="2. Type Postal Code" title="Start typing a Postal code to get Suggestions from within that Country" id="PostalCodeSuggestions" style="width: '+n+'px;" /><span id="showPostalCodeResults" style="width:150px;height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+n+'px"><input type="text" value="" placeholder="3. Type Street Address" title="Start typing a street name to get suggestions for them within that Postal code range in that country" id="StreetSuggestions" style="width: '+n+'px;" /><span id="showStreetResults" style="height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td></tr></table></p><br /><br /><p>';if(z("#showAddressSubPremise").hide(),z("#showAddressSubPremise").css("display","none"),z("#SubBuildingSingleRow").hide(),z("#SubBuildingSingleRow").css("display","none"),v===!0&&(z("#checkout-step-billing").css("display","inline"),z("#billing\\:region_id").css("display","inline"),z(T).insertBefore("#checkout-step-billing"),z(I).insertBefore("#checkout-step-billing"),z("#autocomplete_melissadata_fielded").hide(),z("#autocomplete_melissadata_singlerow").hide(),z("#autocomplete_melissadata_fielded").css("display","none"),z("#autocomplete_melissadata_singlerow").css("display","none"),z("#singleShow").hide(),z("#singleShow").css("display","none"),z("#multiShow").hide(),z("#multiShow").css("display","none"),g===!0&&m===!0?(z("#multiShow").show(),z("#multiShow").css("display","inline"),z("#autocomplete_melissadata_fielded").show(),z("#autocomplete_melissadata_fielded").css("display","inline"),z("#singleShow").show(),z("#singleShow").css("display","inline"),z("#autocomplete_melissadata_singlerow").show(),z("#autocomplete_melissadata_singlerow").css("display","inline")):g===!0?(z("#singleShow").show(),z("#singleShow").css("display","inline"),z("#autocomplete_melissadata_singlerow").show(),z("#autocomplete_melissadata_singlerow").css("display","inline"),z("#autocomplete_melissadata_fielded").hide(),z("#autocomplete_melissadata_fielded").css("display","none")):m===!0?(z("#multiShow").show(),z("#multiShow").css("display","inline"),z("#autocomplete_melissadata_fielded").show(),z("#autocomplete_melissadata_fielded").css("display","inline"),z("#autocomplete_melissadata_singlerow").hide(),z("#autocomplete_melissadata_singlerow").css("display","none")):(z("#autocomplete_melissadata_singlerow").hide(),z("#autocomplete_melissadata_singlerow").css("display","none"),z("#autocomplete_melissadata_fielded").hide(),z("#autocomplete_melissadata_fielded").css("display","none"))),b===!0&&y===!0){var A='<form id="formaction"><input type="button" id="submitCheck" title="Verify now the Input Address Values" value=" Verify "></form><br /><span id="gawsresults_top" style="display:none;"></span><br /><span id="errorresults_top" style="display:none;"></span>';z(A).insertBefore("#checkout-step-billing"),z("#checkout-step-billing").css("display","inline"),z("#billing\\:region_id").css("display","inline")}else if(b===!0){var A='<form><input type="button" id="submitCheck" title="Verify now the Input Address Values" value=" Verify "></form><br /><span id="gawsresults_top" style="display:none;"></span><br /><span id="errorresults_top" style="display:none;"></span>';z(A).insertBefore("#checkout-step-billing"),z("#checkout-step-billing").css("display","inline"),z("#billing\\:region_id").css("display","inline")}else if(y===!0){var P='<form><input type="button" id="submitCheck" title="Verify now the Input Address Values" value=" Verify Now "></form><br /><span id="gawsresults_top" style="display:none;"></span><br /><span id="errorresults_top" style="display:none;"></span>';z(P).insertBefore("#checkout-step-billing"),z("#checkout-step-billing").css("display","inline"),z("#billing\\:region_id").css("display","inline")}z("#showCountryResults").on("click",function(){var t=z("#showCountryResults").find(":selected").val(),e=z("#showCountryResults").find(":selected").text(),i='<option selected value="'+t+'">'+e+"</option>",s=new Array;s.push('<select style="width: '+n+'px;" size="10">'),s.push(i),s.push("</select>");var o=s.join(""),r=0;z.each(_,function(e,i){i=i.trim();var s=t.toLowerCase();-1!=i.toLowerCase().indexOf(s)}),1==r?(z("#billing\\:country_id").html(i),z("#autocomplete_melissadata_singlerow").show(),z("#autocomplete_melissadata_fielded").hide(),z("#CountrySuggestionsSingleRow").val(""),z("#CountrySuggestionsSingleRow").html(""),z("#CountrySuggestionsSingleRow").val(e),z("#showAddressResultsSingleRow").html(""),z("#showAddressResultsSingleRow").val(""),z("#AddressSuggestionsSingleRow").html(""),z("#AddressSuggestionsSingleRow").val(""),z("#AddressSuggestionsSingleRow").focus(),z("#showAddressResultsSingleRow").focus(),z("#AddressResultsSingleRow").focus(),z("#showCountryResultsSingleRow").hide(),z("#showCountryResultsSingleRow").html(o)):(z("#billing\\:country_id").html(i),z("#CountrySuggestions").val(""),z("#CountrySuggestions").html(""),z("#CountrySuggestions").val(e),z("#PostalCodeSuggestions").val(""),z("#showPostalCodeResults").val(""),z("#PostalCodeSuggestions").html(""),z("#showPostalCodeResults").html(""),z("#billing\\:street1").val(""),z("#showStreetResults").val(""),z("#showStreetResults").html(""),z("#StreetSuggestions").val(""),z("#StreetSuggestions").html(""),z("#PostalCodeSuggestions").focus(),z("#showPostalCodeResults").focus(),z("#showCountryResults").html(o),z("#showCountryResults").hide()),res="Country selected.",html_result_gaws='<span style="color: green; font-weight:bold;">'+res+"</span>",z("#gawsresults_top").html(html_result_gaws),z("#gawsresults_top").css("display","block")}),z("#showAddressSubPremise").on("click",function(){var t=z("#showAddressSubPremise").find(":selected").val(),e=z("#showAddressResultsSingleRow").find(":selected").attr("deliver"),i=z("#showCountryResultsSingleRow").find(":selected").val();z("#billing\\:street1").val(""),z("#billing\\:street1").html("");var s=z("#showAddressResultsSingleRow").find(":selected").attr("organization"),n=z("#showAddressResultsSingleRow").find(":selected").attr("building"),o=z("#showAddressResultsSingleRow").find(":selected").attr("premise"),r=z("#showAddressResultsSingleRow").find(":selected").attr("thoroughfare");if(-1!=i.toLowerCase().indexOf("gb")){var a=new Array;a.push(s),a.push(n),a=a.filter(function(t){return t});var l=a.join(","),h=new Array;h.push(t),h.push(o+" "+r),h=h.filter(function(t){return t});var u=h.join(",");z("#billing\\:street1").val(l),z("#billing\\:street2").val(u)}else console.log("Set apartment number with street2: "+t),z("#billing\\:street1").val(e),z("#billing\\:street2").val(t);z("#SubBuildingSingleRow").val(""),z("#SubBuildingSingleRow").html(""),z("#SubBuildingSingleRow").val(t),z("#showAddressSubPremise").val(""),z("#showAddressSubPremise").html(""),z("#showAddressSubPremise").val(t),res="Suite selected.",html_result_gaws='<span style="color: green; font-weight:bold;">'+res+"</span>",z("#gawsresults_top").html(html_result_gaws),z("#gawsresults_top").css("display","block")}),z("#showPostalCodeResults").on("click",function(){var t=z("#showPostalCodeResults").find(":selected").val(),e=z("#showPostalCodeResults").find(":selected").attr("pc"),i=z("#showCountryResults").find(":selected").val(),s=z("#showCountryResults").find(":selected").text(),n='<option selected value="'+i+'">'+s+"</option>";z("#PostalCodeSuggestions").val(""),z("#PostalCodeSuggestions").html(""),z("#PostalCodeSuggestions").val(e+", "+t),z("#billing\\:country_id").html(n),z("#billing\\:city").val(t),z("#billing\\:postcode").val(e),z("#billing\\:street1").val(""),z("#showStreetResults").val(""),z("#showStreetResults").html(""),z("#StreetSuggestions").val(""),z("#StreetSuggestions").html(""),z("#showStreetResults").focus(),z("#StreetSuggestions").focus(),z("#showPostalCodeResults").hide(),res="Postal Code selected.",html_result_gaws='<span style="color: green; font-weight:bold;">'+res+"</span>",z("#gawsresults_top").html(html_result_gaws),z("#gawsresults_top").css("display","block")}),z("#showCountryResultsSingleRow").on("click",function(){var t=(z("#showCountryResultsSingleRow").find(":selected").val(),z("#showCountryResultsSingleRow").find(":selected").text());z("#CountrySuggestionsSingleRow").val(""),z("#CountrySuggestionsSingleRow").html(""),z("#CountrySuggestionsSingleRow").val(t),z("#showAddressResultsSingleRow").html(""),z("#showAddressResultsSingleRow").val(""),z("#AddressSuggestionsSingleRow").html(""),z("#AddressSuggestionsSingleRow").val(""),z("#AddressSuggestionsSingleRow").focus(),z("#showAddressResultsSingleRow").focus(),z("#AddressResultsSingleRow").focus(),z("#showCountryResultsSingleRow").hide(),res="Country selected.",html_result_gaws='<span style="color: green; font-weight:bold;">'+res+"</span>",z("#gawsresults_top").html(html_result_gaws),z("#gawsresults_top").css("display","block")}),z("#showStreetResults").on("click",function(){var t=z("#showPostalCodeResults").find(":selected").val(),e=z("#showPostalCodeResults").find(":selected").attr("pc"),i=z("#showStreetResults").find(":selected").text(),s=(z("#showPostalCodeResults").find(":selected").attr("aarea"),z("#showStreetResults").find(":selected").attr("aarea"),z("#showCountryResults").find(":selected").val()),n=z("#showCountryResults").find(":selected").text(),o='<option selected value="'+s+'">'+n+"</option>";z("#billing\\:city").val(t),z("#billing\\:postcode").val(e),z("#billing\\:street1").val(i),z("#billing\\:country_id").html(o),z("#StreetSuggestions").val(""),z("#StreetSuggestions").html(""),z("#StreetSuggestions").val(i),z("#showStreetResults").hide(),res="Address selected.",html_result_gaws='<span style="color: green; font-weight:bold;">'+res+"</span>",z("#gawsresults_top").html(html_result_gaws),z("#gawsresults_top").css("display","block")}),z("#showAddressResultsSingleRow").on("click",function(){var t=z("#showAddressResultsSingleRow").find(":selected").val(),e=z("#showAddressResultsSingleRow").find(":selected").attr("loc"),i=z("#showAddressResultsSingleRow").find(":selected").attr("pc"),n=z("#showAddressResultsSingleRow").find(":selected").attr("deliver"),r=(z("#showAddressResultsSingleRow").find(":selected").attr("aarea"),z("#showAddressResultsSingleRow").find(":selected").attr("simpleaddr"),z("#showAddressResultsSingleRow").find(":selected").attr("subbuilding")),a=r.split(","),l=z("#showCountryResultsSingleRow").find(":selected").val(),h=z("#showCountryResultsSingleRow").find(":selected").text(),u='<option selected value="'+l+'">'+h+"</option>",c=z("#showAddressResultsSingleRow").find(":selected").attr("organization"),d=z("#showAddressResultsSingleRow").find(":selected").attr("building"),p=z("#showAddressResultsSingleRow").find(":selected").attr("premise"),f=z("#showAddressResultsSingleRow").find(":selected").attr("thoroughfare");if(-1!=l.toLowerCase().indexOf("gb")){var g=new Array;g.push(c),g.push(d),g=g.filter(function(t){return t});var m=g.join(","),v=new Array;v.push(p+" "+f),v=v.filter(function(t){return t});var b=v.join(",");z("#billing\\:street1").val(m),z("#billing\\:street2").val(b),z("#billing\\:city").val(e),z("#billing\\:postcode").val(i),z("#billing\\:country_id").html(u)}else z("#billing\\:city").val(e),z("#billing\\:postcode").val(i),z("#billing\\:street1").val(n),z("#billing\\:street2").val(""),z("#billing\\:country_id").html(u);z("#AddressSuggestionsSingleRow").val(""),z("#AddressSuggestionsSingleRow").html(""),z("#AddressSuggestionsSingleRow").val(t),z("#showAddressResultsSingleRow").hide(),res="Street and House Number have been chosen.",html_result_gaws='<span style="color: green; font-weight:bold;">'+res+"</span>",z("#gawsresults_top").html(html_result_gaws),z("#gawsresults_top").css("display","block");var y=0;if(z.each(_,function(t,e){e=e.trim();var i=l.toLowerCase();-1!=e.toLowerCase().indexOf(i)&&(y=1)}),1==y&&"undefined"!=typeof a[0]&&null!=a[0]&&a[0].length>0){var w=new Array,x=1,C=o+100;w.push('<select style="width: '+C+'px;" size="25">'),z.each(a,function(t,e){e=e.trim(),"undefined"!=typeof e&&"string"==typeof e.valueOf()&&e.length>=1&&(x>=0?(w.push('<option selected value="'+e+'">'+e+"</option>"),x++):x>=1&&s>=x&&(w.push('<option value="'+e+'">'+e+"</option>"),x++))}),w.push("</select>");var k=w.join("");z("#SubBuildingSingleRow").focus(),z("#showAddressSubPremise").focus(),z("#showAddressSubPremise").html(""),z("#showAddressSubPremise").val(""),z("#showAddressSubPremise").html(k),z("#showAddressSubPremise").css("display","inline"),z("#showAddressSubPremise").show()}}),v===!0&&(z("#AddressSuggestionsSingleRow").autocomplete({showHeader:!0,minLength:1,delay:250,source:function(t,e){z.ajax({url:k,dataType:"jsonp",data:{maxrecords:s,ff:z("#AddressSuggestionsSingleRow").val(),country:z("#showCountryResultsSingleRow").find(":selected").val(),id:r,format:"jsonp",nativecharset:!1},success:function(t){function e(t){var o="",a="";for(i in t){z("#showCountryResultsSingleRow").find(":selected").val();a=t.Address,simpleaddr=t.Address2,loc=t.Locality,o=t.PostalCode,aarea=t.AdministrativeArea,deliver=t.DeliveryAddress,subbuilding=t.SubBuilding,organization=t.Organization,building=t.Building,premise=t.Premise,tn=t.Thoroughfare,"undefined"!=typeof a&&"string"==typeof a.valueOf()&&a.length>0&&(l>=0?(r.push('<option selected value="'+a+'" organization="'+organization+'" building="'+building+'" premise="'+premise+'" thoroughfare="'+tn+'" subbuilding="'+subbuilding+'" loc="'+loc+'" pc="'+o+'" aarea="'+aarea+'" simpleaddr="'+simpleaddr+'" deliver="'+deliver+'">'+a+"</option>"),l++):l>=1&&s>=l&&(r.push('<option value="'+a+'" organization="'+organization+'" building="'+building+'" premise="'+premise+'" thoroughfare="'+tn+'" subbuilding="'+subbuilding+'" loc="'+loc+'" pc="'+o+'" aarea="'+aarea+'" simpleaddr="'+simpleaddr+'" deliver="'+deliver+'">'+a+"</option>"),l++)),"object"==typeof t[i]&&e(t[i])}return n(r).join("")}function n(t){var e={};return t.filter(function(t){return e.hasOwnProperty(t)?!1:e[t]=!0})}var r=new Array,a=new Array,l=1,h=o+100;a.push('<select style="width: '+h+'px;" size="10">');var u=JSON.stringify(t),c=z.parseJSON(u),d=JSON.stringify(c.Results),p=z.parseJSON(d),f=e(p);a.push(f),a.push("</select>");var g=a.join("");z("#showAddressResultsSingleRow").html(""),z("#showAddressResultsSingleRow").val(""),z("#showAddressResultsSingleRow").html(g),z("#showAddressResultsSingleRow").show(),r=[]}})}}),z("#StreetSuggestions").autocomplete({showHeader:!0,minLength:1,delay:250,source:function(t,e){z.ajax({url:C,dataType:"jsonp",data:{maxrecords:s,address1:z("#StreetSuggestions").val(),locality:z("#showPostalCodeResults").find(":selected").val(),postalcode:z("#showPostalCodeResults").find(":selected").attr("pc"),country:z("#showCountryResults").find(":selected").val(),id:r,format:"jsonp",nativecharset:!1},success:function(t){function e(t){var n="";for(i in t)n=t.DeliveryAddress,aarea=t.AdministrativeArea,"undefined"!=typeof n&&"string"==typeof n.valueOf()&&n.length>0&&(l>=0?(r.push('<option selected value="'+n+'" aarea="'+aarea+'">'+n+"</option>"),l++):l>=1&&s>=l&&(r.push('<option value="'+n+'" aarea="'+aarea+'">'+n+"</option>"),l++)),"object"==typeof t[i]&&e(t[i]);return o(r).join("")}function o(t){var e={};return t.filter(function(t){return e.hasOwnProperty(t)?!1:e[t]=!0})}var r=new Array,a=new Array,l=1;a.push('<select style="width: '+n+'px;" size="10">');var h=JSON.stringify(t),u=z.parseJSON(h),c=JSON.stringify(u.Results),d=z.parseJSON(c),p=e(d);a.push(p),a.push("</select>");var f=a.join("");z("#showStreetResults").html(""),z("#showStreetResults").val(""),z("#showStreetResults").html(f),z("#showStreetResults").show(),r=[]}})}}),z("#PostalCodeSuggestions").autocomplete({showHeader:!0,minLength:1,delay:250,source:function(t,e){z.ajax({url:w,dataType:"jsonp",data:{maxrecords:s,postalcode:z("#PostalCodeSuggestions").val(),country:z("#showCountryResults").find(":selected").val(),id:r,format:"jsonp",nativecharset:!1},success:function(t){function e(t){var n="",a="",h="";for(i in t)n=t.PostalCodePrimary,a=t.Locality,h=t.AdministrativeArea,"undefined"!=typeof n&&"string"==typeof n.valueOf()&&n.length>0&&"undefined"!=typeof a&&"string"==typeof a.valueOf()&&a.length>0&&(l>=0?(r.push('<option selected value="'+a+'" pc="'+n+'" aarea="'+h+'">'+n+", "+a+"</option>"),l++):l>=1&&s>=l&&(r.push('<option value="'+a+'" pc="'+n+'" aarea="'+h+'">'+n+", "+a+"</option>"),l++)),"object"==typeof t[i]&&e(t[i]);return o(r).join("")}function o(t){var e={};return t.filter(function(t){return e.hasOwnProperty(t)?!1:e[t]=!0})}var r=new Array,a=new Array,l=1;a.push('<select style="width: '+n+'px;" size="10">');var h=JSON.stringify(t),u=z.parseJSON(h),c=JSON.stringify(u.Results),d=z.parseJSON(c),p=e(d);a.push(p),a.push("</select>");var f=a.join("");z("#showPostalCodeResults").html(""),z("#showPostalCodeResults").val(""),z("#showPostalCodeResults").html(f),z("#showPostalCodeResults").show(),r=[]}})}}),z("#CountrySuggestions").autocomplete({showHeader:!0,minLength:1,delay:250,source:function(t,e){z.ajax({url:x,dataType:"jsonp",data:{country:z("#CountrySuggestions").val(),id:r,maxrecords:s,format:"jsonp"},success:function(t){function e(t){var n="",a="";for(i in t)n=t.Char2ISO,a=t.English,"undefined"!=typeof n&&"string"==typeof n.valueOf()&&n.length>0&&"undefined"!=typeof a&&"string"==typeof a.valueOf()&&a.length>0&&(l>=0?(r.push('<option selected value="'+n+'">'+a+"</option>"),l++):l>=1&&s>=l&&(r.push('<option value="'+n+'">'+a+"</option>"),l++)),"object"==typeof t[i]&&e(t[i]);return o(r).join("")}function o(t){var e={};return t.filter(function(t){return e.hasOwnProperty(t)?!1:e[t]=!0})}var r=new Array,a=new Array,l=1;a.push('<select style="width: '+n+'px;" size="10">');var h=JSON.stringify(t),u=z.parseJSON(h),c=JSON.stringify(u.Results),d=z.parseJSON(c),p=e(d);a.push(p),a.push("</select>");var f=a.join("");z("#showCountryResults").html(""),z("#showCountryResults").val(""),z("#showCountryResults").html(f),z("#showCountryResults").show(),r=[]}})}}),z("#CountrySuggestionsSingleRow").autocomplete({showHeader:!0,minLength:1,delay:250,
20
- source:function(t,e){z.ajax({url:x,dataType:"jsonp",data:{country:z("#CountrySuggestionsSingleRow").val(),id:r,maxrecords:s,format:"jsonp"},success:function(t){function e(t){var n="",a="";for(i in t)n=t.Char2ISO,a=t.English,"undefined"!=typeof n&&"string"==typeof n.valueOf()&&n.length>0&&"undefined"!=typeof a&&"string"==typeof a.valueOf()&&a.length>0&&(l>=0?(r.push('<option selected value="'+n+'">'+a+"</option>"),l++):l>=1&&s>=l&&(r.push('<option value="'+n+'">'+a+"</option>"),l++)),"object"==typeof t[i]&&e(t[i]);return o(r).join("")}function o(t){var e={};return t.filter(function(t){return e.hasOwnProperty(t)?!1:e[t]=!0})}var r=new Array,a=new Array,l=1;a.push('<select style="width: '+n+'px;" size="10">');var h=JSON.stringify(t),u=z.parseJSON(h),c=JSON.stringify(u.Results),d=z.parseJSON(c),p=e(d);a.push(p),a.push("</select>");var f=a.join("");z("#showCountryResultsSingleRow").html(""),z("#showCountryResultsSingleRow").val(""),z("#showCountryResultsSingleRow").html(f),z("#showCountryResultsSingleRow").show(),r=[]}})}})),z("#submitCheck").click(function(){e(),t()}),z("#billing-buttons-container .button").click(function(){var t=z("#billing\\:city").val(),e=z("#billing\\:postcode").val(),i=z("#billing\\:street1").val(),s=z("#billing\\:country_id").val(),n=(z("#billing\\:firstname").val(),z("#billing\\:lastname").val(),z("#billing\\:email").val()),o=n.includes("@"),r=n.includes(".");t.length>=2&&e.length>=2&&i.length>=2&&s.length>=1&&n.length>=6&&o===!0&&r===!0&&(z("#autocomplete_melissadata_fielded").hide(),z("#autocomplete_melissadata_singlerow").hide(),z("#autocomplete_melissadata_fielded").css("display","none"),z("#autocomplete_melissadata_singlerow").css("display","none"),z("#singleShow").hide(),z("#singleShow").css("display","none"),z("#multiShow").hide(),z("#multiShow").css("display","none"),z("#gawsresults_top").hide(),z("#gawsresults_top").css("display","none"),z("#submitCheck").hide(),z("#submitCheck").css("display","none"))})});
3
  Author: Sebastian Enger, M.Sc. //"Liebe besiegt Alles".
4
  Contact: Sebastian.Enger@MelissaData.com
5
  Phone: +49 30 80 933 178-2
6
+ Last Modified: 2016-08-17//11:30pm
7
  */
8
 
9
+ function openMDElement(t,e){var i,s,n;for(s=document.getElementsByClassName("tabcontent"),i=0;i<s.length;i++)s[i].style.display="none";for(n=document.getElementsByClassName("tablinks"),i=0;i<n.length;i++)n[i].className=n[i].className.replace(" active","");var o=e.includes("Paris"),r=e.includes("London");o===!0?z("#Paris").css("display","block"):r===!0&&z("#London").css("display","block"),t.currentTarget.className+=" active"}!function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){function i(t){var e=!!t&&"length"in t&&t.length,i=ot.type(t);return"function"===i||ot.isWindow(t)?!1:"array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t}function s(t,e,i){if(ot.isFunction(e))return ot.grep(t,function(t,s){return!!e.call(t,s,t)!==i});if(e.nodeType)return ot.grep(t,function(t){return t===e!==i});if("string"==typeof e){if(gt.test(e))return ot.filter(e,t,i);e=ot.filter(e,t)}return ot.grep(t,function(t){return Z.call(e,t)>-1!==i})}function n(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function o(t){var e={};return ot.each(t.match(wt)||[],function(t,i){e[i]=!0}),e}function r(){X.removeEventListener("DOMContentLoaded",r),t.removeEventListener("load",r),ot.ready()}function a(){this.expando=ot.expando+a.uid++}function l(t,e,i){var s;if(void 0===i&&1===t.nodeType)if(s="data-"+e.replace(Tt,"-$&").toLowerCase(),i=t.getAttribute(s),"string"==typeof i){try{i="true"===i?!0:"false"===i?!1:"null"===i?null:+i+""===i?+i:zt.test(i)?ot.parseJSON(i):i}catch(n){}St.set(t,e,i)}else i=void 0;return i}function h(t,e,i,s){var n,o=1,r=20,a=s?function(){return s.cur()}:function(){return ot.css(t,e,"")},l=a(),h=i&&i[3]||(ot.cssNumber[e]?"":"px"),u=(ot.cssNumber[e]||"px"!==h&&+l)&&At.exec(ot.css(t,e));if(u&&u[3]!==h){h=h||u[3],i=i||[],u=+l||1;do o=o||".5",u/=o,ot.style(t,e,u+h);while(o!==(o=a()/l)&&1!==o&&--r)}return i&&(u=+u||+l||0,n=i[1]?u+(i[1]+1)*i[2]:+i[2],s&&(s.unit=h,s.start=u,s.end=n)),n}function u(t,e){var i="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):[];return void 0===e||e&&ot.nodeName(t,e)?ot.merge([t],i):i}function c(t,e){for(var i=0,s=t.length;s>i;i++)Dt.set(t[i],"globalEval",!e||Dt.get(e[i],"globalEval"))}function d(t,e,i,s,n){for(var o,r,a,l,h,d,p=e.createDocumentFragment(),f=[],g=0,m=t.length;m>g;g++)if(o=t[g],o||0===o)if("object"===ot.type(o))ot.merge(f,o.nodeType?[o]:o);else if(Ht.test(o)){for(r=r||p.appendChild(e.createElement("div")),a=(Nt.exec(o)||["",""])[1].toLowerCase(),l=Ot[a]||Ot._default,r.innerHTML=l[1]+ot.htmlPrefilter(o)+l[2],d=l[0];d--;)r=r.lastChild;ot.merge(f,r.childNodes),r=p.firstChild,r.textContent=""}else f.push(e.createTextNode(o));for(p.textContent="",g=0;o=f[g++];)if(s&&ot.inArray(o,s)>-1)n&&n.push(o);else if(h=ot.contains(o.ownerDocument,o),r=u(p.appendChild(o),"script"),h&&c(r),i)for(d=0;o=r[d++];)Rt.test(o.type||"")&&i.push(o);return p}function p(){return!0}function f(){return!1}function g(){try{return X.activeElement}catch(t){}}function m(t,e,i,s,n,o){var r,a;if("object"==typeof e){"string"!=typeof i&&(s=s||i,i=void 0);for(a in e)m(t,a,i,s,e[a],o);return t}if(null==s&&null==n?(n=i,s=i=void 0):null==n&&("string"==typeof i?(n=s,s=void 0):(n=s,s=i,i=void 0)),n===!1)n=f;else if(!n)return t;return 1===o&&(r=n,n=function(t){return ot().off(t),r.apply(this,arguments)},n.guid=r.guid||(r.guid=ot.guid++)),t.each(function(){ot.event.add(this,e,n,s,i)})}function v(t,e){return ot.nodeName(t,"table")&&ot.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function b(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function y(t){var e=Yt.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function _(t,e){var i,s,n,o,r,a,l,h;if(1===e.nodeType){if(Dt.hasData(t)&&(o=Dt.access(t),r=Dt.set(e,o),h=o.events)){delete r.handle,r.events={};for(n in h)for(i=0,s=h[n].length;s>i;i++)ot.event.add(e,n,h[n][i])}St.hasData(t)&&(a=St.access(t),l=ot.extend({},a),St.set(e,l))}}function w(t,e){var i=e.nodeName.toLowerCase();"input"===i&&Et.test(t.type)?e.checked=t.checked:"input"!==i&&"textarea"!==i||(e.defaultValue=t.defaultValue)}function x(t,e,i,s){e=J.apply([],e);var n,o,r,a,l,h,c=0,p=t.length,f=p-1,g=e[0],m=ot.isFunction(g);if(m||p>1&&"string"==typeof g&&!st.checkClone&&qt.test(g))return t.each(function(n){var o=t.eq(n);m&&(e[0]=g.call(this,n,o.html())),x(o,e,i,s)});if(p&&(n=d(e,t[0].ownerDocument,!1,t,s),o=n.firstChild,1===n.childNodes.length&&(n=o),o||s)){for(r=ot.map(u(n,"script"),b),a=r.length;p>c;c++)l=n,c!==f&&(l=ot.clone(l,!0,!0),a&&ot.merge(r,u(l,"script"))),i.call(t[c],l,c);if(a)for(h=r[r.length-1].ownerDocument,ot.map(r,y),c=0;a>c;c++)l=r[c],Rt.test(l.type||"")&&!Dt.access(l,"globalEval")&&ot.contains(h,l)&&(l.src?ot._evalUrl&&ot._evalUrl(l.src):ot.globalEval(l.textContent.replace(Ut,"")))}return t}function C(t,e,i){for(var s,n=e?ot.filter(e,t):t,o=0;null!=(s=n[o]);o++)i||1!==s.nodeType||ot.cleanData(u(s)),s.parentNode&&(i&&ot.contains(s.ownerDocument,s)&&c(u(s,"script")),s.parentNode.removeChild(s));return t}function k(t,e){var i=ot(e.createElement(t)).appendTo(e.body),s=ot.css(i[0],"display");return i.detach(),s}function D(t){var e=X,i=$t[t];return i||(i=k(t,e),"none"!==i&&i||(Vt=(Vt||ot("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement),e=Vt[0].contentDocument,e.write(),e.close(),i=k(t,e),Vt.detach()),$t[t]=i),i}function S(t,e,i){var s,n,o,r,a=t.style;return i=i||Gt(t),r=i?i.getPropertyValue(e)||i[e]:void 0,""!==r&&void 0!==r||ot.contains(t.ownerDocument,t)||(r=ot.style(t,e)),i&&!st.pixelMarginRight()&&Xt.test(r)&&Kt.test(e)&&(s=a.width,n=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=i.width,a.width=s,a.minWidth=n,a.maxWidth=o),void 0!==r?r+"":r}function z(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}function T(t){if(t in se)return t;for(var e=t[0].toUpperCase()+t.slice(1),i=ie.length;i--;)if(t=ie[i]+e,t in se)return t}function P(t,e,i){var s=At.exec(e);return s?Math.max(0,s[2]-(i||0))+(s[3]||"px"):e}function A(t,e,i,s,n){for(var o=i===(s?"border":"content")?4:"width"===e?1:0,r=0;4>o;o+=2)"margin"===i&&(r+=ot.css(t,i+It[o],!0,n)),s?("content"===i&&(r-=ot.css(t,"padding"+It[o],!0,n)),"margin"!==i&&(r-=ot.css(t,"border"+It[o]+"Width",!0,n))):(r+=ot.css(t,"padding"+It[o],!0,n),"padding"!==i&&(r+=ot.css(t,"border"+It[o]+"Width",!0,n)));return r}function I(t,e,i){var s=!0,n="width"===e?t.offsetWidth:t.offsetHeight,o=Gt(t),r="border-box"===ot.css(t,"boxSizing",!1,o);if(0>=n||null==n){if(n=S(t,e,o),(0>n||null==n)&&(n=t.style[e]),Xt.test(n))return n;s=r&&(st.boxSizingReliable()||n===t.style[e]),n=parseFloat(n)||0}return n+A(t,e,i||(r?"border":"content"),s,o)+"px"}function M(t,e){for(var i,s,n,o=[],r=0,a=t.length;a>r;r++)s=t[r],s.style&&(o[r]=Dt.get(s,"olddisplay"),i=s.style.display,e?(o[r]||"none"!==i||(s.style.display=""),""===s.style.display&&Mt(s)&&(o[r]=Dt.access(s,"olddisplay",D(s.nodeName)))):(n=Mt(s),"none"===i&&n||Dt.set(s,"olddisplay",n?i:ot.css(s,"display"))));for(r=0;a>r;r++)s=t[r],s.style&&(e&&"none"!==s.style.display&&""!==s.style.display||(s.style.display=e?o[r]||"":"none"));return t}function E(t,e,i,s,n){return new E.prototype.init(t,e,i,s,n)}function N(){return t.setTimeout(function(){ne=void 0}),ne=ot.now()}function R(t,e){var i,s=0,n={height:t};for(e=e?1:0;4>s;s+=2-e)i=It[s],n["margin"+i]=n["padding"+i]=t;return e&&(n.opacity=n.width=t),n}function O(t,e,i){for(var s,n=(j.tweeners[e]||[]).concat(j.tweeners["*"]),o=0,r=n.length;r>o;o++)if(s=n[o].call(i,e,t))return s}function H(t,e,i){var s,n,o,r,a,l,h,u,c=this,d={},p=t.style,f=t.nodeType&&Mt(t),g=Dt.get(t,"fxshow");i.queue||(a=ot._queueHooks(t,"fx"),null==a.unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,c.always(function(){c.always(function(){a.unqueued--,ot.queue(t,"fx").length||a.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(i.overflow=[p.overflow,p.overflowX,p.overflowY],h=ot.css(t,"display"),u="none"===h?Dt.get(t,"olddisplay")||D(t.nodeName):h,"inline"===u&&"none"===ot.css(t,"float")&&(p.display="inline-block")),i.overflow&&(p.overflow="hidden",c.always(function(){p.overflow=i.overflow[0],p.overflowX=i.overflow[1],p.overflowY=i.overflow[2]}));for(s in e)if(n=e[s],re.exec(n)){if(delete e[s],o=o||"toggle"===n,n===(f?"hide":"show")){if("show"!==n||!g||void 0===g[s])continue;f=!0}d[s]=g&&g[s]||ot.style(t,s)}else h=void 0;if(ot.isEmptyObject(d))"inline"===("none"===h?D(t.nodeName):h)&&(p.display=h);else{g?"hidden"in g&&(f=g.hidden):g=Dt.access(t,"fxshow",{}),o&&(g.hidden=!f),f?ot(t).show():c.done(function(){ot(t).hide()}),c.done(function(){var e;Dt.remove(t,"fxshow");for(e in d)ot.style(t,e,d[e])});for(s in d)r=O(f?g[s]:0,s,c),s in g||(g[s]=r.start,f&&(r.end=r.start,r.start="width"===s||"height"===s?1:0))}}function W(t,e){var i,s,n,o,r;for(i in t)if(s=ot.camelCase(i),n=e[s],o=t[i],ot.isArray(o)&&(n=o[1],o=t[i]=o[0]),i!==s&&(t[s]=o,delete t[i]),r=ot.cssHooks[s],r&&"expand"in r){o=r.expand(o),delete t[s];for(i in o)i in t||(t[i]=o[i],e[i]=n)}else e[s]=n}function j(t,e,i){var s,n,o=0,r=j.prefilters.length,a=ot.Deferred().always(function(){delete l.elem}),l=function(){if(n)return!1;for(var e=ne||N(),i=Math.max(0,h.startTime+h.duration-e),s=i/h.duration||0,o=1-s,r=0,l=h.tweens.length;l>r;r++)h.tweens[r].run(o);return a.notifyWith(t,[h,o,i]),1>o&&l?i:(a.resolveWith(t,[h]),!1)},h=a.promise({elem:t,props:ot.extend({},e),opts:ot.extend(!0,{specialEasing:{},easing:ot.easing._default},i),originalProperties:e,originalOptions:i,startTime:ne||N(),duration:i.duration,tweens:[],createTween:function(e,i){var s=ot.Tween(t,h.opts,e,i,h.opts.specialEasing[e]||h.opts.easing);return h.tweens.push(s),s},stop:function(e){var i=0,s=e?h.tweens.length:0;if(n)return this;for(n=!0;s>i;i++)h.tweens[i].run(1);return e?(a.notifyWith(t,[h,1,0]),a.resolveWith(t,[h,e])):a.rejectWith(t,[h,e]),this}}),u=h.props;for(W(u,h.opts.specialEasing);r>o;o++)if(s=j.prefilters[o].call(h,t,u,h.opts))return ot.isFunction(s.stop)&&(ot._queueHooks(h.elem,h.opts.queue).stop=ot.proxy(s.stop,s)),s;return ot.map(u,O,h),ot.isFunction(h.opts.start)&&h.opts.start.call(t,h),ot.fx.timer(ot.extend(l,{elem:t,anim:h,queue:h.opts.queue})),h.progress(h.opts.progress).done(h.opts.done,h.opts.complete).fail(h.opts.fail).always(h.opts.always)}function L(t){return t.getAttribute&&t.getAttribute("class")||""}function F(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var s,n=0,o=e.toLowerCase().match(wt)||[];if(ot.isFunction(i))for(;s=o[n++];)"+"===s[0]?(s=s.slice(1)||"*",(t[s]=t[s]||[]).unshift(i)):(t[s]=t[s]||[]).push(i)}}function B(t,e,i,s){function n(a){var l;return o[a]=!0,ot.each(t[a]||[],function(t,a){var h=a(e,i,s);return"string"!=typeof h||r||o[h]?r?!(l=h):void 0:(e.dataTypes.unshift(h),n(h),!1)}),l}var o={},r=t===Se;return n(e.dataTypes[0])||!o["*"]&&n("*")}function q(t,e){var i,s,n=ot.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((n[i]?t:s||(s={}))[i]=e[i]);return s&&ot.extend(!0,t,s),t}function Y(t,e,i){for(var s,n,o,r,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===s&&(s=t.mimeType||e.getResponseHeader("Content-Type"));if(s)for(n in a)if(a[n]&&a[n].test(s)){l.unshift(n);break}if(l[0]in i)o=l[0];else{for(n in i){if(!l[0]||t.converters[n+" "+l[0]]){o=n;break}r||(r=n)}o=o||r}return o?(o!==l[0]&&l.unshift(o),i[o]):void 0}function U(t,e,i,s){var n,o,r,a,l,h={},u=t.dataTypes.slice();if(u[1])for(r in t.converters)h[r.toLowerCase()]=t.converters[r];for(o=u.shift();o;)if(t.responseFields[o]&&(i[t.responseFields[o]]=e),!l&&s&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(r=h[l+" "+o]||h["* "+o],!r)for(n in h)if(a=n.split(" "),a[1]===o&&(r=h[l+" "+a[0]]||h["* "+a[0]])){r===!0?r=h[n]:h[n]!==!0&&(o=a[0],u.unshift(a[1]));break}if(r!==!0)if(r&&t["throws"])e=r(e);else try{e=r(e)}catch(c){return{state:"parsererror",error:r?c:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}function V(t,e,i,s){var n;if(ot.isArray(e))ot.each(e,function(e,n){i||Ae.test(t)?s(t,n):V(t+"["+("object"==typeof n&&null!=n?e:"")+"]",n,i,s)});else if(i||"object"!==ot.type(e))s(t,e);else for(n in e)V(t+"["+n+"]",e[n],i,s)}function $(t){return ot.isWindow(t)?t:9===t.nodeType&&t.defaultView}var K=[],X=t.document,G=K.slice,J=K.concat,Q=K.push,Z=K.indexOf,tt={},et=tt.toString,it=tt.hasOwnProperty,st={},nt="2.2.4",ot=function(t,e){return new ot.fn.init(t,e)},rt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,at=/^-ms-/,lt=/-([\da-z])/gi,ht=function(t,e){return e.toUpperCase()};ot.fn=ot.prototype={jquery:nt,constructor:ot,selector:"",length:0,toArray:function(){return G.call(this)},get:function(t){return null!=t?0>t?this[t+this.length]:this[t]:G.call(this)},pushStack:function(t){var e=ot.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t){return ot.each(this,t)},map:function(t){return this.pushStack(ot.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return this.pushStack(G.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,i=+t+(0>t?e:0);return this.pushStack(i>=0&&e>i?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:Q,sort:K.sort,splice:K.splice},ot.extend=ot.fn.extend=function(){var t,e,i,s,n,o,r=arguments[0]||{},a=1,l=arguments.length,h=!1;for("boolean"==typeof r&&(h=r,r=arguments[a]||{},a++),"object"==typeof r||ot.isFunction(r)||(r={}),a===l&&(r=this,a--);l>a;a++)if(null!=(t=arguments[a]))for(e in t)i=r[e],s=t[e],r!==s&&(h&&s&&(ot.isPlainObject(s)||(n=ot.isArray(s)))?(n?(n=!1,o=i&&ot.isArray(i)?i:[]):o=i&&ot.isPlainObject(i)?i:{},r[e]=ot.extend(h,o,s)):void 0!==s&&(r[e]=s));return r},ot.extend({expando:"jQuery"+(nt+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===ot.type(t)},isArray:Array.isArray,isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){var e=t&&t.toString();return!ot.isArray(t)&&e-parseFloat(e)+1>=0},isPlainObject:function(t){var e;if("object"!==ot.type(t)||t.nodeType||ot.isWindow(t))return!1;if(t.constructor&&!it.call(t,"constructor")&&!it.call(t.constructor.prototype||{},"isPrototypeOf"))return!1;for(e in t);return void 0===e||it.call(t,e)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?tt[et.call(t)]||"object":typeof t},globalEval:function(t){var e,i=eval;t=ot.trim(t),t&&(1===t.indexOf("use strict")?(e=X.createElement("script"),e.text=t,X.head.appendChild(e).parentNode.removeChild(e)):i(t))},camelCase:function(t){return t.replace(at,"ms-").replace(lt,ht)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e){var s,n=0;if(i(t))for(s=t.length;s>n&&e.call(t[n],n,t[n])!==!1;n++);else for(n in t)if(e.call(t[n],n,t[n])===!1)break;return t},trim:function(t){return null==t?"":(t+"").replace(rt,"")},makeArray:function(t,e){var s=e||[];return null!=t&&(i(Object(t))?ot.merge(s,"string"==typeof t?[t]:t):Q.call(s,t)),s},inArray:function(t,e,i){return null==e?-1:Z.call(e,t,i)},merge:function(t,e){for(var i=+e.length,s=0,n=t.length;i>s;s++)t[n++]=e[s];return t.length=n,t},grep:function(t,e,i){for(var s,n=[],o=0,r=t.length,a=!i;r>o;o++)s=!e(t[o],o),s!==a&&n.push(t[o]);return n},map:function(t,e,s){var n,o,r=0,a=[];if(i(t))for(n=t.length;n>r;r++)o=e(t[r],r,s),null!=o&&a.push(o);else for(r in t)o=e(t[r],r,s),null!=o&&a.push(o);return J.apply([],a)},guid:1,proxy:function(t,e){var i,s,n;return"string"==typeof e&&(i=t[e],e=t,t=i),ot.isFunction(t)?(s=G.call(arguments,2),n=function(){return t.apply(e||this,s.concat(G.call(arguments)))},n.guid=t.guid=t.guid||ot.guid++,n):void 0},now:Date.now,support:st}),"function"==typeof Symbol&&(ot.fn[Symbol.iterator]=K[Symbol.iterator]),ot.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){tt["[object "+e+"]"]=e.toLowerCase()});var ut=function(t){function e(t,e,i,s){var n,o,r,a,l,h,c,p,f=e&&e.ownerDocument,g=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==g&&9!==g&&11!==g)return i;if(!s&&((e?e.ownerDocument||e:L)!==M&&I(e),e=e||M,N)){if(11!==g&&(h=vt.exec(t)))if(n=h[1]){if(9===g){if(!(r=e.getElementById(n)))return i;if(r.id===n)return i.push(r),i}else if(f&&(r=f.getElementById(n))&&W(e,r)&&r.id===n)return i.push(r),i}else{if(h[2])return Q.apply(i,e.getElementsByTagName(t)),i;if((n=h[3])&&w.getElementsByClassName&&e.getElementsByClassName)return Q.apply(i,e.getElementsByClassName(n)),i}if(w.qsa&&!U[t+" "]&&(!R||!R.test(t))){if(1!==g)f=e,p=t;else if("object"!==e.nodeName.toLowerCase()){for((a=e.getAttribute("id"))?a=a.replace(yt,"\\$&"):e.setAttribute("id",a=j),c=D(t),o=c.length,l=dt.test(a)?"#"+a:"[id='"+a+"']";o--;)c[o]=l+" "+d(c[o]);p=c.join(","),f=bt.test(t)&&u(e.parentNode)||e}if(p)try{return Q.apply(i,f.querySelectorAll(p)),i}catch(m){}finally{a===j&&e.removeAttribute("id")}}}return z(t.replace(at,"$1"),e,i,s)}function i(){function t(i,s){return e.push(i+" ")>x.cacheLength&&delete t[e.shift()],t[i+" "]=s}var e=[];return t}function s(t){return t[j]=!0,t}function n(t){var e=M.createElement("div");try{return!!t(e)}catch(i){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var i=t.split("|"),s=i.length;s--;)x.attrHandle[i[s]]=e}function r(t,e){var i=e&&t,s=i&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||$)-(~t.sourceIndex||$);if(s)return s;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function a(t){return function(e){var i=e.nodeName.toLowerCase();return"input"===i&&e.type===t}}function l(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function h(t){return s(function(e){return e=+e,s(function(i,s){for(var n,o=t([],i.length,e),r=o.length;r--;)i[n=o[r]]&&(i[n]=!(s[n]=i[n]))})})}function u(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function c(){}function d(t){for(var e=0,i=t.length,s="";i>e;e++)s+=t[e].value;return s}function p(t,e,i){var s=e.dir,n=i&&"parentNode"===s,o=B++;return e.first?function(e,i,o){for(;e=e[s];)if(1===e.nodeType||n)return t(e,i,o)}:function(e,i,r){var a,l,h,u=[F,o];if(r){for(;e=e[s];)if((1===e.nodeType||n)&&t(e,i,r))return!0}else for(;e=e[s];)if(1===e.nodeType||n){if(h=e[j]||(e[j]={}),l=h[e.uniqueID]||(h[e.uniqueID]={}),(a=l[s])&&a[0]===F&&a[1]===o)return u[2]=a[2];if(l[s]=u,u[2]=t(e,i,r))return!0}}}function f(t){return t.length>1?function(e,i,s){for(var n=t.length;n--;)if(!t[n](e,i,s))return!1;return!0}:t[0]}function g(t,i,s){for(var n=0,o=i.length;o>n;n++)e(t,i[n],s);return s}function m(t,e,i,s,n){for(var o,r=[],a=0,l=t.length,h=null!=e;l>a;a++)(o=t[a])&&(i&&!i(o,s,n)||(r.push(o),h&&e.push(a)));return r}function v(t,e,i,n,o,r){return n&&!n[j]&&(n=v(n)),o&&!o[j]&&(o=v(o,r)),s(function(s,r,a,l){var h,u,c,d=[],p=[],f=r.length,v=s||g(e||"*",a.nodeType?[a]:a,[]),b=!t||!s&&e?v:m(v,d,t,a,l),y=i?o||(s?t:f||n)?[]:r:b;if(i&&i(b,y,a,l),n)for(h=m(y,p),n(h,[],a,l),u=h.length;u--;)(c=h[u])&&(y[p[u]]=!(b[p[u]]=c));if(s){if(o||t){if(o){for(h=[],u=y.length;u--;)(c=y[u])&&h.push(b[u]=c);o(null,y=[],h,l)}for(u=y.length;u--;)(c=y[u])&&(h=o?tt(s,c):d[u])>-1&&(s[h]=!(r[h]=c))}}else y=m(y===r?y.splice(f,y.length):y),o?o(null,r,y,l):Q.apply(r,y)})}function b(t){for(var e,i,s,n=t.length,o=x.relative[t[0].type],r=o||x.relative[" "],a=o?1:0,l=p(function(t){return t===e},r,!0),h=p(function(t){return tt(e,t)>-1},r,!0),u=[function(t,i,s){var n=!o&&(s||i!==T)||((e=i).nodeType?l(t,i,s):h(t,i,s));return e=null,n}];n>a;a++)if(i=x.relative[t[a].type])u=[p(f(u),i)];else{if(i=x.filter[t[a].type].apply(null,t[a].matches),i[j]){for(s=++a;n>s&&!x.relative[t[s].type];s++);return v(a>1&&f(u),a>1&&d(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(at,"$1"),i,s>a&&b(t.slice(a,s)),n>s&&b(t=t.slice(s)),n>s&&d(t))}u.push(i)}return f(u)}function y(t,i){var n=i.length>0,o=t.length>0,r=function(s,r,a,l,h){var u,c,d,p=0,f="0",g=s&&[],v=[],b=T,y=s||o&&x.find.TAG("*",h),_=F+=null==b?1:Math.random()||.1,w=y.length;for(h&&(T=r===M||r||h);f!==w&&null!=(u=y[f]);f++){if(o&&u){for(c=0,r||u.ownerDocument===M||(I(u),a=!N);d=t[c++];)if(d(u,r||M,a)){l.push(u);break}h&&(F=_)}n&&((u=!d&&u)&&p--,s&&g.push(u))}if(p+=f,n&&f!==p){for(c=0;d=i[c++];)d(g,v,r,a);if(s){if(p>0)for(;f--;)g[f]||v[f]||(v[f]=G.call(l));v=m(v)}Q.apply(l,v),h&&!s&&v.length>0&&p+i.length>1&&e.uniqueSort(l)}return h&&(F=_,T=b),g};return n?s(r):r}var _,w,x,C,k,D,S,z,T,P,A,I,M,E,N,R,O,H,W,j="sizzle"+1*new Date,L=t.document,F=0,B=0,q=i(),Y=i(),U=i(),V=function(t,e){return t===e&&(A=!0),0},$=1<<31,K={}.hasOwnProperty,X=[],G=X.pop,J=X.push,Q=X.push,Z=X.slice,tt=function(t,e){for(var i=0,s=t.length;s>i;i++)if(t[i]===e)return i;return-1},et="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",it="[\\x20\\t\\r\\n\\f]",st="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",nt="\\["+it+"*("+st+")(?:"+it+"*([*^$|!~]?=)"+it+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+st+"))|)"+it+"*\\]",ot=":("+st+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+nt+")*)|.*)\\)|)",rt=new RegExp(it+"+","g"),at=new RegExp("^"+it+"+|((?:^|[^\\\\])(?:\\\\.)*)"+it+"+$","g"),lt=new RegExp("^"+it+"*,"+it+"*"),ht=new RegExp("^"+it+"*([>+~]|"+it+")"+it+"*"),ut=new RegExp("="+it+"*([^\\]'\"]*?)"+it+"*\\]","g"),ct=new RegExp(ot),dt=new RegExp("^"+st+"$"),pt={ID:new RegExp("^#("+st+")"),CLASS:new RegExp("^\\.("+st+")"),TAG:new RegExp("^("+st+"|[*])"),ATTR:new RegExp("^"+nt),PSEUDO:new RegExp("^"+ot),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+it+"*(even|odd|(([+-]|)(\\d*)n|)"+it+"*(?:([+-]|)"+it+"*(\\d+)|))"+it+"*\\)|)","i"),bool:new RegExp("^(?:"+et+")$","i"),needsContext:new RegExp("^"+it+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+it+"*((?:-\\d)?\\d*)"+it+"*\\)|)(?=[^-]|$)","i")},ft=/^(?:input|select|textarea|button)$/i,gt=/^h\d$/i,mt=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,bt=/[+~]/,yt=/'|\\/g,_t=new RegExp("\\\\([\\da-f]{1,6}"+it+"?|("+it+")|.)","ig"),wt=function(t,e,i){var s="0x"+e-65536;return s!==s||i?e:0>s?String.fromCharCode(s+65536):String.fromCharCode(s>>10|55296,1023&s|56320)},xt=function(){I()};try{Q.apply(X=Z.call(L.childNodes),L.childNodes),X[L.childNodes.length].nodeType}catch(Ct){Q={apply:X.length?function(t,e){J.apply(t,Z.call(e))}:function(t,e){for(var i=t.length,s=0;t[i++]=e[s++];);t.length=i-1}}}w=e.support={},k=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return e?"HTML"!==e.nodeName:!1},I=e.setDocument=function(t){var e,i,s=t?t.ownerDocument||t:L;return s!==M&&9===s.nodeType&&s.documentElement?(M=s,E=M.documentElement,N=!k(M),(i=M.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",xt,!1):i.attachEvent&&i.attachEvent("onunload",xt)),w.attributes=n(function(t){return t.className="i",!t.getAttribute("className")}),w.getElementsByTagName=n(function(t){return t.appendChild(M.createComment("")),!t.getElementsByTagName("*").length}),w.getElementsByClassName=mt.test(M.getElementsByClassName),w.getById=n(function(t){return E.appendChild(t).id=j,!M.getElementsByName||!M.getElementsByName(j).length}),w.getById?(x.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&N){var i=e.getElementById(t);return i?[i]:[]}},x.filter.ID=function(t){var e=t.replace(_t,wt);return function(t){return t.getAttribute("id")===e}}):(delete x.find.ID,x.filter.ID=function(t){var e=t.replace(_t,wt);return function(t){var i="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}}),x.find.TAG=w.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):w.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,s=[],n=0,o=e.getElementsByTagName(t);if("*"===t){for(;i=o[n++];)1===i.nodeType&&s.push(i);return s}return o},x.find.CLASS=w.getElementsByClassName&&function(t,e){return"undefined"!=typeof e.getElementsByClassName&&N?e.getElementsByClassName(t):void 0},O=[],R=[],(w.qsa=mt.test(M.querySelectorAll))&&(n(function(t){E.appendChild(t).innerHTML="<a id='"+j+"'></a><select id='"+j+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&R.push("[*^$]="+it+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||R.push("\\["+it+"*(?:value|"+et+")"),t.querySelectorAll("[id~="+j+"-]").length||R.push("~="),t.querySelectorAll(":checked").length||R.push(":checked"),t.querySelectorAll("a#"+j+"+*").length||R.push(".#.+[+~]")}),n(function(t){var e=M.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&R.push("name"+it+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||R.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),R.push(",.*:")})),(w.matchesSelector=mt.test(H=E.matches||E.webkitMatchesSelector||E.mozMatchesSelector||E.oMatchesSelector||E.msMatchesSelector))&&n(function(t){w.disconnectedMatch=H.call(t,"div"),H.call(t,"[s!='']:x"),O.push("!=",ot)}),R=R.length&&new RegExp(R.join("|")),O=O.length&&new RegExp(O.join("|")),e=mt.test(E.compareDocumentPosition),W=e||mt.test(E.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,s=e&&e.parentNode;return t===s||!(!s||1!==s.nodeType||!(i.contains?i.contains(s):t.compareDocumentPosition&&16&t.compareDocumentPosition(s)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},V=e?function(t,e){if(t===e)return A=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i?i:(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&i||!w.sortDetached&&e.compareDocumentPosition(t)===i?t===M||t.ownerDocument===L&&W(L,t)?-1:e===M||e.ownerDocument===L&&W(L,e)?1:P?tt(P,t)-tt(P,e):0:4&i?-1:1)}:function(t,e){if(t===e)return A=!0,0;var i,s=0,n=t.parentNode,o=e.parentNode,a=[t],l=[e];if(!n||!o)return t===M?-1:e===M?1:n?-1:o?1:P?tt(P,t)-tt(P,e):0;if(n===o)return r(t,e);for(i=t;i=i.parentNode;)a.unshift(i);for(i=e;i=i.parentNode;)l.unshift(i);for(;a[s]===l[s];)s++;return s?r(a[s],l[s]):a[s]===L?-1:l[s]===L?1:0},M):M},e.matches=function(t,i){return e(t,null,null,i)},e.matchesSelector=function(t,i){if((t.ownerDocument||t)!==M&&I(t),i=i.replace(ut,"='$1']"),w.matchesSelector&&N&&!U[i+" "]&&(!O||!O.test(i))&&(!R||!R.test(i)))try{var s=H.call(t,i);if(s||w.disconnectedMatch||t.document&&11!==t.document.nodeType)return s}catch(n){}return e(i,M,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==M&&I(t),W(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==M&&I(t);var i=x.attrHandle[e.toLowerCase()],s=i&&K.call(x.attrHandle,e.toLowerCase())?i(t,e,!N):void 0;return void 0!==s?s:w.attributes||!N?t.getAttribute(e):(s=t.getAttributeNode(e))&&s.specified?s.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,i=[],s=0,n=0;if(A=!w.detectDuplicates,P=!w.sortStable&&t.slice(0),t.sort(V),A){for(;e=t[n++];)e===t[n]&&(s=i.push(n));for(;s--;)t.splice(i[s],1)}return P=null,t},C=e.getText=function(t){var e,i="",s=0,n=t.nodeType;if(n){if(1===n||9===n||11===n){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=C(t)}else if(3===n||4===n)return t.nodeValue}else for(;e=t[s++];)i+=C(e);return i},x=e.selectors={cacheLength:50,createPseudo:s,match:pt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(_t,wt),t[3]=(t[3]||t[4]||t[5]||"").replace(_t,wt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return pt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&ct.test(i)&&(e=D(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(_t,wt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=q[t+" "];return e||(e=new RegExp("(^|"+it+")"+t+"("+it+"|$)"))&&q(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,i,s){return function(n){var o=e.attr(n,t);return null==o?"!="===i:i?(o+="","="===i?o===s:"!="===i?o!==s:"^="===i?s&&0===o.indexOf(s):"*="===i?s&&o.indexOf(s)>-1:"$="===i?s&&o.slice(-s.length)===s:"~="===i?(" "+o.replace(rt," ")+" ").indexOf(s)>-1:"|="===i?o===s||o.slice(0,s.length+1)===s+"-":!1):!0}},CHILD:function(t,e,i,s,n){var o="nth"!==t.slice(0,3),r="last"!==t.slice(-4),a="of-type"===e;return 1===s&&0===n?function(t){return!!t.parentNode}:function(e,i,l){var h,u,c,d,p,f,g=o!==r?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),b=!l&&!a,y=!1;if(m){if(o){for(;g;){for(d=e;d=d[g];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[r?m.firstChild:m.lastChild],r&&b){for(d=m,c=d[j]||(d[j]={}),u=c[d.uniqueID]||(c[d.uniqueID]={}),h=u[t]||[],p=h[0]===F&&h[1],y=p&&h[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(y=p=0)||f.pop();)if(1===d.nodeType&&++y&&d===e){u[t]=[F,p,y];break}}else if(b&&(d=e,c=d[j]||(d[j]={}),u=c[d.uniqueID]||(c[d.uniqueID]={}),h=u[t]||[],p=h[0]===F&&h[1],y=p),y===!1)for(;(d=++p&&d&&d[g]||(y=p=0)||f.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++y||(b&&(c=d[j]||(d[j]={}),u=c[d.uniqueID]||(c[d.uniqueID]={}),u[t]=[F,y]),d!==e)););return y-=n,y===s||y%s===0&&y/s>=0}}},PSEUDO:function(t,i){var n,o=x.pseudos[t]||x.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[j]?o(i):o.length>1?(n=[t,t,"",i],x.setFilters.hasOwnProperty(t.toLowerCase())?s(function(t,e){for(var s,n=o(t,i),r=n.length;r--;)s=tt(t,n[r]),t[s]=!(e[s]=n[r])}):function(t){return o(t,0,n)}):o}},pseudos:{not:s(function(t){var e=[],i=[],n=S(t.replace(at,"$1"));return n[j]?s(function(t,e,i,s){for(var o,r=n(t,null,s,[]),a=t.length;a--;)(o=r[a])&&(t[a]=!(e[a]=o))}):function(t,s,o){return e[0]=t,n(e,null,o,i),e[0]=null,!i.pop()}}),has:s(function(t){return function(i){return e(t,i).length>0}}),contains:s(function(t){return t=t.replace(_t,wt),function(e){return(e.textContent||e.innerText||C(e)).indexOf(t)>-1}}),lang:s(function(t){return dt.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(_t,wt).toLowerCase(),function(e){var i;do if(i=N?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return i=i.toLowerCase(),i===t||0===i.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===E},focus:function(t){return t===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!x.pseudos.empty(t)},header:function(t){return gt.test(t.nodeName)},input:function(t){return ft.test(t.nodeName);
10
+ },button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:h(function(){return[0]}),last:h(function(t,e){return[e-1]}),eq:h(function(t,e,i){return[0>i?i+e:i]}),even:h(function(t,e){for(var i=0;e>i;i+=2)t.push(i);return t}),odd:h(function(t,e){for(var i=1;e>i;i+=2)t.push(i);return t}),lt:h(function(t,e,i){for(var s=0>i?i+e:i;--s>=0;)t.push(s);return t}),gt:h(function(t,e,i){for(var s=0>i?i+e:i;++s<e;)t.push(s);return t})}},x.pseudos.nth=x.pseudos.eq;for(_ in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})x.pseudos[_]=a(_);for(_ in{submit:!0,reset:!0})x.pseudos[_]=l(_);return c.prototype=x.filters=x.pseudos,x.setFilters=new c,D=e.tokenize=function(t,i){var s,n,o,r,a,l,h,u=Y[t+" "];if(u)return i?0:u.slice(0);for(a=t,l=[],h=x.preFilter;a;){s&&!(n=lt.exec(a))||(n&&(a=a.slice(n[0].length)||a),l.push(o=[])),s=!1,(n=ht.exec(a))&&(s=n.shift(),o.push({value:s,type:n[0].replace(at," ")}),a=a.slice(s.length));for(r in x.filter)!(n=pt[r].exec(a))||h[r]&&!(n=h[r](n))||(s=n.shift(),o.push({value:s,type:r,matches:n}),a=a.slice(s.length));if(!s)break}return i?a.length:a?e.error(t):Y(t,l).slice(0)},S=e.compile=function(t,e){var i,s=[],n=[],o=U[t+" "];if(!o){for(e||(e=D(t)),i=e.length;i--;)o=b(e[i]),o[j]?s.push(o):n.push(o);o=U(t,y(n,s)),o.selector=t}return o},z=e.select=function(t,e,i,s){var n,o,r,a,l,h="function"==typeof t&&t,c=!s&&D(t=h.selector||t);if(i=i||[],1===c.length){if(o=c[0]=c[0].slice(0),o.length>2&&"ID"===(r=o[0]).type&&w.getById&&9===e.nodeType&&N&&x.relative[o[1].type]){if(e=(x.find.ID(r.matches[0].replace(_t,wt),e)||[])[0],!e)return i;h&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(n=pt.needsContext.test(t)?0:o.length;n--&&(r=o[n],!x.relative[a=r.type]);)if((l=x.find[a])&&(s=l(r.matches[0].replace(_t,wt),bt.test(o[0].type)&&u(e.parentNode)||e))){if(o.splice(n,1),t=s.length&&d(o),!t)return Q.apply(i,s),i;break}}return(h||S(t,c))(s,e,!N,i,!e||bt.test(t)&&u(e.parentNode)||e),i},w.sortStable=j.split("").sort(V).join("")===j,w.detectDuplicates=!!A,I(),w.sortDetached=n(function(t){return 1&t.compareDocumentPosition(M.createElement("div"))}),n(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,i){return i?void 0:t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),w.attributes&&n(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,i){return i||"input"!==t.nodeName.toLowerCase()?void 0:t.defaultValue}),n(function(t){return null==t.getAttribute("disabled")})||o(et,function(t,e,i){var s;return i?void 0:t[e]===!0?e.toLowerCase():(s=t.getAttributeNode(e))&&s.specified?s.value:null}),e}(t);ot.find=ut,ot.expr=ut.selectors,ot.expr[":"]=ot.expr.pseudos,ot.uniqueSort=ot.unique=ut.uniqueSort,ot.text=ut.getText,ot.isXMLDoc=ut.isXML,ot.contains=ut.contains;var ct=function(t,e,i){for(var s=[],n=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(n&&ot(t).is(i))break;s.push(t)}return s},dt=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},pt=ot.expr.match.needsContext,ft=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,gt=/^.[^:#\[\.,]*$/;ot.filter=function(t,e,i){var s=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===s.nodeType?ot.find.matchesSelector(s,t)?[s]:[]:ot.find.matches(t,ot.grep(e,function(t){return 1===t.nodeType}))},ot.fn.extend({find:function(t){var e,i=this.length,s=[],n=this;if("string"!=typeof t)return this.pushStack(ot(t).filter(function(){for(e=0;i>e;e++)if(ot.contains(n[e],this))return!0}));for(e=0;i>e;e++)ot.find(t,n[e],s);return s=this.pushStack(i>1?ot.unique(s):s),s.selector=this.selector?this.selector+" "+t:t,s},filter:function(t){return this.pushStack(s(this,t||[],!1))},not:function(t){return this.pushStack(s(this,t||[],!0))},is:function(t){return!!s(this,"string"==typeof t&&pt.test(t)?ot(t):t||[],!1).length}});var mt,vt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,bt=ot.fn.init=function(t,e,i){var s,n;if(!t)return this;if(i=i||mt,"string"==typeof t){if(s="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:vt.exec(t),!s||!s[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(s[1]){if(e=e instanceof ot?e[0]:e,ot.merge(this,ot.parseHTML(s[1],e&&e.nodeType?e.ownerDocument||e:X,!0)),ft.test(s[1])&&ot.isPlainObject(e))for(s in e)ot.isFunction(this[s])?this[s](e[s]):this.attr(s,e[s]);return this}return n=X.getElementById(s[2]),n&&n.parentNode&&(this.length=1,this[0]=n),this.context=X,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):ot.isFunction(t)?void 0!==i.ready?i.ready(t):t(ot):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),ot.makeArray(t,this))};bt.prototype=ot.fn,mt=ot(X);var yt=/^(?:parents|prev(?:Until|All))/,_t={children:!0,contents:!0,next:!0,prev:!0};ot.fn.extend({has:function(t){var e=ot(t,this),i=e.length;return this.filter(function(){for(var t=0;i>t;t++)if(ot.contains(this,e[t]))return!0})},closest:function(t,e){for(var i,s=0,n=this.length,o=[],r=pt.test(t)||"string"!=typeof t?ot(t,e||this.context):0;n>s;s++)for(i=this[s];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(r?r.index(i)>-1:1===i.nodeType&&ot.find.matchesSelector(i,t))){o.push(i);break}return this.pushStack(o.length>1?ot.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?Z.call(ot(t),this[0]):Z.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(ot.uniqueSort(ot.merge(this.get(),ot(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),ot.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return ct(t,"parentNode")},parentsUntil:function(t,e,i){return ct(t,"parentNode",i)},next:function(t){return n(t,"nextSibling")},prev:function(t){return n(t,"previousSibling")},nextAll:function(t){return ct(t,"nextSibling")},prevAll:function(t){return ct(t,"previousSibling")},nextUntil:function(t,e,i){return ct(t,"nextSibling",i)},prevUntil:function(t,e,i){return ct(t,"previousSibling",i)},siblings:function(t){return dt((t.parentNode||{}).firstChild,t)},children:function(t){return dt(t.firstChild)},contents:function(t){return t.contentDocument||ot.merge([],t.childNodes)}},function(t,e){ot.fn[t]=function(i,s){var n=ot.map(this,e,i);return"Until"!==t.slice(-5)&&(s=i),s&&"string"==typeof s&&(n=ot.filter(s,n)),this.length>1&&(_t[t]||ot.uniqueSort(n),yt.test(t)&&n.reverse()),this.pushStack(n)}});var wt=/\S+/g;ot.Callbacks=function(t){t="string"==typeof t?o(t):ot.extend({},t);var e,i,s,n,r=[],a=[],l=-1,h=function(){for(n=t.once,s=e=!0;a.length;l=-1)for(i=a.shift();++l<r.length;)r[l].apply(i[0],i[1])===!1&&t.stopOnFalse&&(l=r.length,i=!1);t.memory||(i=!1),e=!1,n&&(r=i?[]:"")},u={add:function(){return r&&(i&&!e&&(l=r.length-1,a.push(i)),function s(e){ot.each(e,function(e,i){ot.isFunction(i)?t.unique&&u.has(i)||r.push(i):i&&i.length&&"string"!==ot.type(i)&&s(i)})}(arguments),i&&!e&&h()),this},remove:function(){return ot.each(arguments,function(t,e){for(var i;(i=ot.inArray(e,r,i))>-1;)r.splice(i,1),l>=i&&l--}),this},has:function(t){return t?ot.inArray(t,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return n=a=[],r=i="",this},disabled:function(){return!r},lock:function(){return n=a=[],i||(r=i=""),this},locked:function(){return!!n},fireWith:function(t,i){return n||(i=i||[],i=[t,i.slice?i.slice():i],a.push(i),e||h()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!s}};return u},ot.extend({Deferred:function(t){var e=[["resolve","done",ot.Callbacks("once memory"),"resolved"],["reject","fail",ot.Callbacks("once memory"),"rejected"],["notify","progress",ot.Callbacks("memory")]],i="pending",s={state:function(){return i},always:function(){return n.done(arguments).fail(arguments),this},then:function(){var t=arguments;return ot.Deferred(function(i){ot.each(e,function(e,o){var r=ot.isFunction(t[e])&&t[e];n[o[1]](function(){var t=r&&r.apply(this,arguments);t&&ot.isFunction(t.promise)?t.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[o[0]+"With"](this===s?i.promise():this,r?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?ot.extend(t,s):s}},n={};return s.pipe=s.then,ot.each(e,function(t,o){var r=o[2],a=o[3];s[o[1]]=r.add,a&&r.add(function(){i=a},e[1^t][2].disable,e[2][2].lock),n[o[0]]=function(){return n[o[0]+"With"](this===n?s:this,arguments),this},n[o[0]+"With"]=r.fireWith}),s.promise(n),t&&t.call(n,n),n},when:function(t){var e,i,s,n=0,o=G.call(arguments),r=o.length,a=1!==r||t&&ot.isFunction(t.promise)?r:0,l=1===a?t:ot.Deferred(),h=function(t,i,s){return function(n){i[t]=this,s[t]=arguments.length>1?G.call(arguments):n,s===e?l.notifyWith(i,s):--a||l.resolveWith(i,s)}};if(r>1)for(e=new Array(r),i=new Array(r),s=new Array(r);r>n;n++)o[n]&&ot.isFunction(o[n].promise)?o[n].promise().progress(h(n,i,e)).done(h(n,s,o)).fail(l.reject):--a;return a||l.resolveWith(s,o),l.promise()}});var xt;ot.fn.ready=function(t){return ot.ready.promise().done(t),this},ot.extend({isReady:!1,readyWait:1,holdReady:function(t){t?ot.readyWait++:ot.ready(!0)},ready:function(t){(t===!0?--ot.readyWait:ot.isReady)||(ot.isReady=!0,t!==!0&&--ot.readyWait>0||(xt.resolveWith(X,[ot]),ot.fn.triggerHandler&&(ot(X).triggerHandler("ready"),ot(X).off("ready"))))}}),ot.ready.promise=function(e){return xt||(xt=ot.Deferred(),"complete"===X.readyState||"loading"!==X.readyState&&!X.documentElement.doScroll?t.setTimeout(ot.ready):(X.addEventListener("DOMContentLoaded",r),t.addEventListener("load",r))),xt.promise(e)},ot.ready.promise();var Ct=function(t,e,i,s,n,o,r){var a=0,l=t.length,h=null==i;if("object"===ot.type(i)){n=!0;for(a in i)Ct(t,e,a,i[a],!0,o,r)}else if(void 0!==s&&(n=!0,ot.isFunction(s)||(r=!0),h&&(r?(e.call(t,s),e=null):(h=e,e=function(t,e,i){return h.call(ot(t),i)})),e))for(;l>a;a++)e(t[a],i,r?s:s.call(t[a],a,e(t[a],i)));return n?t:h?e.call(t):l?e(t[0],i):o},kt=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};a.uid=1,a.prototype={register:function(t,e){var i=e||{};return t.nodeType?t[this.expando]=i:Object.defineProperty(t,this.expando,{value:i,writable:!0,configurable:!0}),t[this.expando]},cache:function(t){if(!kt(t))return{};var e=t[this.expando];return e||(e={},kt(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,i){var s,n=this.cache(t);if("string"==typeof e)n[e]=i;else for(s in e)n[s]=e[s];return n},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][e]},access:function(t,e,i){var s;return void 0===e||e&&"string"==typeof e&&void 0===i?(s=this.get(t,e),void 0!==s?s:this.get(t,ot.camelCase(e))):(this.set(t,e,i),void 0!==i?i:e)},remove:function(t,e){var i,s,n,o=t[this.expando];if(void 0!==o){if(void 0===e)this.register(t);else{ot.isArray(e)?s=e.concat(e.map(ot.camelCase)):(n=ot.camelCase(e),e in o?s=[e,n]:(s=n,s=s in o?[s]:s.match(wt)||[])),i=s.length;for(;i--;)delete o[s[i]]}(void 0===e||ot.isEmptyObject(o))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!ot.isEmptyObject(e)}};var Dt=new a,St=new a,zt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Tt=/[A-Z]/g;ot.extend({hasData:function(t){return St.hasData(t)||Dt.hasData(t)},data:function(t,e,i){return St.access(t,e,i)},removeData:function(t,e){St.remove(t,e)},_data:function(t,e,i){return Dt.access(t,e,i)},_removeData:function(t,e){Dt.remove(t,e)}}),ot.fn.extend({data:function(t,e){var i,s,n,o=this[0],r=o&&o.attributes;if(void 0===t){if(this.length&&(n=St.get(o),1===o.nodeType&&!Dt.get(o,"hasDataAttrs"))){for(i=r.length;i--;)r[i]&&(s=r[i].name,0===s.indexOf("data-")&&(s=ot.camelCase(s.slice(5)),l(o,s,n[s])));Dt.set(o,"hasDataAttrs",!0)}return n}return"object"==typeof t?this.each(function(){St.set(this,t)}):Ct(this,function(e){var i,s;if(o&&void 0===e){if(i=St.get(o,t)||St.get(o,t.replace(Tt,"-$&").toLowerCase()),void 0!==i)return i;if(s=ot.camelCase(t),i=St.get(o,s),void 0!==i)return i;if(i=l(o,s,void 0),void 0!==i)return i}else s=ot.camelCase(t),this.each(function(){var i=St.get(this,s);St.set(this,s,e),t.indexOf("-")>-1&&void 0!==i&&St.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){St.remove(this,t)})}}),ot.extend({queue:function(t,e,i){var s;return t?(e=(e||"fx")+"queue",s=Dt.get(t,e),i&&(!s||ot.isArray(i)?s=Dt.access(t,e,ot.makeArray(i)):s.push(i)),s||[]):void 0},dequeue:function(t,e){e=e||"fx";var i=ot.queue(t,e),s=i.length,n=i.shift(),o=ot._queueHooks(t,e),r=function(){ot.dequeue(t,e)};"inprogress"===n&&(n=i.shift(),s--),n&&("fx"===e&&i.unshift("inprogress"),delete o.stop,n.call(t,r,o)),!s&&o&&o.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return Dt.get(t,i)||Dt.access(t,i,{empty:ot.Callbacks("once memory").add(function(){Dt.remove(t,[e+"queue",i])})})}}),ot.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length<i?ot.queue(this[0],t):void 0===e?this:this.each(function(){var i=ot.queue(this,t,e);ot._queueHooks(this,t),"fx"===t&&"inprogress"!==i[0]&&ot.dequeue(this,t)})},dequeue:function(t){return this.each(function(){ot.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var i,s=1,n=ot.Deferred(),o=this,r=this.length,a=function(){--s||n.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";r--;)i=Dt.get(o[r],t+"queueHooks"),i&&i.empty&&(s++,i.empty.add(a));return a(),n.promise(e)}});var Pt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,At=new RegExp("^(?:([+-])=|)("+Pt+")([a-z%]*)$","i"),It=["Top","Right","Bottom","Left"],Mt=function(t,e){return t=e||t,"none"===ot.css(t,"display")||!ot.contains(t.ownerDocument,t)},Et=/^(?:checkbox|radio)$/i,Nt=/<([\w:-]+)/,Rt=/^$|\/(?:java|ecma)script/i,Ot={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ot.optgroup=Ot.option,Ot.tbody=Ot.tfoot=Ot.colgroup=Ot.caption=Ot.thead,Ot.th=Ot.td;var Ht=/<|&#?\w+;/;!function(){var t=X.createDocumentFragment(),e=t.appendChild(X.createElement("div")),i=X.createElement("input");i.setAttribute("type","radio"),i.setAttribute("checked","checked"),i.setAttribute("name","t"),e.appendChild(i),st.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",st.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var Wt=/^key/,jt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Lt=/^([^.]*)(?:\.(.+)|)/;ot.event={global:{},add:function(t,e,i,s,n){var o,r,a,l,h,u,c,d,p,f,g,m=Dt.get(t);if(m)for(i.handler&&(o=i,i=o.handler,n=o.selector),i.guid||(i.guid=ot.guid++),(l=m.events)||(l=m.events={}),(r=m.handle)||(r=m.handle=function(e){return"undefined"!=typeof ot&&ot.event.triggered!==e.type?ot.event.dispatch.apply(t,arguments):void 0}),e=(e||"").match(wt)||[""],h=e.length;h--;)a=Lt.exec(e[h])||[],p=g=a[1],f=(a[2]||"").split(".").sort(),p&&(c=ot.event.special[p]||{},p=(n?c.delegateType:c.bindType)||p,c=ot.event.special[p]||{},u=ot.extend({type:p,origType:g,data:s,handler:i,guid:i.guid,selector:n,needsContext:n&&ot.expr.match.needsContext.test(n),namespace:f.join(".")},o),(d=l[p])||(d=l[p]=[],d.delegateCount=0,c.setup&&c.setup.call(t,s,f,r)!==!1||t.addEventListener&&t.addEventListener(p,r)),c.add&&(c.add.call(t,u),u.handler.guid||(u.handler.guid=i.guid)),n?d.splice(d.delegateCount++,0,u):d.push(u),ot.event.global[p]=!0)},remove:function(t,e,i,s,n){var o,r,a,l,h,u,c,d,p,f,g,m=Dt.hasData(t)&&Dt.get(t);if(m&&(l=m.events)){for(e=(e||"").match(wt)||[""],h=e.length;h--;)if(a=Lt.exec(e[h])||[],p=g=a[1],f=(a[2]||"").split(".").sort(),p){for(c=ot.event.special[p]||{},p=(s?c.delegateType:c.bindType)||p,d=l[p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=o=d.length;o--;)u=d[o],!n&&g!==u.origType||i&&i.guid!==u.guid||a&&!a.test(u.namespace)||s&&s!==u.selector&&("**"!==s||!u.selector)||(d.splice(o,1),u.selector&&d.delegateCount--,c.remove&&c.remove.call(t,u));r&&!d.length&&(c.teardown&&c.teardown.call(t,f,m.handle)!==!1||ot.removeEvent(t,p,m.handle),delete l[p])}else for(p in l)ot.event.remove(t,p+e[h],i,s,!0);ot.isEmptyObject(l)&&Dt.remove(t,"handle events")}},dispatch:function(t){t=ot.event.fix(t);var e,i,s,n,o,r=[],a=G.call(arguments),l=(Dt.get(this,"events")||{})[t.type]||[],h=ot.event.special[t.type]||{};if(a[0]=t,t.delegateTarget=this,!h.preDispatch||h.preDispatch.call(this,t)!==!1){for(r=ot.event.handlers.call(this,t,l),e=0;(n=r[e++])&&!t.isPropagationStopped();)for(t.currentTarget=n.elem,i=0;(o=n.handlers[i++])&&!t.isImmediatePropagationStopped();)t.rnamespace&&!t.rnamespace.test(o.namespace)||(t.handleObj=o,t.data=o.data,s=((ot.event.special[o.origType]||{}).handle||o.handler).apply(n.elem,a),void 0!==s&&(t.result=s)===!1&&(t.preventDefault(),t.stopPropagation()));return h.postDispatch&&h.postDispatch.call(this,t),t.result}},handlers:function(t,e){var i,s,n,o,r=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==t.type)){for(s=[],i=0;a>i;i++)o=e[i],n=o.selector+" ",void 0===s[n]&&(s[n]=o.needsContext?ot(n,this).index(l)>-1:ot.find(n,this,null,[l]).length),s[n]&&s.push(o);s.length&&r.push({elem:l,handlers:s})}return a<e.length&&r.push({elem:this,handlers:e.slice(a)}),r},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var i,s,n,o=e.button;return null==t.pageX&&null!=e.clientX&&(i=t.target.ownerDocument||X,s=i.documentElement,n=i.body,t.pageX=e.clientX+(s&&s.scrollLeft||n&&n.scrollLeft||0)-(s&&s.clientLeft||n&&n.clientLeft||0),t.pageY=e.clientY+(s&&s.scrollTop||n&&n.scrollTop||0)-(s&&s.clientTop||n&&n.clientTop||0)),t.which||void 0===o||(t.which=1&o?1:2&o?3:4&o?2:0),t}},fix:function(t){if(t[ot.expando])return t;var e,i,s,n=t.type,o=t,r=this.fixHooks[n];for(r||(this.fixHooks[n]=r=jt.test(n)?this.mouseHooks:Wt.test(n)?this.keyHooks:{}),s=r.props?this.props.concat(r.props):this.props,t=new ot.Event(o),e=s.length;e--;)i=s[e],t[i]=o[i];return t.target||(t.target=X),3===t.target.nodeType&&(t.target=t.target.parentNode),r.filter?r.filter(t,o):t},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==g()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===g()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&ot.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(t){return ot.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},ot.removeEvent=function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i)},ot.Event=function(t,e){return this instanceof ot.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&t.returnValue===!1?p:f):this.type=t,e&&ot.extend(this,e),this.timeStamp=t&&t.timeStamp||ot.now(),void(this[ot.expando]=!0)):new ot.Event(t,e)},ot.Event.prototype={constructor:ot.Event,isDefaultPrevented:f,isPropagationStopped:f,isImmediatePropagationStopped:f,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=p,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=p,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=p,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},ot.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){ot.event.special[t]={delegateType:e,bindType:e,handle:function(t){var i,s=this,n=t.relatedTarget,o=t.handleObj;return n&&(n===s||ot.contains(s,n))||(t.type=o.origType,i=o.handler.apply(this,arguments),t.type=e),i}}}),ot.fn.extend({on:function(t,e,i,s){return m(this,t,e,i,s)},one:function(t,e,i,s){return m(this,t,e,i,s,1)},off:function(t,e,i){var s,n;if(t&&t.preventDefault&&t.handleObj)return s=t.handleObj,ot(t.delegateTarget).off(s.namespace?s.origType+"."+s.namespace:s.origType,s.selector,s.handler),this;if("object"==typeof t){for(n in t)this.off(n,e,t[n]);return this}return e!==!1&&"function"!=typeof e||(i=e,e=void 0),i===!1&&(i=f),this.each(function(){ot.event.remove(this,t,i,e)})}});var Ft=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,Bt=/<script|<style|<link/i,qt=/checked\s*(?:[^=]|=\s*.checked.)/i,Yt=/^true\/(.*)/,Ut=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;ot.extend({htmlPrefilter:function(t){return t.replace(Ft,"<$1></$2>")},clone:function(t,e,i){var s,n,o,r,a=t.cloneNode(!0),l=ot.contains(t.ownerDocument,t);if(!(st.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||ot.isXMLDoc(t)))for(r=u(a),o=u(t),s=0,n=o.length;n>s;s++)w(o[s],r[s]);if(e)if(i)for(o=o||u(t),r=r||u(a),s=0,n=o.length;n>s;s++)_(o[s],r[s]);else _(t,a);return r=u(a,"script"),r.length>0&&c(r,!l&&u(t,"script")),a},cleanData:function(t){for(var e,i,s,n=ot.event.special,o=0;void 0!==(i=t[o]);o++)if(kt(i)){if(e=i[Dt.expando]){if(e.events)for(s in e.events)n[s]?ot.event.remove(i,s):ot.removeEvent(i,s,e.handle);i[Dt.expando]=void 0}i[St.expando]&&(i[St.expando]=void 0)}}}),ot.fn.extend({domManip:x,detach:function(t){return C(this,t,!0)},remove:function(t){return C(this,t)},text:function(t){return Ct(this,function(t){return void 0===t?ot.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return x(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=v(this,t);e.appendChild(t)}})},prepend:function(){return x(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=v(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return x(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return x(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(ot.cleanData(u(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null==t?!1:t,e=null==e?t:e,this.map(function(){return ot.clone(this,t,e)})},html:function(t){return Ct(this,function(t){var e=this[0]||{},i=0,s=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Bt.test(t)&&!Ot[(Nt.exec(t)||["",""])[1].toLowerCase()]){t=ot.htmlPrefilter(t);try{for(;s>i;i++)e=this[i]||{},1===e.nodeType&&(ot.cleanData(u(e,!1)),e.innerHTML=t);e=0}catch(n){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return x(this,arguments,function(e){var i=this.parentNode;ot.inArray(this,t)<0&&(ot.cleanData(u(this)),i&&i.replaceChild(e,this))},t)}}),ot.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){ot.fn[t]=function(t){for(var i,s=[],n=ot(t),o=n.length-1,r=0;o>=r;r++)i=r===o?this:this.clone(!0),ot(n[r])[e](i),Q.apply(s,i.get());return this.pushStack(s)}});var Vt,$t={HTML:"block",BODY:"block"},Kt=/^margin/,Xt=new RegExp("^("+Pt+")(?!px)[a-z%]+$","i"),Gt=function(e){var i=e.ownerDocument.defaultView;return i&&i.opener||(i=t),i.getComputedStyle(e)},Jt=function(t,e,i,s){var n,o,r={};for(o in e)r[o]=t.style[o],t.style[o]=e[o];n=i.apply(t,s||[]);for(o in e)t.style[o]=r[o];return n},Qt=X.documentElement;!function(){function e(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",a.innerHTML="",Qt.appendChild(r);var e=t.getComputedStyle(a);i="1%"!==e.top,o="2px"===e.marginLeft,s="4px"===e.width,a.style.marginRight="50%",n="4px"===e.marginRight,Qt.removeChild(r)}var i,s,n,o,r=X.createElement("div"),a=X.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",st.clearCloneStyle="content-box"===a.style.backgroundClip,r.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",r.appendChild(a),ot.extend(st,{pixelPosition:function(){return e(),i},boxSizingReliable:function(){return null==s&&e(),s},pixelMarginRight:function(){return null==s&&e(),n},reliableMarginLeft:function(){return null==s&&e(),o},reliableMarginRight:function(){var e,i=a.appendChild(X.createElement("div"));return i.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",a.style.width="1px",Qt.appendChild(r),e=!parseFloat(t.getComputedStyle(i).marginRight),Qt.removeChild(r),a.removeChild(i),e}}))}();var Zt=/^(none|table(?!-c[ea]).+)/,te={position:"absolute",visibility:"hidden",display:"block"},ee={letterSpacing:"0",fontWeight:"400"},ie=["Webkit","O","Moz","ms"],se=X.createElement("div").style;ot.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=S(t,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(t,e,i,s){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var n,o,r,a=ot.camelCase(e),l=t.style;return e=ot.cssProps[a]||(ot.cssProps[a]=T(a)||a),r=ot.cssHooks[e]||ot.cssHooks[a],void 0===i?r&&"get"in r&&void 0!==(n=r.get(t,!1,s))?n:l[e]:(o=typeof i,"string"===o&&(n=At.exec(i))&&n[1]&&(i=h(t,e,n),o="number"),void(null!=i&&i===i&&("number"===o&&(i+=n&&n[3]||(ot.cssNumber[a]?"":"px")),st.clearCloneStyle||""!==i||0!==e.indexOf("background")||(l[e]="inherit"),r&&"set"in r&&void 0===(i=r.set(t,i,s))||(l[e]=i))))}},css:function(t,e,i,s){var n,o,r,a=ot.camelCase(e);return e=ot.cssProps[a]||(ot.cssProps[a]=T(a)||a),r=ot.cssHooks[e]||ot.cssHooks[a],r&&"get"in r&&(n=r.get(t,!0,i)),void 0===n&&(n=S(t,e,s)),"normal"===n&&e in ee&&(n=ee[e]),""===i||i?(o=parseFloat(n),i===!0||isFinite(o)?o||0:n):n}}),ot.each(["height","width"],function(t,e){ot.cssHooks[e]={get:function(t,i,s){return i?Zt.test(ot.css(t,"display"))&&0===t.offsetWidth?Jt(t,te,function(){return I(t,e,s)}):I(t,e,s):void 0},set:function(t,i,s){var n,o=s&&Gt(t),r=s&&A(t,e,s,"border-box"===ot.css(t,"boxSizing",!1,o),o);return r&&(n=At.exec(i))&&"px"!==(n[3]||"px")&&(t.style[e]=i,i=ot.css(t,e)),P(t,i,r)}}}),ot.cssHooks.marginLeft=z(st.reliableMarginLeft,function(t,e){return e?(parseFloat(S(t,"marginLeft"))||t.getBoundingClientRect().left-Jt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px":void 0}),ot.cssHooks.marginRight=z(st.reliableMarginRight,function(t,e){return e?Jt(t,{display:"inline-block"},S,[t,"marginRight"]):void 0}),ot.each({margin:"",padding:"",border:"Width"},function(t,e){ot.cssHooks[t+e]={expand:function(i){for(var s=0,n={},o="string"==typeof i?i.split(" "):[i];4>s;s++)n[t+It[s]+e]=o[s]||o[s-2]||o[0];return n}},Kt.test(t)||(ot.cssHooks[t+e].set=P)}),ot.fn.extend({css:function(t,e){return Ct(this,function(t,e,i){var s,n,o={},r=0;if(ot.isArray(e)){for(s=Gt(t),n=e.length;n>r;r++)o[e[r]]=ot.css(t,e[r],!1,s);return o}return void 0!==i?ot.style(t,e,i):ot.css(t,e)},t,e,arguments.length>1)},show:function(){return M(this,!0)},hide:function(){return M(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Mt(this)?ot(this).show():ot(this).hide()})}}),ot.Tween=E,E.prototype={constructor:E,init:function(t,e,i,s,n,o){this.elem=t,this.prop=i,this.easing=n||ot.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=s,this.unit=o||(ot.cssNumber[i]?"":"px")},cur:function(){var t=E.propHooks[this.prop];return t&&t.get?t.get(this):E.propHooks._default.get(this)},run:function(t){var e,i=E.propHooks[this.prop];return this.options.duration?this.pos=e=ot.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):E.propHooks._default.set(this),this}},E.prototype.init.prototype=E.prototype,E.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=ot.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){ot.fx.step[t.prop]?ot.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[ot.cssProps[t.prop]]&&!ot.cssHooks[t.prop]?t.elem[t.prop]=t.now:ot.style(t.elem,t.prop,t.now+t.unit)}}},E.propHooks.scrollTop=E.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},ot.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},ot.fx=E.prototype.init,ot.fx.step={};var ne,oe,re=/^(?:toggle|show|hide)$/,ae=/queueHooks$/;ot.Animation=ot.extend(j,{tweeners:{"*":[function(t,e){var i=this.createTween(t,e);return h(i.elem,t,At.exec(e),i),i}]},tweener:function(t,e){ot.isFunction(t)?(e=t,t=["*"]):t=t.match(wt);for(var i,s=0,n=t.length;n>s;s++)i=t[s],j.tweeners[i]=j.tweeners[i]||[],j.tweeners[i].unshift(e)},prefilters:[H],prefilter:function(t,e){e?j.prefilters.unshift(t):j.prefilters.push(t)}}),ot.speed=function(t,e,i){var s=t&&"object"==typeof t?ot.extend({},t):{complete:i||!i&&e||ot.isFunction(t)&&t,duration:t,easing:i&&e||e&&!ot.isFunction(e)&&e};return s.duration=ot.fx.off?0:"number"==typeof s.duration?s.duration:s.duration in ot.fx.speeds?ot.fx.speeds[s.duration]:ot.fx.speeds._default,null!=s.queue&&s.queue!==!0||(s.queue="fx"),s.old=s.complete,s.complete=function(){ot.isFunction(s.old)&&s.old.call(this),s.queue&&ot.dequeue(this,s.queue)},s},ot.fn.extend({fadeTo:function(t,e,i,s){return this.filter(Mt).css("opacity",0).show().end().animate({opacity:e},t,i,s)},animate:function(t,e,i,s){var n=ot.isEmptyObject(t),o=ot.speed(e,i,s),r=function(){var e=j(this,ot.extend({},t),o);(n||Dt.get(this,"finish"))&&e.stop(!0)};return r.finish=r,n||o.queue===!1?this.each(r):this.queue(o.queue,r)},stop:function(t,e,i){var s=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,n=null!=t&&t+"queueHooks",o=ot.timers,r=Dt.get(this);if(n)r[n]&&r[n].stop&&s(r[n]);else for(n in r)r[n]&&r[n].stop&&ae.test(n)&&s(r[n]);for(n=o.length;n--;)o[n].elem!==this||null!=t&&o[n].queue!==t||(o[n].anim.stop(i),e=!1,o.splice(n,1));!e&&i||ot.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,i=Dt.get(this),s=i[t+"queue"],n=i[t+"queueHooks"],o=ot.timers,r=s?s.length:0;for(i.finish=!0,ot.queue(this,t,[]),n&&n.stop&&n.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;r>e;e++)s[e]&&s[e].finish&&s[e].finish.call(this);delete i.finish})}}),ot.each(["toggle","show","hide"],function(t,e){var i=ot.fn[e];ot.fn[e]=function(t,s,n){
11
+ return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(R(e,!0),t,s,n)}}),ot.each({slideDown:R("show"),slideUp:R("hide"),slideToggle:R("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){ot.fn[t]=function(t,i,s){return this.animate(e,t,i,s)}}),ot.timers=[],ot.fx.tick=function(){var t,e=0,i=ot.timers;for(ne=ot.now();e<i.length;e++)t=i[e],t()||i[e]!==t||i.splice(e--,1);i.length||ot.fx.stop(),ne=void 0},ot.fx.timer=function(t){ot.timers.push(t),t()?ot.fx.start():ot.timers.pop()},ot.fx.interval=13,ot.fx.start=function(){oe||(oe=t.setInterval(ot.fx.tick,ot.fx.interval))},ot.fx.stop=function(){t.clearInterval(oe),oe=null},ot.fx.speeds={slow:600,fast:200,_default:400},ot.fn.delay=function(e,i){return e=ot.fx?ot.fx.speeds[e]||e:e,i=i||"fx",this.queue(i,function(i,s){var n=t.setTimeout(i,e);s.stop=function(){t.clearTimeout(n)}})},function(){var t=X.createElement("input"),e=X.createElement("select"),i=e.appendChild(X.createElement("option"));t.type="checkbox",st.checkOn=""!==t.value,st.optSelected=i.selected,e.disabled=!0,st.optDisabled=!i.disabled,t=X.createElement("input"),t.value="t",t.type="radio",st.radioValue="t"===t.value}();var le,he=ot.expr.attrHandle;ot.fn.extend({attr:function(t,e){return Ct(this,ot.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){ot.removeAttr(this,t)})}}),ot.extend({attr:function(t,e,i){var s,n,o=t.nodeType;return 3!==o&&8!==o&&2!==o?"undefined"==typeof t.getAttribute?ot.prop(t,e,i):(1===o&&ot.isXMLDoc(t)||(e=e.toLowerCase(),n=ot.attrHooks[e]||(ot.expr.match.bool.test(e)?le:void 0)),void 0!==i?null===i?void ot.removeAttr(t,e):n&&"set"in n&&void 0!==(s=n.set(t,i,e))?s:(t.setAttribute(e,i+""),i):n&&"get"in n&&null!==(s=n.get(t,e))?s:(s=ot.find.attr(t,e),null==s?void 0:s)):void 0},attrHooks:{type:{set:function(t,e){if(!st.radioValue&&"radio"===e&&ot.nodeName(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,s,n=0,o=e&&e.match(wt);if(o&&1===t.nodeType)for(;i=o[n++];)s=ot.propFix[i]||i,ot.expr.match.bool.test(i)&&(t[s]=!1),t.removeAttribute(i)}}),le={set:function(t,e,i){return e===!1?ot.removeAttr(t,i):t.setAttribute(i,i),i}},ot.each(ot.expr.match.bool.source.match(/\w+/g),function(t,e){var i=he[e]||ot.find.attr;he[e]=function(t,e,s){var n,o;return s||(o=he[e],he[e]=n,n=null!=i(t,e,s)?e.toLowerCase():null,he[e]=o),n}});var ue=/^(?:input|select|textarea|button)$/i,ce=/^(?:a|area)$/i;ot.fn.extend({prop:function(t,e){return Ct(this,ot.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[ot.propFix[t]||t]})}}),ot.extend({prop:function(t,e,i){var s,n,o=t.nodeType;return 3!==o&&8!==o&&2!==o?(1===o&&ot.isXMLDoc(t)||(e=ot.propFix[e]||e,n=ot.propHooks[e]),void 0!==i?n&&"set"in n&&void 0!==(s=n.set(t,i,e))?s:t[e]=i:n&&"get"in n&&null!==(s=n.get(t,e))?s:t[e]):void 0},propHooks:{tabIndex:{get:function(t){var e=ot.find.attr(t,"tabindex");return e?parseInt(e,10):ue.test(t.nodeName)||ce.test(t.nodeName)&&t.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),st.optSelected||(ot.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),ot.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ot.propFix[this.toLowerCase()]=this});var de=/[\t\r\n\f]/g;ot.fn.extend({addClass:function(t){var e,i,s,n,o,r,a,l=0;if(ot.isFunction(t))return this.each(function(e){ot(this).addClass(t.call(this,e,L(this)))});if("string"==typeof t&&t)for(e=t.match(wt)||[];i=this[l++];)if(n=L(i),s=1===i.nodeType&&(" "+n+" ").replace(de," ")){for(r=0;o=e[r++];)s.indexOf(" "+o+" ")<0&&(s+=o+" ");a=ot.trim(s),n!==a&&i.setAttribute("class",a)}return this},removeClass:function(t){var e,i,s,n,o,r,a,l=0;if(ot.isFunction(t))return this.each(function(e){ot(this).removeClass(t.call(this,e,L(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(wt)||[];i=this[l++];)if(n=L(i),s=1===i.nodeType&&(" "+n+" ").replace(de," ")){for(r=0;o=e[r++];)for(;s.indexOf(" "+o+" ")>-1;)s=s.replace(" "+o+" "," ");a=ot.trim(s),n!==a&&i.setAttribute("class",a)}return this},toggleClass:function(t,e){var i=typeof t;return"boolean"==typeof e&&"string"===i?e?this.addClass(t):this.removeClass(t):ot.isFunction(t)?this.each(function(i){ot(this).toggleClass(t.call(this,i,L(this),e),e)}):this.each(function(){var e,s,n,o;if("string"===i)for(s=0,n=ot(this),o=t.match(wt)||[];e=o[s++];)n.hasClass(e)?n.removeClass(e):n.addClass(e);else void 0!==t&&"boolean"!==i||(e=L(this),e&&Dt.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||t===!1?"":Dt.get(this,"__className__")||""))})},hasClass:function(t){var e,i,s=0;for(e=" "+t+" ";i=this[s++];)if(1===i.nodeType&&(" "+L(i)+" ").replace(de," ").indexOf(e)>-1)return!0;return!1}});var pe=/\r/g,fe=/[\x20\t\r\n\f]+/g;ot.fn.extend({val:function(t){var e,i,s,n=this[0];return arguments.length?(s=ot.isFunction(t),this.each(function(i){var n;1===this.nodeType&&(n=s?t.call(this,i,ot(this).val()):t,null==n?n="":"number"==typeof n?n+="":ot.isArray(n)&&(n=ot.map(n,function(t){return null==t?"":t+""})),e=ot.valHooks[this.type]||ot.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,n,"value")||(this.value=n))})):n?(e=ot.valHooks[n.type]||ot.valHooks[n.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(i=e.get(n,"value"))?i:(i=n.value,"string"==typeof i?i.replace(pe,""):null==i?"":i)):void 0}}),ot.extend({valHooks:{option:{get:function(t){var e=ot.find.attr(t,"value");return null!=e?e:ot.trim(ot.text(t)).replace(fe," ")}},select:{get:function(t){for(var e,i,s=t.options,n=t.selectedIndex,o="select-one"===t.type||0>n,r=o?null:[],a=o?n+1:s.length,l=0>n?a:o?n:0;a>l;l++)if(i=s[l],(i.selected||l===n)&&(st.optDisabled?!i.disabled:null===i.getAttribute("disabled"))&&(!i.parentNode.disabled||!ot.nodeName(i.parentNode,"optgroup"))){if(e=ot(i).val(),o)return e;r.push(e)}return r},set:function(t,e){for(var i,s,n=t.options,o=ot.makeArray(e),r=n.length;r--;)s=n[r],(s.selected=ot.inArray(ot.valHooks.option.get(s),o)>-1)&&(i=!0);return i||(t.selectedIndex=-1),o}}}}),ot.each(["radio","checkbox"],function(){ot.valHooks[this]={set:function(t,e){return ot.isArray(e)?t.checked=ot.inArray(ot(t).val(),e)>-1:void 0}},st.checkOn||(ot.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var ge=/^(?:focusinfocus|focusoutblur)$/;ot.extend(ot.event,{trigger:function(e,i,s,n){var o,r,a,l,h,u,c,d=[s||X],p=it.call(e,"type")?e.type:e,f=it.call(e,"namespace")?e.namespace.split("."):[];if(r=a=s=s||X,3!==s.nodeType&&8!==s.nodeType&&!ge.test(p+ot.event.triggered)&&(p.indexOf(".")>-1&&(f=p.split("."),p=f.shift(),f.sort()),h=p.indexOf(":")<0&&"on"+p,e=e[ot.expando]?e:new ot.Event(p,"object"==typeof e&&e),e.isTrigger=n?2:3,e.namespace=f.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=s),i=null==i?[e]:ot.makeArray(i,[e]),c=ot.event.special[p]||{},n||!c.trigger||c.trigger.apply(s,i)!==!1)){if(!n&&!c.noBubble&&!ot.isWindow(s)){for(l=c.delegateType||p,ge.test(l+p)||(r=r.parentNode);r;r=r.parentNode)d.push(r),a=r;a===(s.ownerDocument||X)&&d.push(a.defaultView||a.parentWindow||t)}for(o=0;(r=d[o++])&&!e.isPropagationStopped();)e.type=o>1?l:c.bindType||p,u=(Dt.get(r,"events")||{})[e.type]&&Dt.get(r,"handle"),u&&u.apply(r,i),u=h&&r[h],u&&u.apply&&kt(r)&&(e.result=u.apply(r,i),e.result===!1&&e.preventDefault());return e.type=p,n||e.isDefaultPrevented()||c._default&&c._default.apply(d.pop(),i)!==!1||!kt(s)||h&&ot.isFunction(s[p])&&!ot.isWindow(s)&&(a=s[h],a&&(s[h]=null),ot.event.triggered=p,s[p](),ot.event.triggered=void 0,a&&(s[h]=a)),e.result}},simulate:function(t,e,i){var s=ot.extend(new ot.Event,i,{type:t,isSimulated:!0});ot.event.trigger(s,null,e)}}),ot.fn.extend({trigger:function(t,e){return this.each(function(){ot.event.trigger(t,e,this)})},triggerHandler:function(t,e){var i=this[0];return i?ot.event.trigger(t,e,i,!0):void 0}}),ot.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){ot.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}),ot.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),st.focusin="onfocusin"in t,st.focusin||ot.each({focus:"focusin",blur:"focusout"},function(t,e){var i=function(t){ot.event.simulate(e,t.target,ot.event.fix(t))};ot.event.special[e]={setup:function(){var s=this.ownerDocument||this,n=Dt.access(s,e);n||s.addEventListener(t,i,!0),Dt.access(s,e,(n||0)+1)},teardown:function(){var s=this.ownerDocument||this,n=Dt.access(s,e)-1;n?Dt.access(s,e,n):(s.removeEventListener(t,i,!0),Dt.remove(s,e))}}});var me=t.location,ve=ot.now(),be=/\?/;ot.parseJSON=function(t){return JSON.parse(t+"")},ot.parseXML=function(e){var i;if(!e||"string"!=typeof e)return null;try{i=(new t.DOMParser).parseFromString(e,"text/xml")}catch(s){i=void 0}return i&&!i.getElementsByTagName("parsererror").length||ot.error("Invalid XML: "+e),i};var ye=/#.*$/,_e=/([?&])_=[^&]*/,we=/^(.*?):[ \t]*([^\r\n]*)$/gm,xe=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ce=/^(?:GET|HEAD)$/,ke=/^\/\//,De={},Se={},ze="*/".concat("*"),Te=X.createElement("a");Te.href=me.href,ot.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:me.href,type:"GET",isLocal:xe.test(me.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ze,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ot.parseJSON,"text xml":ot.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?q(q(t,ot.ajaxSettings),e):q(ot.ajaxSettings,t)},ajaxPrefilter:F(De),ajaxTransport:F(Se),ajax:function(e,i){function s(e,i,s,a){var h,c,b,y,w,C=i;2!==_&&(_=2,l&&t.clearTimeout(l),n=void 0,r=a||"",x.readyState=e>0?4:0,h=e>=200&&300>e||304===e,s&&(y=Y(d,x,s)),y=U(d,y,x,h),h?(d.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(ot.lastModified[o]=w),w=x.getResponseHeader("etag"),w&&(ot.etag[o]=w)),204===e||"HEAD"===d.type?C="nocontent":304===e?C="notmodified":(C=y.state,c=y.data,b=y.error,h=!b)):(b=C,!e&&C||(C="error",0>e&&(e=0))),x.status=e,x.statusText=(i||C)+"",h?g.resolveWith(p,[c,C,x]):g.rejectWith(p,[x,C,b]),x.statusCode(v),v=void 0,u&&f.trigger(h?"ajaxSuccess":"ajaxError",[x,d,h?c:b]),m.fireWith(p,[x,C]),u&&(f.trigger("ajaxComplete",[x,d]),--ot.active||ot.event.trigger("ajaxStop")))}"object"==typeof e&&(i=e,e=void 0),i=i||{};var n,o,r,a,l,h,u,c,d=ot.ajaxSetup({},i),p=d.context||d,f=d.context&&(p.nodeType||p.jquery)?ot(p):ot.event,g=ot.Deferred(),m=ot.Callbacks("once memory"),v=d.statusCode||{},b={},y={},_=0,w="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(2===_){if(!a)for(a={};e=we.exec(r);)a[e[1].toLowerCase()]=e[2];e=a[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===_?r:null},setRequestHeader:function(t,e){var i=t.toLowerCase();return _||(t=y[i]=y[i]||t,b[t]=e),this},overrideMimeType:function(t){return _||(d.mimeType=t),this},statusCode:function(t){var e;if(t)if(2>_)for(e in t)v[e]=[v[e],t[e]];else x.always(t[x.status]);return this},abort:function(t){var e=t||w;return n&&n.abort(e),s(0,e),this}};if(g.promise(x).complete=m.add,x.success=x.done,x.error=x.fail,d.url=((e||d.url||me.href)+"").replace(ye,"").replace(ke,me.protocol+"//"),d.type=i.method||i.type||d.method||d.type,d.dataTypes=ot.trim(d.dataType||"*").toLowerCase().match(wt)||[""],null==d.crossDomain){h=X.createElement("a");try{h.href=d.url,h.href=h.href,d.crossDomain=Te.protocol+"//"+Te.host!=h.protocol+"//"+h.host}catch(C){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=ot.param(d.data,d.traditional)),B(De,d,i,x),2===_)return x;u=ot.event&&d.global,u&&0===ot.active++&&ot.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Ce.test(d.type),o=d.url,d.hasContent||(d.data&&(o=d.url+=(be.test(o)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=_e.test(o)?o.replace(_e,"$1_="+ve++):o+(be.test(o)?"&":"?")+"_="+ve++)),d.ifModified&&(ot.lastModified[o]&&x.setRequestHeader("If-Modified-Since",ot.lastModified[o]),ot.etag[o]&&x.setRequestHeader("If-None-Match",ot.etag[o])),(d.data&&d.hasContent&&d.contentType!==!1||i.contentType)&&x.setRequestHeader("Content-Type",d.contentType),x.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+ze+"; q=0.01":""):d.accepts["*"]);for(c in d.headers)x.setRequestHeader(c,d.headers[c]);if(d.beforeSend&&(d.beforeSend.call(p,x,d)===!1||2===_))return x.abort();w="abort";for(c in{success:1,error:1,complete:1})x[c](d[c]);if(n=B(Se,d,i,x)){if(x.readyState=1,u&&f.trigger("ajaxSend",[x,d]),2===_)return x;d.async&&d.timeout>0&&(l=t.setTimeout(function(){x.abort("timeout")},d.timeout));try{_=1,n.send(b,s)}catch(C){if(!(2>_))throw C;s(-1,C)}}else s(-1,"No Transport");return x},getJSON:function(t,e,i){return ot.get(t,e,i,"json")},getScript:function(t,e){return ot.get(t,void 0,e,"script")}}),ot.each(["get","post"],function(t,e){ot[e]=function(t,i,s,n){return ot.isFunction(i)&&(n=n||s,s=i,i=void 0),ot.ajax(ot.extend({url:t,type:e,dataType:n,data:i,success:s},ot.isPlainObject(t)&&t))}}),ot._evalUrl=function(t){return ot.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},ot.fn.extend({wrapAll:function(t){var e;return ot.isFunction(t)?this.each(function(e){ot(this).wrapAll(t.call(this,e))}):(this[0]&&(e=ot(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this)},wrapInner:function(t){return ot.isFunction(t)?this.each(function(e){ot(this).wrapInner(t.call(this,e))}):this.each(function(){var e=ot(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=ot.isFunction(t);return this.each(function(i){ot(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(){return this.parent().each(function(){ot.nodeName(this,"body")||ot(this).replaceWith(this.childNodes)}).end()}}),ot.expr.filters.hidden=function(t){return!ot.expr.filters.visible(t)},ot.expr.filters.visible=function(t){return t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0};var Pe=/%20/g,Ae=/\[\]$/,Ie=/\r?\n/g,Me=/^(?:submit|button|image|reset|file)$/i,Ee=/^(?:input|select|textarea|keygen)/i;ot.param=function(t,e){var i,s=[],n=function(t,e){e=ot.isFunction(e)?e():null==e?"":e,s[s.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=ot.ajaxSettings&&ot.ajaxSettings.traditional),ot.isArray(t)||t.jquery&&!ot.isPlainObject(t))ot.each(t,function(){n(this.name,this.value)});else for(i in t)V(i,t[i],e,n);return s.join("&").replace(Pe,"+")},ot.fn.extend({serialize:function(){return ot.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=ot.prop(this,"elements");return t?ot.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!ot(this).is(":disabled")&&Ee.test(this.nodeName)&&!Me.test(t)&&(this.checked||!Et.test(t))}).map(function(t,e){var i=ot(this).val();return null==i?null:ot.isArray(i)?ot.map(i,function(t){return{name:e.name,value:t.replace(Ie,"\r\n")}}):{name:e.name,value:i.replace(Ie,"\r\n")}}).get()}}),ot.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(e){}};var Ne={0:200,1223:204},Re=ot.ajaxSettings.xhr();st.cors=!!Re&&"withCredentials"in Re,st.ajax=Re=!!Re,ot.ajaxTransport(function(e){var i,s;return st.cors||Re&&!e.crossDomain?{send:function(n,o){var r,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)a[r]=e.xhrFields[r];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(r in n)a.setRequestHeader(r,n[r]);i=function(t){return function(){i&&(i=s=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Ne[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=i(),s=a.onerror=i("error"),void 0!==a.onabort?a.onabort=s:a.onreadystatechange=function(){4===a.readyState&&t.setTimeout(function(){i&&s()})},i=i("abort");try{a.send(e.hasContent&&e.data||null)}catch(l){if(i)throw l}},abort:function(){i&&i()}}:void 0}),ot.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return ot.globalEval(t),t}}}),ot.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),ot.ajaxTransport("script",function(t){if(t.crossDomain){var e,i;return{send:function(s,n){e=ot("<script>").prop({charset:t.scriptCharset,src:t.url}).on("load error",i=function(t){e.remove(),i=null,t&&n("error"===t.type?404:200,t.type)}),X.head.appendChild(e[0])},abort:function(){i&&i()}}}});var Oe=[],He=/(=)\?(?=&|$)|\?\?/;ot.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Oe.pop()||ot.expando+"_"+ve++;return this[t]=!0,t}}),ot.ajaxPrefilter("json jsonp",function(e,i,s){var n,o,r,a=e.jsonp!==!1&&(He.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&He.test(e.data)&&"data");return a||"jsonp"===e.dataTypes[0]?(n=e.jsonpCallback=ot.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(He,"$1"+n):e.jsonp!==!1&&(e.url+=(be.test(e.url)?"&":"?")+e.jsonp+"="+n),e.converters["script json"]=function(){return r||ot.error(n+" was not called"),r[0]},e.dataTypes[0]="json",o=t[n],t[n]=function(){r=arguments},s.always(function(){void 0===o?ot(t).removeProp(n):t[n]=o,e[n]&&(e.jsonpCallback=i.jsonpCallback,Oe.push(n)),r&&ot.isFunction(o)&&o(r[0]),r=o=void 0}),"script"):void 0}),ot.parseHTML=function(t,e,i){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(i=e,e=!1),e=e||X;var s=ft.exec(t),n=!i&&[];return s?[e.createElement(s[1])]:(s=d([t],e,n),n&&n.length&&ot(n).remove(),ot.merge([],s.childNodes))};var We=ot.fn.load;ot.fn.load=function(t,e,i){if("string"!=typeof t&&We)return We.apply(this,arguments);var s,n,o,r=this,a=t.indexOf(" ");return a>-1&&(s=ot.trim(t.slice(a)),t=t.slice(0,a)),ot.isFunction(e)?(i=e,e=void 0):e&&"object"==typeof e&&(n="POST"),r.length>0&&ot.ajax({url:t,type:n||"GET",dataType:"html",data:e}).done(function(t){o=arguments,r.html(s?ot("<div>").append(ot.parseHTML(t)).find(s):t)}).always(i&&function(t,e){r.each(function(){i.apply(this,o||[t.responseText,e,t])})}),this},ot.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){ot.fn[e]=function(t){return this.on(e,t)}}),ot.expr.filters.animated=function(t){return ot.grep(ot.timers,function(e){return t===e.elem}).length},ot.offset={setOffset:function(t,e,i){var s,n,o,r,a,l,h,u=ot.css(t,"position"),c=ot(t),d={};"static"===u&&(t.style.position="relative"),a=c.offset(),o=ot.css(t,"top"),l=ot.css(t,"left"),h=("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1,h?(s=c.position(),r=s.top,n=s.left):(r=parseFloat(o)||0,n=parseFloat(l)||0),ot.isFunction(e)&&(e=e.call(t,i,ot.extend({},a))),null!=e.top&&(d.top=e.top-a.top+r),null!=e.left&&(d.left=e.left-a.left+n),"using"in e?e.using.call(t,d):c.css(d)}},ot.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ot.offset.setOffset(this,t,e)});var e,i,s=this[0],n={top:0,left:0},o=s&&s.ownerDocument;return o?(e=o.documentElement,ot.contains(e,s)?(n=s.getBoundingClientRect(),i=$(o),{top:n.top+i.pageYOffset-e.clientTop,left:n.left+i.pageXOffset-e.clientLeft}):n):void 0},position:function(){if(this[0]){var t,e,i=this[0],s={top:0,left:0};return"fixed"===ot.css(i,"position")?e=i.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),ot.nodeName(t[0],"html")||(s=t.offset()),s.top+=ot.css(t[0],"borderTopWidth",!0),s.left+=ot.css(t[0],"borderLeftWidth",!0)),{top:e.top-s.top-ot.css(i,"marginTop",!0),left:e.left-s.left-ot.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===ot.css(t,"position");)t=t.offsetParent;return t||Qt})}}),ot.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var i="pageYOffset"===e;ot.fn[t]=function(s){return Ct(this,function(t,s,n){var o=$(t);return void 0===n?o?o[e]:t[s]:void(o?o.scrollTo(i?o.pageXOffset:n,i?n:o.pageYOffset):t[s]=n)},t,s,arguments.length)}}),ot.each(["top","left"],function(t,e){ot.cssHooks[e]=z(st.pixelPosition,function(t,i){return i?(i=S(t,e),Xt.test(i)?ot(t).position()[e]+"px":i):void 0})}),ot.each({Height:"height",Width:"width"},function(t,e){ot.each({padding:"inner"+t,content:e,"":"outer"+t},function(i,s){ot.fn[s]=function(s,n){var o=arguments.length&&(i||"boolean"!=typeof s),r=i||(s===!0||n===!0?"margin":"border");return Ct(this,function(e,i,s){var n;return ot.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(n=e.documentElement,Math.max(e.body["scroll"+t],n["scroll"+t],e.body["offset"+t],n["offset"+t],n["client"+t])):void 0===s?ot.css(e,i,r):ot.style(e,i,s,r)},e,o?s:void 0,o,null)}})}),ot.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,s){return this.on(e,t,i,s)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)},size:function(){return this.length}}),ot.fn.andSelf=ot.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ot});var je=t.jQuery,Le=t.$;return ot.noConflict=function(e){return t.$===ot&&(t.$=Le),e&&t.jQuery===ot&&(t.jQuery=je),ot},e||(t.jQuery=t.$=ot),ot}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(e,s){var n,o,r,a=e.nodeName.toLowerCase();return"area"===a?(n=e.parentNode,o=n.name,e.href&&o&&"map"===n.nodeName.toLowerCase()?(r=t("img[usemap='#"+o+"']")[0],!!r&&i(r)):!1):(/^(input|select|textarea|button|object)$/.test(a)?!e.disabled:"a"===a?e.href||s:s)&&i(e)}function i(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}function s(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={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},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=o(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function o(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",r)}function r(){t.datepicker._isDisabledDatepicker(v.inline?v.dpDiv.parent()[0]:v.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function a(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}function l(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.extend(t.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({scrollParent:function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])},focusable:function(i){return e(i,!isNaN(t.attr(i,"tabindex")))},tabbable:function(i){var s=t.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&&e(i,!n)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),r={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?r["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?r["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.fn.extend({focus:function(e){return function(i,s){return"number"==typeof i?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),s&&s.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(e){if(void 0!==e)return this.css("zIndex",e);if(this.length)for(var i,s,n=t(this[0]);n.length&&n[0]!==document;){if(i=n.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}};var h=0,u=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(r){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,r,a,l={},h=e.split(".")[0];return e=e.split(".")[1],n=h+"-"+e,s||(s=i,i=t.Widget),t.expr[":"][n.toLowerCase()]=function(e){return!!t.data(e,n)},t[h]=t[h]||{},o=t[h][e],r=t[h][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new r(t,e)},t.extend(r,o,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?void(l[e]=function(){var t=function(){return i.prototype[e].apply(this,arguments)},n=function(t){return i.prototype[e].apply(this,t)};return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}()):void(l[e]=s)}),r.prototype=t.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix||e:e},l,{constructor:r,namespace:h,widgetName:e,widgetFullName:n}),o?(t.each(o._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete o._childConstructors):i._childConstructors.push(r),t.widget.bridge(e,r),r},t.widget.extend=function(e){for(var i,s,n=u.call(arguments,1),o=0,r=n.length;r>o;o++)for(i in n[o])s=n[o][i],n[o].hasOwnProperty(i)&&void 0!==s&&(e[i]=t.isPlainObject(s)?t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(n){var o="string"==typeof n,r=u.call(arguments,1),a=this;return o?this.each(function(){var i,o=t.data(this,s);return"instance"===n?(a=o,!1):o?t.isFunction(o[n])&&"_"!==n.charAt(0)?(i=o[n].apply(o,r),i!==o&&void 0!==i?(a=i&&i.jquery?a.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+n+"'")}):(r.length&&(n=t.widget.extend.apply(null,[n].concat(r))),this.each(function(){var e=t.data(this,s);e?(e.option(n||{}),e._init&&e._init()):t.data(this,s,new i(n,this))})),a}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,i){
12
+ i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=h++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(t.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:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,r=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(r={},s=e.split("."),e=s.shift(),s.length){for(n=r[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];r[e]=i}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!e),e&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,r){function a(){return e||o.options.disabled!==!0&&!t(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||t.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,u=l[2];u?n.delegate(u,h,a):i.bind(h,a)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(i).undelegate(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,r=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var r,a=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),r=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),r&&t.effects&&t.effects.effect[a]?s[e](n):a!==e&&s[a]?s[a](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget;var c=!1;t(document).mouseup(function(){c=!1}),t.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!c){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,n="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),c=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),c=!1,!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),function(){function e(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var n,o,r=Math.max,a=Math.abs,l=Math.round,h=/left|center|right/,u=/top|center|bottom/,c=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s||n?i.width():i.outerWidth(),height:s||n?i.height():i.outerHeight()}}},t.fn.position=function(n){if(!n||!n.of)return f.apply(this,arguments);n=t.extend({},n);var p,g,m,v,b,y,_=t(n.of),w=t.position.getWithinInfo(n.within),x=t.position.getScrollInfo(w),C=(n.collision||"flip").split(" "),k={};return y=s(_),_[0].preventDefault&&(n.at="left top"),g=y.width,m=y.height,v=y.offset,b=t.extend({},v),t.each(["my","at"],function(){var t,e,i=(n[this]||"").split(" ");1===i.length&&(i=h.test(i[0])?i.concat(["center"]):u.test(i[0])?["center"].concat(i):["center","center"]),i[0]=h.test(i[0])?i[0]:"center",i[1]=u.test(i[1])?i[1]:"center",t=c.exec(i[0]),e=c.exec(i[1]),k[this]=[t?t[0]:0,e?e[0]:0],n[this]=[d.exec(i[0])[0],d.exec(i[1])[0]]}),1===C.length&&(C[1]=C[0]),"right"===n.at[0]?b.left+=g:"center"===n.at[0]&&(b.left+=g/2),"bottom"===n.at[1]?b.top+=m:"center"===n.at[1]&&(b.top+=m/2),p=e(k.at,g,m),b.left+=p[0],b.top+=p[1],this.each(function(){var s,h,u=t(this),c=u.outerWidth(),d=u.outerHeight(),f=i(this,"marginLeft"),y=i(this,"marginTop"),D=c+f+i(this,"marginRight")+x.width,S=d+y+i(this,"marginBottom")+x.height,z=t.extend({},b),T=e(k.my,u.outerWidth(),u.outerHeight());"right"===n.my[0]?z.left-=c:"center"===n.my[0]&&(z.left-=c/2),"bottom"===n.my[1]?z.top-=d:"center"===n.my[1]&&(z.top-=d/2),z.left+=T[0],z.top+=T[1],o||(z.left=l(z.left),z.top=l(z.top)),s={marginLeft:f,marginTop:y},t.each(["left","top"],function(e,i){t.ui.position[C[e]]&&t.ui.position[C[e]][i](z,{targetWidth:g,targetHeight:m,elemWidth:c,elemHeight:d,collisionPosition:s,collisionWidth:D,collisionHeight:S,offset:[p[0]+T[0],p[1]+T[1]],my:n.my,at:n.at,within:w,elem:u})}),n.using&&(h=function(t){var e=v.left-z.left,i=e+g-c,s=v.top-z.top,o=s+m-d,l={target:{element:_,left:v.left,top:v.top,width:g,height:m},element:{element:u,left:z.left,top:z.top,width:c,height:d},horizontal:0>i?"left":e>0?"right":"center",vertical:0>o?"top":s>0?"bottom":"middle"};c>g&&g>a(e+i)&&(l.horizontal="center"),d>m&&m>a(s+o)&&(l.vertical="middle"),l.important=r(a(e),a(i))>r(a(s),a(o))?"horizontal":"vertical",n.using.call(this,t,l)}),u.offset(t.extend(z,{using:h}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,o=s.width,a=t.left-e.collisionPosition.marginLeft,l=n-a,h=a+e.collisionWidth-o-n;e.collisionWidth>o?l>0&&0>=h?(i=t.left+l+e.collisionWidth-o-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+o-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=r(t.left-a,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,o=e.within.height,a=t.top-e.collisionPosition.marginTop,l=n-a,h=a+e.collisionHeight-o-n;e.collisionHeight>o?l>0&&0>=h?(i=t.top+l+e.collisionHeight-o-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+o-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=r(t.top-a,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,u=h-l,c=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>u?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(u)>i)&&(t.left+=d+p+f)):c>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||c>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,u=h-l,c=h+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>u?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(u)>s)&&(t.top+=p+f+g)):c>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,(i>0||c>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,r,a=document.getElementsByTagName("body")[0],l=document.createElement("div");e=document.createElement(a?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},a&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(r in s)e.style[r]=s[r];e.appendChild(l),i=a||document.documentElement,i.insertBefore(e,i.firstChild),l.style.cssText="position: absolute; left: 10.7432222px;",n=t(l).offset().left,o=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()}(),t.ui.position,t.widget("ui.accordion",{version:"1.11.4",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},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active 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").removeUniqueId(),this._destroyIcons(),t=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?void this._activate(e):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),void("disabled"===t&&(this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e))))},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),o.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.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(){var e=t(this),i=e.uniqueId().attr("id"),s=e.next(),n=s.uniqueId().attr("id");e.attr("aria-controls",n),s.attr("aria-labelledby",i)}).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(i.event),"fill"===s?(e=n.height(),this.element.siblings(":visible").each(function(){var i=t(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===s&&(e=0,this.headers.next().each(function(){e=Math.max(e,t(this).css("height","").height())}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_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(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n[0]===s[0],r=o&&i.collapsible,a=r?t():n.next(),l=s.next(),h={oldHeader:s,oldPanel:l,newHeader:r?t():n,newPanel:a};e.preventDefault(),o&&!i.collapsible||this._trigger("beforeActivate",e,h)===!1||(i.active=r?!1:this.headers.index(n),this.active=o?t():n,this._toggle(h),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),o||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var s,n,o,r=this,a=0,l=t.css("box-sizing"),h=t.length&&(!e.length||t.index()<e.index()),u=this.options.animate||{},c=h&&u.down||u,d=function(){r._toggleComplete(i)};return"number"==typeof c&&(o=c),"string"==typeof c&&(n=c),n=n||c.easing||u.easing,o=o||c.duration||u.duration,e.length?t.length?(s=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:n,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:o,easing:n,complete:d,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===l&&(a+=i.now):"content"!==r.options.heightStyle&&(i.now=Math.round(s-e.outerHeight()-a),a=0)}})):e.animate(this.hideProps,o,n,d):t.animate(this.showProps,o,n,d)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 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").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target);!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&t(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(e){if(!this.previousFilter){var i=t(e.currentTarget);i.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&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-menu-icons ui-front").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").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){var i,s,n,o,r=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:r=!1,s=this.previousFilter||"",n=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}r&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(t):this.select(t))},refresh:function(){var e,i,s=this,n=this.options.icons.submenu,o=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),o.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.parent(),s=t("<span>").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),e=o.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);s._isDivider(e)&&e.addClass("ui-widget-content ui-menu-divider")}),i.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,r,a;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),r=this.activeMenu.height(),a=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+a>r&&this.activeMenu.scrollTop(o+n-r+a))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},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(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?void(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(e)},previousPage:function(e){var i,s,n;return this.active?void(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first()))):void this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(t.trim(t(this).text()))})}}),t.widget("ui.autocomplete",{version:"1.11.4",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 e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,r="input"===n;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(n){if(this.element.prop("readOnly"))return e=!0,s=!0,void(i=!0);e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault());if(!i){var n=t.ui.keyCode;switch(s.keyCode){
13
+ case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,void t.preventDefault()):void this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),void this._change(t))}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(s){s.target===e.element[0]||s.target===i||t.contains(i,s.target)||e.close()})})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)})):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,void(s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("<div>").text(s).appendTo(this.liveRegion))))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),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(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").text(i.label).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e):void this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete;var d,p="ui-button ui-widget ui-state-default ui-corner-all",f="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",g=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},m=function(e){var i=e.name,s=e.form,n=t([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?t(s).find("[name='"+i+"'][type=radio]"):t("[name='"+i+"'][type=radio]",e.ownerDocument).filter(function(){return!this.form})),n};t.widget("ui.button",{version:"1.11.4",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,g),"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 e=this,i=this.options,s="checkbox"===this.type||"radio"===this.type,n=s?"":"ui-state-active";null===i.label&&(i.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(p).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){i.disabled||this===d&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){i.disabled||t(this).removeClass(n)}).bind("click"+this.eventNamespace,function(t){i.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),s&&this.element.bind("change"+this.eventNamespace,function(){e.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return i.disabled?!1:void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(i.disabled)return!1;t(this).addClass("ui-state-active"),e.buttonElement.attr("aria-pressed","true");var s=e.element[0];m(s).not(s).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return i.disabled?!1:(t(this).addClass("ui-state-active"),d=this,void e.document.one("mouseup",function(){d=null}))}).bind("mouseup"+this.eventNamespace,function(){return i.disabled?!1:void t(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(e){return i.disabled?!1:void((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",i.disabled),this._resetButton()},_determineButtonType:function(){var t,e,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?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),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(p+" ui-state-active "+f).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?(this.widget().toggleClass("ui-state-disabled",!!e),this.element.prop("disabled",!!e),void(e&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active")))):void this._resetButton()},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?m(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(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 e=this.buttonElement.removeClass(f),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,o=[];s.primary||s.secondary?(this.options.text&&o.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(o.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):o.push("ui-button-text-only"),e.addClass(o.join(" "))}}),t.widget("ui.buttonset",{version:"1.11.4",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(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction"),i=this.element.find(this.options.items),s=i.filter(":ui-button");i.not(":ui-button").button(),s.button("refresh"),this.buttons=i.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}}),t.ui.button,t.extend(t.ui,{datepicker:{version:"1.11.4"}});var v;t.extend(n.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return a(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var s=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?o(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,r=this._get(i,"appendText"),a=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=t("<span class='"+this._appendClass+"'>"+r+"</span>"),e[a?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[a?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),r=this._get(t,"dateFormat");r.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,r.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,n,o){var r,l,h,u,c,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),a(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(l=document.documentElement.clientWidth,h=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,c=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+u,h/2-150+c]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),v===n&&(v=null))},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,s){var n,o,r,l,h=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):h?"all"===i?t.extend({},h.settings):this._get(h,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),void(h&&(this._curInst===h&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(h,"min"),l=this._getMinMaxDate(h,"max"),a(h.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(h.settings.minDate=this._formatDate(h,r)),null!==l&&void 0!==n.dateFormat&&void 0===n.maxDate&&(h.settings.maxDate=this._formatDate(h,l)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),h),this._autoSize(h),this._setDate(h,o),this._updateAlternate(h),this._updateDatepicker(h))))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),r=!0,a=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),r=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),r=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),r=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?1:-1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),r=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?-1:1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),r=e.ctrlKey||e.metaKey;break;default:r=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):r=!1;r&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);return t.datepicker._get(n,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,n,o,r,l,h,u;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(i,"beforeShow"),o=n?n.apply(e,[e,i]):{},o!==!1&&(a(i.settings,o),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),l={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),l=t.datepicker._checkOffset(i,l,r),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),i.inline||(h=t.datepicker._get(i,"showAnim"),u=t.datepicker._get(i,"duration"),i.dpDiv.css("z-index",s(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?i.dpDiv.show(h,t.datepicker._get(i,"showOptions"),u):i.dpDiv[h||"show"](h?u:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,v=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,s=this._getNumberOfMonths(e),n=s[1],o=17,a=e.dpDiv.find("."+this._dayOverClass+" a");a.length>0&&r.apply(a.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",o*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),r=e.input?e.input.outerWidth():0,a=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),h=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-r:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+a?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>l&&l>n?Math.abs(i.left+n-l):0),i.top-=Math.min(i.top,i.top+o>h&&h>o?Math.abs(o+a):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,r=this._curInst;!r||e&&r!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(r,"showAnim"),s=this._get(r,"duration"),n=function(){t.datepicker._tidyDialog(r)},t.effects&&(t.effects.effect[i]||t.effects[i])?r.dpDiv.hide(i,t.datepicker._get(r,"showOptions"),s,n):r.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(r,"onClose"),o&&o.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,r=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(o=this._getInst(r[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.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(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).each(function(){t(this).val(n)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,o,r,a,l=0,h=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),c=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,v=-1,b=-1,y=!1,_=function(t){var i=e.length>n+1&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=_(t),s="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n="y"===t?s:1,o=RegExp("^\\d{"+n+","+s+"}"),r=i.substring(l).match(o);if(!r)throw"Missing number at position "+l;return l+=r[0].length,parseInt(r[0],10)},x=function(e,s,n){var o=-1,r=t.map(_(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(r,function(t,e){var s=e[1];return i.substr(l,s.length).toLowerCase()===s.toLowerCase()?(o=e[0],l+=s.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+l},C=function(){if(i.charAt(l)!==e.charAt(n))throw"Unexpected literal at position "+l;l++};for(n=0;e.length>n;n++)if(y)"'"!==e.charAt(n)||_("'")?C():y=!1;else switch(e.charAt(n)){case"d":v=w("d");break;case"D":x("D",c,d);break;case"o":b=w("o");break;case"m":m=w("m");break;case"M":m=x("M",p,f);break;case"y":g=w("y");break;case"@":a=new Date(w("@")),g=a.getFullYear(),m=a.getMonth()+1,v=a.getDate();break;case"!":a=new Date((w("!")-this._ticksTo1970)/1e4),g=a.getFullYear(),m=a.getMonth()+1,v=a.getDate();break;case"'":_("'")?C():y=!0;break;default:C()}if(i.length>l&&(r=i.substr(l),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=g?0:-100)),b>-1)for(m=1,v=b;o=this._getDaysInMonth(g,m-1),!(o>=v);)m++,v-=o;if(a=this._daylightSavingAdjust(new Date(g,m-1,v)),a.getFullYear()!==g||a.getMonth()+1!==m||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:864e9*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";
14
+ var s,n=(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(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},h=function(t,e,i){var s=""+e;if(l(t))for(;i>s.length;)s="0"+s;return s},u=function(t,e,i,s){return l(t)?s[e]:i[e]},c="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||l("'")?c+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":c+=h("d",e.getDate(),2);break;case"D":c+=u("D",e.getDay(),n,o);break;case"o":c+=h("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":c+=h("m",e.getMonth()+1,2);break;case"M":c+=u("M",e.getMonth(),r,a);break;case"y":c+=l("y")?e.getFullYear():(10>e.getYear()%100?"0":"")+e.getYear()%100;break;case"@":c+=e.getTime();break;case"!":c+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?c+="'":d=!0;break;default:c+=t.charAt(s)}return c},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,r=this._getFormatConfig(t);try{o=this.parseDate(i,s,r)||n}catch(a){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),r=n.getMonth(),a=n.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,h=l.exec(i);h;){switch(h[2]||"d"){case"d":case"D":a+=parseInt(h[1],10);break;case"w":case"W":a+=7*parseInt(h[1],10);break;case"m":case"M":r+=parseInt(h[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(o,r));break;case"y":case"Y":o+=parseInt(h[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(o,r))}h=l.exec(i)}return new Date(o,r,a)},r=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return r=r&&"Invalid Date"==""+r?s:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,r=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=r.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=r.getMonth(),t.drawYear=t.selectedYear=t.currentYear=r.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,r,a,l,h,u,c,d,p,f,g,m,v,b,y,_,w,x,C,k,D,S,z,T,P,A,I,M,E,N,R,O,H,W,j,L=new Date,F=this._daylightSavingAdjust(new Date(L.getFullYear(),L.getMonth(),L.getDate())),B=this._get(t,"isRTL"),q=this._get(t,"showButtonPanel"),Y=this._get(t,"hideIfNoPrevNext"),U=this._get(t,"navigationAsDateFormat"),V=this._getNumberOfMonths(t),$=this._get(t,"showCurrentAtPos"),K=this._get(t,"stepMonths"),X=1!==V[0]||1!==V[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),J=this._getMinMaxDate(t,"min"),Q=this._getMinMaxDate(t,"max"),Z=t.drawMonth-$,tt=t.drawYear;if(0>Z&&(Z+=12,tt--),Q)for(e=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-V[0]*V[1]+1,Q.getDate())),e=J&&J>e?J:e;this._daylightSavingAdjust(new Date(tt,Z,1))>e;)Z--,0>Z&&(Z=11,tt--);for(t.drawMonth=Z,t.drawYear=tt,i=this._get(t,"prevText"),i=U?this.formatDate(i,this._daylightSavingAdjust(new Date(tt,Z-K,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,tt,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>":Y?"":"<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>",n=this._get(t,"nextText"),n=U?this.formatDate(n,this._daylightSavingAdjust(new Date(tt,Z+K,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,tt,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+n+"</span></a>":Y?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+n+"</span></a>",r=this._get(t,"currentText"),a=this._get(t,"gotoCurrent")&&t.currentDay?G:F,r=U?this.formatDate(r,a,this._getFormatConfig(t)):r,l=t.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(t,"closeText")+"</button>",h=q?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(B?l:"")+(this._isInRange(t,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(t,"firstDay"),10),u=isNaN(u)?0:u,c=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),b=this._get(t,"selectOtherMonths"),y=this._getDefaultDate(t),_="",x=0;V[0]>x;x++){for(C="",this.maxRows=4,k=0;V[1]>k;k++){if(D=this._daylightSavingAdjust(new Date(tt,Z,t.selectedDay)),S=" ui-corner-all",z="",X){if(z+="<div class='ui-datepicker-group",V[1]>1)switch(k){case 0:z+=" ui-datepicker-group-first",S=" ui-corner-"+(B?"right":"left");break;case V[1]-1:z+=" ui-datepicker-group-last",S=" ui-corner-"+(B?"left":"right");break;default:z+=" ui-datepicker-group-middle",S=""}z+="'>"}for(z+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+S+"'>"+(/all|left/.test(S)&&0===x?B?o:s:"")+(/all|right/.test(S)&&0===x?B?s:o:"")+this._generateMonthYearHeader(t,Z,tt,J,Q,x>0||k>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",T=c?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)P=(w+u)%7,T+="<th scope='col'"+((w+u+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[P]+"'>"+p[P]+"</span></th>";for(z+=T+"</tr></thead><tbody>",A=this._getDaysInMonth(tt,Z),tt===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,A)),I=(this._getFirstDayOfMonth(tt,Z)-u+7)%7,M=Math.ceil((I+A)/7),E=X&&this.maxRows>M?this.maxRows:M,this.maxRows=E,N=this._daylightSavingAdjust(new Date(tt,Z,1-I)),R=0;E>R;R++){for(z+="<tr>",O=c?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(N)+"</td>":"",w=0;7>w;w++)H=m?m.apply(t.input?t.input[0]:null,[N]):[!0,""],W=N.getMonth()!==Z,j=W&&!b||!H[0]||J&&J>N||Q&&N>Q,O+="<td class='"+((w+u+6)%7>=5?" ui-datepicker-week-end":"")+(W?" ui-datepicker-other-month":"")+(N.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||y.getTime()===N.getTime()&&y.getTime()===D.getTime()?" "+this._dayOverClass:"")+(j?" "+this._unselectableClass+" ui-state-disabled":"")+(W&&!v?"":" "+H[1]+(N.getTime()===G.getTime()?" "+this._currentClass:"")+(N.getTime()===F.getTime()?" ui-datepicker-today":""))+"'"+(W&&!v||!H[2]?"":" title='"+H[2].replace(/'/g,"&#39;")+"'")+(j?"":" data-handler='selectDay' data-event='click' data-month='"+N.getMonth()+"' data-year='"+N.getFullYear()+"'")+">"+(W&&!v?"&#xa0;":j?"<span class='ui-state-default'>"+N.getDate()+"</span>":"<a class='ui-state-default"+(N.getTime()===F.getTime()?" ui-state-highlight":"")+(N.getTime()===G.getTime()?" ui-state-active":"")+(W?" ui-priority-secondary":"")+"' href='#'>"+N.getDate()+"</a>")+"</td>",N.setDate(N.getDate()+1),N=this._daylightSavingAdjust(N);z+=O+"</tr>"}Z++,Z>11&&(Z=0,tt++),z+="</tbody></table>"+(X?"</div>"+(V[0]>0&&k===V[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),C+=z}_+=C}return _+=h,t._keyEvent=!1,_},_generateMonthYearHeader:function(t,e,i,s,n,o,r,a){var l,h,u,c,d,p,f,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),b=this._get(t,"showMonthAfterYear"),y="<div class='ui-datepicker-title'>",_="";if(o||!m)_+="<span class='ui-datepicker-month'>"+r[e]+"</span>";else{for(l=s&&s.getFullYear()===i,h=n&&n.getFullYear()===i,_+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",u=0;12>u;u++)(!l||u>=s.getMonth())&&(!h||n.getMonth()>=u)&&(_+="<option value='"+u+"'"+(u===e?" selected='selected'":"")+">"+a[u]+"</option>");_+="</select>"}if(b||(y+=_+(!o&&m&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!v)y+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(c=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(c[0]),g=Math.max(f,p(c[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",y+=t.yearshtml,t.yearshtml=null}return y+=this._get(t,"yearSuffix"),b&&(y+=(!o&&m&&v?"":"&#xa0;")+_),y+="</div>"},_adjustInstDate:function(t,e,i){var s=t.drawYear+("Y"===i?e:0),n=t.drawMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),r=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=r.getDate(),t.drawMonth=t.selectedMonth=r.getMonth(),t.drawYear=t.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),r=null,a=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),s=(new Date).getFullYear(),r=parseInt(i[0],10),a=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=s),i[1].match(/[+\-].*/)&&(a+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!r||e.getFullYear()>=r)&&(!a||a>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new n,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.11.4",t.datepicker,t.widget("ui.draggable",t.ui.mouse,{version:"1.11.4",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&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(e){var i=this.options;return this._blurActiveElement(e),this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=this.document[0];if(this.handleElement.is(e.target))try{i.activeElement&&"body"!==i.activeElement.nodeName.toLowerCase()&&t(i.activeElement).blur()}catch(s){}},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._normalizeRightBottom(),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.focus(),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),n=s?t(i.helper.apply(this.element[0],[e])):"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),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_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 e,i,s,n=this.options,o=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?void(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===n.containment?void(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):n.containment.constructor===Array?void(this.containment=n.containment):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],void(s&&(e=/(scroll|auto)/.test(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),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i))):void(this.containment=null)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,r=this.options,a=this._isRootNode(this.scrollParent[0]),l=t.pageX,h=t.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(h=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]&&(h=i[3]+this.offset.click.top)),r.grid&&(n=r.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,h=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-r.grid[1]:n+r.grid[1]:n,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),"y"===r.axis&&(l=this.originalPageX),"x"===r.axis&&(h=this.originalPageY)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0: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,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,s._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("toSortable",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,r=s.scrollParentNotHidden[0],a=s.document[0];r!==a&&"HTML"!==r.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+r.offsetHeight-e.pageY<n.scrollSensitivity?r.scrollTop=o=r.scrollTop+n.scrollSpeed:e.pageY-s.overflowOffset.top<n.scrollSensitivity&&(r.scrollTop=o=r.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+r.offsetWidth-e.pageX<n.scrollSensitivity?r.scrollLeft=o=r.scrollLeft+n.scrollSpeed:e.pageX-s.overflowOffset.left<n.scrollSensitivity&&(r.scrollLeft=o=r.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(e.pageY-t(a).scrollTop()<n.scrollSensitivity?o=t(a).scrollTop(t(a).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(a).scrollTop())<n.scrollSensitivity&&(o=t(a).scrollTop(t(a).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(e.pageX-t(a).scrollLeft()<n.scrollSensitivity?o=t(a).scrollLeft(t(a).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(a).scrollLeft())<n.scrollSensitivity&&(o=t(a).scrollLeft(t(a).scrollLeft()+n.scrollSpeed)))),o!==!1&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,s){var n=s.options;s.snapElements=[],t(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var e=t(this),i=e.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,s){var n,o,r,a,l,h,u,c,d,p,f=s.options,g=f.snapTolerance,m=i.offset.left,v=m+s.helperProportions.width,b=i.offset.top,y=b+s.helperProportions.height;for(d=s.snapElements.length-1;d>=0;d--)l=s.snapElements[d].left-s.margins.left,h=l+s.snapElements[d].width,u=s.snapElements[d].top-s.margins.top,c=u+s.snapElements[d].height,l-g>v||m>h+g||u-g>y||b>c+g||!t.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=g>=Math.abs(u-y),o=g>=Math.abs(c-b),r=g>=Math.abs(l-v),a=g>=Math.abs(h-m),n&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left)),p=n||o||r||a,"outer"!==f.snapMode&&(n=g>=Math.abs(u-b),o=g>=Math.abs(c-y),r=g>=Math.abs(l-m),a=g>=Math.abs(h-v),n&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left),a&&(i.position.left=s._convertPositionTo("relative",{
15
+ top:0,left:h-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||o||r||a||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||o||r||a||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,o=s.options,r=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});r.length&&(n=parseInt(t(r[0]).css("zIndex"),10)||0,t(r).each(function(e){t(this).css("zIndex",n+e)}),this.css("zIndex",n+r.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}}),t.ui.draggable,t.widget("ui.resizable",t.ui.mouse,{version:"1.11.4",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},_num:function(t){return parseInt(t,10)||0},_isNumber:function(t){return!isNaN(parseInt(t,10))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i,s,n,o,r=this,a=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<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.resizable("instance")),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=a.handles||(t(".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=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length>i;i++)s=t.trim(e[i]),o="ui-resizable-"+s,n=t("<div class='ui-resizable-handle "+o+"'></div>"),n.css({zIndex:a.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.mouseover(function(){r.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=n&&n[1]?n[1]:"se")}),a.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){a.disabled||(t(this).removeClass("ui-resizable-autohide"),r._handles.show())}).mouseleave(function(){a.disabled||r.resizing||(t(this).addClass("ui-resizable-autohide"),r._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).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),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,r=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:r.width(),height:r.height()},this.originalSize=this._helper?{width:r.outerWidth(),height:r.outerHeight()}:{width:r.width(),height:r.height()},this.sizeDiff={width:r.outerWidth()-r.width(),height:r.outerHeight()-r.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),r.addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,r=e.pageX-n.left||0,a=e.pageY-n.top||0,l=this._change[o];return this._updatePrevProperties(),l?(i=l.apply(this,[e,r,a]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,r,a,l,h=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:u.sizeDiff.height,o=s?0:u.sizeDiff.width,r={width:u.helper.width()-o,height:u.helper.height()-n},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,h.animate||this.element.css(t.extend(r,{top:l,left:a})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!h.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,r=this.options;o={minWidth:this._isNumber(r.minWidth)?r.minWidth:0,maxWidth:this._isNumber(r.maxWidth)?r.maxWidth:1/0,minHeight:this._isNumber(r.minHeight)?r.minHeight:0,maxHeight:this._isNumber(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,r=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,h=/sw|nw|w/.test(i),u=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),r&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&h&&(t.left=a-e.minWidth),s&&h&&(t.left=a-e.maxWidth),r&&u&&(t.top=l-e.minHeight),n&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseInt(s[e],10)||0,i[e]+=parseInt(n[e],10)||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<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(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,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}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),r=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,a=o?0:i.sizeDiff.width,l={width:i.size.width-a,height:i.size.height-r},h=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(t.extend(l,u&&h?{top:u,left:h}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={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)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,r,a,l=t(this).resizable("instance"),h=l.options,u=l.element,c=h.containment,d=c instanceof t?c.get(0):/parent/.test(c)?u.parent().get(0):c;d&&(l.containerElement=t(d),/document/.test(c)||c===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=l._num(e.css("padding"+s))}),l.containerOffset=e.offset(),l.containerPosition=e.position(),l.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=l.containerOffset,n=l.containerSize.height,o=l.containerSize.width,r=l._hasScroll(d,"left")?d.scrollWidth:o,a=l._hasScroll(d)?d.scrollHeight:n,l.parentData={element:d,left:s.left,top:s.top,width:r,height:a}))},resize:function(e){var i,s,n,o,r=t(this).resizable("instance"),a=r.options,l=r.containerOffset,h=r.position,u=r._aspectRatio||e.shiftKey,c={top:0,left:0},d=r.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(c=l),h.left<(r._helper?l.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-l.left:r.position.left-c.left),u&&(r.size.height=r.size.width/r.aspectRatio,p=!1),r.position.left=a.helper?l.left:0),h.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,p=!1),r.position.top=r._helper?l.top:0),n=r.containerElement.get(0)===r.element.parent().get(0),o=/relative|absolute/.test(r.containerElement.css("position")),n&&o?(r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top):(r.offset.left=r.element.offset().left,r.offset.top=r.element.offset().top),i=Math.abs(r.sizeDiff.width+(r._helper?r.offset.left-c.left:r.offset.left-l.left)),s=Math.abs(r.sizeDiff.height+(r._helper?r.offset.top-c.top:r.offset.top-l.top)),i+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-i,u&&(r.size.height=r.size.width/r.aspectRatio,p=!1)),s+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-s,u&&(r.size.width=r.size.height*r.aspectRatio,p=!1)),p||(r.position.left=r.prevPosition.left,r.position.top=r.prevPosition.top,r.size.width=r.prevSize.width,r.size.height=r.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,r=t(e.helper),a=r.offset(),l=r.outerWidth()-e.sizeDiff.width,h=r.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:a.left-n.left-s.left,width:l,height:h}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:a.left-n.left-s.left,width:l,height:h})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,r=s.originalPosition,a={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-r.top||0,left:s.position.left-r.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(a[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,r=i.originalPosition,a=i.axis,l="number"==typeof s.grid?[s.grid,s.grid]:s.grid,h=l[0]||1,u=l[1]||1,c=Math.round((n.width-o.width)/h)*h,d=Math.round((n.height-o.height)/u)*u,p=o.width+c,f=o.height+d,g=s.maxWidth&&p>s.maxWidth,m=s.maxHeight&&f>s.maxHeight,v=s.minWidth&&s.minWidth>p,b=s.minHeight&&s.minHeight>f;s.grid=l,v&&(p+=h),b&&(f+=u),g&&(p-=h),m&&(f-=u),/^(se|s|e)$/.test(a)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(a)?(i.size.width=p,i.size.height=f,i.position.top=r.top-d):/^(sw)$/.test(a)?(i.size.width=p,i.size.height=f,i.position.left=r.left-c):((0>=f-u||0>=p-h)&&(e=i._getPaddingPlusBorderDimensions(this)),f-u>0?(i.size.height=f,i.position.top=r.top-d):(f=u-e.height,i.size.height=f,i.position.top=r.top+o.height-f),p-h>0?(i.size.width=p,i.position.left=r.left-c):(p=h-e.width,i.size.width=p,i.position.left=r.left+o.width-p))}}),t.ui.resizable,t.widget("ui.dialog",{version:"1.11.4",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(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.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},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_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&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),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),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i,s=this;if(this._isOpen&&this._trigger("beforeClose",e)!==!1){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement,i&&"body"!==i.nodeName.toLowerCase()&&t(i).blur()}catch(n){}this._hide(this.uiDialog,this.options.hide,function(){s._trigger("close",e)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,n);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),s=!0),s&&!i&&this._trigger("focus",e),s},open:function(){var e=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),void this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<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(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),void this.close(e);if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){n.focus()}),e.preventDefault()):(this._delay(function(){s.focus()}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<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(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html("&#160;"),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?void this.uiDialog.removeClass("ui-dialog-buttons"):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(e.element[0],arguments)},o={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,t("<button></button>",s).button(o).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){var r=o.offset.left-i.document.scrollLeft(),a=o.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" top"+(a>=0?"+":"")+a,of:i.window},t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),r="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:r,start:function(s,n){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){var r=i.uiDialog.offset(),a=r.left-i.document.scrollLeft(),l=r.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" top"+(l>=0?"+":"")+l,of:i.window},t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);-1!==i&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,s=!1,n={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(t,e){var i,s,n=this.uiDialog;"dialogClass"===t&&n.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=n.is(":data(ui-draggable)"),i&&!e&&n.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(s=n.is(":data(ui-resizable)"),s&&!e&&n.resizable("destroy"),s&&"string"==typeof e&&n.resizable("option","handles",e),s||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):this.document.unbind("focusin").removeData("ui-dialog-overlays"),this.overlay.remove(),this.overlay=null}}}),t.widget("ui.droppable",{version:"1.11.4",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 e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?void(e=arguments[0]):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;t.length>e;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var s=t.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i));
16
+ },_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.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",e,this.ui(i)))},_out:function(e){var i=t.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",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=t(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(){function t(t,e,i){return t>=e&&e+i>t}return function(e,i,s,n){if(!i.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,r=(e.positionAbs||e.position.absolute).top+e.margins.top,a=o+e.helperProportions.width,l=r+e.helperProportions.height,h=i.offset.left,u=i.offset.top,c=h+i.proportions().width,d=u+i.proportions().height;switch(s){case"fit":return o>=h&&c>=a&&r>=u&&d>=l;case"intersect":return o+e.helperProportions.width/2>h&&c>a-e.helperProportions.width/2&&r+e.helperProportions.height/2>u&&d>l-e.helperProportions.height/2;case"pointer":return t(n.pageY,u,i.proportions().height)&&t(n.pageX,h,i.proportions().width);case"touch":return(r>=u&&d>=r||l>=u&&d>=l||u>r&&l>d)&&(o>=h&&c>=o||a>=h&&c>=a||h>o&&a>c);default:return!1}}}(),t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],r=i?i.type:null,a=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;a.length>n;n++)if(a[n]===o[s].element[0]){o[s].proportions().height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===r&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions({width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,r=t.ui.intersect(e,this,this.options.tolerance,i),a=!r&&this.isover?"isout":r&&!this.isover?"isover":null;a&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===n}),o.length&&(s=t(o[0]).droppable("instance"),s.greedyChild="isover"===a)),s&&"isover"===a&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,i),s&&"isout"===a&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},t.ui.droppable;var b="ui-effects-",y=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var s=c[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=h(),n=s._rgba=[];return i=i.toLowerCase(),f(l,function(t,o){var r,a=o.re.exec(i),l=a&&o.parse(a),h=o.space||"rgba";return l?(r=s[h](l),s[u[h].cache]=r[u[h].cache],n=s._rgba=r._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}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(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},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"}}}},c={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=h.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(u,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),h.fn=t.extend(h.prototype,{parse:function(n,r,a,l){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(r),r=e);var c=this,d=t.type(n),p=this._rgba=[];return r!==e&&(n=[n,r,a,l],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(u.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof h?f(u,function(t,e){n[e.cache]&&(c[e.cache]=n[e.cache].slice())}):f(u,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!c[o]&&s.to){if("alpha"===t||null==n[t])return;c[o]=s.to(c._rgba)}c[o][e.idx]=i(n[t],e,!0)}),c[o]&&0>t.inArray(null,c[o].slice(0,3))&&(c[o][3]=1,s.from&&(c._rgba=s.from(c[o])))}),this):e},is:function(t){var i=h(t),s=!0,n=this;return f(u,function(t,o){var r,a=i[o.cache];return a&&(r=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=a[i.idx]?s=a[i.idx]===r[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(u,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=h(t),n=s._space(),o=u[n],r=0===this.alpha()?h("transparent"):this,a=r[o.cache]||o.to(r._rgba),l=a.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,r=a[o],h=s[o],u=c[n.type]||{};null!==h&&(null===r?l[o]=h:(u.mod&&(h-r>u.mod/2?r+=u.mod:r-h>u.mod/2&&(r-=u.mod)),l[o]=i((h-r)*e+r,n)))}),this[n](l)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=h(e)._rgba;return h(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,u.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,r=t[3],a=Math.max(s,n,o),l=Math.min(s,n,o),h=a-l,u=a+l,c=.5*u;return e=l===a?0:s===a?60*(n-o)/h+360:n===a?60*(o-s)/h+120:60*(s-n)/h+240,i=0===h?0:.5>=c?h/u:h/(2-u),[Math.round(e)%360,i,c,null==r?1:r]},u.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],r=.5>=s?s*(1+i):s+i-s*i,a=2*s-r;return[Math.round(255*n(a,r,e+1/3)),Math.round(255*n(a,r,e)),Math.round(255*n(a,r,e-1/3)),o]},f(u,function(s,n){var o=n.props,r=n.cache,l=n.to,u=n.from;h.fn[s]=function(s){if(l&&!this[r]&&(this[r]=l(this._rgba)),s===e)return this[r].slice();var n,a=t.type(s),c="array"===a||"object"===a?s:arguments,d=this[r].slice();return f(o,function(t,e){var s=c["object"===a?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),u?(n=h(u(d)),n[r]=d,n):h(d)},f(o,function(e,i){h.fn[e]||(h.fn[e]=function(n){var o,r=t.type(n),l="alpha"===e?this._hsla?"hsla":"rgba":s,h=this[l](),u=h[i.idx];return"undefined"===r?u:("function"===r&&(n=n.call(this,u),r=t.type(n)),null==n&&i.empty?this:("string"===r&&(o=a.exec(n),o&&(n=u+parseFloat(o[2])*("+"===o[1]?1:-1))),h[i.idx]=n,this[l](h)))})})}),h.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,r,a="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=h(o||n),!d.rgba&&1!==n._rgba[3]){for(r="backgroundColor"===i?e.parentNode:e;(""===a||"transparent"===a)&&r&&r.style;)try{a=t.css(r,"backgroundColor"),r=r.parentNode}catch(l){}n=n.blend(a&&"transparent"!==a?a:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(l){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=h(e.elem,i),e.end=h(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},h.hook(r),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.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"}}(y),function(){function e(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function i(e,i){var s,o,r={};for(s in i)o=i[s],e[s]!==o&&(n[s]||(t.fx.step[s]||!isNaN(parseFloat(o)))&&(r[s]=o));return r}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(y.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(n,o,r,a){var l=t.speed(o,r,a);return this.queue(function(){var o,r=t(this),a=r.attr("class")||"",h=l.children?r.find("*").addBack():r;h=h.map(function(){var i=t(this);return{el:i,start:e(this)}}),o=function(){t.each(s,function(t,e){n[e]&&r[e+"Class"](n[e])})},o(),h=h.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),r.attr("class",a),h=h.map(function(){var e=this,i=t.Deferred(),s=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,h.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(r[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,s,n,o,r){return"boolean"==typeof s||void 0===s?n?t.effects.animateClass.call(this,s?{add:i}:{remove:i},n,o,r):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},s,n,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function e(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function i(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.11.4",save:function(t,e){for(var i=0;e.length>i;i++)null!==e[i]&&t.data(b+e[i],t[0].style[e[i]])},restore:function(t,e){var i,s;for(s=0;e.length>s;s++)null!==e[s]&&(i=t.data(b+e[s]),void 0===i&&(i=""),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(r){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function i(e){function i(){t.isFunction(o)&&o.call(n[0]),t.isFunction(e)&&e()}var n=t(this),o=s.complete,a=s.mode;(n.is(":hidden")?"hide"===a:"show"===a)?(n[a](),i()):r.call(n[0],s,i)}var s=e.apply(this,arguments),n=s.mode,o=s.queue,r=t.effects.effect[s.effect];return t.fx.off||!r?n?this[n](s.duration,s.complete):this.each(function(){s.complete&&s.complete.call(this)}):o===!1?this.each(i):this.queue(o||"fx",i)},show:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="show",this.effect.call(this,n)}}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||"boolean"==typeof s)return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}(),t.effects,t.effects.effect.blind=function(e,i){var s,n,o,r=t(this),a=/up|down|vertical/,l=/up|left|vertical|horizontal/,h=["position","top","bottom","left","right","height","width"],u=t.effects.setMode(r,e.mode||"hide"),c=e.direction||"up",d=a.test(c),p=d?"height":"width",f=d?"top":"left",g=l.test(c),m={},v="show"===u;r.parent().is(".ui-effects-wrapper")?t.effects.save(r.parent(),h):t.effects.save(r,h),r.show(),s=t.effects.createWrapper(r).css({overflow:"hidden"}),n=s[p](),o=parseFloat(s.css(f))||0,m[p]=v?n:0,g||(r.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),m[f]=v?o:n+o),v&&(s.css(p,0),g||s.css(f,o+n)),s.animate(m,{duration:e.duration,easing:e.easing,queue:!1,complete:function(){"hide"===u&&r.hide(),t.effects.restore(r,h),t.effects.removeWrapper(r),i()}})},t.effects.effect.bounce=function(e,i){var s,n,o,r=t(this),a=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(r,e.mode||"effect"),h="hide"===l,u="show"===l,c=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(u||h?1:0),g=e.duration/f,m=e.easing,v="up"===c||"down"===c?"top":"left",b="up"===c||"left"===c,y=r.queue(),_=y.length;for((u||h)&&a.push("opacity"),t.effects.save(r,a),r.show(),t.effects.createWrapper(r),d||(d=r["top"===v?"outerHeight":"outerWidth"]()/3),u&&(o={opacity:1},o[v]=0,r.css("opacity",0).css(v,b?2*-d:2*d).animate(o,g,m)),h&&(d/=Math.pow(2,p-1)),o={},o[v]=0,s=0;p>s;s++)n={},n[v]=(b?"-=":"+=")+d,r.animate(n,g,m).animate(o,g,m),d=h?2*d:d/2;h&&(n={opacity:0},n[v]=(b?"-=":"+=")+d,r.animate(n,g,m)),r.queue(function(){h&&r.hide(),t.effects.restore(r,a),t.effects.removeWrapper(r),i()}),_>1&&y.splice.apply(y,[1,0].concat(y.splice(_,f+1))),r.dequeue()},t.effects.effect.clip=function(e,i){var s,n,o,r=t(this),a=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(r,e.mode||"hide"),h="show"===l,u=e.direction||"vertical",c="vertical"===u,d=c?"height":"width",p=c?"top":"left",f={};t.effects.save(r,a),r.show(),s=t.effects.createWrapper(r).css({overflow:"hidden"}),n="IMG"===r[0].tagName?s:r,o=n[d](),h&&(n.css(d,0),n.css(p,o/2)),f[d]=h?o:0,f[p]=h?0:o/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){h||r.hide(),t.effects.restore(r,a),t.effects.removeWrapper(r),i()}})},t.effects.effect.drop=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","opacity","height","width"],r=t.effects.setMode(n,e.mode||"hide"),a="show"===r,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",u="up"===l||"left"===l?"pos":"neg",c={opacity:a?1:0};t.effects.save(n,o),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,a&&n.css("opacity",0).css(h,"pos"===u?-s:s),c[h]=(a?"pos"===u?"+=":"-=":"pos"===u?"-=":"+=")+s,n.animate(c,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===r&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})},t.effects.effect.explode=function(e,i){function s(){y.push(this),y.length===c*d&&n()}function n(){p.css({visibility:"visible"}),t(y).remove(),g||p.hide(),i()}var o,r,a,l,h,u,c=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=c,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),b=Math.ceil(p.outerHeight()/c),y=[];for(o=0;c>o;o++)for(l=m.top+o*b,u=o-(c-1)/2,r=0;d>r;r++)a=m.left+r*v,h=r-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-r*v,top:-o*b}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:b,left:a+(g?h*v:0),top:l+(g?u*b:0),opacity:g?0:1}).animate({left:a+(g?0:h*v),top:l+(g?0:u*b),opacity:g?1:0},e.duration||500,e.easing,s)},t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})},t.effects.effect.fold=function(e,i){var s,n,o=t(this),r=["position","top","bottom","left","right","height","width"],a=t.effects.setMode(o,e.mode||"hide"),l="show"===a,h="hide"===a,u=e.size||15,c=/([0-9]+)%/.exec(u),d=!!e.horizFirst,p=l!==d,f=p?["width","height"]:["height","width"],g=e.duration/2,m={},v={};t.effects.save(o,r),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],c&&(u=parseInt(c[1],10)/100*n[h?0:1]),l&&s.css(d?{height:0,width:u}:{height:u,width:0}),m[f[0]]=l?n[0]:u,v[f[1]]=l?n[1]:0,s.animate(m,g,e.easing).animate(v,g,e.easing,function(){h&&o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()})},t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],o=t.effects.setMode(s,e.mode||"show"),r={backgroundColor:s.css("backgroundColor")};"hide"===o&&(r.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&s.hide(),t.effects.restore(s,n),i()}})},t.effects.effect.size=function(e,i){var s,n,o,r=t(this),a=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],u=["fontSize"],c=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(r,e.mode||"effect"),f=e.restore||"effect"!==p,g=e.scale||"both",m=e.origin||["middle","center"],v=r.css("position"),b=f?a:l,y={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&r.show(),s={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()},"toggle"===e.mode&&"show"===p?(r.from=e.to||y,r.to=e.from||s):(r.from=e.from||("show"===p?y:s),r.to=e.to||("hide"===p?y:s)),o={from:{y:r.from.height/s.height,x:r.from.width/s.width},to:{y:r.to.height/s.height,x:r.to.width/s.width}},("box"===g||"both"===g)&&(o.from.y!==o.to.y&&(b=b.concat(c),r.from=t.effects.setTransition(r,c,o.from.y,r.from),r.to=t.effects.setTransition(r,c,o.to.y,r.to)),o.from.x!==o.to.x&&(b=b.concat(d),r.from=t.effects.setTransition(r,d,o.from.x,r.from),r.to=t.effects.setTransition(r,d,o.to.x,r.to))),("content"===g||"both"===g)&&o.from.y!==o.to.y&&(b=b.concat(u).concat(h),r.from=t.effects.setTransition(r,u,o.from.y,r.from),r.to=t.effects.setTransition(r,u,o.to.y,r.to)),t.effects.save(r,b),r.show(),t.effects.createWrapper(r),r.css("overflow","hidden").css(r.from),m&&(n=t.effects.getBaseline(m,s),r.from.top=(s.outerHeight-r.outerHeight())*n.y,r.from.left=(s.outerWidth-r.outerWidth())*n.x,r.to.top=(s.outerHeight-r.to.outerHeight)*n.y,r.to.left=(s.outerWidth-r.to.outerWidth)*n.x),r.css(r.from),("content"===g||"both"===g)&&(c=c.concat(["marginTop","marginBottom"]).concat(u),d=d.concat(["marginLeft","marginRight"]),h=a.concat(c).concat(d),r.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,h),i.from={height:s.height*o.from.y,width:s.width*o.from.x,outerHeight:s.outerHeight*o.from.y,outerWidth:s.outerWidth*o.from.x},i.to={height:s.height*o.to.y,width:s.width*o.to.x,outerHeight:s.height*o.to.y,outerWidth:s.width*o.to.x},o.from.y!==o.to.y&&(i.from=t.effects.setTransition(i,c,o.from.y,i.from),i.to=t.effects.setTransition(i,c,o.to.y,i.to)),o.from.x!==o.to.x&&(i.from=t.effects.setTransition(i,d,o.from.x,i.from),i.to=t.effects.setTransition(i,d,o.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,h)})})),r.animate(r.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===r.to.opacity&&r.css("opacity",r.from.opacity),"hide"===p&&r.hide(),t.effects.restore(r,b),f||("static"===v?r.css({position:"relative",top:r.to.top,left:r.to.left}):t.each(["top","left"],function(t,e){r.css(e,function(e,i){var s=parseInt(i,10),n=t?r.to.left:r.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(r),i()}})},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),o=t.effects.setMode(s,e.mode||"effect"),r=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===o?0:100),a=e.direction||"both",l=e.origin,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},u={y:"horizontal"!==a?r/100:1,x:"vertical"!==a?r/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==o&&(n.origin=l||["middle","center"],n.restore=!0),n.from=e.from||("show"===o?{height:0,width:0,outerHeight:0,outerWidth:0}:h),n.to={height:h.height*u.y,width:h.width*u.x,outerHeight:h.outerHeight*u.y,outerWidth:h.outerWidth*u.x},n.fade&&("show"===o&&(n.from.opacity=0,n.to.opacity=1),"hide"===o&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),o="hide"===n,r=parseInt(e.percent,10)||150,a=r/100,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,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}}),s.effect(e)},t.effects.effect.pulsate=function(e,i){var s,n=t(this),o=t.effects.setMode(n,e.mode||"show"),r="show"===o,a="hide"===o,l=r||"hide"===o,h=2*(e.times||5)+(l?1:0),u=e.duration/h,c=0,d=n.queue(),p=d.length;for((r||!n.is(":visible"))&&(n.css("opacity",0).show(),c=1),s=1;h>s;s++)n.animate({opacity:c},u,e.easing),c=1-c;n.animate({opacity:c},u,e.easing),n.queue(function(){a&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,h+1))),n.dequeue()},t.effects.effect.shake=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(n,e.mode||"effect"),a=e.direction||"left",l=e.distance||20,h=e.times||3,u=2*h+1,c=Math.round(e.duration/u),d="up"===a||"down"===a?"top":"left",p="up"===a||"left"===a,f={},g={},m={},v=n.queue(),b=v.length;for(t.effects.save(n,o),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+l,g[d]=(p?"+=":"-=")+2*l,m[d]=(p?"-=":"+=")+2*l,n.animate(f,c,e.easing),s=1;h>s;s++)n.animate(g,c,e.easing).animate(m,c,e.easing);n.animate(g,c,e.easing).animate(f,c/2,e.easing).queue(function(){"hide"===r&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}),b>1&&v.splice.apply(v,[1,0].concat(v.splice(b,u+1))),n.dequeue()},t.effects.effect.slide=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","width","height"],r=t.effects.setMode(n,e.mode||"show"),a="show"===r,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",u="up"===l||"left"===l,c={};t.effects.save(n,o),n.show(),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),a&&n.css(h,u?isNaN(s)?"-"+s:-s:s),c[h]=(a?u?"+=":"-=":u?"-=":"+=")+s,n.animate(c,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===r&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})},t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),r=t("body"),a=o?r.scrollTop():0,l=o?r.scrollLeft():0,h=n.offset(),u={top:h.top-a,left:h.left-l,height:n.innerHeight(),width:n.innerWidth()},c=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:c.top-a,left:c.left-l,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(u,e.duration,e.easing,function(){d.remove(),i()})},t.widget("ui.progressbar",{version:"1.11.4",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=t("<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(t){return void 0===t?this.options.value:(this.options.value=this._constrainedValue(t),void this._refreshValue())},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===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=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),t.widget("ui.selectable",t.ui.mouse,{version:"1.11.4",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 e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),
17
+ this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],r=this.opos[1],a=e.pageX,l=e.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=t.data(this,"selectable-item"),h=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?h=!(i.left>a||o>i.right||i.top>l||r>i.bottom):"fit"===n.tolerance&&(h=i.left>o&&a>i.right&&i.top>r&&l>i.bottom),h?(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,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.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),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.selectmenu",{version:"1.11.4",defaultElement:"<select>",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var t=this.element.uniqueId().attr("id");this.ids={element:t,button:t+"-button",menu:t+"-menu"},this._drawButton(),this._drawMenu(),this.options.disabled&&this.disable()},_drawButton:function(){var e=this;this.label=t("label[for='"+this.ids.element+"']").attr("for",this.ids.button),this._on(this.label,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{"class":"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element),t("<span>",{"class":"ui-icon "+this.options.icons.button}).prependTo(this.button),this.buttonText=t("<span>",{"class":"ui-selectmenu-text"}).appendTo(this.button),this._setText(this.buttonText,this.element.find("option:selected").text()),this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){e.menuItems||e._refreshMenu()}),this._hoverable(this.button),this._focusable(this.button)},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>",{"class":"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo()),this.menuInstance=this.menu.menu({role:"listbox",select:function(t,i){t.preventDefault(),e._setSelection(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var s=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&s.index!==e.focusIndex&&(e._trigger("focus",t,{item:s}),e.isOpen||e._select(s,t)),e.focusIndex=s.index,e.button.attr("aria-activedescendant",e.menuItems.eq(s.index).attr("id"))}}).menu("instance"),this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this._setText(this.buttonText,this._getSelectedItem().text()),this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var t,e=this.element.find("option");e.length&&(this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(e,i){var s=this,n="";t.each(i,function(i,o){o.optgroup!==n&&(t("<li>",{"class":"ui-selectmenu-optgroup ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:o.optgroup}).appendTo(e),n=o.optgroup),s._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var s=t("<li>");return i.disabled&&s.addClass("ui-state-disabled"),this._setText(s,i.label),s.appendTo(e)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,s,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex):(i=this.menuItems.eq(this.element[0].selectedIndex),n+=":not(.ui-state-disabled)"),s="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](n).eq(-1):i[t+"All"](n).eq(0),s.length&&this.menuInstance.focus(e,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex);e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this._setText(this.buttonText,t.label),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){"icons"===t&&this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(e.button),this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"disabled"===t&&(this.menuInstance.option("disabled",e),this.button.toggleClass("ui-state-disabled",e).attr("aria-disabled",e),this.element.prop("disabled",e),e?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)),"width"===t&&this._resizeButton()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.toggleClass("ui-corner-top",this.isOpen).toggleClass("ui-corner-all",!this.isOpen).attr("aria-expanded",this.isOpen),this.menuWrap.toggleClass("ui-selectmenu-open",this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;t||(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop("disabled")}},_parseOptions:function(e){var i=[];e.each(function(e,s){var n=t(s),o=n.parent("optgroup");i.push({element:n,index:e,value:n.val(),label:n.text(),optgroup:o.attr("label")||"",disabled:o.prop("disabled")||n.prop("disabled")})}),this.items=i},_destroy:function(){this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.label.attr("for",this.ids.element)}}),t.widget("ui.slider",t.ui.mouse,{version:"1.11.4",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},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),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 e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",r=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)r.push(o);this.handles=n.add(t(r.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.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=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_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(e){var i,s,n,o,r,a,l,h,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastChangedValue||u.values(e)===c.min))&&(n=i,o=t(this),r=e)}),a=this._start(e,r),a===!1?!1:(this._mouseSliding=!0,this._handleIndex=r,o.addClass("ui-state-active").focus(),l=o.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-o.width()/2,top:e.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(e,r,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,o;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,o=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),o!==!1&&this.values(e,i))):i!==this.value()&&(o=this._trigger("slide",t,{handle:this.handles[e],value:i}),o!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&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)),t.isArray(this.options.values)&&(n=this.options.values.length),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!i),this._super(e,i),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step,s=Math.floor(+(t-e).toFixed(this._precision())/i)*i;t=s+e,this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var e,i,s,n,o,r=this.options.range,a=this.options,l=this,h=this._animateOff?!1:a.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())),u["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](u,a.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},a.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},a.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](u,a.animate),"min"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},a.animate),"max"===r&&"horizontal"===this.orientation&&this.range[h?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:a.animate}),"min"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},a.animate),"max"===r&&"vertical"===this.orientation&&this.range[h?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:a.animate}))},_handleEvents:{keydown:function(e){var i,s,n,o,r=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(e.target).addClass("ui-state-active"),i=this._start(e,r),i===!1))return}switch(o=this.options.step,s=n=this.options.values&&this.options.values.length?this.values(r):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-o)}this._slide(e,r,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.11.4",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},_isOverAxis:function(t,e,i){return t>=e&&e+i>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),t.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s&&(!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n))?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1)},_mouseStart:function(e,i,s){var n,o,r=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),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},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.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(e),this.originalPageX=e.pageX,this.originalPageY=e.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=t("<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]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,r=this.options,a=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<r.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+r.scrollSpeed:e.pageY-this.overflowOffset.top<r.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-r.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<r.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+r.scrollSpeed:e.pageX-this.overflowOffset.left<r.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-r.scrollSpeed)):(e.pageY-this.document.scrollTop()<r.scrollSensitivity?a=this.document.scrollTop(this.document.scrollTop()-r.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<r.scrollSensitivity&&(a=this.document.scrollTop(this.document.scrollTop()+r.scrollSpeed)),e.pageX-this.document.scrollLeft()<r.scrollSensitivity?a=this.document.scrollLeft(this.document.scrollLeft()-r.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<r.scrollSensitivity&&(a=this.document.scrollLeft(this.document.scrollLeft()+r.scrollSpeed))),a!==!1&&t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),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(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,r={};o&&"x"!==o||(r.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(r.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(r,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,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 e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].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(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,r=o+t.width,a=t.top,l=a+t.height,h=this.offset.click.top,u=this.offset.click.left,c="x"===this.options.axis||s+h>a&&l>s+h,d="y"===this.options.axis||e+u>o&&r>e+u,p=c&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&r>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>a&&l>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var e="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),i="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),s=e&&i,n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return s?this.floating?o&&"right"===o||"down"===n?2:1:n&&("down"===n?2:1):!1},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){a.push(this)}var s,n,o,r,a=[],l=[],h=this._connectWith();if(h&&e)for(s=h.length-1;s>=0;s--)for(o=t(h[s],this.document[0]),
18
+ n=o.length-1;n>=0;n--)r=t.data(o[n],this.widgetFullName),r&&r!==this&&!r.options.disabled&&l.push([t.isFunction(r.options.items)?r.options.items.call(r.element):t(r.options.items,r.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),r]);for(l.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=l.length-1;s>=0;s--)l[s][0].each(i);return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,r,a,l,h,u=this.items,c=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i],this.document[0]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(c.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=c.length-1;i>=0;i--)for(r=c[i][1],a=c[i][0],s=0,h=a.length;h>s;s++)l=t(a[s]),l.data(this.widgetName+"-item",r),u.push({item:l,instance:r,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.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(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(n)):"tr"===s?e._createTrPlaceholder(e.currentItem,n):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each(function(){t("<td>&#160;</td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,s,n,o,r,a,l,h,u,c,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,o=null,u=d.floating||this._isFloating(this.currentItem),r=u?"left":"top",a=u?"width":"height",c=u?"clientX":"clientY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(l=this.items[s].item.offset()[r],h=!1,e[c]-l>this.items[s][a]/2&&(h=!0),n>Math.abs(e[c]-l)&&(n=Math.abs(e[c]-l),o=this.items[s],this.direction=h?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return void(this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[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")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.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 e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,r=e.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.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]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(r=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((r-this.originalPageY)/n.grid[1])*n.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-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{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(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].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,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),t.widget("ui.spinner",{version:"1.11.4",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 e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",t)))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=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=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!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(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,void this.element.val(this._format(i))}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(this.widget().toggleClass("ui-state-disabled",!!e),this.element.prop("disabled",!!e),this.buttons.button(e?"disable":"enable"))},_setOptions:l(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null===t?!1:t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),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:l(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:l(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:l(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:l(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?void l(this._value).call(this,t):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),t.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var i,s;e=e.cloneNode(!1),i=e.href.replace(t,""),s=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return e.hash.length>1&&i===s}}(),_create:function(){var e=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),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===e&&(s&&this.tabs.each(function(i,n){return t(n).attr("aria-controls")===s?(e=i,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=this.tabs.length?0:!1)),e!==!1&&(e=this.tabs.index(this.tabs.eq(e)),-1===e&&(e=i?!1:0)),!i&&e===!1&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(this.document[0].activeElement).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:n=!1,s--;break;case t.ui.keyCode.END:s=this.anchors.length-1;break;case t.ui.keyCode.HOME:s=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),void this._activate(s);case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),void this._activate(s===this.options.active?!1:s);default:return}e.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,e){return"active"===t?void this._activate(e):"disabled"===t?void this._setupDisabled(e):(this._super(t,e),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",e),e||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(e),void("heightStyle"===t&&this._setupHeightStyle(e)))},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),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","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),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 t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,s){var n,o,r,a=t(s).uniqueId().attr("id"),l=t(s).closest("li"),h=l.attr("aria-controls");e._isLocal(s)?(n=s.hash,r=n.substring(1),o=e.element.find(e._sanitizeSelector(n))):(r=l.attr("aria-controls")||t({}).uniqueId()[0].id,n="#"+r,o=e.element.find(n),o.length||(o=e._createPanel(r),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),h&&l.data("ui-tabs-aria-controls",h),l.attr({"aria-controls":r,"aria-labelledby":a}),o.attr("aria-labelledby",a)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),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(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),r=o[0]===s[0],a=r&&i.collapsible,l=a?t():this._getPanelForTab(o),h=s.length?this._getPanelForTab(s):t(),u={oldTab:s,oldPanel:h,newTab:a?t():o,newPanel:l};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||r&&!i.collapsible||this._trigger("beforeActivate",e,u)===!1||(i.active=a?!1:this.tabs.index(o),this.active=r?t():o,this.xhr&&this.xhr.abort(),h.length||l.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(o),e),this._toggle(e,u))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),r.length&&o.options.show?o._show(r,o.options.show,s):(r.show(),s())}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"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),a.hide(),n()),a.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),r.length&&a.length?i.oldTab.attr("tabIndex",-1):r.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),r.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_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.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(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 e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;i!==!1&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setupDisabled(i))},disable:function(e){var i=this.options.disabled;if(i!==!0){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setupDisabled(i)}},load:function(e,i){e=this._getIndex(e);var s=this,n=this.tabs.eq(e),o=n.find(".ui-tabs-anchor"),r=this._getPanelForTab(n),a={tab:n,panel:r},l=function(t,e){"abort"===e&&s.panels.stop(!1,!0),n.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===s.xhr&&delete s.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,a)),this.xhr&&"canceled"!==this.xhr.statusText&&(n.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.done(function(t,e,n){
19
+ setTimeout(function(){r.html(t),s._trigger("load",i,a),l(n,e)},1)}).fail(function(t,e){setTimeout(function(){l(t,e)},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),t.widget("ui.tooltip",{version:"1.11.4",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).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},_addDescribedBy:function(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),void(this.options[e]=i)):(this._super(e,i),void("content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e.element)})))},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s.element[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(e,s),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){n._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}),void(i&&this._open(e,t,i)))},_open:function(e,i,s){function n(t){h.of=t,r.is(":hidden")||r.position(h)}var o,r,a,l,h=t.extend({},this.options.position);if(s){if(o=this._find(i))return void o.tooltip.find(".ui-tooltip-content").html(s);i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),o=this._tooltip(i),r=o.tooltip,this._addDescribedBy(i,r.attr("id")),r.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),s.clone?(l=s.clone(),l.removeAttr("id").find("[id]").removeAttr("id")):l=s,t("<div>").html(l).appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:n}),n(e)):r.position(t.extend({of:i},this.options.position)),r.hide(),this._show(r,this.options.show),this.options.show&&this.options.show.delay&&(a=this.delayedShow=setInterval(function(){r.is(":visible")&&(n(h.of),clearInterval(a))},t.fx.interval)),this._trigger("open",e,{tooltip:r})}},_registerCloseHandlers:function(e,i){var s={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var s=t.Event(e);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(s.mouseleave="close"),e&&"focusin"!==e.type||(s.focusout="close"),this._on(!0,i,s)},close:function(e){var i,s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);return o?(i=o.tooltip,void(o.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1)))):void n.removeData("ui-tooltip-open")},_tooltip:function(e){var i=t("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),s=i.uniqueId().attr("id");return t("<div>").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[s]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur"),o=s.element;n.target=n.currentTarget=o[0],e.close(n,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}})}),!function(t){if("function"==typeof define&&define.amd)define(t);else if("object"==typeof exports)module.exports=t();else{var e=window.Cookies,i=window.Cookies=t();i.noConflict=function(){return window.Cookies=e,i}}}(function(){function t(){for(var t=0,e={};t<arguments.length;t++){var i=arguments[t];for(var s in i)e[s]=i[s]}return e}function e(i){function s(e,n,o){var r;if("undefined"!=typeof document){if(arguments.length>1){if(o=t({path:"/"},s.defaults,o),"number"==typeof o.expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*o.expires),o.expires=a}try{r=JSON.stringify(n),/^[\{\[]/.test(r)&&(n=r)}catch(l){}return n=i.write?i.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)),e=e.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),e=e.replace(/[\(\)]/g,escape),document.cookie=[e,"=",n,o.expires&&"; expires="+o.expires.toUTCString(),o.path&&"; path="+o.path,o.domain&&"; domain="+o.domain,o.secure?"; secure":""].join("")}e||(r={});for(var h=document.cookie?document.cookie.split("; "):[],u=/(%[0-9A-Z]{2})+/g,c=0;c<h.length;c++){var d=h[c].split("="),p=d[0].replace(u,decodeURIComponent),f=d.slice(1).join("=");'"'===f.charAt(0)&&(f=f.slice(1,-1));try{if(f=i.read?i.read(f,p):i(f,p)||f.replace(u,decodeURIComponent),this.json)try{f=JSON.parse(f)}catch(l){}if(e===p){r=f;break}e||(r[p]=f)}catch(l){}}return r}}return s.set=s,s.get=function(t){return s(t)},s.getJSON=function(){return s.apply({json:!0},[].slice.call(arguments))},s.defaults={},s.remove=function(e,i){s(e,"",t(i,{expires:-1}))},s.withConverter=e,s}return e(function(){})});var z=jQuery.noConflict(!0);z(document).ready(function(){function t(){if(b!==!0){var t="Global Address Verification is not enabled.";return z("#errorresults_top").append(t),z("#errorresults_top").css("display","block"),void z("#errorresults_top").fadeOut(6800)}var e,i,s="",n=z("#billing\\:city").val(),o=z("#billing\\:postcode").val(),r=z("#billing\\:street1").val(),l=z("#billing\\:street2").val(),h=z("#showCountryResults").find(":selected").val(),u=z("#showCountryResultsSingleRow").find(":selected").val();return console.log("c1: "+h+" -> c2: "+u),"undefined"==typeof h||"string"!=typeof h.valueOf()||2!=h.length&&3!=h.length?"undefined"==typeof u||"string"!=typeof u.valueOf()||2!=u.length&&3!=u.length||(e=u):e=h,n=z.trim(n),o=z.trim(o),r=z.trim(r),l=z.trim(l),e=z.trim(e),i=z.trim(i),console.log("doGawsWebCall [Live Input]: Locality:"+n+" - Street: "+r+" - Street2: "+l+" - PostalCode: "+o+" - Country: "+e),z.ajax({type:"GET",url:k,dataType:"jsonp",async:!0,cache:!1,data:{id:a,t:"Melissa Data Magento Plugin - Address Check (SE)",format:"json",ctry:e,a1:r,a2:l,postal:o,loc:n},success:function(t){var e=JSON.stringify(t),i=z.parseJSON(e);console.log("Data: "+e);var n=JSON.stringify(i.Records),o=z.parseJSON(n),r=o[0].Results,a=(r.split(","),o[0].FormattedAddress),h=(o[0].Latitude,o[0].Longitude,o[0].Locality),u=o[0].PostalCode,c=o[0].AddressLine1,d=o[0].AddressLine2,p=(o[0].AddressLine3,o[0].AddressLine4,o[0].AddressLine5,o[0].Thoroughfare,o[0].CountryName,o[0].AdministrativeArea,o[0].SubNationalArea,o[0].CountryISO3166_1_Alpha3,o[0].CountryISO3166_1_Alpha2);o[0].PremisesNumber,o[0].SubPremisesNumber;console.log("doGawsWebCall [live] ResultCodes:"+o[0].Results+" - FormAddr: "+a),null!=r.match(/(AV23|AV24|AV25)/gi)?(s='Address: <span style="text-decoration: underline;">'+a+"</span> is a good address.",html_result_gaws='<span style="color: green; font-weight:bold;">'+s+"</span>",z("#billing\\:street1").val(c),z("#billing\\:postcode").val(u),z("#billing\\:city").val(h),null!=p.match(/(GB|UK|US|AU|NL)/gi)&&l.length>=2&&z("#billing\\:street2").val(d)):null!=r.match(/(AV1|AE05|AV21|AV22)/gi)?(s='Address: <span style="text-decoration: underline;">'+a+"</span> may or may not be a deliverable. <br> Please verify the address input.",html_result_gaws='<span style="color: orange; font-weight:bold;">'+s+"</span>"):null!=r.match(/(AE..)/gi)&&null==r.match(/(AE05)/gi)&&(s='Address: <span style="text-decoration: underline;">'+a+"</span> is a bad address. <br> Please double check the address input.",html_result_gaws='<span style="color: red; font-weight:bold;">'+s+"</span>"),z("#gawsresults_top").html(""),z("#gawsresults_top").html(html_result_gaws),z("#gawsresults_top").css("display","block")}}),0}function e(){if(y!==!0){var t="Global Email Validation is not enabled.";return z("#errorresults_top").append(t),z("#errorresults_top").css("display","block"),void z("#errorresults_top").fadeOut(6800)}var e="",i=z("#billing\\:email").val();i=z.trim(i);i.includes("@"),i.includes(".");return z.ajax({type:"GET",url:D,dataType:"jsonp",async:!0,cache:!1,data:{id:l,t:"Melissa Data Magento Plugin - Email Check (SE)",opt:"VERIFYMAILBOX:Express,DomainCorrection:On",format:"json",email:i},success:function(t){var i=JSON.stringify(t),s=z.parseJSON(i),n=JSON.stringify(s.Records),o=z.parseJSON(n),r=o[0].Results,a=r.split(","),l=o[0].EmailAddress,h=(o[0].MailboxName,o[0].DomainName,o[0].TopLevelDomain,o[0].TopLevelDomainName,""),u=0;z.each(a,function(t,e){e=e.trim(),null!=e.match(/ES01/gi)&&u++,null!=e.match(/ES20/gi)&&u++});var c=0;return null!=r.match(/(EE01|EE02|EE03|EE04|ES02|ES03|ES04|ES05|ES06|ES09)/gi)?(e='eMail: <span style="text-decoration: underline;">'+l+"</span> is not a deliverable Email address.",h=' <span style="color: red; font-weight:bold;">'+e+"</span>",c=0):null!=r.match(/(ES07|ES08)/gi)||2==u?(e='eMail: <span style="text-decoration: underline;">'+l+"</span> may or may not be deliverable. <br> The ISP is an accept-all or does not allow real-time verification.",h=' <span style="color: orange; font-weight:bold;">'+e+"</span>",c=0):null!=r.match(/(ES01|ES20|ES21|ES22)/gi)&&2!=u&&(e='eMail: <span style="text-decoration: underline;">'+l+"</span> is found to be deliverable.",h=' <span style="color: green; font-weight:bold;">'+e+"</span>",c=1),z("#gawsresults_top").append(h),z("#gawsresults_top").css("display","block"),c}}),0}var s=25,n=225,o=450,r=Cookies.get("MelissaDataMagento_GEE_Token"),a=Cookies.get("MelissaDataMagento_GAWS_Token"),l=Cookies.get("MelissaDataMagento_EMAIL_Token"),h=Cookies.get("MelissaDataMagento_EMAIL_ENABLED"),u=Cookies.get("MelissaDataMagento_GAWS_ENABLED"),c=Cookies.get("MelissaDataMagento_GEE_ENABLED"),d=Cookies.get("MelissaDataMagento_GEE_SINGLEROWCOUNTRIES"),p=Cookies.get("MelissaDataMagento_GEE_SINGLEROW_ENABLED"),f=Cookies.get("MelissaDataMagento_GEE_MULTIROW_ENABLED"),g=p.includes("1"),m=f.includes("1"),v=c.includes("1"),b=u.includes("1"),y=h.includes("1"),_=(d.split(","),"https://expressentry.melissadata.net/jsonp/GlobalExpressPostalCode"),w="https://expressentry.melissadata.net/jsonp/GlobalExpressCountry",_="https://expressentry.melissadata.net/jsonp/GlobalExpressPostalCode",x="https://expressentry.melissadata.net/jsonp/GlobalExpressAddress",C="https://expressentry.melissadata.net/jsonp/GlobalExpressFreeForm",k="https://address.melissadata.net/V3/WEB/GlobalAddress/doGlobalAddress",D="https://globalemail.melissadata.net/v3/WEB/GlobalEmail/doGlobalEmail",S='<div id="London" class="tabcontent"><br /><p><table id="autocomplete_melissadata_singlerow" border="0px;"><tr style="font-weight: bold; font-size: 140%;"><b id="singleShow">Melissa Data Single Row Autocompletion</b></tr><tr width="" style="clear:both;"><td><br /></td></tr><tr style="clear:both;"><td width="'+n+'px"><input type="text" value="" placeholder="1. Type Country" title="Start typing a country name to get Suggestions" id="CountrySuggestionsSingleRow" style="width: '+n+'px;" /><span id="showCountryResultsSingleRow" style="height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+o+'px"><input type="text" value="" placeholder="2. Type Address" title="Start typing a Postal code & Address to get Suggestions from within that Country" id="AddressSuggestionsSingleRow" style="width: '+o+'px;" /><span id="showAddressResultsSingleRow" style="width: '+o+'px; height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+n+'px"><input type="text" value="" placeholder="3. Choose Suite" title="Choose an Apartment Number for that Address" id="SubBuildingSingleRow" style="width: '+n+'px;" /><span id="showAddressSubPremise" style="width: '+o+'px; height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td></tr></table></p><br /><br /></div>',T='<div id="Paris" class="tabcontent"><br /><p><table id="autocomplete_melissadata_fielded" border="0px;"><tr style="font-weight: bold; font-size: 140%;"><b id="multiShow">Melissa Data Fielded Autocompletion</b></tr><tr width="'+3*n+'px"><td><br /></td></tr><tr style="clear:both;"><td width="'+n+'px"><input type="text" value="" placeholder="1. Type Country" title="Start typing a country name to get Suggestions" id="CountrySuggestions" style="width: '+n+'px;" /><span id="showCountryResults" style="width:150px;height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+n+'px"><input type="text" value="" placeholder="2. Type Postal Code" title="Start typing a Postal code to get Suggestions from within that Country" id="PostalCodeSuggestions" style="width: '+n+'px;" /><span id="showPostalCodeResults" style="width:150px;height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+n+'px"><input type="text" value="" placeholder="3. Type Street Address" title="Start typing a street name to get suggestions for them within that Postal code range in that country" id="StreetSuggestions" style="width: '+n+'px;" /><span id="showStreetResults" style="height:75px;line-height:3em;overflow:auto;padding:5px;"></span></td><td width="'+n+'px"><input type="text" value="" placeholder="4. Choose Suite" title="Choose an Apartment Number for that Address" id="SubBuildingSuggestions" style="width: '+n+'px;" /><span id="showSubPremise" style="width: '+o+'px; height:75px;line-height:3em;overflow:auto;padding:5px;"></tr></table></p><br /><br /><p></div>',P='<ul class="tab"><li><a href="#" class="tablinks" onclick="openMDElement(event, \'London\')">Single Row Autocompletion</a></li><li><a href="#" class="tablinks" onclick="openMDElement(event, \'Paris\')">Fielded Autocompletion</a></li></ul>';if(v===!0&&(z("#checkout-step-billing").css("display","inline"),z(P).insertBefore("#checkout-step-billing"),g===!0&&z(S).insertBefore("#checkout-step-billing"),m===!0&&z(T).insertBefore("#checkout-step-billing")),b===!0&&y===!0){var A='<form id="formaction"><input type="button" id="submitCheck" title="Verify now the Input Address Values" value=" Verify "></form><br /><span id="gawsresults_top" style="display:none;"></span><br /><span id="errorresults_top" style="display:none;"></span>';z(A).insertBefore("#checkout-step-billing"),z("#checkout-step-billing").css("display","inline"),z("#billing\\:region_id").css("display","inline")}else if(b===!0){var A='<form><input type="button" id="submitCheck" title="Verify now the Input Address Values" value=" Verify "></form><br /><span id="gawsresults_top" style="display:none;"></span><br /><span id="errorresults_top" style="display:none;"></span>';z(A).insertBefore("#checkout-step-billing"),z("#checkout-step-billing").css("display","inline"),z("#billing\\:region_id").css("display","inline")}else if(y===!0){var I='<form><input type="button" id="submitCheck" title="Verify now the Input Address Values" value=" Verify Now "></form><br /><span id="gawsresults_top" style="display:none;"></span><br /><span id="errorresults_top" style="display:none;"></span>';z(I).insertBefore("#checkout-step-billing"),z("#checkout-step-billing").css("display","inline"),z("#billing\\:region_id").css("display","inline")}z("#showCountryResults").on("click",function(){var t=z("#showCountryResults").find(":selected").val(),e=z("#showCountryResults").find(":selected").text(),i='<option selected value="'+t+'">'+e+"</option>",s=new Array;s.push('<select style="width: '+n+'px;" size="10">'),s.push(i),s.push("</select>");var o=s.join(""),r=0;1==r?(z("#autocomplete_melissadata_singlerow").show(),z("#autocomplete_melissadata_fielded").hide(),z("#CountrySuggestionsSingleRow").val(""),z("#CountrySuggestionsSingleRow").html(""),z("#CountrySuggestionsSingleRow").val(e),z("#showAddressResultsSingleRow").html(""),z("#showAddressResultsSingleRow").val(""),z("#AddressSuggestionsSingleRow").html(""),z("#AddressSuggestionsSingleRow").val(""),z("#AddressSuggestionsSingleRow").focus(),z("#showAddressResultsSingleRow").focus(),z("#AddressResultsSingleRow").focus(),z("#showCountryResultsSingleRow").hide(),z("#showCountryResultsSingleRow").html(o)):(z("#CountrySuggestions").val(""),z("#CountrySuggestions").html(""),z("#CountrySuggestions").val(e),z("#PostalCodeSuggestions").val(""),z("#showPostalCodeResults").val(""),z("#PostalCodeSuggestions").html(""),z("#showPostalCodeResults").html(""),z("#billing\\:street1").val(""),z("#showStreetResults").val(""),z("#showStreetResults").html(""),z("#StreetSuggestions").val(""),z("#StreetSuggestions").html(""),z("#PostalCodeSuggestions").focus(),z("#showPostalCodeResults").focus(),z("#showCountryResults").html(o),z("#showCountryResults").hide()),res="Country selected.",html_result_gaws='<span style="color: green; font-weight:bold;">'+res+"</span>",z("#gawsresults_top").html(html_result_gaws),z("#gawsresults_top").css("display","block")}),z("#showAddressSubPremise").on("click",function(){var t=z("#showAddressSubPremise").find(":selected").val(),e=z("#showAddressResultsSingleRow").find(":selected").attr("deliver"),i=(z("#showPostalCodeResults").find(":selected").attr("pc"),z("#showAddressSubPremise").find(":selected").attr("pc_sec")),s=z("#showCountryResultsSingleRow").find(":selected").val();z("#billing\\:street1").val(""),z("#billing\\:street1").html("");var n=z("#showAddressResultsSingleRow").find(":selected").attr("organization"),o=z("#showAddressResultsSingleRow").find(":selected").attr("building"),r=z("#showAddressResultsSingleRow").find(":selected").attr("premise"),a=z("#showAddressResultsSingleRow").find(":selected").attr("thoroughfare");if(i.length>2&&-1!=s.toLowerCase().indexOf("us")&&(z("#billing\\:postcode").val(""),z("#billing\\:postcode").html(""),z("#billing\\:postcode").val(i),console.log("Setting Postal Code ZIP9:"+i)),-1!=s.toLowerCase().indexOf("gb")){var l=new Array;l.push(n),l.push(o),l=l.filter(function(t){return t});var h=l.join(","),u=new Array;u.push(t),u.push(r+" "+a),u=u.filter(function(t){return t});var c=u.join(",");z("#billing\\:street1").val(h),z("#billing\\:street2").val(c)}else console.log("Set apartment number with street2: "+t),z("#billing\\:street1").val(e),z("#billing\\:street2").val(t);z("#SubBuildingSingleRow").val(""),z("#SubBuildingSingleRow").html(""),z("#SubBuildingSingleRow").val(t),z("#showAddressSubPremise").val(""),z("#showAddressSubPremise").html(""),z("#showAddressSubPremise").val(t),res="Suite selected.",html_result_gaws='<span style="color: green; font-weight:bold;">'+res+"</span>",z("#gawsresults_top").html(html_result_gaws),z("#gawsresults_top").css("display","block")}),z("#showSubPremise").on("click",function(){var t=z("#showSubPremise").find(":selected").val(),e=(z("#showPostalCodeResults").find(":selected").attr("pc"),z("#showSubPremise").find(":selected").attr("pc_sec")),i=Cookies.get("MelissaDataMagento_deliveryaddr"),s=z("#showCountryResults").find(":selected").val();z("#billing\\:street1").val(""),z("#billing\\:street1").html("");var n=z("#showStreetResults").find(":selected").attr("organization"),o=z("#showStreetResults").find(":selected").attr("building"),r=z("#showStreetResults").find(":selected").attr("premise"),a=z("#showStreetResults").find(":selected").attr("thoroughfare");if(e.length>2&&-1!=s.toLowerCase().indexOf("us")&&(z("#billing\\:postcode").val(""),z("#billing\\:postcode").html(""),z("#billing\\:postcode").val(e),console.log("Setting Postal Code ZIP9:"+e)),-1!=s.toLowerCase().indexOf("gb")){var l=new Array;l.push(n),l.push(o),l=l.filter(function(t){return t});var h=l.join(","),u=new Array;u.push(t),u.push(r+" "+a),u=u.filter(function(t){return t});var c=u.join(",");z("#billing\\:street1").val(h),z("#billing\\:street2").val(c)}else console.log("Set apartment number with street2: "+t+" and delivery: "+i),z("#billing\\:street1").val(i),z("#billing\\:street2").val(t);z("#SubBuildingSuggestions").val(""),z("#SubBuildingSuggestions").html(""),z("#SubBuildingSuggestions").val(t),z("#showSubPremise").val(""),z("#showSubPremise").html(""),z("#showSubPremise").val(t),res="Suite selected.",html_result_gaws='<span style="color: green; font-weight:bold;">'+res+"</span>",z("#gawsresults_top").html(html_result_gaws),z("#gawsresults_top").css("display","block")}),z("#showPostalCodeResults").on("click",function(){var t=z("#showPostalCodeResults").find(":selected").val(),e=z("#showPostalCodeResults").find(":selected").attr("pc");z("#showCountryResults").find(":selected").val(),z("#showCountryResults").find(":selected").text();z("#PostalCodeSuggestions").val(""),z("#PostalCodeSuggestions").html(""),z("#PostalCodeSuggestions").val(e+", "+t),z("#billing\\:city").val(t),z("#billing\\:postcode").val(e),z("#billing\\:street1").val(""),z("#showStreetResults").val(""),z("#showStreetResults").html(""),z("#StreetSuggestions").val(""),z("#StreetSuggestions").html(""),z("#showStreetResults").focus(),z("#StreetSuggestions").focus(),z("#showPostalCodeResults").hide(),res="Postal Code selected.",html_result_gaws='<span style="color: green; font-weight:bold;">'+res+"</span>",z("#gawsresults_top").html(html_result_gaws),z("#gawsresults_top").css("display","block")}),z("#showCountryResultsSingleRow").on("click",function(){var t=(z("#showCountryResultsSingleRow").find(":selected").val(),z("#showCountryResultsSingleRow").find(":selected").text());z("#CountrySuggestionsSingleRow").val(""),z("#CountrySuggestionsSingleRow").html(""),z("#CountrySuggestionsSingleRow").val(t),z("#showAddressResultsSingleRow").html(""),z("#showAddressResultsSingleRow").val(""),z("#AddressSuggestionsSingleRow").html(""),z("#AddressSuggestionsSingleRow").val(""),z("#AddressSuggestionsSingleRow").focus(),z("#showAddressResultsSingleRow").focus(),z("#AddressResultsSingleRow").focus(),z("#showCountryResultsSingleRow").hide(),res="Country selected.",html_result_gaws='<span style="color: green; font-weight:bold;">'+res+"</span>",z("#gawsresults_top").html(html_result_gaws),z("#gawsresults_top").css("display","block")}),z("#showStreetResults").on("click",function(){var t=z("#showStreetResults").find(":selected").val(),e=z("#showStreetResults").find(":selected").attr("loc"),i=z("#showPostalCodeResults").find(":selected").attr("pc"),n=z("#showStreetResults").find(":selected").attr("pc_sec"),r=z("#showStreetResults").find(":selected").attr("deliver"),a=(z("#showStreetResults").find(":selected").attr("aarea"),z("#showStreetResults").find(":selected").attr("simpleaddr"),z("#showStreetResults").find(":selected").attr("subbuilding")),l=a.split(","),h=n.toString().split(","),u=z("#showCountryResults").find(":selected").val();z("#showCountryResults").find(":selected").text();Cookies.set("MelissaDataMagento_deliveryaddr",r);var c=z("#showStreetResults").find(":selected").attr("organization"),d=z("#showStreetResults").find(":selected").attr("building"),p=z("#showStreetResults").find(":selected").attr("premise"),f=z("#showStreetResults").find(":selected").attr("thoroughfare");if(-1!=u.toLowerCase().indexOf("gb")){var g=new Array;g.push(c),g.push(d),g=g.filter(function(t){return t});var m=g.join(","),v=new Array;v.push(p+" "+f),v=v.filter(function(t){return t});var b=v.join(",");console.log("GB Postalcode: #showStreetResults "+i),z("#billing\\:street1").val(m),z("#billing\\:street2").val(b),z("#billing\\:city").val(e),z("#billing\\:postcode").val(i)}else console.log("not GB Postalcode: #showStreetResults "+i),z("#billing\\:city").val(e),z("#billing\\:postcode").val(i),z("#billing\\:street1").val(r),z("#billing\\:street2").val("");z("#StreetSuggestions").val(""),z("#StreetSuggestions").html(""),z("#StreetSuggestions").val(t),z("#showStreetResults").val(""),z("#showStreetResults").html(""),z("#showStreetResults").val(t),res="Address selected.",html_result_gaws='<span style="color: green; font-weight:bold;">'+res+"</span>",z("#gawsresults_top").html(html_result_gaws),z("#gawsresults_top").css("display","block"),z("#SubBuildingSuggestions").focus(),z("#showSubPremise").focus();var y=1;if(1==y&&"undefined"!=typeof l[0]&&null!=l[0]&&l[0].length>0){var _=new Array,w=1,x=o+100;_.push('<select style="width: '+x+'px;" size="25">'),z.each(l,function(t,e){e=e.trim();var n=i+"-"+h[t];"undefined"!=typeof e&&"string"==typeof e.valueOf()&&e.length>=1&&(w>=0?(_.push('<option selected pc_sec="'+n+'" value="'+e+'">'+e+"</option>"),w++):w>=1&&s>=w&&(_.push('<option pc_sec="'+n+'" value="'+e+'">'+e+"</option>"),w++))}),_.push("</select>");var C=_.join("");z("#SubBuildingSuggestions").focus(),z("#showSubPremise").focus(),z("#showSubPremise").html(""),z("#showSubPremise").val(""),z("#showSubPremise").html(C),z("#showSubPremise").css("display","inline"),z("#showSubPremise").show()}}),z("#showAddressResultsSingleRow").on("click",function(){var t=z("#showAddressResultsSingleRow").find(":selected").val(),e=z("#showAddressResultsSingleRow").find(":selected").attr("loc"),i=z("#showAddressResultsSingleRow").find(":selected").attr("pc"),n=z("#showAddressResultsSingleRow").find(":selected").attr("pc_sec"),r=z("#showAddressResultsSingleRow").find(":selected").attr("deliver"),a=(z("#showAddressResultsSingleRow").find(":selected").attr("aarea"),z("#showAddressResultsSingleRow").find(":selected").attr("simpleaddr"),z("#showAddressResultsSingleRow").find(":selected").attr("subbuilding")),l=a.split(","),h=n.toString().split(","),u=z("#showCountryResultsSingleRow").find(":selected").val(),c=(z("#showCountryResultsSingleRow").find(":selected").text(),z("#showAddressResultsSingleRow").find(":selected").attr("organization")),d=z("#showAddressResultsSingleRow").find(":selected").attr("building"),p=(z("#showAddressResultsSingleRow").find(":selected").attr("subbuilding"),z("#showAddressResultsSingleRow").find(":selected").attr("premise")),f=z("#showAddressResultsSingleRow").find(":selected").attr("thoroughfare");if(-1!=u.toLowerCase().indexOf("gb")){var g=new Array;g.push(c),g.push(d),g=g.filter(function(t){return t});var m=g.join(","),v=new Array;v.push(p+" "+f),v=v.filter(function(t){return t});var b=v.join(",");z("#billing\\:street1").val(m),z("#billing\\:street2").val(b),z("#billing\\:city").val(e),z("#billing\\:postcode").val(i)}else z("#billing\\:city").val(e),z("#billing\\:postcode").val(i),z("#billing\\:street1").val(r),z("#billing\\:street2").val("");z("#AddressSuggestionsSingleRow").val(""),z("#AddressSuggestionsSingleRow").html(""),z("#AddressSuggestionsSingleRow").val(t),z("#showAddressResultsSingleRow").hide(),res="Street and House Number have been chosen.",html_result_gaws='<span style="color: green; font-weight:bold;">'+res+"</span>",z("#gawsresults_top").html(html_result_gaws),z("#gawsresults_top").css("display","block");var y=1;if(1==y&&"undefined"!=typeof l[0]&&null!=l[0]&&l[0].length>0){var _=new Array,w=1,x=o+100;_.push('<select style="width: '+x+'px;" size="25">'),z.each(l,function(t,e){e=e.trim();var n=i+"-"+h[t];"undefined"!=typeof e&&"string"==typeof e.valueOf()&&e.length>=1&&(w>=0?(_.push('<option selected pc_sec="'+n+'" value="'+e+'">'+e+"</option>"),w++):w>=1&&s>=w&&(_.push('<option pc_sec="'+n+'" value="'+e+'">'+e+"</option>"),w++))}),_.push("</select>");var C=_.join("");z("#SubBuildingSingleRow").focus(),z("#showAddressSubPremise").focus(),z("#showAddressSubPremise").html(""),z("#showAddressSubPremise").val(""),z("#showAddressSubPremise").html(C),z("#showAddressSubPremise").css("display","inline"),z("#showAddressSubPremise").show()}}),v===!0&&(z("#AddressSuggestionsSingleRow").autocomplete({showHeader:!0,minLength:1,delay:250,source:function(t,e){z.ajax({url:C,dataType:"jsonp",data:{maxrecords:s,ff:z("#AddressSuggestionsSingleRow").val(),country:z("#showCountryResultsSingleRow").find(":selected").val(),id:r,format:"jsonp",nativecharset:!1},success:function(t){function e(t){var o="",a="";for(i in t){z("#showCountryResultsSingleRow").find(":selected").val();a=t.Address,simpleaddr=t.Address2,loc=t.Locality,o=t.PostalCode,pc_sec=t.PostalCodeSecondary,aarea=t.AdministrativeArea,deliver=t.DeliveryAddress,subbuilding=t.SubBuilding,organization=t.Organization,building=t.Building,premise=t.Premise,tn=t.Thoroughfare,"undefined"!=typeof a&&"string"==typeof a.valueOf()&&a.length>0&&(l>=0?(r.push('<option selected value="'+a+'" organization="'+organization+'" building="'+building+'" premise="'+premise+'" thoroughfare="'+tn+'" subbuilding="'+subbuilding+'" loc="'+loc+'" pc_sec="'+pc_sec+'" pc="'+o+'" aarea="'+aarea+'" simpleaddr="'+simpleaddr+'" deliver="'+deliver+'">'+a+"</option>"),l++):l>=1&&s>=l&&(r.push('<option value="'+a+'" organization="'+organization+'" building="'+building+'" premise="'+premise+'" thoroughfare="'+tn+'" subbuilding="'+subbuilding+'" loc="'+loc+'" pc_sec="'+pc_sec+'" pc="'+o+'" aarea="'+aarea+'" simpleaddr="'+simpleaddr+'" deliver="'+deliver+'">'+a+"</option>"),l++)),"object"==typeof t[i]&&e(t[i])}return n(r).join("")}function n(t){var e={};return t.filter(function(t){return e.hasOwnProperty(t)?!1:e[t]=!0})}var r=new Array,a=new Array,l=1,h=o+100;a.push('<select style="width: '+h+'px;" size="10">');var u=JSON.stringify(t),c=z.parseJSON(u),d=JSON.stringify(c.Results),p=z.parseJSON(d),f=e(p);a.push(f),a.push("</select>");var g=a.join("");z("#showAddressResultsSingleRow").html(""),z("#showAddressResultsSingleRow").val(""),z("#showAddressResultsSingleRow").html(g),z("#showAddressResultsSingleRow").show(),r=[]}})}}),z("#StreetSuggestions").autocomplete({showHeader:!0,minLength:1,delay:250,source:function(t,e){z.ajax({url:x,dataType:"jsonp",data:{maxrecords:s,address1:z("#StreetSuggestions").val(),locality:z("#showPostalCodeResults").find(":selected").val(),postalcode:z("#showPostalCodeResults").find(":selected").attr("pc"),country:z("#showCountryResults").find(":selected").val(),id:r,format:"jsonp",nativecharset:!1},success:function(t){function e(t){var n="",a="";
20
+ for(i in t)a=t.DeliveryAddress,simpleaddr=t.DeliveryAddress,loc=t.Locality,n=t.PostalCode,pc_sec=t.PostalCodeSecondary,aarea=t.AdministrativeArea,deliver=t.DeliveryAddress,subbuilding=t.SubBuilding,organization=t.Organization,building=t.Building,premise=t.Premise,tn=t.Thoroughfare,console.log("sub building:"+subbuilding),"undefined"!=typeof a&&"string"==typeof a.valueOf()&&a.length>0&&(l>=0?(r.push('<option selected value="'+a+'" organization="'+organization+'" building="'+building+'" premise="'+premise+'" thoroughfare="'+tn+'" subbuilding="'+subbuilding+'" loc="'+loc+'" pc_sec="'+pc_sec+'" pc="'+n+'" aarea="'+aarea+'" simpleaddr="'+simpleaddr+'" deliver="'+deliver+'">'+a+"</option>"),l++):l>=1&&s>=l&&(r.push('<option value="'+a+'" organization="'+organization+'" building="'+building+'" premise="'+premise+'" thoroughfare="'+tn+'" subbuilding="'+subbuilding+'" loc="'+loc+'" pc_sec="'+pc_sec+'" pc="'+n+'" aarea="'+aarea+'" simpleaddr="'+simpleaddr+'" deliver="'+deliver+'">'+a+"</option>"),l++)),"object"==typeof t[i]&&e(t[i]);return o(r).join("")}function o(t){var e={};return t.filter(function(t){return e.hasOwnProperty(t)?!1:e[t]=!0})}var r=new Array,a=new Array,l=1;a.push('<select style="width: '+n+'px;" size="10">');var h=JSON.stringify(t),u=z.parseJSON(h),c=JSON.stringify(u.Results),d=z.parseJSON(c),p=e(d);a.push(p),a.push("</select>");var f=a.join("");z("#showStreetResults").html(""),z("#showStreetResults").val(""),z("#showStreetResults").html(f),z("#showStreetResults").show(),r=[]}})}}),z("#PostalCodeSuggestions").autocomplete({showHeader:!0,minLength:1,delay:250,source:function(t,e){z.ajax({url:_,dataType:"jsonp",data:{maxrecords:s,postalcode:z("#PostalCodeSuggestions").val(),country:z("#showCountryResults").find(":selected").val(),id:r,format:"jsonp",nativecharset:!1},success:function(t){function e(t){var n="",a="",h="",u=z("#showCountryResults").find(":selected").val();for(i in t)n=t.PostalCode,a=t.Locality,h=t.AdministrativeArea,premise=t.Premise,null!=u.match(/(GB|UK)/gi)&&(n=t.PostalCodePrimary),console.log("POSTALCOOOODEEE: "+n+" locality: "+a+"country: "+u),"undefined"!=typeof n&&"string"==typeof n.valueOf()&&n.length>0&&"undefined"!=typeof a&&"string"==typeof a.valueOf()&&a.length>0&&(l>=0?(r.push('<option selected value="'+a+'" premise="'+premise+'" pc="'+n+'" aarea="'+h+'">'+n+", "+a+"</option>"),l++):l>=1&&s>=l&&(r.push('<option value="'+a+'" premise="'+premise+'" pc="'+n+'" aarea="'+h+'">'+n+", "+a+"</option>"),l++)),"object"==typeof t[i]&&e(t[i]);return o(r).join("")}function o(t){var e={};return t.filter(function(t){return e.hasOwnProperty(t)?!1:e[t]=!0})}var r=new Array,a=new Array,l=1;a.push('<select style="width: '+n+'px;" size="10">');var h=JSON.stringify(t),u=z.parseJSON(h),c=JSON.stringify(u.Results),d=z.parseJSON(c),p=e(d);a.push(p),a.push("</select>");var f=a.join("");z("#showPostalCodeResults").html(""),z("#showPostalCodeResults").val(""),z("#showPostalCodeResults").html(f),z("#showPostalCodeResults").show(),r=[]}})}}),z("#CountrySuggestions").autocomplete({showHeader:!0,minLength:1,delay:250,source:function(t,e){z.ajax({url:w,dataType:"jsonp",data:{country:z("#CountrySuggestions").val(),id:r,maxrecords:s,format:"jsonp"},success:function(t){function e(t){var n="",a="";for(i in t)n=t.Char2ISO,a=t.English,"undefined"!=typeof n&&"string"==typeof n.valueOf()&&n.length>0&&"undefined"!=typeof a&&"string"==typeof a.valueOf()&&a.length>0&&(l>=0?(r.push('<option selected value="'+n+'">'+a+"</option>"),l++):l>=1&&s>=l&&(r.push('<option value="'+n+'">'+a+"</option>"),l++)),"object"==typeof t[i]&&e(t[i]);return o(r).join("")}function o(t){var e={};return t.filter(function(t){return e.hasOwnProperty(t)?!1:e[t]=!0})}var r=new Array,a=new Array,l=1;a.push('<select style="width: '+n+'px;" size="10">');var h=JSON.stringify(t),u=z.parseJSON(h),c=JSON.stringify(u.Results),d=z.parseJSON(c),p=e(d);a.push(p),a.push("</select>");var f=a.join("");z("#showCountryResults").html(""),z("#showCountryResults").val(""),z("#showCountryResults").html(f),z("#showCountryResults").show(),r=[]}})}}),z("#CountrySuggestionsSingleRow").autocomplete({showHeader:!0,minLength:1,delay:250,source:function(t,e){z.ajax({url:w,dataType:"jsonp",data:{country:z("#CountrySuggestionsSingleRow").val(),id:r,maxrecords:s,format:"jsonp"},success:function(t){function e(t){var n="",a="";for(i in t)n=t.Char2ISO,a=t.English,"undefined"!=typeof n&&"string"==typeof n.valueOf()&&n.length>0&&"undefined"!=typeof a&&"string"==typeof a.valueOf()&&a.length>0&&(l>=0?(r.push('<option selected value="'+n+'">'+a+"</option>"),l++):l>=1&&s>=l&&(r.push('<option value="'+n+'">'+a+"</option>"),l++)),"object"==typeof t[i]&&e(t[i]);return o(r).join("")}function o(t){var e={};return t.filter(function(t){return e.hasOwnProperty(t)?!1:e[t]=!0})}var r=new Array,a=new Array,l=1;a.push('<select style="width: '+n+'px;" size="10">');var h=JSON.stringify(t),u=z.parseJSON(h),c=JSON.stringify(u.Results),d=z.parseJSON(c),p=e(d);a.push(p),a.push("</select>");var f=a.join("");z("#showCountryResultsSingleRow").html(""),z("#showCountryResultsSingleRow").val(""),z("#showCountryResultsSingleRow").html(f),z("#showCountryResultsSingleRow").show(),r=[]}})}})),z("#submitCheck").click(function(){e(),t()}),z("#billing-buttons-container .button").click(function(){var t=z("#billing\\:city").val(),e=z("#billing\\:postcode").val(),i=z("#billing\\:street1").val(),s=z("#billing\\:country_id").val(),n=(z("#billing\\:firstname").val(),z("#billing\\:lastname").val(),z("#billing\\:email").val()),o=n.includes("@"),r=n.includes(".");t.length>=2&&e.length>=2&&i.length>=2&&s.length>=1&&n.length>=6&&o===!0&&r===!0&&(z("#autocomplete_melissadata_fielded").hide(),z("#autocomplete_melissadata_singlerow").hide(),z("#autocomplete_melissadata_fielded").css("display","none"),z("#autocomplete_melissadata_singlerow").css("display","none"),z("#singleShow").hide(),z("#singleShow").css("display","none"),z("#multiShow").hide(),z("#multiShow").css("display","none"),z("#gawsresults_top").hide(),z("#gawsresults_top").css("display","none"),z("#submitCheck").hide(),z("#submitCheck").css("display","none"))})});
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Melissa_Plugin</name>
4
- <version>1.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
@@ -12,7 +12,7 @@
12
  <authors><author><name>Sebastian Enger</name><user>melissadata</user>
13
  <email>Sebastian.Enger@MelissaData.com</email></author>
14
  </authors>
15
- <date>2016-07-19</date>
16
  <time>11:24:03</time>
17
  <contents><target name="mage"></target></contents>
18
  <compatible/>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Melissa_Plugin</name>
4
+ <version>1.2.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
12
  <authors><author><name>Sebastian Enger</name><user>melissadata</user>
13
  <email>Sebastian.Enger@MelissaData.com</email></author>
14
  </authors>
15
+ <date>2016-08-10</date>
16
  <time>11:24:03</time>
17
  <contents><target name="mage"></target></contents>
18
  <compatible/>
skin/frontend/base/default/melissadata/Magento.css ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ul.tab {
2
+ list-style-type: none;
3
+ margin: 0;
4
+ padding: 0;
5
+ overflow: hidden;
6
+ border: 1px solid #ccc;
7
+ background-color: #f1f1f1;
8
+ }
9
+
10
+ /* Float the list items side by side */
11
+ ul.tab li {float: left;}
12
+
13
+ /* Style the links inside the list items */
14
+ ul.tab li a {
15
+ display: inline-block;
16
+ color: black;
17
+ text-align: center;
18
+ padding: 14px 16px;
19
+ text-decoration: none;
20
+ transition: 0.3s;
21
+ font-size: 17px;
22
+ }
23
+
24
+ /* Change background color of links on hover */
25
+ ul.tab li a:hover {
26
+ background-color: #ddd;
27
+ }
28
+
29
+ /* Create an active/current tablink class */
30
+ ul.tab li a:focus, .active {
31
+ background-color: #ccc;
32
+ }
33
+
34
+ /* Style the tab content */
35
+ .tabcontent {
36
+ display: none;
37
+ padding: 6px 12px;
38
+ border: 1px solid #ccc;
39
+ border-top: none;
40
+ width: 920px;
41
+ }