├── icon32.png ├── lib ├── fonts │ ├── OpenSans-Greek.woff2 │ ├── OpenSans-Latin.woff2 │ ├── OpenSans-Regular.ttf │ ├── OpenSans-Cyrillic.woff2 │ ├── OpenSans-GreekExt.woff2 │ ├── OpenSans-LatinExt.woff2 │ ├── OpenSans-CyrillicExt.woff2 │ └── OpenSans-Vietnamese.woff2 ├── css │ ├── OpenSans.css │ └── notie.css └── js │ ├── notie.js │ └── jquery-3.2.1.min.js ├── bg.html ├── Settings.plist ├── css └── offcloud.css ├── Info.plist ├── options.js ├── options.html ├── main.js └── background.js /icon32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Offcloud/offcloud-ext-safari/HEAD/icon32.png -------------------------------------------------------------------------------- /lib/fonts/OpenSans-Greek.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Offcloud/offcloud-ext-safari/HEAD/lib/fonts/OpenSans-Greek.woff2 -------------------------------------------------------------------------------- /lib/fonts/OpenSans-Latin.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Offcloud/offcloud-ext-safari/HEAD/lib/fonts/OpenSans-Latin.woff2 -------------------------------------------------------------------------------- /lib/fonts/OpenSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Offcloud/offcloud-ext-safari/HEAD/lib/fonts/OpenSans-Regular.ttf -------------------------------------------------------------------------------- /lib/fonts/OpenSans-Cyrillic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Offcloud/offcloud-ext-safari/HEAD/lib/fonts/OpenSans-Cyrillic.woff2 -------------------------------------------------------------------------------- /lib/fonts/OpenSans-GreekExt.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Offcloud/offcloud-ext-safari/HEAD/lib/fonts/OpenSans-GreekExt.woff2 -------------------------------------------------------------------------------- /lib/fonts/OpenSans-LatinExt.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Offcloud/offcloud-ext-safari/HEAD/lib/fonts/OpenSans-LatinExt.woff2 -------------------------------------------------------------------------------- /lib/fonts/OpenSans-CyrillicExt.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Offcloud/offcloud-ext-safari/HEAD/lib/fonts/OpenSans-CyrillicExt.woff2 -------------------------------------------------------------------------------- /lib/fonts/OpenSans-Vietnamese.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Offcloud/offcloud-ext-safari/HEAD/lib/fonts/OpenSans-Vietnamese.woff2 -------------------------------------------------------------------------------- /bg.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Settings.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Key 7 | apiKey 8 | Password 9 | 10 | Secure 11 | 12 | Title 13 | apiKey 14 | Type 15 | TextField 16 | 17 | 18 | Key 19 | remoteOptionId 20 | Secure 21 | 22 | Type 23 | Hidden 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /css/offcloud.css: -------------------------------------------------------------------------------- 1 | .loader { 2 | font-size: 10px; 3 | text-indent: -9999em; 4 | width: 44px; 5 | height: 44px; 6 | border-radius: 50%; 7 | background: #0080c0; 8 | background: -moz-linear-gradient(left, #0080c0 10%, rgba(0,128,192, 0) 42%); 9 | background: -webkit-linear-gradient(left, #0080c0 10%, rgba(0,128,192, 0) 42%); 10 | background: -o-linear-gradient(left, #0080c0 10%, rgba(0,128,192, 0) 42%); 11 | background: -ms-linear-gradient(left, #0080c0 10%, rgba(0,128,192, 0) 42%); 12 | background: linear-gradient(to right, #0080c0 10%, rgba(0,128,192, 0) 42%); 13 | position: relative; 14 | -webkit-animation: load3 1.4s infinite linear; 15 | animation: load3 1.4s infinite linear; 16 | -webkit-transform: translateZ(0); 17 | -ms-transform: translateZ(0); 18 | transform: translateZ(0); 19 | } 20 | .loader:before { 21 | width: 50%; 22 | height: 50%; 23 | background: #0080c0; 24 | border-radius: 100% 0 0 0; 25 | position: absolute; 26 | top: 0; 27 | left: 0; 28 | content: ''; 29 | } 30 | .loader:after { 31 | background: #ffffff; 32 | width: 75%; 33 | height: 75%; 34 | border-radius: 50%; 35 | content: ''; 36 | margin: auto; 37 | position: absolute; 38 | top: 0; 39 | left: 0; 40 | bottom: 0; 41 | right: 0; 42 | } 43 | @-webkit-keyframes load3 { 44 | 0% { 45 | -webkit-transform: rotate(0deg); 46 | transform: rotate(0deg); 47 | } 48 | 100% { 49 | -webkit-transform: rotate(360deg); 50 | transform: rotate(360deg); 51 | } 52 | } 53 | @keyframes load3 { 54 | 0% { 55 | -webkit-transform: rotate(0deg); 56 | transform: rotate(0deg); 57 | } 58 | 100% { 59 | -webkit-transform: rotate(360deg); 60 | transform: rotate(360deg); 61 | } 62 | } -------------------------------------------------------------------------------- /lib/css/OpenSans.css: -------------------------------------------------------------------------------- 1 | /* cyrillic-ext */ 2 | @font-face { 3 | font-family: 'Open Sans'; 4 | font-style: normal; 5 | font-weight: 600; 6 | src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(/lib/fonts/OpenSans-CyrillicExt.woff2) format('woff2'); 7 | unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; 8 | } 9 | /* cyrillic */ 10 | @font-face { 11 | font-family: 'Open Sans'; 12 | font-style: normal; 13 | font-weight: 600; 14 | src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(/lib/fonts/OpenSans-Cyrillic.woff2) format('woff2'); 15 | unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; 16 | } 17 | /* greek-ext */ 18 | @font-face { 19 | font-family: 'Open Sans'; 20 | font-style: normal; 21 | font-weight: 600; 22 | src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(/lib/fonts/OpenSans-GreekExt.woff2) format('woff2'); 23 | unicode-range: U+1F00-1FFF; 24 | } 25 | /* greek */ 26 | @font-face { 27 | font-family: 'Open Sans'; 28 | font-style: normal; 29 | font-weight: 600; 30 | src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(/lib/fonts/OpenSans-Greek.woff2) format('woff2'); 31 | unicode-range: U+0370-03FF; 32 | } 33 | /* vietnamese */ 34 | @font-face { 35 | font-family: 'Open Sans'; 36 | font-style: normal; 37 | font-weight: 600; 38 | src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(/lib/fonts/OpenSans-Vietnamese.woff2) format('woff2'); 39 | unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; 40 | } 41 | /* latin-ext */ 42 | @font-face { 43 | font-family: 'Open Sans'; 44 | font-style: normal; 45 | font-weight: 600; 46 | src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(/lib/fonts/OpenSans-LatinExt.woff2) format('woff2'); 47 | unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; 48 | } 49 | /* latin */ 50 | @font-face { 51 | font-family: 'Open Sans'; 52 | font-style: normal; 53 | font-weight: 600; 54 | src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(/lib/fonts/OpenSans-Latin.woff2) format('woff2'); 55 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; 56 | } -------------------------------------------------------------------------------- /Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Author 6 | offcloud.com 7 | Builder Version 8 | 11601.7.7 9 | CFBundleDisplayName 10 | offcloud 11 | CFBundleIdentifier 12 | com.yourcompany.offcloud 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleShortVersionString 16 | 0.2.6.0 17 | CFBundleVersion 18 | 1 19 | Chrome 20 | 21 | Global Page 22 | bg.html 23 | Popovers 24 | 25 | 26 | Filename 27 | options.html 28 | Identifier 29 | options 30 | 31 | 32 | Toolbar Items 33 | 34 | 35 | Identifier 36 | options 37 | Image 38 | icon32.png 39 | Include By Default 40 | 41 | Label 42 | Offcloud settings 43 | Popover 44 | options 45 | Tool Tip 46 | Offcloud settings 47 | 48 | 49 | 50 | Content 51 | 52 | Scripts 53 | 54 | End 55 | 56 | lib/js/jquery-3.2.1.min.js 57 | lib/js/notie.js 58 | main.js 59 | 60 | 61 | Stylesheets 62 | 63 | lib/css/OpenSans.css 64 | lib/css/notie.css 65 | css/offcloud.css 66 | 67 | 68 | Description 69 | Allows you to take any link and fetch its data, either by directly downloading it, backing it up or transferring it to a third party 70 | DeveloperIdentifier 71 | 0000000000 72 | ExtensionInfoDictionaryVersion 73 | 1.0 74 | Permissions 75 | 76 | Website Access 77 | 78 | Include Secure Pages 79 | 80 | Level 81 | All 82 | 83 | 84 | Website 85 | https://offcloud.com/ 86 | 87 | 88 | -------------------------------------------------------------------------------- /options.js: -------------------------------------------------------------------------------- 1 | var apiKeyInput = document.getElementById('apiKeyInput'); 2 | var remoteOptionsSelect = document.getElementById('remoteOptionsSelect'); 3 | var saveApiKeyBtn = document.getElementById('saveApiKeyBtn'); 4 | var saveRemoteOptionBtn = document.getElementById('saveRemoteOptionBtn'); 5 | var statusDiv = document.querySelector('.status-div'); 6 | 7 | restoreOptions(); 8 | 9 | setEventHandlers(); 10 | 11 | function setEventHandlers() { 12 | saveApiKeyBtn.addEventListener('click', function () { 13 | var apiKey = apiKeyInput.value; 14 | if (apiKey == "") 15 | apiKey = null; 16 | 17 | safari.extension.settings.apiKey = apiKey; 18 | statusDiv.innerText = 'Your Api Key has been successfully changed!'; 19 | }); 20 | 21 | saveRemoteOptionBtn.addEventListener('click', function () { 22 | var remoteOptionId = remoteOptionsSelect.value; 23 | if (remoteOptionId != "default") { 24 | safari.extension.settings.remoteOptionId = remoteOptionId; 25 | statusDiv.innerText = 'Your default remote account has been successfully changed!'; 26 | } else { 27 | safari.extension.settings.remoteOptionId = null; 28 | } 29 | }); 30 | } 31 | 32 | function restoreOptions() { 33 | if (safari.extension.settings.apiKey !== null) { 34 | apiKeyInput.value = safari.extension.settings.apiKey; 35 | getRemoteOptionsRequest(safari.extension.settings.apiKey) 36 | .then(function (data) { 37 | setRemoteOptions(data, safari.extension.settings.remoteOptionId); 38 | }); 39 | } 40 | } 41 | 42 | function setRemoteOptions(data, lastRemoteOptionId) { 43 | var remoteOptionsArray = JSON.parse(data).data; 44 | 45 | remoteOptionsArray.forEach(function (obj) { 46 | var type = obj.type; 47 | var username = obj.username; 48 | var value = obj.remoteOptionId; 49 | 50 | var text = type + " - " + username; 51 | 52 | var option = document.createElement('option'); 53 | option.value = value; 54 | option.textContent = text; 55 | remoteOptionsSelect.appendChild(option); 56 | }); 57 | 58 | if (lastRemoteOptionId != null) 59 | remoteOptionsSelect.value = lastRemoteOptionId; 60 | } 61 | 62 | function getRemoteOptionsRequest(apiKey) { 63 | return new Promise(function (resolve, reject) { 64 | var request = new XMLHttpRequest(); 65 | request.onreadystatechange = function () { 66 | if (this.readyState == 4) { 67 | resolve(this.responseText); 68 | } 69 | }; 70 | request.onerror = function () { 71 | reject(new Error('Request failed!')); 72 | }; 73 | request.open("POST", "https://offcloud.com/api/remote-account/list?apikey=" + apiKey, true); 74 | request.send(); 75 | }); 76 | } -------------------------------------------------------------------------------- /lib/css/notie.css: -------------------------------------------------------------------------------- 1 | .notie-container { 2 | font-size: 1.6rem; 3 | height: auto; 4 | left: 0; 5 | position: fixed; 6 | text-align: center; 7 | width: 100%; 8 | z-index: 2147483647; 9 | box-sizing: border-box; 10 | -o-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.5); 11 | -ms-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.5); 12 | -moz-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.5); 13 | -webkit-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.5); 14 | box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.5); 15 | } 16 | 17 | @media screen and (max-width: 900px) { 18 | .notie-container { 19 | font-size: 1.4rem; 20 | } 21 | } 22 | 23 | @media screen and (max-width: 750px) { 24 | .notie-container { 25 | font-size: 1.2rem; 26 | } 27 | } 28 | 29 | @media screen and (max-width: 400px) { 30 | .notie-container { 31 | font-size: 1rem; 32 | } 33 | } 34 | 35 | .notie-background-success { 36 | background-color: #57BF57; 37 | } 38 | 39 | .notie-background-warning { 40 | background-color: #D6A14D; 41 | } 42 | 43 | .notie-background-error { 44 | background-color: #E1715B; 45 | } 46 | 47 | .notie-background-info { 48 | background-color: #4D82D6; 49 | } 50 | 51 | .notie-background-neutral { 52 | background-color: #A0A0A0; 53 | } 54 | 55 | .notie-background-overlay { 56 | background-color: #FFFFFF; 57 | } 58 | 59 | .notie-textbox { 60 | color: #FFFFFF; 61 | padding: 20px; 62 | } 63 | 64 | .notie-textbox-inner { 65 | margin: 0 auto; 66 | max-width: 900px; 67 | } 68 | 69 | .notie-overlay { 70 | height: 100%; 71 | left: 0; 72 | opacity: 0; 73 | position: fixed; 74 | top: 0; 75 | width: 100%; 76 | z-index: 2147483646; 77 | } 78 | 79 | .notie-button { 80 | color: #FFFFFF; 81 | padding: 10px; 82 | cursor: pointer; 83 | } 84 | 85 | .notie-element { 86 | color: #FFFFFF; 87 | padding: 10px; 88 | } 89 | 90 | .notie-element-half { 91 | display: inline-block; 92 | width: 50%; 93 | box-sizing: border-box; 94 | } 95 | 96 | .notie-element-third { 97 | display: inline-block; 98 | width: 33.3333%; 99 | box-sizing: border-box; 100 | } 101 | 102 | .notie-alert { 103 | cursor: pointer; 104 | } 105 | 106 | .notie-input-field { 107 | background-color: #FFFFFF; 108 | border: 0; 109 | font-family: inherit; 110 | font-size: inherit; 111 | outline: 0; 112 | padding: 10px; 113 | text-align: center; 114 | width: 100%; 115 | box-sizing: border-box; 116 | } 117 | 118 | .notie-select-choice-repeated { 119 | border-bottom: 1px solid rgba(255, 255, 255, 0.2); 120 | box-sizing: border-box; 121 | } 122 | 123 | .notie-date-selector-inner { 124 | margin: 0 auto; 125 | max-width: 900px; 126 | -webkit-user-select: none; 127 | -moz-user-select: none; 128 | -ms-user-select: none; 129 | -o-user-select: none; 130 | user-select: none; 131 | } 132 | 133 | .notie-date-selector-inner [contenteditable], .notie-date-selector-inner [contenteditable]:focus { 134 | outline: 0px solid transparent; 135 | } 136 | 137 | .notie-date-selector-up { 138 | transform: rotate(180deg); 139 | } -------------------------------------------------------------------------------- /options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 93 | 94 | 95 |
96 |
97 | Set your API key below: 98 |
99 |
100 | 101 |
102 |
103 | 104 |
105 |
106 | Set your remote upload account: 107 |
108 |
109 | 112 |
113 |
114 | 115 |
116 |
117 |
118 | 119 | 120 | -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | initMain(); 2 | 3 | function initMain() { 4 | document.addEventListener('contextmenu', function (event) { 5 | function getSelectionText() { 6 | var text = ''; 7 | if (window.getSelection) { 8 | text = window.getSelection().toString(); 9 | } else if (document.selection && document.selection.type != "Control") { 10 | text = document.selection.createRange().text; 11 | } 12 | return text; 13 | } 14 | 15 | var link = $(event.target).closest('a'); 16 | var linkUrl = link ? link.attr('href') : ''; 17 | var selectionText = getSelectionText(); 18 | safari.self.tab.setContextMenuEventUserInfo(event, {linkUrl: linkUrl, selectionText: selectionText}); 19 | }, false); 20 | 21 | var $loaderContainer = $("
").css({ 22 | 'position': 'fixed', 23 | 'bottom': '5px', 24 | 'right': '5px', 25 | 'z-index': '999999999' 26 | }); 27 | 28 | var $loaderSpinner = $('
').addClass('loader'); 29 | 30 | $loaderContainer.append($loaderSpinner); 31 | 32 | safari.self.addEventListener("message", requestHandler, false); 33 | 34 | function requestHandler(event) { 35 | if (event.name == "getSelectedHtml") { 36 | var selectedHtml = getHTMLOfSelection(); 37 | var response = { 38 | html: selectedHtml, 39 | href: location.href, 40 | remote: event.message.remote, 41 | apiLink: event.message.apiLink, 42 | type: event.message.type 43 | }; 44 | safari.self.tab.dispatchMessage("getSelectedHtml-result", response); 45 | } else if (event.name == "appendLoader") { 46 | appendLoader(); 47 | } else if (event.name == "remoteInProcessNotification") { 48 | showRemoteInProcessNotification(); 49 | return true; 50 | } else if (event.name == "successNotification") { 51 | showSuccessNotification(event.message.text, event.message.type, function (obj) { 52 | obj.urls = event.message.urls; 53 | safari.self.tab.dispatchMessage("successNotification-result", obj); 54 | }); 55 | } else if (event.name == "errorNotification") { 56 | showErrorNotification(); 57 | } else if (event.name == "showModal") { 58 | showModal(event.message.type); 59 | } 60 | } 61 | 62 | function getHTMLOfSelection() { 63 | var range; 64 | if (document.selection && document.selection.createRange) { 65 | range = document.selection.createRange(); 66 | return range.htmlText; 67 | } else if (window.getSelection) { 68 | var selection = window.getSelection(); 69 | if (selection && selection.rangeCount > 0) { 70 | range = selection.getRangeAt(0); 71 | var clonedSelection = range.cloneContents(); 72 | var div = document.createElement('div'); 73 | div.appendChild(clonedSelection); 74 | return div.innerHTML; 75 | } else { 76 | return ''; 77 | } 78 | } else { 79 | return ''; 80 | } 81 | } 82 | 83 | function appendLoader() { 84 | $loaderContainer.appendTo('body'); 85 | } 86 | 87 | function removeLoader() { 88 | $loaderContainer.remove(); 89 | } 90 | 91 | function showRemoteInProcessNotification() { 92 | removeLoader(); 93 | notie.alert({ 94 | type: 1, 95 | text: 'Your remote upload has begun.', 96 | time: 4 97 | }); 98 | } 99 | 100 | function showSuccessNotification(text, type, callback) { 101 | removeLoader(); 102 | var confirmText = ""; 103 | if (type == 0) 104 | confirmText = 'Download links copied to clipboard. Open them in new tab?'; 105 | else if (type == 1) 106 | confirmText = 'Transfer has started & links are copied. Open them in new tab?' 107 | 108 | notie.confirm({ 109 | text: confirmText, 110 | submitText: 'Yes', 111 | cancelText: 'No', 112 | submitCallback: function () { 113 | copyTextToClipboard(text); 114 | callback({success: true}); 115 | }, 116 | cancelCallback: function () { 117 | copyTextToClipboard(text); 118 | } 119 | }); 120 | } 121 | 122 | function showErrorNotification() { 123 | removeLoader(); 124 | notie.alert({ 125 | type: 'error', 126 | text: 'An error occured!', 127 | time: 4 128 | }); 129 | } 130 | 131 | function showModal(type) { 132 | var label = ""; 133 | 134 | if (type == 0) 135 | label = 'Instant download custom links'; 136 | else if (type == 1) 137 | label = 'Cloud download custom links'; 138 | else if (type == 2) 139 | label = 'Remote download custom links'; 140 | 141 | notie.textarea({ 142 | text: label, 143 | submitText: 'Process link(s) to Offcloud.com', 144 | cancelText: 'Cancel', 145 | rows: 5, 146 | submitCallback: function (customLinks) { 147 | if (customLinks && customLinks.trim() != "") { 148 | safari.self.tab.dispatchMessage("custom", { 149 | html: customLinks, 150 | type: type 151 | }); 152 | } 153 | } 154 | }); 155 | } 156 | 157 | function copyTextToClipboard(text) { 158 | var copyFrom = $('",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var ra=d.documentElement,sa=/^key/,ta=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ua=/^([^.]*)(?:\.(.+)|)/;function va(){return!0}function wa(){return!1}function xa(){try{return d.activeElement}catch(a){}}function ya(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ya(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=wa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(ra,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(L)||[""],j=b.length;while(j--)h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.hasData(a)&&W.get(a);if(q&&(i=q.events)){b=(b||"").match(L)||[""],j=b.length;while(j--)if(h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&W.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(W.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i\x20\t\r\n\f]*)[^>]*)\/>/gi,Aa=/\s*$/g;function Ea(a,b){return B(a,"table")&&B(11!==b.nodeType?b:b.firstChild,"tr")?r(">tbody",a)[0]||a:a}function Fa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Ga(a){var b=Ca.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ha(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(W.hasData(a)&&(f=W.access(a),g=W.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c1&&"string"==typeof q&&!o.checkClone&&Ba.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ja(f,b,c,d)});if(m&&(e=qa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(na(e,"script"),Fa),i=h.length;l")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=na(h),f=na(a),d=0,e=f.length;d0&&oa(g,!i&&na(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(U(c)){if(b=c[W.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[W.expando]=void 0}c[X.expando]&&(c[X.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ka(this,a,!0)},remove:function(a){return Ka(this,a)},text:function(a){return T(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.appendChild(a)}})},prepend:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(na(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return T(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!Aa.test(a)&&!ma[(ka.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c1)}});function _a(a,b,c,d,e){return new _a.prototype.init(a,b,c,d,e)}r.Tween=_a,_a.prototype={constructor:_a,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=_a.propHooks[this.prop];return a&&a.get?a.get(this):_a.propHooks._default.get(this)},run:function(a){var b,c=_a.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):_a.propHooks._default.set(this),this}},_a.prototype.init.prototype=_a.prototype,_a.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},_a.propHooks.scrollTop=_a.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=_a.prototype.init,r.fx.step={};var ab,bb,cb=/^(?:toggle|show|hide)$/,db=/queueHooks$/;function eb(){bb&&(d.hidden===!1&&a.requestAnimationFrame?a.requestAnimationFrame(eb):a.setTimeout(eb,r.fx.interval),r.fx.tick())}function fb(){return a.setTimeout(function(){ab=void 0}),ab=r.now()}function gb(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ca[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function hb(a,b,c){for(var d,e=(kb.tweeners[b]||[]).concat(kb.tweeners["*"]),f=0,g=e.length;f1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?lb:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b), 4 | null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&B(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(L);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),lb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=mb[b]||r.find.attr;mb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=mb[g],mb[g]=e,e=null!=c(a,b,d)?g:null,mb[g]=f),e}});var nb=/^(?:input|select|textarea|button)$/i,ob=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return T(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):nb.test(a.nodeName)||ob.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function pb(a){var b=a.match(L)||[];return b.join(" ")}function qb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,qb(this)))});if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,qb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,qb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(L)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=qb(this),b&&W.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":W.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+pb(qb(c))+" ").indexOf(b)>-1)return!0;return!1}});var rb=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":Array.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:pb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(Array.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var sb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!sb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,sb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(W.get(h,"events")||{})[b.type]&&W.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&U(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!U(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=W.access(d,b);e||d.addEventListener(a,c,!0),W.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=W.access(d,b)-1;e?W.access(d,b,e):(d.removeEventListener(a,c,!0),W.remove(d,b))}}});var tb=a.location,ub=r.now(),vb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;function Ab(a,b,c,d){var e;if(Array.isArray(b))r.each(b,function(b,e){c||wb.test(a)?d(a,e):Ab(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)Ab(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(Array.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)Ab(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(a)&&(this.checked||!ja.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:Array.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(xb,"\r\n")}}):{name:b.name,value:c.replace(xb,"\r\n")}}).get()}});var Bb=/%20/g,Cb=/#.*$/,Db=/([?&])_=[^&]*/,Eb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Fb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Gb=/^(?:GET|HEAD)$/,Hb=/^\/\//,Ib={},Jb={},Kb="*/".concat("*"),Lb=d.createElement("a");Lb.href=tb.href;function Mb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(L)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nb(a,b,c,d){var e={},f=a===Jb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Ob(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Pb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Qb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:tb.href,type:"GET",isLocal:Fb.test(tb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kb,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":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Ob(Ob(a,r.ajaxSettings),b):Ob(r.ajaxSettings,a)},ajaxPrefilter:Mb(Ib),ajaxTransport:Mb(Jb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Eb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||tb.href)+"").replace(Hb,tb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(L)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Lb.protocol+"//"+Lb.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Nb(Ib,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Gb.test(o.type),f=o.url.replace(Cb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(Bb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(vb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Db,"$1"),n=(vb.test(f)?"&":"?")+"_="+ub++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Kb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Nb(Jb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Pb(o,y,d)),v=Qb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Rb={0:200,1223:204},Sb=r.ajaxSettings.xhr();o.cors=!!Sb&&"withCredentials"in Sb,o.ajax=Sb=!!Sb,r.ajaxTransport(function(b){var c,d;if(o.cors||Sb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Rb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r("