diff --git a/.travis.yml b/.travis.yml
index 63e92431..099d8f6c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,8 +1,12 @@
language: objective-c
-install: gem install xcpretty --no-rdoc --no-ri --no-document --quiet
+install:
+ - gem install xcpretty --no-rdoc --no-ri --no-document --quiet
+ - sudo easy_install cpp-coveralls
script:
- export LC_CTYPE=en_US.UTF-8
- set -o pipefail
- xcodebuild test -project XCDYouTubeKit.xcodeproj -scheme 'XCDYouTubeKit iOS' -destination 'platform=iOS Simulator,name=iPhone Retina (4-inch)' | xcpretty -c
- - xcodebuild test -project XCDYouTubeKit.xcodeproj -scheme 'XCDYouTubeKit iOS' -destination 'platform=iOS Simulator,name=iPhone Retina (4-inch 64-bit)' | xcpretty -c
+ - xcodebuild test -project XCDYouTubeKit.xcodeproj -scheme 'XCDYouTubeKit iOS' -destination 'platform=iOS Simulator,name=iPhone Retina (4-inch 64-bit)' OBJROOT=XCDYouTubeKit/build | xcpretty -c
- xcodebuild test -project XCDYouTubeKit.xcodeproj -scheme 'XCDYouTubeKit OS X' | xcpretty -c
+after_success:
+ - ./Scripts/coveralls.sh
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a416e74b..b9fe65b9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,9 @@
+#### Version 2.0.2
+
+* Fixed errors on protected videos. (#52)
+* Better error reporting if a protected video is not available.
+* Updated README about YouTube Terms of Service.
+
#### Version 2.0.1
* Fixed crash on protected videos. (#46)
diff --git a/README.md b/README.md
index 5cc7a59c..17013954 100644
--- a/README.md
+++ b/README.md
@@ -1,19 +1,15 @@
## About
-[![build status](https://travis-ci.org/0xced/XCDYouTubeKit.svg)](https://travis-ci.org/0xced/XCDYouTubeKit)
+[![Build Status](https://img.shields.io/travis/0xced/XCDYouTubeKit/master.svg?style=flat)](https://travis-ci.org/0xced/XCDYouTubeKit)
+[![Coverage Status](https://img.shields.io/coveralls/0xced/XCDYouTubeKit/master.svg?style=flat)](https://coveralls.io/r/0xced/XCDYouTubeKit?branch=master)
+![Platform](https://img.shields.io/cocoapods/p/XCDYouTubeKit.svg?style=flat)
+[![Pod Version](https://img.shields.io/cocoapods/v/XCDYouTubeKit.svg?style=flat)](http://cocoadocs.org/docsets/XCDYouTubeKit/)
+[![License](https://img.shields.io/cocoapods/l/XCDYouTubeKit.svg?style=flat)](LICENSE)
**XCDYouTubeKit** is a YouTube video player for iOS and OS X.
-To the best of my knowledge, the only *official* way of playing a YouTube video on iOS is with a UIWebView and the [iframe player API](https://developers.google.com/youtube/iframe_api_reference). Unfortunately, this is very slow and quite ugly, so I wrote this player to give users a better viewing experience.
-
-Except for live videos, the player uses progressive download. Remember that some restrictions apply if you submit your app to the App Store, as stated in
-[HTTP Live Streaming — Requirements for Apps](https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/UsingHTTPLiveStreaming/UsingHTTPLiveStreaming.html#//apple_ref/doc/uid/TP40008332-CH102-SW5):
-> **Warning**: iOS apps submitted for distribution in the App Store must conform to these requirements.
->
-> If your app delivers video over cellular networks, and the video exceeds either 10 minutes duration or 5 MB of data in a five minute period, you are required to use HTTP Live Streaming. (Progressive download may be used for smaller clips.)
-
Are you enjoying XCDYouTubeKit? You can say thank you with [a tweet](https://twitter.com/intent/tweet?text=%400xced%20Thank%20you%20for%20XCDYouTubeKit%2E). I am also accepting donations. ;-)
[![Donate button](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MGEPRSNQFMV3W)
@@ -23,6 +19,16 @@ Are you enjoying XCDYouTubeKit? You can say thank you with [a tweet](https://twi
- Runs on iOS 5.0 and later
- Runs on OS X 10.7 and later
+## Warnings
+
+* XCDYouTubeKit is against the YouTube [Terms of Service](https://www.youtube.com/t/terms). The only *official* way of playing a YouTube video inside an app is with a web view and the [iframe player API](https://developers.google.com/youtube/iframe_api_reference). Unfortunately, this is very slow and quite ugly, so I wrote this player to give users a better viewing experience.
+
+* Except for live videos, the player uses progressive download. Remember that some restrictions apply if you submit your app to the App Store, as stated in
+[HTTP Live Streaming — Requirements for Apps](https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/UsingHTTPLiveStreaming/UsingHTTPLiveStreaming.html#//apple_ref/doc/uid/TP40008332-CH102-SW5):
+> **Warning**: iOS apps submitted for distribution in the App Store must conform to these requirements.
+>
+> If your app delivers video over cellular networks, and the video exceeds either 10 minutes duration or 5 MB of data in a five minute period, you are required to use HTTP Live Streaming. (Progressive download may be used for smaller clips.)
+
## Installation
XCDYouTubeKit is available through CocoaPods.
@@ -32,7 +38,7 @@ Alternatively, you can manually use the provided static library on iOS or dynami
If you use the iOS static library and you are targeting iOS 7, add the JavaScriptCore framework. If you are targeting iOS 5 or 6, you must add the following *Other Linker Flags* instead to your app:
```
--Wl,-U,_JSEvaluateScript -Wl,-U,_JSGlobalContextCreate -Wl,-U,_JSGlobalContextRelease -Wl,-U,_JSObjectCallAsFunction -Wl,-U,_JSObjectIsFunction -Wl,-U,_JSStringCopyCFString -Wl,-U,_JSStringCreateWithCFString -Wl,-U,_JSStringRelease -Wl,-U,_JSValueIsObject -Wl,-U,_JSValueIsString -Wl,-U,_JSValueMakeString -Wl,-U,_JSValueToStringCopy
+-Wl,-U,_JSContextGetGlobalObject -Wl,-U,_JSEvaluateScript -Wl,-U,_JSGlobalContextCreate -Wl,-U,_JSGlobalContextRelease -Wl,-U,_JSObjectCallAsFunction -Wl,-U,_JSObjectIsFunction -Wl,-U,_JSObjectSetProperty -Wl,-U,_JSStringCopyCFString -Wl,-U,_JSStringCreateWithCFString -Wl,-U,_JSStringRelease -Wl,-U,_JSValueIsObject -Wl,-U,_JSValueIsString -Wl,-U,_JSValueMakeString -Wl,-U,_JSValueToStringCopy
```
See my [JavaScriptCore framework availability on iOS](http://stackoverflow.com/questions/23514579/javascriptcore-framework-availability-on-ios/23514580#23514580) answer on Stack Overflow for a complete explanation.
@@ -85,7 +91,7 @@ See the demo project for more sample code.
## Credits
-The URL exctraction algorithms in *XCDYouTubeKit* are inspired by the [YouTube extractor](https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/youtube.py) module of the *youtube-dl* project.
+The URL extraction algorithms in *XCDYouTubeKit* are inspired by the [YouTube extractor](https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/youtube.py) module of the *youtube-dl* project.
## Contact
diff --git a/Scripts/create-coveralls-script.sh b/Scripts/create-coveralls-script.sh
new file mode 100755
index 00000000..ffe10ed1
--- /dev/null
+++ b/Scripts/create-coveralls-script.sh
@@ -0,0 +1,19 @@
+#!/bin/bash -e
+
+if [[ -z "${TRAVIS_JOB_ID}" ]]; then
+ exit 0
+fi
+
+COVERALLS_SCRIPT_PATH="${SRCROOT}/Scripts/coveralls.sh"
+cat > "${COVERALLS_SCRIPT_PATH}" <CFBundleShortVersionString
${CURRENT_PROJECT_VERSION}
CFBundleVersion
- 2
+ 3
LSApplicationCategoryType
public.app-category.entertainment
LSMinimumSystemVersion
diff --git a/XCDYouTubeKit Demo/XCDYouTubeKit Demo.xcodeproj/project.pbxproj b/XCDYouTubeKit Demo/XCDYouTubeKit Demo.xcodeproj/project.pbxproj
index 0e6f2b93..3d7d7b7a 100644
--- a/XCDYouTubeKit Demo/XCDYouTubeKit Demo.xcodeproj/project.pbxproj
+++ b/XCDYouTubeKit Demo/XCDYouTubeKit Demo.xcodeproj/project.pbxproj
@@ -438,7 +438,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 2.0.1;
+ CURRENT_PROJECT_VERSION = 2.0.2;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
@@ -476,7 +476,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
- CURRENT_PROJECT_VERSION = 2.0.1;
+ CURRENT_PROJECT_VERSION = 2.0.2;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_PREPROCESSOR_DEFINITIONS = "NS_BLOCK_ASSERTIONS=1";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
@@ -501,11 +501,13 @@
GCC_PREFIX_HEADER = "iOS Demo/Supporting Files/XCDYouTubeKit iOS Demo-Prefix.pch";
INFOPLIST_FILE = "iOS Demo/Supporting Files/XCDYouTubeKit iOS Demo-Info.plist";
OTHER_LDFLAGS = (
+ "-Wl,-U,_JSContextGetGlobalObject",
"-Wl,-U,_JSEvaluateScript",
"-Wl,-U,_JSGlobalContextCreate",
"-Wl,-U,_JSGlobalContextRelease",
"-Wl,-U,_JSObjectCallAsFunction",
"-Wl,-U,_JSObjectIsFunction",
+ "-Wl,-U,_JSObjectSetProperty",
"-Wl,-U,_JSStringCopyCFString",
"-Wl,-U,_JSStringCreateWithCFString",
"-Wl,-U,_JSStringRelease",
@@ -526,11 +528,13 @@
GCC_PREFIX_HEADER = "iOS Demo/Supporting Files/XCDYouTubeKit iOS Demo-Prefix.pch";
INFOPLIST_FILE = "iOS Demo/Supporting Files/XCDYouTubeKit iOS Demo-Info.plist";
OTHER_LDFLAGS = (
+ "-Wl,-U,_JSContextGetGlobalObject",
"-Wl,-U,_JSEvaluateScript",
"-Wl,-U,_JSGlobalContextCreate",
"-Wl,-U,_JSGlobalContextRelease",
"-Wl,-U,_JSObjectCallAsFunction",
"-Wl,-U,_JSObjectIsFunction",
+ "-Wl,-U,_JSObjectSetProperty",
"-Wl,-U,_JSStringCopyCFString",
"-Wl,-U,_JSStringCreateWithCFString",
"-Wl,-U,_JSStringRelease",
diff --git a/XCDYouTubeKit Demo/iOS Demo/Supporting Files/XCDYouTubeKit iOS Demo-Info.plist b/XCDYouTubeKit Demo/iOS Demo/Supporting Files/XCDYouTubeKit iOS Demo-Info.plist
index 8d82f12b..c3151700 100644
--- a/XCDYouTubeKit Demo/iOS Demo/Supporting Files/XCDYouTubeKit iOS Demo-Info.plist
+++ b/XCDYouTubeKit Demo/iOS Demo/Supporting Files/XCDYouTubeKit iOS Demo-Info.plist
@@ -19,7 +19,7 @@
CFBundleShortVersionString
${CURRENT_PROJECT_VERSION}
CFBundleVersion
- 2
+ 3
LSRequiresIPhoneOS
UIBackgroundModes
diff --git a/XCDYouTubeKit Tests/Cassettes/testCancelingOperation.json b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testCancelingOperation.json
similarity index 100%
rename from XCDYouTubeKit Tests/Cassettes/testCancelingOperation.json
rename to XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testCancelingOperation.json
diff --git a/XCDYouTubeKit Tests/Cassettes/testConnectionError.json b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testConnectionError.json
similarity index 100%
rename from XCDYouTubeKit Tests/Cassettes/testConnectionError.json
rename to XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testConnectionError.json
diff --git a/XCDYouTubeKit Tests/Cassettes/testDVRVideo.json b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testDVRVideo.json
similarity index 100%
rename from XCDYouTubeKit Tests/Cassettes/testDVRVideo.json
rename to XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testDVRVideo.json
diff --git a/XCDYouTubeKit Tests/Cassettes/testFrenchClient.json b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testFrenchClient.json
similarity index 100%
rename from XCDYouTubeKit Tests/Cassettes/testFrenchClient.json
rename to XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testFrenchClient.json
diff --git a/XCDYouTubeKit Tests/Cassettes/testInvalidVideoIdentifier.json b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testInvalidVideoIdentifier.json
similarity index 100%
rename from XCDYouTubeKit Tests/Cassettes/testInvalidVideoIdentifier.json
rename to XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testInvalidVideoIdentifier.json
diff --git a/XCDYouTubeKit Tests/Cassettes/testLiveVideo.json b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testLiveVideo.json
similarity index 100%
rename from XCDYouTubeKit Tests/Cassettes/testLiveVideo.json
rename to XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testLiveVideo.json
diff --git a/XCDYouTubeKit Tests/Cassettes/testMobileRestrictedVideo.json b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testMobileRestrictedVideo.json
similarity index 100%
rename from XCDYouTubeKit Tests/Cassettes/testMobileRestrictedVideo.json
rename to XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testMobileRestrictedVideo.json
diff --git a/XCDYouTubeKit Tests/Cassettes/testNilCompletionHandler.json b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testNilCompletionHandler.json
similarity index 100%
rename from XCDYouTubeKit Tests/Cassettes/testNilCompletionHandler.json
rename to XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testNilCompletionHandler.json
diff --git a/XCDYouTubeKit Tests/Cassettes/testNilVideoIdentifier.json b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testNilVideoIdentifier.json
similarity index 100%
rename from XCDYouTubeKit Tests/Cassettes/testNilVideoIdentifier.json
rename to XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testNilVideoIdentifier.json
diff --git a/XCDYouTubeKit Tests/Cassettes/testNonExistentVideoIdentifier.json b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testNonExistentVideoIdentifier.json
similarity index 100%
rename from XCDYouTubeKit Tests/Cassettes/testNonExistentVideoIdentifier.json
rename to XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testNonExistentVideoIdentifier.json
diff --git a/XCDYouTubeKit Tests/Cassettes/testRemovedVideo.json b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testRemovedVideo.json
similarity index 100%
rename from XCDYouTubeKit Tests/Cassettes/testRemovedVideo.json
rename to XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testRemovedVideo.json
diff --git a/XCDYouTubeKit Tests/Cassettes/testRestrictedVideo.json b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testRestrictedVideo.json
similarity index 100%
rename from XCDYouTubeKit Tests/Cassettes/testRestrictedVideo.json
rename to XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testRestrictedVideo.json
diff --git a/XCDYouTubeKit Tests/Cassettes/testSpaceVideoIdentifier.json b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testSpaceVideoIdentifier.json
similarity index 100%
rename from XCDYouTubeKit Tests/Cassettes/testSpaceVideoIdentifier.json
rename to XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testSpaceVideoIdentifier.json
diff --git a/XCDYouTubeKit Tests/Cassettes/testThatVideoHasMetadata.json b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testThatVideoHasMetadata.json
similarity index 100%
rename from XCDYouTubeKit Tests/Cassettes/testThatVideoHasMetadata.json
rename to XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testThatVideoHasMetadata.json
diff --git a/XCDYouTubeKit Tests/Cassettes/testThatVideoIsAvailalbeOnDetailPageEventLabel.json b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testThatVideoIsAvailalbeOnDetailPageEventLabel.json
similarity index 100%
rename from XCDYouTubeKit Tests/Cassettes/testThatVideoIsAvailalbeOnDetailPageEventLabel.json
rename to XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testThatVideoIsAvailalbeOnDetailPageEventLabel.json
diff --git a/XCDYouTubeKit Tests/Cassettes/testUsingClientOnNonMainThread.json b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testUsingClientOnNonMainThread.json
similarity index 100%
rename from XCDYouTubeKit Tests/Cassettes/testUsingClientOnNonMainThread.json
rename to XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testUsingClientOnNonMainThread.json
diff --git a/XCDYouTubeKit Tests/Cassettes/testProtectedVEVOVideo.json b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeProtectedVideosTestCase/testProtectedVEVOVideo.json
similarity index 100%
rename from XCDYouTubeKit Tests/Cassettes/testProtectedVEVOVideo.json
rename to XCDYouTubeKit Tests/Cassettes/XCDYouTubeProtectedVideosTestCase/testProtectedVEVOVideo.json
diff --git a/XCDYouTubeKit Tests/Cassettes/XCDYouTubeProtectedVideosTestCase/testProtectedVideoWithBrokenSignatureFunction.json b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeProtectedVideosTestCase/testProtectedVideoWithBrokenSignatureFunction.json
new file mode 100644
index 00000000..cca0e540
--- /dev/null
+++ b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeProtectedVideosTestCase/testProtectedVideoWithBrokenSignatureFunction.json
@@ -0,0 +1,79 @@
+[
+ {
+ "body" : "(function(){var f,aa=aa||{},m=this;function n(a){return void 0!==a}function ba(a,b,c){a=a.split(\".\");c=c||m;a[0]in c||!c.execScript||c.execScript(\"var \"+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&n(b)?c[d]=b:c[d]?c=c[d]:c=c[d]={}}function p(a,b){for(var c=a.split(\".\"),d=b||m,e;e=c.shift();)if(null!=d[e])d=d[e];else return null;return d}function ca(){}function da(a){a.getInstance=function(){return a.Db?a.Db:a.Db=new a}}\nfunction fa(a){var b=typeof a;if(\"object\"==b)if(a){if(a instanceof Array)return\"array\";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(\"[object Window]\"==c)return\"object\";if(\"[object Array]\"==c||\"number\"==typeof a.length&&\"undefined\"!=typeof a.splice&&\"undefined\"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(\"splice\"))return\"array\";if(\"[object Function]\"==c||\"undefined\"!=typeof a.call&&\"undefined\"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(\"call\"))return\"function\"}else return\"null\";\nelse if(\"function\"==b&&\"undefined\"==typeof a.call)return\"object\";return b}function ga(a){return null!=a}function ha(a){return\"array\"==fa(a)}function ia(a){var b=fa(a);return\"array\"==b||\"object\"==b&&\"number\"==typeof a.length}function s(a){return\"string\"==typeof a}function ja(a){return\"number\"==typeof a}function ka(a){return\"function\"==fa(a)}function la(a){var b=typeof a;return\"object\"==b&&null!=a||\"function\"==b}function ma(a){return a[na]||(a[na]=++oa)}\nvar na=\"closure_uid_\"+(1E9*Math.random()>>>0),oa=0;function pa(a,b,c){return a.call.apply(a.bind,arguments)}function qa(a,b,c){if(!a)throw Error();if(2\")&&(a=a.replace(Ha,\">\"));-1!=a.indexOf('\"')&&(a=a.replace(Ia,\""\"));-1!=a.indexOf(\"'\")&&(a=a.replace(Ja,\"'\"));-1!=a.indexOf(\"\\x00\")&&(a=a.replace(Ka,\"\"));return a}var Fa=\/&\/g,Ga=\/<\/g,Ha=\/>\/g,Ia=\/\"\/g,Ja=\/'\/g,Ka=\/\\x00\/g,Ea=\/[\\x00&<>\"']\/;function La(a){return Ma(a,\"&\")?\"document\"in m?Na(a):Oa(a):a}\nfunction Na(a){var b={\"&\":\"&\",\"<\":\"<\",\">\":\">\",\""\":'\"'},c;c=m.document.createElement(\"div\");return a.replace(Pa,function(a,e){var g=b[a];if(g)return g;if(\"#\"==e.charAt(0)){var h=Number(\"0\"+e.substr(1));isNaN(h)||(g=String.fromCharCode(h))}g||(c.innerHTML=a+\" \",g=c.firstChild.nodeValue.slice(0,-1));return b[a]=g})}\nfunction Oa(a){return a.replace(\/&([^;]+);\/g,function(a,c){switch(c){case \"amp\":return\"&\";case \"lt\":return\"<\";case \"gt\":return\">\";case \"quot\":return'\"';default:if(\"#\"==c.charAt(0)){var d=Number(\"0\"+c.substr(1));if(!isNaN(d))return String.fromCharCode(d)}return a}})}var Pa=\/&([^;\\s<&]+);?\/g;function Ma(a,b){return-1!=a.indexOf(b)}function Qa(a,b){return Ma(a.toLowerCase(),b.toLowerCase())}function Ra(a){return String(a).replace(\/([-()\\[\\]{}+?*.$\\^|,:#b?1:0}\nfunction Xa(a){for(var b=0,c=0;cc?Math.max(0,a.length+c):c;if(s(a))return s(b)&&1==b.length?a.indexOf(b,c):-1;for(;cc&&(c=Math.max(0,a.length+c));if(s(a))return s(b)&&1==b.length?a.lastIndexOf(b,c):-1;for(;0<=c;c--)if(c in a&&a[c]===b)return c;\nreturn-1},z=eb.forEach?function(a,b,c){eb.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=s(a)?a.split(\"\"):a,g=0;gb?null:s(a)?a.charAt(b):a[b]}function mb(a,b,c){for(var d=a.length,e=s(a)?a.split(\"\"):a,g=0;gc?null:s(a)?a.charAt(c):a[c]}function ob(a,b,c){for(var d=s(a)?a.split(\"\"):a,e=a.length-1;0<=e;e--)if(e in d&&b.call(c,d[e],e,a))return e;return-1}function C(a,b){return 0<=fb(a,b)}function E(a){return 0==a.length}\nfunction pb(a){if(!ha(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}function qb(a,b){C(a,b)||a.push(b)}function rb(a,b){var c=fb(a,b),d;(d=0<=c)&&sb(a,c);return d}function sb(a,b){eb.splice.call(a,b,1)}function tb(a,b){var c=mb(a,b,void 0);0<=c&&sb(a,c)}function ub(a){return eb.concat.apply(eb,arguments)}function vb(a){var b=a.length;if(0=arguments.length?eb.slice.call(a,b):eb.slice.call(a,b,c)}\nfunction zb(a){for(var b={},c=0,d=0;d>1,k;k=c(b,a[h]);0b?1:ac&&xb(a,-(c+1),0,b)}function Hb(a){for(var b=[],c=0;cparseFloat(a))?String(b):a}(),Ac={};function Bc(a){return Ac[a]||(Ac[a]=0<=Va(zc,a))}function Cc(a){return qc&&Dc>=a}var Ec=m.document,Dc=Ec&&qc?yc()||(\"CSS1Compat\"==Ec.compatMode?parseInt(zc,10):5):void 0;var Fc=!qc||Cc(9),Gc=!rc&&!qc||qc&&Cc(9)||rc&&Bc(\"1.9.1\"),Hc=qc&&!Bc(\"9\"),Ic=qc||pc||sc;function Jc(a){return a?new Kc(Lc(a)):va||(va=new Kc)}function Mc(a){return s(a)?document.getElementById(a):a}function Nc(a,b){var c=b||document;return c.querySelectorAll&&c.querySelector?c.querySelectorAll(\".\"+a):Oc(\"*\",a,b)}function H(a,b){var c=b||document,d=null;c.querySelectorAll&&c.querySelector?d=c.querySelector(\".\"+a):d=Oc(\"*\",a,b)[0];return d||null}\nfunction Oc(a,b,c){var d=document;c=c||d;a=a&&\"*\"!=a?a.toUpperCase():\"\";if(c.querySelectorAll&&c.querySelector&&(a||b))return c.querySelectorAll(a+(b?\".\"+b:\"\"));if(b&&c.getElementsByClassName){c=c.getElementsByClassName(b);if(a){for(var d={},e=0,g=0,h;h=c[g];g++)a==h.nodeName&&(d[e++]=h);d.length=e;return d}return c}c=c.getElementsByTagName(a||\"*\");if(b){d={};for(g=e=0;h=c[g];g++)a=h.className,\"function\"==typeof a.split&&C(a.split(\/\\s+\/),b)&&(d[e++]=h);d.length=e;return d}return c}\nfunction Pc(a,b){Nb(b,function(b,d){\"style\"==d?a.style.cssText=b:\"class\"==d?a.className=b:\"for\"==d?a.htmlFor=b:d in Qc?a.setAttribute(Qc[d],b):0==d.lastIndexOf(\"aria-\",0)||0==d.lastIndexOf(\"data-\",0)?a.setAttribute(d,b):a[d]=b})}var Qc={cellpadding:\"cellPadding\",cellspacing:\"cellSpacing\",colspan:\"colSpan\",frameborder:\"frameBorder\",height:\"height\",maxlength:\"maxLength\",role:\"role\",rowspan:\"rowSpan\",type:\"type\",usemap:\"useMap\",valign:\"vAlign\",width:\"width\"};\nfunction Rc(a){a=a.document;a=Sc(a)?a.documentElement:a.body;return new G(a.clientWidth,a.clientHeight)}function Tc(a){var b=Uc(a);a=a.parentWindow||a.defaultView;return qc&&Bc(\"10\")&&a.pageYOffset!=b.scrollTop?new F(b.scrollLeft,b.scrollTop):new F(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function Uc(a){return!sc&&Sc(a)?a.documentElement:a.body||a.documentElement}function Vc(a){return a?a.parentWindow||a.defaultView:window}function I(a,b,c){return Wc(document,arguments)}\nfunction Wc(a,b){var c=b[0],d=b[1];if(!Fc&&d&&(d.name||d.type)){c=[\"<\",c];d.name&&c.push(' name=\"',Da(d.name),'\"');if(d.type){c.push(' type=\"',Da(d.type),'\"');var e={};dc(e,d);delete e.type;d=e}c.push(\">\");c=c.join(\"\")}c=a.createElement(c);d&&(s(d)?c.className=d:ha(d)?c.className=d.join(\" \"):Pc(c,d));2=a.length)throw yd;if(b in a)return a[b++];b++}};return c}throw Error(\"Not implemented\");}\nfunction Bd(a,b,c){if(ia(a))try{z(a,b,c)}catch(d){if(d!==yd)throw d;}else{a=Ad(a);try{for(;;)b.call(c,a.next(),void 0,a)}catch(e){if(e!==yd)throw e;}}}function Cd(a){if(ia(a))return vb(a);a=Ad(a);var b=[];Bd(a,function(a){b.push(a)});return b};function Dd(a,b){this.g={};this.b=[];this.j=this.ea=0;var c=arguments.length;if(12*this.ea&&Ed(this),!0):!1};function Ed(a){if(a.ea!=a.b.length){for(var b=0,c=0;b=c.length)throw yd;var h=c[b++];return a?h:d[h]}};return h};function Fd(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function Hd(a){return\"function\"==typeof a.Na?a.Na():ia(a)||s(a)?a.length:Qb(a)}function Id(a){if(\"function\"==typeof a.Qa)return a.Qa();if(s(a))return a.split(\"\");if(ia(a)){for(var b=[],c=a.length,d=0;dc?a[1]=\"?\":c==b.length-1&&(a[1]=void 0)}return a.join(\"\")}function Td(a,b,c){if(ha(b))for(var d=0;db)throw Error(\"Bad port number \"+b);a.af=b}else a.af=null;return a}\nfunction qe(a){return a.Mb}function fe(a,b,c){a.Mb=c?ie(b):b}function ge(a,b,c){b instanceof je?(a.b=b,re(a.b,a.cf)):(c||(b=ke(b,se)),a.b=new je(b,0,a.cf));return a}function te(a){return a.b}function K(a,b,c){a.b.set(b,c);return a}function ue(a,b,c){ha(c)||(c=[String(c)]);ve(a.b,b,c)}function we(a,b){return a.b.get(b)}f.Pg=function(){return this.pn};function he(a,b,c){a.pn=c?ie(b):b;return a}\nfunction xe(a){K(a,\"zx\",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^v()).toString(36));return a}function ye(a){return a instanceof J?a.clone():new J(a,void 0)}function ze(a,b,c,d){var e=new J(null,void 0);a&&ce(e,a);b&&de(e,b);c&&ee(e,c);d&&fe(e,d);return e}function ie(a){return a?decodeURIComponent(a):\"\"}function ke(a,b){return s(a)?encodeURI(a).replace(b,Ae):null}\nfunction Ae(a){a=a.charCodeAt(0);return\"%\"+(a>>4&15).toString(16)+(a&15).toString(16)}var le=\/[#\\\/\\?@]\/g,ne=\/[\\#\\?:]\/g,me=\/[\\#\\?]\/g,se=\/[\\#\\?@]\/g,oe=\/#\/g;function je(a,b,c){this.b=a||null;this.g=!!c}function Be(a){if(!a.Ya&&(a.Ya=new Dd,a.ea=0,a.b))for(var b=a.b.split(\"&\"),c=0;c<\/body>\"',style:\"display:none\"}),Lc(a).body.appendChild(a)):nf(a,b))}function nf(a,b){var c=new Image,d=\"\"+kf++;jf[d]=c;c.onload=c.onerror=function(){b&&jf[d]&&b();delete jf[d]};c.src=a;c=eval(\"null\")};function of(a){a=String(a);if(\/^\\s*$\/.test(a)?0:\/^[\\],:{}\\s\\u2028\\u2029]*$\/.test(a.replace(\/\\\\[\"\\\\\\\/bfnrtu]\/g,\"@\").replace(\/\"[^\"\\\\\\n\\r\\u2028\\u2029\\x00-\\x08\\x0a-\\x1f]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?\/g,\"]\").replace(\/(?:^|:|,)(?:[\\s\\u2028\\u2029]*\\[)+\/g,\"\")))try{return eval(\"(\"+a+\")\")}catch(b){}throw Error(\"Invalid JSON string: \"+a);}function pf(a){return eval(\"(\"+a+\")\")}function qf(a){return rf(new sf(void 0),a)}function sf(a){this.b=a}\nfunction rf(a,b){var c=[];tf(a,b,c);return c.join(\"\")}\nfunction tf(a,b,c){switch(typeof b){case \"string\":uf(b,c);break;case \"number\":c.push(isFinite(b)&&!isNaN(b)?b:\"null\");break;case \"boolean\":c.push(b);break;case \"undefined\":c.push(\"null\");break;case \"object\":if(null==b){c.push(\"null\");break}if(ha(b)){var d=b.length;c.push(\"[\");for(var e=\"\",g=0;gb?e+=\"000\":256>b?e+=\"00\":4096>b&&(e+=\"0\");return vf[a]=e+b.toString(16)}),'\"')};function xf(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}f=xf.prototype;f.getHeight=function(){return this.bottom-this.top};f.clone=function(){return new xf(this.top,this.right,this.bottom,this.left)};f.contains=function(a){return this&&a?a instanceof xf?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1};\nf.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};f.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};f.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};\nf.scale=function(a,b){var c=ja(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};function yf(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}f=yf.prototype;f.clone=function(){return new yf(this.left,this.top,this.width,this.height)};function zf(a){return new yf(a.left,a.top,a.right-a.left,a.bottom-a.top)}function Af(a,b){return a==b?!0:a&&b?a.left==b.left&&a.width==b.width&&a.top==b.top&&a.height==b.height:!1}\nf.contains=function(a){return a instanceof yf?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};function Bf(a){return new G(a.width,a.height)}f.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};\nf.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};f.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};f.scale=function(a,b){var c=ja(b)?b:a;this.left*=a;this.width*=a;this.top*=c;this.height*=c;return this};function Cf(a){Cf[\" \"](a);return a}Cf[\" \"]=ca;function Df(){return sc?\"Webkit\":rc?\"Moz\":qc?\"ms\":pc?\"O\":null}function Ef(){return sc?\"-webkit\":rc?\"-moz\":qc?\"-ms\":pc?\"-o\":null}function Ff(a,b){if(b&&a in b)return a;var c=Df();return c?(c=c.toLowerCase(),c+=bb(a),!n(b)||c in b?c:null):null};function Gf(a,b,c){s(b)?Hf(a,c,b):Nb(b,ra(Hf,a))}function Hf(a,b,c){(c=If(a,c))&&(a.style[c]=b)}function If(a,b){var c=ab(b);if(void 0===a.style[c]){var d=Df()+bb(c);if(void 0!==a.style[d])return d}return c}function Jf(a,b){var c=Lc(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||\"\":\"\"}function Kf(a,b){return Jf(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]}\nfunction Lf(a,b,c){var d,e=rc&&(jc||lc)&&Bc(\"1.9\");b instanceof F?(d=b.x,b=b.y):(d=b,b=c);a.style.left=Mf(d,e);a.style.top=Mf(b,e)}function Nf(a){return new F(a.offsetLeft,a.offsetTop)}function Of(a){var b;try{b=a.getBoundingClientRect()}catch(c){return{left:0,top:0,right:0,bottom:0}}qc&&a.ownerDocument.body&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b}\nfunction Pf(a){if(qc&&!Cc(8))return a.offsetParent;var b=Lc(a),c=Kf(a,\"position\"),d=\"fixed\"==c||\"absolute\"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=Kf(a,\"position\"),d=d&&\"static\"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||\"fixed\"==c||\"absolute\"==c||\"relative\"==c))return a;return null}\nfunction Qf(a){for(var b=new xf(0,Infinity,Infinity,0),c=Jc(a),d=c.b.body,e=c.b.documentElement,g=Uc(c.b);a=Pf(a);)if(!(qc&&0==a.clientWidth||sc&&0==a.clientHeight&&a==d)&&a!=d&&a!=e&&\"visible\"!=Kf(a,\"overflow\")){var h=Rf(a),k;k=a;if(rc&&!Bc(\"1.9\")){var l=parseFloat(Jf(k,\"borderLeftWidth\"));if(Sf(k))var q=k.offsetWidth-k.clientWidth-l-parseFloat(Jf(k,\"borderRightWidth\")),l=l+q;k=new F(l,parseFloat(Jf(k,\"borderTopWidth\")))}else k=new F(k.clientLeft,k.clientTop);h.x+=k.x;h.y+=k.y;b.top=Math.max(b.top,\nh.y);b.right=Math.min(b.right,h.x+a.clientWidth);b.bottom=Math.min(b.bottom,h.y+a.clientHeight);b.left=Math.max(b.left,h.x)}d=g.scrollLeft;g=g.scrollTop;b.left=Math.max(b.left,d);b.top=Math.max(b.top,g);c=Rc(wd(c)||window);b.right=Math.min(b.right,d+c.width);b.bottom=Math.min(b.bottom,g+c.height);return 0<=b.top&&0<=b.left&&b.bottom>b.top&&b.right>b.left?b:null}\nfunction Rf(a){var b,c=Lc(a),d=Kf(a,\"position\"),e=rc&&c.getBoxObjectFor&&!a.getBoundingClientRect&&\"absolute\"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),g=new F(0,0),h;b=c?Lc(c):document;h=!qc||Cc(9)||vd(Jc(b))?b.documentElement:b.body;if(a==h)return g;if(a.getBoundingClientRect)b=Of(a),a=xd(Jc(c)),g.x=b.left+a.x,g.y=b.top+a.y;else if(c.getBoxObjectFor&&!e)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(h),g.x=b.screenX-a.screenX,g.y=b.screenY-a.screenY;else{b=a;do{g.x+=b.offsetLeft;g.y+=\nb.offsetTop;b!=a&&(g.x+=b.clientLeft||0,g.y+=b.clientTop||0);if(sc&&\"fixed\"==Kf(b,\"position\")){g.x+=c.body.scrollLeft;g.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(pc||sc&&\"absolute\"==d)g.y-=c.body.offsetTop;for(b=a;(b=Pf(b))&&b!=c.body&&b!=h;)g.x-=b.scrollLeft,pc&&\"TR\"==b.tagName||(g.y-=b.scrollTop)}return g}\nfunction Tf(a){var b;if(a.getBoundingClientRect)b=Of(a),b=new F(b.left,b.top);else{b=xd(Jc(a));var c=Rf(a);b=new F(c.x-b.x,c.y-b.y)}if(rc&&!Bc(12)){i:{c=ab(\"transform\");if(void 0===a.style[c]&&(c=Df()+bb(c),void 0!==a.style[c])){c=Ef()+\"-transform\";break i}c=\"transform\"}a=(a=Kf(a,c)||Kf(a,\"transform\"))?(a=a.match(Uf))?new F(parseFloat(a[1]),parseFloat(a[2])):new F(0,0):new F(0,0);a=new F(b.x+a.x,b.y+a.y)}else a=b;return a}\nfunction Vf(a){if(1==a.nodeType)return Tf(a);var b=ka(a.kC),c=a;a.targetTouches?c=a.targetTouches[0]:b&&a.b.targetTouches&&(c=a.b.targetTouches[0]);return new F(c.clientX,c.clientY)}function Wf(a,b,c){if(b instanceof G)c=b.height,b=b.width;else if(void 0==c)throw Error(\"missing height argument\");Xf(a,b);a.style.height=Mf(c,!0)}function Mf(a,b){\"number\"==typeof a&&(a=(b?Math.round(a):a)+\"px\");return a}function Xf(a,b){a.style.width=Mf(b,!0)}function Yf(a){return Zf(a)}\nfunction Zf(a){var b=$f;if(\"none\"!=Kf(a,\"display\"))return b(a);var c=a.style,d=c.display,e=c.visibility,g=c.position;c.visibility=\"hidden\";c.position=\"absolute\";c.display=\"inline\";a=b(a);c.display=d;c.position=g;c.visibility=e;return a}function $f(a){var b=a.offsetWidth,c=a.offsetHeight,d=sc&&!b&&!c;return n(b)&&!d||!a.getBoundingClientRect?new G(b,c):(a=Of(a),new G(a.right-a.left,a.bottom-a.top))}function ag(a){var b=Rf(a);a=Zf(a);return new yf(b.x,b.y,a.width,a.height)}\nfunction bg(a,b){var c=a.style;\"opacity\"in c?c.opacity=b:\"MozOpacity\"in c?c.MozOpacity=b:\"filter\"in c&&(c.filter=\"\"===b?\"\":\"alpha(opacity=\"+100*b+\")\")}function cg(a,b){a.style.display=b?\"\":\"none\"}function Sf(a){return\"rtl\"==Kf(a,\"direction\")}function eg(a,b){if(\/^\\d+px?$\/.test(b))return parseInt(b,10);var c=a.style.left,d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=b;var e=a.style.pixelLeft;a.style.left=c;a.runtimeStyle.left=d;return e}\nfunction fg(a,b){var c=a.currentStyle?a.currentStyle[b]:null;return c?eg(a,c):0}var gg={thin:2,medium:4,thick:6};function hg(a,b){if(\"none\"==(a.currentStyle?a.currentStyle[b+\"Style\"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+\"Width\"]:null;return c in gg?gg[c]:eg(a,c)}\nfunction ig(a){if(qc&&!Cc(9)){var b=hg(a,\"borderLeft\"),c=hg(a,\"borderRight\"),d=hg(a,\"borderTop\");a=hg(a,\"borderBottom\");return new xf(d,c,a,b)}b=Jf(a,\"borderLeftWidth\");c=Jf(a,\"borderRightWidth\");d=Jf(a,\"borderTopWidth\");a=Jf(a,\"borderBottomWidth\");return new xf(parseFloat(d),parseFloat(c),parseFloat(a),parseFloat(b))}var jg=\/[^\\d]+$\/,kg={cm:1,\"in\":1,mm:1,pc:1,pt:1},lg={em:1,ex:1};\nfunction mg(a){var b=Kf(a,\"fontSize\"),c;c=(c=b.match(jg))&&c[0]||null;if(b&&\"px\"==c)return parseInt(b,10);if(qc){if(c in kg)return eg(a,b);if(a.parentNode&&1==a.parentNode.nodeType&&c in lg)return a=a.parentNode,c=Kf(a,\"fontSize\"),eg(a,b==c?\"1em\":b)}c=I(\"span\",{style:\"visibility:hidden;position:absolute;line-height:0;padding:0;margin:0;border:0;height:1em;\"});a.appendChild(c);b=c.offsetHeight;ed(c);return b}var Uf=\/matrix\\([0-9\\.\\-]+, [0-9\\.\\-]+, [0-9\\.\\-]+, [0-9\\.\\-]+, ([0-9\\.\\-]+)p?x?, ([0-9\\.\\-]+)p?x?\\)\/;function ng(a){if(a.classList)return a.classList;a=a.className;return s(a)&&a.match(\/\\S+\/g)||[]}function og(a,b){return a.classList?a.classList.contains(b):C(ng(a),b)}function O(a,b){a.classList?a.classList.add(b):og(a,b)||(a.className+=0=c.length)throw yd;var d;d=c.key(b++);if(a)return d;d=c.getItem(d);if(!s(d))throw\"Storage mechanism: Invalid value was encountered\";return d};return d};f.clear=function(){this.b.clear()};f.key=function(a){return this.b.key(a)};function ci(){var a=null;try{a=window.localStorage||null}catch(b){}this.b=a}w(ci,bi);function di(){var a=null;try{a=window.sessionStorage||null}catch(b){}this.b=a}w(di,bi);function ei(a){this.b=a}ei.prototype.set=function(a,b){n(b)?this.b.set(a,qf(b)):this.b.remove(a)};ei.prototype.get=function(a){var b;try{b=this.b.get(a)}catch(c){return}if(null!==b)try{return of(b)}catch(d){throw\"Storage: Invalid value was encountered\";}};ei.prototype.remove=function(a){this.b.remove(a)};function fi(a){this.b=a}w(fi,ei);function gi(a){this.data=a}function hi(a){return!n(a)||a instanceof gi?a:new gi(a)}fi.prototype.set=function(a,b){fi.G.set.call(this,a,hi(b))};fi.prototype.g=function(a){a=fi.G.get.call(this,a);if(!n(a)||a instanceof Object)return a;throw\"Storage: Invalid value was encountered\";};fi.prototype.get=function(a){if(a=this.g(a)){if(a=a.data,!n(a))throw\"Storage: Invalid value was encountered\";}else a=void 0;return a};function ii(a){this.b=a}w(ii,fi);function ji(a){var b=a.creation;a=a.expiration;return!!a&&av()}ii.prototype.set=function(a,b,c){if(b=hi(b)){if(c){if(ca.status)e=Ii(c,a);if(d)t:{switch(c){case \"XML\":d=0==parseInt(e&&e.return_code,\n10);break t;case \"RAW\":d=!0;break t}d=!!e}var e=e||{},g=b.context||m;d?b.onSuccess&&b.onSuccess.call(g,a,e):b.onError&&b.onError.call(g,a,e);b.vb&&b.vb.call(g,a,e)}},b.method,h,b.headers,b.responseType,b.withCredentials);b.kh&&0Va(a,\"10.0\")&&(this.b=!1))}function Pi(a,b,c,d){var e=\"\/api\/lounge\";if(n(d)?d:a.b)e=\"https:\/\/\"+a.g+a.port+\"\/api\/lounge\";return Yd(e+b,c||{})};function Qi(a){a&&(this.id=a.id||\"\",this.name=a.name||\"\",this.activityId=a.activityId||\"\",this.status=a.status||\"UNKNOWN\")}Qi.prototype.id=\"\";Qi.prototype.name=\"\";Qi.prototype.activityId=\"\";Qi.prototype.status=\"UNKNOWN\";function Ri(a){return{id:a.id,name:a.name,activityId:a.activityId,status:a.status}}Qi.prototype.toString=function(){return\"{id:\"+this.id+\",name:\"+this.name+\",activityId:\"+this.activityId+\",status:\"+this.status+\"}\"};\nfunction Si(a){a=a||[];return\"[\"+A(a,function(a){return a?a.toString():\"null\"}).join(\",\")+\"]\"};function Ti(){return\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(\/[xy]\/g,function(a){var b=16*Math.random()|0;return(\"x\"==a?b:b&3|8).toString(16)})}function Ui(a){return A(a,function(a){return{key:a.id,name:a.name}})}function Vi(a){return A(a,function(a){return Ri(a)})}function Wi(a){return A(a,function(a){return new Qi(a)})}function Xi(a,b){return a||b?a&&b?a.id==b.id&&a.name==b.name:!1:!0}function Yi(a,b){return B(a,function(a){return a.id==b})}\nfunction Zi(a,b){return B(a,function(a){return a||b?!a!=!b?!1:a.id==b.id:!0})}function $i(a,b){return B(a,function(a){return a.id==b||a.uuid==b})};function aj(){this.M=new Nh;S(this,this.M)}w(aj,Ih);aj.prototype.subscribe=function(a,b,c){return this.fa()?0:this.M.subscribe(a,b,c)};aj.prototype.ia=function(a,b,c){return this.fa()?!1:this.M.ia(a,b,c)};aj.prototype.Ib=function(a){return this.fa()?!1:this.M.Ib(a)};aj.prototype.H=function(a,b){return this.fa()?!1:this.M.H.apply(this.M,arguments)};function bj(a){aj.call(this);this.j=a;this.g=[]}w(bj,aj);bj.prototype.Pn=function(){return this.g};bj.prototype.contains=function(a){return!!Zi(this.g,a)};bj.prototype.get=function(a){return $i(this.g,a)};bj.prototype.info=function(a){yh(this.j,a)};function cj(a){this.b=a}var dj=\/\\s*;\\s*\/;f=cj.prototype;f.set=function(a,b,c,d,e,g){if(\/[;=\\s]\/.test(a))throw Error('Invalid cookie name \"'+a+'\"');if(\/[;\\r\\n]\/.test(b))throw Error('Invalid cookie value \"'+b+'\"');n(c)||(c=-1);e=e?\";domain=\"+e:\"\";d=d?\";path=\"+d:\"\";g=g?\";secure\":\"\";c=0>c?\"\":0==c?\";expires=\"+(new Date(1970,1,1)).toUTCString():\";expires=\"+(new Date(v()+1E3*c)).toUTCString();this.b.cookie=a+\"=\"+b+e+d+c+g};\nf.get=function(a,b){for(var c=a+\"=\",d=(this.b.cookie||\"\").split(dj),e=0,g;g=d[e];e++){if(0==g.lastIndexOf(c,0))return g.substr(c.length);if(g==a)return\"\"}return b};f.remove=function(a,b,c){var d=n(this.get(a));this.set(a,\"\",0,b,c);return d};f.Ma=function(){return ej(this).keys};f.Qa=function(){return ej(this).bs};f.isEmpty=function(){return!this.b.cookie};f.Na=function(){return this.b.cookie?(this.b.cookie||\"\").split(dj).length:0};\nf.eg=function(a){for(var b=ej(this).bs,c=0;cc)return!1;!(b instanceof Zj)&&5=a.keyCode)a.keyCode=-1}catch(b){}};f.kC=function(){return this.b};f.J=function(){};var jk=\"closure_listenable_\"+(1E6*Math.random()|0);function kk(a){return!(!a||!a[jk])}var lk=0;function mk(a,b,c,d,e){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.Of=!!d;this.Pc=e;this.key=++lk;this.removed=this.tj=!1}function nk(a){a.removed=!0;a.listener=null;a.proxy=null;a.src=null;a.Pc=null};function ok(a){this.src=a;this.b={};this.g=0}ok.prototype.add=function(a,b,c,d,e){var g=a.toString();a=this.b[g];a||(a=this.b[g]=[],this.g++);var h=pk(a,b,d,e);-1c.keyCode||void 0!=c.returnValue)){t:{var g=!1;if(0==c.keyCode)try{c.keyCode=-1;break t}catch(h){g=!0}if(g||void 0==c.returnValue)c.returnValue=!0}c=[];for(g=d.currentTarget;g;g=g.parentNode)c.push(g);for(var g=a.type,k=c.length-1;!d.g&&0<=k;k--)d.currentTarget=c[k],e&=Fk(c[k],g,!0,d);for(k=0;!d.g&&k>>0);function wk(a){if(ka(a))return a;a[Hk]||(a[Hk]=function(b){return a.handleEvent(b)});return a[Hk]};function U(){this.Fd=new ok(this);this.ka=this;this.V=null}w(U,Ih);U.prototype[jk]=!0;f=U.prototype;f.ci=function(a){this.V=a};f.addEventListener=function(a,b,c,d){vk(this,a,b,c,d)};f.removeEventListener=function(a,b,c,d){Dk(this,a,b,c,d)};\nf.S=function(a){var b,c=this.V;if(c){b=[];for(var d=1;c;c=c.V)b.push(c),++d}c=this.ka;d=a.type||a;if(s(a))a=new T(a,c);else if(a instanceof T)a.target=a.target||c;else{var e=a;a=new T(d,c);dc(a,e)}var e=!0,g;if(b)for(var h=b.length-1;!a.g&&0<=h;h--)g=a.currentTarget=b[h],e=Ik(g,d,!0,a)&&e;a.g||(g=a.currentTarget=c,e=Ik(g,d,!0,a)&&e,a.g||(e=Ik(g,d,!1,a)&&e));if(b)for(h=0;!a.g&&h=a.b.length)throw Error(\"Out of bounds exception\");return a.b.lengthb)break t}else if(3>b||3==b&&!pc&&!ol(this.jb))break t;this.We||4!=b||7==c||(8==c||0>=d?this.b.Mc(3):this.b.Mc(2));pl(this);var e=this.jb.getStatus();this.Tg=e;var g=ol(this.jb);(this.Nc=200==e)?(4==b&&ql(this),this.o?(rl(this,b,g),pc&&this.Nc&&3==b&&(this.k.listen(this.g,\"tick\",this.cz),this.g.start())):sl(this,g),this.Nc&&!this.We&&(4==b?this.b.ej(this):(this.Nc=!1,ml(this)))):\n(this.Re=400==e&&0b.length)return il;var e=b.substr(d,c);a.Ah=d+c;return e}\nfunction wl(a,b){a.oh=v();ml(a);var c=b?window.location.hostname:\"\";a.ie=a.fe.clone();K(a.ie,\"DOMAIN\",c);K(a.ie,\"t\",a.A);try{a.Oc=new ActiveXObject(\"htmlfile\")}catch(d){ql(a);a.Re=7;tl();ul(a);return}var e=\"\";b&&(e+='