diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..ffda7f7b --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,31 @@ +name: Deploy Slate Docs + +on: + push: + branches: + - master + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install Ruby and Bundler + run: | + sudo apt-get update + sudo apt-get install -y ruby-full build-essential + gem install bundler + + - name: Build Slate + run: | + bundle install --path vendor/bundle + bundle exec middleman build --clean + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build \ No newline at end of file diff --git a/.gitignore b/.gitignore index b67d505d..dc38bb52 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,12 @@ /node_modules/ /package-lock.json /build/ +/docs/ # Extraneous system files .DS_Store +/.vs/VSWorkspaceState.json +/.vs/api-documentation/config/applicationhost.config +/.vs/api-documentation/FileContentIndex +/.vs/api-documentation/v17 +/.vs diff --git a/NOTES.md b/NOTES.md new file mode 100644 index 00000000..7b17445c --- /dev/null +++ b/NOTES.md @@ -0,0 +1,5 @@ +"instructed_amount": how much the client wants to pay +"received_amount": currency sold. what CT received +"paid_amount": how much of the instructed amount has been paid + +more detailed status explinations in docs diff --git a/deploy.sh b/deploy.sh index 8832455b..3163ccfc 100755 --- a/deploy.sh +++ b/deploy.sh @@ -67,7 +67,7 @@ parse_args() { # Set internal option vars from the environment and arg flags. All internal # vars should be declared here, with sane defaults if applicable. # Source directory & target branch. - deploy_directory=build + deploy_directory=docs deploy_branch=gh-pages #if no user identity is already set in the current git environment, use this: default_username=${GIT_DEPLOY_USERNAME:-deploy.sh} diff --git a/docs/CNAME b/docs/CNAME deleted file mode 100644 index f69e37ce..00000000 --- a/docs/CNAME +++ /dev/null @@ -1 +0,0 @@ -api-docs.cleartreasury.co.uk \ No newline at end of file diff --git a/docs/fonts/slate.ttf b/docs/fonts/slate.ttf deleted file mode 100755 index ace9a46a..00000000 Binary files a/docs/fonts/slate.ttf and /dev/null differ diff --git a/docs/fonts/slate.woff b/docs/fonts/slate.woff deleted file mode 100755 index 1e72e0ee..00000000 Binary files a/docs/fonts/slate.woff and /dev/null differ diff --git a/docs/fonts/slate.woff2 b/docs/fonts/slate.woff2 deleted file mode 100755 index 7c585a72..00000000 Binary files a/docs/fonts/slate.woff2 and /dev/null differ diff --git a/docs/images/bookmark.png b/docs/images/bookmark.png deleted file mode 100644 index da250d33..00000000 Binary files a/docs/images/bookmark.png and /dev/null differ diff --git a/docs/images/logo.png b/docs/images/logo.png deleted file mode 100644 index 851c8a32..00000000 Binary files a/docs/images/logo.png and /dev/null differ diff --git a/docs/images/navbar.png b/docs/images/navbar.png deleted file mode 100644 index df38e90d..00000000 Binary files a/docs/images/navbar.png and /dev/null differ diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index e2303742..00000000 --- a/docs/index.html +++ /dev/null @@ -1,923 +0,0 @@ - - - - - - API Reference - - - - - NAV navbar - - -
- - -
- - javascript - - bash - -
- - - - - -
- - - -
- -
-
-
- -

Introduction

-

Welcome to the Clear Payments API - Powered by Clear Treasury. With international payments a daily necessity for many, we have developed our online payments platform that dramatically streamlines the process.

-

We have designed the Clear Payments API to integrate directly into your process, product or software.

-

Authentication

-
-

To authorize, use this code:

-
-
# With shell, you can just pass the correct header with each request
-curl "api_endpoint_here"
-  -H "Authorization: --yourAuthKey--"
const kittn = require('kittn');
-
-let api = kittn.authorize('--yourAuthKey--');
-

Make sure to replace --yourAuthKey-- with your API key.

-
-

Clear Payments uses API keys to allow access to the API. You can register a new API key at our developer portal.

-

Clear Payments expects for the API key to be included in all API requests to the server in a header that looks like the following:

-

Authorization: --yourAuthKey--

- - - -

Bookquote

-
-

Example JSON response:

-
-
{
-  "ID": 0,
-  "Trade_Date": "string",
-  "Value_Date": "string",
-  "CCY_Bought": "string",
-  "CCY_Sold": "string",
-  "Rate": 0,
-  "Bought_Amount": 0,
-  "Sold_Amount": 0,
-  "Payment_Fee": 0,
-  "Trade_ID": "string",
-  "Trade_Type": "string",
-  "OurAccountName": "string",
-  "OurBankName": "string",
-  "OurIBAN": "string",
-  "OurSortCode": "string",
-  "OurSWIFTCode": "string",
-  "Message": "string"
-}

HTTP Request

-

POST /api/BookQuote/BookQuote

-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameLocated inDescriptionRequiredType
quote_idqueryYesinteger
sourceOfFundsqueryYesstring
ReasonForTradingqueryYesstring
-

Responses

- - - - - - - - - - - -
CodeDescription
200OK
-

Payment instruction

-

GET

-
-

Example JSON response:

-
-
[
-  {
-    "Intermediary": "string",
-    "AccountName": "string",
-    "AccountNumber": "string",
-    "Address": "string",
-    "BankName": "string",
-    "CCY": "string",
-    "Notes": "string",
-    "SortCode": "string",
-    "Swift": "string",
-    "CountryCode": "string",
-    "Email": "string",
-    "BenAddress": "string",
-    "CNAPS": "string",
-    "Purpose": "string",
-    "ChargeCode": "string",
-    "Amount": 0,
-    "PaymentReference": "string",
-    "TradeReference": "string",
-    "tra_client_id": 0,
-    "pin_id": 0,
-    "PaymentGUID": "string",
-    "opi_id": 0,
-    "CreationDate": "2019-10-17T11:27:23.691Z",
-    "Status": "string",
-    "exportedDate": "2019-10-17T11:27:23.691Z"
-  }
-]

HTTP Request

-

GET /api/PaymentInstruction/GetValues

-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - -
NameLocated inDescriptionRequiredType
fromDatequeryNostring
toDatequeryNostring
-

Responses

- - - - - - - - - - - -
CodeDescription
200OK
-

POST

-

HTTP Request

-

POST /api/PaymentInstruction/PostValue

-

Parameters

- - - - - - - - - - - - - - - - - -
NameLocated inDescriptionRequiredType
trbodyYes
-

Responses

- - - - - - - - - - - -
CodeDescription
200OK
-

Quote

-

POST

-

HTTP Request

-

POST /api/Quote/PostValue

-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameLocated inDescriptionRequiredType
ccy_sellqueryNostring
ccy_buyqueryNostring
value_datequeryNostring
sell_amountqueryNodouble
buy_amountqueryNodouble
quoteIDqueryNointeger
-

Responses

- - - - - - - - - - - -
CodeDescription
200OK
-

GET

-

HTTP Request

-

GET /api/Quote/GetValue

-

Parameters

- - - - - - - - - - - - - - - - - -
NameLocated inDescriptionRequiredType
quote_idqueryYesinteger
-

Responses

- - - - - - - - - - - -
CodeDescription
200OK
-

calculatequote

-
-

Example JSON response:

-
-
{
-  "ID": "string",
-  "sell_amount": 0,
-  "buy_amount": 0,
-  "client_rate": 0,
-  "bank_rate": 0,
-  "ccy_sell": "string",
-  "fee": 0,
-  "fee_ccy": 0,
-  "ccy_buy": "string",
-  "value_date": "string",
-  "Message": "string",
-  "Status": true
-}

HTTP Request

-

POST /api/Quote/CalculateQuote

-

Parameters

- - - - - - - - - - - - - - - - - -
NameLocated inDescriptionRequiredType
quote_idqueryYesinteger
-

Responses

- - - - - - - - - - - -
CodeDescription
200OK
-

Statement

-

GET

-
-

Example JSON response:

-
-
[
-  {
-    "Date": "2019-10-17T12:24:39.589Z",
-    "Reference": "string",
-    "Detail": "string",
-    "Receipts": 0,
-    "Payments": 0,
-    "Bank_Account": "string",
-    "Balance": 0
-  }
-]

HTTP Request

-

GET /api/Statement/GetValues

-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameLocated inDescriptionRequiredType
ccyqueryYesstring
fromDatequeryNostring
toDatequeryNostring
-

Responses

- - - - - - - - - - - -
CodeDescription
200OK
-

Template

-

GET

-
-

Example JSON response:

-
-
[
-  {
-    "pin_id": 0,
-    "pin_link_id": 0,
-    "pin_link_type": 0,
-    "pin_ccy": "string",
-    "pin_bank_name": "string",
-    "pin_address": "string",
-    "pin_account_name": "string",
-    "pin_account_number": "string",
-    "pin_sort_code": "string",
-    "pin_iban": "string",
-    "pin_swift_bic": "string",
-    "pin_fedwire_bank_code": "string",
-    "pin_details": "string",
-    "pin_notes": "string",
-    "pin_country_code": "string",
-    "pin_intermediary": "string",
-    "pin_email": "string",
-    "pin_alert_date": "string",
-    "pin_archived": true,
-    "pin_ben_name": "string",
-    "pin_ben_contact_name": "string",
-    "pin_ben_address": "string",
-    "pin_ben_activity": "string",
-    "pin_ben_post_code": "string",
-    "pin_ben_Town": "string",
-    "pin_bank_post_code": "string",
-    "pin_bank_Town": "string",
-    "pin_bank_code": "string",
-    "pin_bank_branch": "string",
-    "pin_CPF": "string",
-    "pin_account_type": "string",
-    "pin_cnaps": "string",
-    "pin_purpose": "string",
-    "pin_validate_date": "string",
-    "pin_last_external_check_date": "string",
-    "pin_low_risk": 0,
-    "pin_recurrent": 0,
-    "pin_partner": 0,
-    "pin_check_count": 0
-  }
-]

HTTP Request

-

GET /api/Template/GetValues

-

Responses

- - - - - - - - - - - -
CodeDescription
200OK
-

Token

-

POST

-

HTTP Request

-

POST /api/Token/PostValues

-

Parameters

- - - - - - - - - - - - - - - - - -
NameLocated inDescriptionRequiredType
ucbodyYes
-

Responses

- - - - - - - - - - - -
CodeDescription
200OK
-

Trade

-

GET

-
-

Example JSON response:

-
-
[
-  {
-    "ID": 0,
-    "Trade_Date": "string",
-    "Value_Date": "string",
-    "CCY_Bought": "string",
-    "CCY_Sold": "string",
-    "Rate": 0,
-    "Bought_Amount": 0,
-    "Sold_Amount": 0,
-    "Payment_Fee": 0,
-    "Trade_ID": "string",
-    "Trade_Type": "string",
-    "Status": "string",
-    "Beneficiary": "string"
-  }
-]

HTTP Request

-

GET /api/Trade/GetValues

-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - -
NameLocated inDescriptionRequiredType
fromDatequeryNostring
toDatequeryNostring
-

Responses

- - - - - - - - - - - -
CodeDescription
200OK
-

Webhooks

-

Filters

-
-

Example JSON response:

-
-
[
-  {
-    "Name": "string",
-    "Description": "string"
-  }
-]

HTTP Request

-

GET /api/webhooks/filters

-

Responses

- - - - - - - - - - - -
CodeDescription
200OK
-

Registrations

-
-

Example JSON response:

-
-
[
-  {
-    "Id": "string",
-    "WebHookUri": "string",
-    "Secret": "string",
-    "Description": "string",
-    "IsPaused": true,
-    "Filters": [
-      "string"
-    ],
-    "Headers": {},
-    "Properties": {}
-  }
-]

HTTP Request

-

GET /api/webhooks/registrations

-

Responses

- - - - - - - - - - - -
CodeDescription
200OK
-

HTTP Request

-

POST /api/webhooks/registrations

-

Parameters

- - - - - - - - - - - - - - - - - -
NameLocated inDescriptionRequiredType
webHookbodyYes
-

Responses

- - - - - - - - - - - -
CodeDescription
200OK
-

HTTP Request

-

DELETE /api/webhooks/registrations

-

Responses

- - - - - - - - - - - -
CodeDescription
200OK
-

Registrations/{id}

-

GET

-

HTTP Request

-

GET /api/webhooks/registrations/{id}

-

Parameters

- - - - - - - - - - - - - - - - - -
NameLocated inDescriptionRequiredType
idpathYesstring
-

Responses

- - - - - - - - - - - -
CodeDescription
200OK
-

PUT

-

HTTP Request

-

PUT /api/webhooks/registrations/{id}

-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - -
NameLocated inDescriptionRequiredType
idpathYesstring
webHookbodyYes
-

Responses

- - - - - - - - - - - -
CodeDescription
200OK
-

DELETE

-

HTTP Request

-

DELETE /api/webhooks/registrations/{id}

-

Parameters

- - - - - - - - - - - - - - - - - -
NameLocated inDescriptionRequiredType
idpathYesstring
-

Responses

- - - - - - - - - - - -
CodeDescription
200OK
- - -

Errors

- - -

The Clear Payments API uses the following error codes:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Error CodeMeaning
400Bad Request -- The request could not be understood by the server due to malformed syntax.
401Unauthorized -- Your API key is wrong.
403Forbidden -- The value requested is hidden for administrators only.
404Not Found -- The specified value could not be found.
405Method Not Allowed -- You tried to access a value with an invalid method.
406Not Acceptable -- You requested a format that isn't JSON.
410Gone -- The value requested has been removed from our servers.
418I'm a teapot.
429Too Many Requests -- You're requesting too many values! Slow down!
500Internal Server Error -- We had a problem with our server. Try again later.
503Service Unavailable -- We're temporarily offline for maintenance. Please try again later.
- - -
-
- -
- - javascript - - bash - -
- -
-
- - - - \ No newline at end of file diff --git a/docs/javascripts/all.js b/docs/javascripts/all.js deleted file mode 100644 index 0524a583..00000000 --- a/docs/javascripts/all.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,e){"use strict";"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(x,t){"use strict";function g(t){return null!=t&&t===t.window}var e=[],B=x.document,n=Object.getPrototypeOf,r=e.slice,m=e.concat,l=e.push,s=e.indexOf,i={},o=i.toString,b=i.hasOwnProperty,a=b.toString,c=a.call(Object),v={},y=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType},h={type:!0,src:!0,nonce:!0,noModule:!0};function I(t,e,i){var n,s,o=(i=i||B).createElement("script");if(o.text=t,e)for(n in h)(s=e[n]||e.getAttribute&&e.getAttribute(n))&&o.setAttribute(n,s);i.head.appendChild(o).parentNode.removeChild(o)}function _(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?i[o.call(t)]||"object":typeof t}var u="3.4.1",G=function(t,e){return new G.fn.init(t,e)},d=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function p(t){var e=!!t&&"length"in t&&t.length,i=_(t);return!y(t)&&!g(t)&&("array"===i||0===e||"number"==typeof e&&0>10|55296,1023&n|56320)}function s(){C()}var t,p,I,o,a,f,d,g,_,l,c,C,x,r,B,m,h,b,v,G="sizzle"+1*new Date,y=i.document,w=0,n=0,A=lt(),k=lt(),Q=lt(),F=lt(),N=function(t,e){return t===e&&(c=!0),0},W={}.hasOwnProperty,e=[],T=e.pop,D=e.push,S=e.push,Z=e.slice,E=function(t,e){for(var i=0,n=t.length;i+~]|"+R+")"+R+"*"),M=new RegExp(R+"|>"),P=new RegExp(U),j=new RegExp("^"+V+"$"),J={ID:new RegExp("^#("+V+")"),CLASS:new RegExp("^\\.("+V+")"),TAG:new RegExp("^("+V+"|[*])"),ATTR:new RegExp("^"+X),PSEUDO:new RegExp("^"+U),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+H+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},K=/HTML$/i,q=/^(?:input|select|textarea|button)$/i,$=/^h\d$/i,tt=/^[^{]+\{\s*\[native \w/,et=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,it=/[+~]/,nt=new RegExp("\\\\([\\da-f]{1,6}"+R+"?|("+R+")|.)","ig"),st=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ot=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},at=It(function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{S.apply(e=Z.call(y.childNodes),y.childNodes),e[y.childNodes.length].nodeType}catch(t){S={apply:e.length?function(t,e){D.apply(t,Z.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}function rt(e,t,i,n){var s,o,a,r,l,c,h,u=t&&t.ownerDocument,d=t?t.nodeType:9;if(i=i||[],"string"!=typeof e||!e||1!==d&&9!==d&&11!==d)return i;if(!n&&((t?t.ownerDocument||t:y)!==x&&C(t),t=t||x,B)){if(11!==d&&(l=et.exec(e)))if(s=l[1]){if(9===d){if(!(a=t.getElementById(s)))return i;if(a.id===s)return i.push(a),i}else if(u&&(a=u.getElementById(s))&&v(t,a)&&a.id===s)return i.push(a),i}else{if(l[2])return S.apply(i,t.getElementsByTagName(e)),i;if((s=l[3])&&p.getElementsByClassName&&t.getElementsByClassName)return S.apply(i,t.getElementsByClassName(s)),i}if(p.qsa&&!F[e+" "]&&(!m||!m.test(e))&&(1!==d||"object"!==t.nodeName.toLowerCase())){if(h=e,u=t,1===d&&M.test(e)){for((r=t.getAttribute("id"))?r=r.replace(st,ot):t.setAttribute("id",r=G),o=(c=f(e)).length;o--;)c[o]="#"+r+" "+yt(c[o]);h=c.join(","),u=it.test(e)&&bt(t.parentNode)||t}try{return S.apply(i,u.querySelectorAll(h)),i}catch(t){F(e,!0)}finally{r===G&&t.removeAttribute("id")}}}return g(e.replace(L,"$1"),t,i,n)}function lt(){var n=[];return function t(e,i){return n.push(e+" ")>I.cacheLength&&delete t[n.shift()],t[e+" "]=i}}function ct(t){return t[G]=!0,t}function ht(t){var e=x.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ut(t,e){for(var i=t.split("|"),n=i.length;n--;)I.attrHandle[i[n]]=e}function dt(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function pt(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function ft(i){return function(t){var e=t.nodeName.toLowerCase();return("input"===e||"button"===e)&&t.type===i}}function gt(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&at(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function mt(a){return ct(function(o){return o=+o,ct(function(t,e){for(var i,n=a([],t.length,o),s=n.length;s--;)t[i=n[s]]&&(t[i]=!(e[i]=t[i]))})})}function bt(t){return t&&void 0!==t.getElementsByTagName&&t}for(t in p=rt.support={},a=rt.isXML=function(t){var e=t.namespaceURI,i=(t.ownerDocument||t).documentElement;return!K.test(e||i&&i.nodeName||"HTML")},C=rt.setDocument=function(t){var e,i,n=t?t.ownerDocument||t:y;return n!==x&&9===n.nodeType&&n.documentElement&&(r=(x=n).documentElement,B=!a(x),y!==x&&(i=x.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",s,!1):i.attachEvent&&i.attachEvent("onunload",s)),p.attributes=ht(function(t){return t.className="i",!t.getAttribute("className")}),p.getElementsByTagName=ht(function(t){return t.appendChild(x.createComment("")),!t.getElementsByTagName("*").length}),p.getElementsByClassName=tt.test(x.getElementsByClassName),p.getById=ht(function(t){return r.appendChild(t).id=G,!x.getElementsByName||!x.getElementsByName(G).length}),p.getById?(I.filter.ID=function(t){var e=t.replace(nt,u);return function(t){return t.getAttribute("id")===e}},I.find.ID=function(t,e){if(void 0!==e.getElementById&&B){var i=e.getElementById(t);return i?[i]:[]}}):(I.filter.ID=function(t){var i=t.replace(nt,u);return function(t){var e=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return e&&e.value===i}},I.find.ID=function(t,e){if(void 0!==e.getElementById&&B){var i,n,s,o=e.getElementById(t);if(o){if((i=o.getAttributeNode("id"))&&i.value===t)return[o];for(s=e.getElementsByName(t),n=0;o=s[n++];)if((i=o.getAttributeNode("id"))&&i.value===t)return[o]}return[]}}),I.find.TAG=p.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):p.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],s=0,o=e.getElementsByTagName(t);if("*"!==t)return o;for(;i=o[s++];)1===i.nodeType&&n.push(i);return n},I.find.CLASS=p.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&B)return e.getElementsByClassName(t)},h=[],m=[],(p.qsa=tt.test(x.querySelectorAll))&&(ht(function(t){r.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+R+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||m.push("\\["+R+"*(?:value|"+H+")"),t.querySelectorAll("[id~="+G+"-]").length||m.push("~="),t.querySelectorAll(":checked").length||m.push(":checked"),t.querySelectorAll("a#"+G+"+*").length||m.push(".#.+[+~]")}),ht(function(t){t.innerHTML="";var e=x.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&m.push("name"+R+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),r.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),m.push(",.*:")})),(p.matchesSelector=tt.test(b=r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.oMatchesSelector||r.msMatchesSelector))&&ht(function(t){p.disconnectedMatch=b.call(t,"*"),b.call(t,"[s!='']:x"),h.push("!=",U)}),m=m.length&&new RegExp(m.join("|")),h=h.length&&new RegExp(h.join("|")),e=tt.test(r.compareDocumentPosition),v=e||tt.test(r.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},N=e?function(t,e){if(t===e)return c=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!p.sortDetached&&e.compareDocumentPosition(t)===i?t===x||t.ownerDocument===y&&v(y,t)?-1:e===x||e.ownerDocument===y&&v(y,e)?1:l?E(l,t)-E(l,e):0:4&i?-1:1)}:function(t,e){if(t===e)return c=!0,0;var i,n=0,s=t.parentNode,o=e.parentNode,a=[t],r=[e];if(!s||!o)return t===x?-1:e===x?1:s?-1:o?1:l?E(l,t)-E(l,e):0;if(s===o)return dt(t,e);for(i=t;i=i.parentNode;)a.unshift(i);for(i=e;i=i.parentNode;)r.unshift(i);for(;a[n]===r[n];)n++;return n?dt(a[n],r[n]):a[n]===y?-1:r[n]===y?1:0}),x},rt.matches=function(t,e){return rt(t,null,null,e)},rt.matchesSelector=function(t,e){if((t.ownerDocument||t)!==x&&C(t),p.matchesSelector&&B&&!F[e+" "]&&(!h||!h.test(e))&&(!m||!m.test(e)))try{var i=b.call(t,e);if(i||p.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){F(e,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(nt,u),t[3]=(t[3]||t[4]||t[5]||"").replace(nt,u),"~="===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]||rt.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]&&rt.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return J.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&P.test(i)&&(e=f(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(nt,u).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=A[t+" "];return e||(e=new RegExp("(^|"+R+")"+t+"("+R+"|$)"))&&A(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(i,n,s){return function(t){var e=rt.attr(t,i);return null==e?"!="===n:!n||(e+="","="===n?e===s:"!="===n?e!==s:"^="===n?s&&0===e.indexOf(s):"*="===n?s&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function F(t,i,n){return y(i)?G.grep(t,function(t,e){return!!i.call(t,e,t)!==n}):i.nodeType?G.grep(t,function(t){return t===i!==n}):"string"!=typeof i?G.grep(t,function(t){return-1)[^>]*|#([\w-]+))$/;(G.fn.init=function(t,e,i){var n,s;if(!t)return this;if(i=i||N,"string"!=typeof t)return t.nodeType?(this[0]=t,this.length=1,this):y(t)?void 0!==i.ready?i.ready(t):t(G):G.makeArray(t,this);if(!(n="<"===t[0]&&">"===t[t.length-1]&&3<=t.length?[null,t,null]:W.exec(t))||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof G?e[0]:e,G.merge(this,G.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:B,!0)),Q.test(n[1])&&G.isPlainObject(e))for(n in e)y(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return(s=B.getElementById(n[2]))&&(this[0]=s,this.length=1),this}).prototype=G.fn,N=G(B);var T=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};function S(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}G.fn.extend({has:function(t){var e=G(t,this),i=e.length;return this.filter(function(){for(var t=0;t\x20\t\r\n\f]*)/i,ft=/^$|^module$|\/(?:java|ecma)script/i,gt={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function mt(t,e){var i;return i=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&k(t,e)?G.merge([t],i):i}function bt(t,e){for(var i=0,n=t.length;ix",v.noCloneChecked=!!vt.cloneNode(!0).lastChild.defaultValue;var Ct=/^key/,xt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Bt=/^([^.]*)(?:\.(.+)|)/;function Gt(){return!0}function wt(){return!1}function At(t,e){return t===function(){try{return B.activeElement}catch(t){}}()==("focus"===e)}function kt(t,e,i,n,s,o){var a,r;if("object"==typeof e){for(r in"string"!=typeof i&&(n=n||i,i=void 0),e)kt(t,r,i,n,e[r],o);return t}if(null==n&&null==s?(s=i,n=i=void 0):null==s&&("string"==typeof i?(s=n,n=void 0):(s=n,n=i,i=void 0)),!1===s)s=wt;else if(!s)return t;return 1===o&&(a=s,(s=function(t){return G().off(t),a.apply(this,arguments)}).guid=a.guid||(a.guid=G.guid++)),t.each(function(){G.event.add(this,e,s,n,i)})}function Qt(t,s,o){o?(J.set(t,s,!1),G.event.add(t,s,{namespace:!1,handler:function(t){var e,i,n=J.get(this,s);if(1&t.isTrigger&&this[s]){if(n.length)(G.event.special[s]||{}).delegateType&&t.stopPropagation();else if(n=r.call(arguments),J.set(this,s,n),e=o(this,s),this[s](),n!==(i=J.get(this,s))||e?J.set(this,s,!1):i={},n!==i)return t.stopImmediatePropagation(),t.preventDefault(),i.value}else n.length&&(J.set(this,s,{value:G.event.trigger(G.extend(n[0],G.Event.prototype),n.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===J.get(t,s)&&G.event.add(t,s,Gt)}G.event={global:{},add:function(e,t,i,n,s){var o,a,r,l,c,h,u,d,p,f,g,m=J.get(e);if(m)for(i.handler&&(i=(o=i).handler,s=o.selector),s&&G.find.matchesSelector(st,s),i.guid||(i.guid=G.guid++),(l=m.events)||(l=m.events={}),(a=m.handle)||(a=m.handle=function(t){return void 0!==G&&G.event.triggered!==t.type?G.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(Z)||[""]).length;c--;)p=g=(r=Bt.exec(t[c])||[])[1],f=(r[2]||"").split(".").sort(),p&&(u=G.event.special[p]||{},p=(s?u.delegateType:u.bindType)||p,u=G.event.special[p]||{},h=G.extend({type:p,origType:g,data:n,handler:i,guid:i.guid,selector:s,needsContext:s&&G.expr.match.needsContext.test(s),namespace:f.join(".")},o),(d=l[p])||((d=l[p]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(e,n,f,a)||e.addEventListener&&e.addEventListener(p,a)),u.add&&(u.add.call(e,h),h.handler.guid||(h.handler.guid=i.guid)),s?d.splice(d.delegateCount++,0,h):d.push(h),G.event.global[p]=!0)},remove:function(t,e,i,n,s){var o,a,r,l,c,h,u,d,p,f,g,m=J.hasData(t)&&J.get(t);if(m&&(l=m.events)){for(c=(e=(e||"").match(Z)||[""]).length;c--;)if(p=g=(r=Bt.exec(e[c])||[])[1],f=(r[2]||"").split(".").sort(),p){for(u=G.event.special[p]||{},d=l[p=(n?u.delegateType:u.bindType)||p]||[],r=r[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)h=d[o],!s&&g!==h.origType||i&&i.guid!==h.guid||r&&!r.test(h.namespace)||n&&n!==h.selector&&("**"!==n||!h.selector)||(d.splice(o,1),h.selector&&d.delegateCount--,u.remove&&u.remove.call(t,h));a&&!d.length&&(u.teardown&&!1!==u.teardown.call(t,f,m.handle)||G.removeEvent(t,p,m.handle),delete l[p])}else for(p in l)G.event.remove(t,p+e[c],i,n,!0);G.isEmptyObject(l)&&J.remove(t,"handle events")}},dispatch:function(t){var e,i,n,s,o,a,r=G.event.fix(t),l=new Array(arguments.length),c=(J.get(this,"events")||{})[r.type]||[],h=G.event.special[r.type]||{};for(l[0]=r,e=1;e\x20\t\r\n\f]*)[^>]*)\/>/gi,Nt=/\s*$/g;function Dt(t,e){return k(t,"table")&&k(11!==e.nodeType?e:e.firstChild,"tr")&&G(t).children("tbody")[0]||t}function St(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Zt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Et(t,e){var i,n,s,o,a,r,l,c;if(1===e.nodeType){if(J.hasData(t)&&(o=J.access(t),a=J.set(e,o),c=o.events))for(s in delete a.handle,a.events={},c)for(i=0,n=c[s].length;i")},clone:function(t,e,i){var n,s,o,a,r,l,c,h=t.cloneNode(!0),u=ot(t);if(!(v.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||G.isXMLDoc(t)))for(a=mt(h),n=0,s=(o=mt(t)).length;n").attr(i.scriptAttrs||{}).prop({charset:i.scriptCharset,src:i.url}).on("load error",s=function(t){n.remove(),s=null,t&&e("error"===t.type?404:200,t.type)}),B.head.appendChild(n[0])},abort:function(){s&&s()}}});var ii,ni=[],si=/(=)\?(?=&|$)|\?\?/;G.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=ni.pop()||G.expando+"_"+De++;return this[t]=!0,t}}),G.ajaxPrefilter("json jsonp",function(t,e,i){var n,s,o,a=!1!==t.jsonp&&(si.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&si.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return n=t.jsonpCallback=y(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(si,"$1"+n):!1!==t.jsonp&&(t.url+=(Se.test(t.url)?"&":"?")+t.jsonp+"="+n),t.converters["script json"]=function(){return o||G.error(n+" was not called"),o[0]},t.dataTypes[0]="json",s=x[n],x[n]=function(){o=arguments},i.always(function(){void 0===s?G(x).removeProp(n):x[n]=s,t[n]&&(t.jsonpCallback=e.jsonpCallback,ni.push(n)),o&&y(s)&&s(o[0]),o=s=void 0}),"script"}),v.createHTMLDocument=((ii=B.implementation.createHTMLDocument("").body).innerHTML="
",2===ii.childNodes.length),G.parseHTML=function(t,e,i){return"string"!=typeof t?[]:("boolean"==typeof e&&(i=e,e=!1),e||(v.createHTMLDocument?((n=(e=B.implementation.createHTMLDocument("")).createElement("base")).href=B.location.href,e.head.appendChild(n)):e=B),o=!i&&[],(s=Q.exec(t))?[e.createElement(s[1])]:(s=_t([t],e,o),o&&o.length&&G(o).remove(),G.merge([],s.childNodes)));var n,s,o},G.fn.load=function(t,e,i){var n,s,o,a=this,r=t.indexOf(" ");return-1").append(G.parseHTML(t)).find(n):t)}).always(i&&function(t,e){a.each(function(){i.apply(this,o||[t.responseText,e,t])})}),this},G.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){G.fn[e]=function(t){return this.on(e,t)}}),G.expr.pseudos.animated=function(e){return G.grep(G.timers,function(t){return e===t.elem}).length},G.offset={setOffset:function(t,e,i){var n,s,o,a,r,l,c=G.css(t,"position"),h=G(t),u={};"static"===c&&(t.style.position="relative"),r=h.offset(),o=G.css(t,"top"),l=G.css(t,"left"),s=("absolute"===c||"fixed"===c)&&-1<(o+l).indexOf("auto")?(a=(n=h.position()).top,n.left):(a=parseFloat(o)||0,parseFloat(l)||0),y(e)&&(e=e.call(t,i,G.extend({},r))),null!=e.top&&(u.top=e.top-r.top+a),null!=e.left&&(u.left=e.left-r.left+s),"using"in e?e.using.call(t,u):h.css(u)}},G.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){G.offset.setOffset(this,e,t)});var t,i,n=this[0];return n?n.getClientRects().length?(t=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:t.top+i.pageYOffset,left:t.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,i,n=this[0],s={top:0,left:0};if("fixed"===G.css(n,"position"))e=n.getBoundingClientRect();else{for(e=this.offset(),i=n.ownerDocument,t=n.offsetParent||i.documentElement;t&&(t===i.body||t===i.documentElement)&&"static"===G.css(t,"position");)t=t.parentNode;t&&t!==n&&1===t.nodeType&&((s=G(t).offset()).top+=G.css(t,"borderTopWidth",!0),s.left+=G.css(t,"borderLeftWidth",!0))}return{top:e.top-s.top-G.css(n,"marginTop",!0),left:e.left-s.left-G.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===G.css(t,"position");)t=t.offsetParent;return t||st})}}),G.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,s){var o="pageYOffset"===s;G.fn[e]=function(t){return Y(this,function(t,e,i){var n;if(g(t)?n=t:9===t.nodeType&&(n=t.defaultView),void 0===i)return n?n[s]:t[e];n?n.scrollTo(o?n.pageXOffset:i,o?i:n.pageYOffset):t[e]=i},e,t,arguments.length)}}),G.each(["top","left"],function(t,i){G.cssHooks[i]=$t(v.pixelPosition,function(t,e){if(e)return e=qt(t,i),Mt.test(e)?G(t).position()[i]+"px":e})}),G.each({Height:"height",Width:"width"},function(a,r){G.each({padding:"inner"+a,content:r,"":"outer"+a},function(n,o){G.fn[o]=function(t,e){var i=arguments.length&&(n||"boolean"!=typeof t),s=n||(!0===t||!0===e?"margin":"border");return Y(this,function(t,e,i){var n;return g(t)?0===o.indexOf("outer")?t["inner"+a]:t.document.documentElement["client"+a]:9===t.nodeType?(n=t.documentElement,Math.max(t.body["scroll"+a],n["scroll"+a],t.body["offset"+a],n["offset"+a],n["client"+a])):void 0===i?G.css(t,e,s):G.style(t,e,i,s)},r,i?t:void 0,i)}})}),G.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(t,i){G.fn[i]=function(t,e){return 0",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,n,s,o=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(n=o[t]=x.widget.extend({},this.options[t]),s=0;s
"),n=i.children()[0];return x("body").append(i),t=n.offsetWidth,i.css("overflow","scroll"),t===(e=n.offsetWidth)&&(e=i[0].clientWidth),i.remove(),o=t-e},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),n="scroll"===e||"auto"===e&&t.widthC(B(n),B(s))?o.important="horizontal":o.important="vertical",u.using.call(this,t,o)}),a.offset(x.extend(c,{using:t}))})},x.ui.position={fit:{left:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollLeft:n.offset.left,o=n.width,a=t.left-e.collisionPosition.marginLeft,r=s-a,l=a+e.collisionWidth-o-s;e.collisionWidth>o?0o?0")[0],_=u.each,I.style.cssText="background-color:rgba(1,1,1,.5)",y.rgba=-1o.mod/2?n+=o.mod:n-s>o.mod/2&&(n-=o.mod)),c[i]=X((s-n)*a+n,e)))}),this[e](c)},blend:function(t){if(1===this._rgba[3])return this;var e=this._rgba.slice(),i=e.pop(),n=m(t)._rgba;return m(u.map(e,function(t,e){return(1-i)*n[e]+i*t}))},toRgbaString:function(){var t="rgba(",e=u.map(this._rgba,function(t,e){return null==t?2").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:i.width(),height:i.height()},s=document.activeElement;try{s.id}catch(t){s=document.body}return i.wrap(t),i[0]!==s&&!x.contains(i[0],s)||x(s).trigger("focus"),t=i.parent(),"static"===i.css("position")?(t.css({position:"relative"}),i.css({position:"relative"})):(x.extend(n,{position:i.css("position"),zIndex:i.css("z-index")}),x.each(["top","left","bottom","right"],function(t,e){n[e]=i.css(e),isNaN(parseInt(n[e],10))&&(n[e]="auto")}),i.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(e),t.css(n).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),t[0]!==e&&!x.contains(t[0],e)||x(e).trigger("focus")),t}}),x.extend(x.effects,{version:"1.12.1",define:function(t,e,i){return i||(i=e,e="effect"),x.effects.effect[t]=i,x.effects.effect[t].mode=e,i},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var n="horizontal"!==i?(e||100)/100:1,s="vertical"!==i?(e||100)/100:1;return{height:t.height()*s,width:t.width()*n,outerHeight:t.outerHeight()*s,outerWidth:t.outerWidth()*n}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var n=t.queue();1").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(E+"placeholder",e)),t.css({position:i,left:n.left,top:n.top}),e},removePlaceholder:function(t){var e=E+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(t){x.effects.restoreStyle(t),x.effects.removePlaceholder(t)},setTransition:function(n,t,s,o){return o=o||{},x.each(t,function(t,e){var i=n.cssUnit(e);0").appendTo("body").addClass(t.className).css({top:h.top-a,left:h.left-r,height:i.innerHeight(),width:i.innerWidth(),position:s?"fixed":"absolute"}).animate(c,t.duration,t.easing,function(){u.remove(),x.isFunction(e)&&e()})}}),x.fx.step.clip=function(t){t.clipInit||(t.start=x(t.elem).cssClip(),"string"==typeof t.end&&(t.end=M(t.end,t.elem)),t.clipInit=!0),x(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})},Z={},x.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){Z[t]=function(t){return Math.pow(t,e+2)}}),x.extend(Z,{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;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),x.each(Z,function(t,e){x.easing["easeIn"+t]=e,x.easing["easeOut"+t]=function(t){return 1-e(1-t)},x.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}});x.effects,x.effects.define("blind","hide",function(t,e){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},n=x(this),s=t.direction||"up",o=n.cssClip(),a={clip:x.extend({},o)},r=x.effects.createPlaceholder(n);a.clip[i[s][0]]=a.clip[i[s][1]],"show"===t.mode&&(n.cssClip(a.clip),r&&r.css(x.effects.clipToBox(a)),a.clip=o),r&&r.animate(x.effects.clipToBox(a),t.duration,t.easing),n.animate(a,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),x.effects.define("bounce",function(t,e){var i,n,s,o=x(this),a=t.mode,r="hide"===a,l="show"===a,c=t.direction||"up",h=t.distance,u=t.times||5,d=2*u+(l||r?1:0),p=t.duration/d,f=t.easing,g="up"===c||"down"===c?"top":"left",m="up"===c||"left"===c,b=0,v=o.queue().length;for(x.effects.createPlaceholder(o),s=o.css(g),h=h||o["top"==g?"outerHeight":"outerWidth"]()/3,l&&((n={opacity:1})[g]=s,o.css("opacity",0).css(g,m?2*-h:2*h).animate(n,p,f)),r&&(h/=Math.pow(2,u-1)),(n={})[g]=s;b").css({position:"absolute",visibility:"visible",left:-n*p,top:-i*f}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:p,height:f,left:s+(u?a*p:0),top:o+(u?r*f:0),opacity:u?0:1}).animate({left:s+(u?0:a*p),top:o+(u?0:r*f),opacity:u?1:0},t.duration||500,t.easing,m)}),x.effects.define("fade","toggle",function(t,e){var i="show"===t.mode;x(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),x.effects.define("fold","hide",function(e,t){var i=x(this),n=e.mode,s="show"===n,o="hide"===n,a=e.size||15,r=/([0-9]+)%/.exec(a),l=!!e.horizFirst?["right","bottom"]:["bottom","right"],c=e.duration/2,h=x.effects.createPlaceholder(i),u=i.cssClip(),d={clip:x.extend({},u)},p={clip:x.extend({},u)},f=[u[l[0]],u[l[1]]],g=i.queue().length;r&&(a=parseInt(r[1],10)/100*f[o?0:1]),d.clip[l[0]]=a,p.clip[l[0]]=a,p.clip[l[1]]=0,s&&(i.cssClip(p.clip),h&&h.css(x.effects.clipToBox(p)),p.clip=u),i.queue(function(t){h&&h.animate(x.effects.clipToBox(d),c,e.easing).animate(x.effects.clipToBox(p),c,e.easing),t()}).animate(d,c,e.easing).animate(p,c,e.easing).queue(t),x.effects.unshift(i,g,4)}),x.effects.define("highlight","show",function(t,e){var i=x(this),n={backgroundColor:i.css("backgroundColor")};"hide"===t.mode&&(n.opacity=0),x.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(n,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),x.effects.define("size",function(s,e){var t,o,i,n=x(this),a=["fontSize"],r=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=s.mode,h="effect"!==c,u=s.scale||"both",d=s.origin||["middle","center"],p=n.css("position"),f=n.position(),g=x.effects.scaledDimensions(n),m=s.from||g,b=s.to||x.effects.scaledDimensions(n,0);x.effects.createPlaceholder(n),"show"===c&&(i=m,m=b,b=i),o={from:{y:m.height/g.height,x:m.width/g.width},to:{y:b.height/g.height,x:b.width/g.width}},"box"!==u&&"both"!==u||(o.from.y!==o.to.y&&(m=x.effects.setTransition(n,r,o.from.y,m),b=x.effects.setTransition(n,r,o.to.y,b)),o.from.x!==o.to.x&&(m=x.effects.setTransition(n,l,o.from.x,m),b=x.effects.setTransition(n,l,o.to.x,b))),"content"!==u&&"both"!==u||o.from.y!==o.to.y&&(m=x.effects.setTransition(n,a,o.from.y,m),b=x.effects.setTransition(n,a,o.to.y,b)),d&&(t=x.effects.getBaseline(d,g),m.top=(g.outerHeight-m.outerHeight)*t.y+f.top,m.left=(g.outerWidth-m.outerWidth)*t.x+f.left,b.top=(g.outerHeight-b.outerHeight)*t.y+f.top,b.left=(g.outerWidth-b.outerWidth)*t.x+f.left),n.css(m),"content"!==u&&"both"!==u||(r=r.concat(["marginTop","marginBottom"]).concat(a),l=l.concat(["marginLeft","marginRight"]),n.find("*[width]").each(function(){var t=x(this),e=x.effects.scaledDimensions(t),i={height:e.height*o.from.y,width:e.width*o.from.x,outerHeight:e.outerHeight*o.from.y,outerWidth:e.outerWidth*o.from.x},n={height:e.height*o.to.y,width:e.width*o.to.x,outerHeight:e.height*o.to.y,outerWidth:e.width*o.to.x};o.from.y!==o.to.y&&(i=x.effects.setTransition(t,r,o.from.y,i),n=x.effects.setTransition(t,r,o.to.y,n)),o.from.x!==o.to.x&&(i=x.effects.setTransition(t,l,o.from.x,i),n=x.effects.setTransition(t,l,o.to.x,n)),h&&x.effects.saveStyle(t),t.css(i),t.animate(n,s.duration,s.easing,function(){h&&x.effects.restoreStyle(t)})})),n.animate(b,{queue:!1,duration:s.duration,easing:s.easing,complete:function(){var t=n.offset();0===b.opacity&&n.css("opacity",m.opacity),h||(n.css("position","static"===p?"relative":p).offset(t),x.effects.saveStyle(n)),e()}})}),x.effects.define("scale",function(t,e){var i=x(this),n=t.mode,s=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"effect"!==n?0:100),o=x.extend(!0,{from:x.effects.scaledDimensions(i),to:x.effects.scaledDimensions(i,s,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(o.from.opacity=1,o.to.opacity=0),x.effects.effect.size.call(this,o,e)}),x.effects.define("puff","hide",function(t,e){var i=x.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});x.effects.effect.scale.call(this,i,e)}),x.effects.define("pulsate","show",function(t,e){var i=x(this),n=t.mode,s="show"===n,o=s||"hide"===n,a=2*(t.times||5)+(o?1:0),r=t.duration/a,l=0,c=1,h=i.queue().length;for(!s&&i.is(":visible")||(i.css("opacity",0).show(),l=1);c?@[\]^`{|}~])/g,function(t){return t.replace(P,"\\$1")}),x.fn.labels=function(){var t,e,i,n,s;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),(i=this.attr("id"))&&(s=(t=this.eq(0).parents().last()).add(t.length?t.siblings():this.siblings()),e="label[for='"+x.ui.escapeSelector(i)+"']",n=n.add(s.find(e).addBack(e))),this.pushStack(n))},x.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,s=this.parents().filter(function(){var t=x(this);return(!i||"static"!==t.css("position"))&&n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&s.length?s:x(this[0].ownerDocument||document)},x.extend(x.expr[":"],{tabbable:function(t){var e=x.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&x.ui.focusable(t,i)}}),x.fn.extend({uniqueId:(j=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++j)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&x(this).removeAttr("id")})}}),x.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},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 t=this.options;this.prevShow=this.prevHide=x(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():x()}},_createIcons:function(){var t,e,i=this.options.icons;i&&(t=x(""),this._addClass(t,"ui-accordion-header-icon","ui-icon "+i.header),t.prependTo(this.headers),e=this.active.children(".ui-accordion-header-icon"),this._removeClass(e,i.header)._addClass(e,null,i.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){"active"!==t?("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons())):this._activate(e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var e=x.ui.keyCode,i=this.headers.length,n=this.headers.index(t.target),s=!1;switch(t.keyCode){case e.RIGHT:case e.DOWN:s=this.headers[(n+1)%i];break;case e.LEFT:case e.UP:s=this.headers[(n-1+i)%i];break;case e.SPACE:case e.ENTER:this._eventHandler(t);break;case e.HOME:s=this.headers[0];break;case e.END:s=this.headers[i-1]}s&&(x(t.target).attr("tabIndex",-1),x(s).attr("tabIndex",0),x(s).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===x.ui.keyCode.UP&&t.ctrlKey&&x(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=x()):!1===t.active?this._activate(0):this.active.length&&!x.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=x()):this._activate(Math.max(0,t.active-1)):t.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),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var i,t=this.options,e=t.heightStyle,n=this.element.parent();this.active=this._findActive(t.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var t=x(this),e=t.uniqueId().attr("id"),i=t.next(),n=i.uniqueId().attr("id");t.attr("aria-controls",n),i.attr("aria-labelledby",e)}).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(t.event),"fill"===e?(i=n.height(),this.element.siblings(":visible").each(function(){var t=x(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=x(this).outerHeight(!0)}),this.headers.next().each(function(){x(this).height(Math.max(0,i-x(this).innerHeight()+x(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.headers.next().each(function(){var t=x(this).is(":visible");t||x(this).show(),i=Math.max(i,x(this).css("height","").height()),t||x(this).hide()}).height(i))},_activate:function(t){var e=this._findActive(t)[0];e!==this.active[0]&&(e=e||this.active[0],this._eventHandler({target:e,currentTarget:e,preventDefault:x.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):x()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&x.each(t.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(t){var e,i,n=this.options,s=this.active,o=x(t.currentTarget),a=o[0]===s[0],r=a&&n.collapsible,l=r?x():o.next(),c=s.next(),h={oldHeader:s,oldPanel:c,newHeader:r?x():o,newPanel:l};t.preventDefault(),a&&!n.collapsible||!1===this._trigger("beforeActivate",t,h)||(n.active=!r&&this.headers.index(o),this.active=a?x():o,this._toggle(h),this._removeClass(s,"ui-accordion-header-active","ui-state-active"),n.icons&&(e=s.children(".ui-accordion-header-icon"),this._removeClass(e,null,n.icons.activeHeader)._addClass(e,null,n.icons.header)),a||(this._removeClass(o,"ui-accordion-header-collapsed")._addClass(o,"ui-accordion-header-active","ui-state-active"),n.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,n.icons.header)._addClass(i,null,n.icons.activeHeader)),this._addClass(o.next(),"ui-accordion-content-active")))},_toggle:function(t){var e=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=e,this.prevHide=i,this.options.animate?this._animate(e,i,t):(i.hide(),e.show(),this._toggleComplete(t)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),e.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):e.length&&this.headers.filter(function(){return 0===parseInt(x(this).attr("tabIndex"),10)}).attr("tabIndex",-1),e.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,i,e){function n(){r._toggleComplete(e)}var s,o,a,r=this,l=0,c=t.css("box-sizing"),h=t.length&&(!i.length||t.index()",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(t){var e=x(t.target),i=x(x.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var e=x(t.target).closest(".ui-menu-item"),i=x(t.currentTarget);e[0]===i[0]&&(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,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(t){this._delay(function(){x.contains(this.element[0],x.ui.safeActiveElement(this.document[0]))||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=x(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,n,s,o=!0;switch(t.keyCode){case x.ui.keyCode.PAGE_UP:this.previousPage(t);break;case x.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case x.ui.keyCode.HOME:this._move("first","first",t);break;case x.ui.keyCode.END:this._move("last","last",t);break;case x.ui.keyCode.UP:this.previous(t);break;case x.ui.keyCode.DOWN:this.next(t);break;case x.ui.keyCode.LEFT:this.collapse(t);break;case x.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case x.ui.keyCode.ENTER:case x.ui.keyCode.SPACE:this._activate(t);break;case x.ui.keyCode.ESCAPE:this.collapse(t);break;default:o=!1,i=this.previousFilter||"",s=!1,n=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),n===i?s=!0:n=i+n,e=this._filterMenuItems(n),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(n=String.fromCharCode(t.keyCode),e=this._filterMenuItems(n)),e.length?(this.focus(t,e),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}o&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,i,n,s=this,o=this.options.icons.submenu,a=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=a.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=x(this),e=t.prev(),i=x("").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+o),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=a.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=x(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),n=(i=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(i,"ui-menu-item")._addClass(n,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!x.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,n,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),n=this.active.children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),s=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,n,s,o,a;this._hasScroll()&&(e=parseFloat(x.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(x.css(this.activeMenu[0],"paddingTop"))||0,n=t.offset().top-this.activeMenu.offset().top-e-i,s=this.activeMenu.scrollTop(),o=this.activeMenu.height(),a=t.outerHeight(),n<0?this.activeMenu.scrollTop(s+n):o",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 i,n,s,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,o="input"===t;this.isMultiLine=e||!o&&this._isContentEditable(this.element),this.valueMethod=this.element[e||o?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))n=s=i=!0;else{n=s=i=!1;var e=x.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:n=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!n){var e=x.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(s)return s=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),this._change(t))}}),this._initSource(),this.menu=x("