summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-08-15 19:34:34 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-08-15 19:34:34 (GMT)
commit940de61e5b6d8651f6ea8b1626c92f5d80cb723c (patch)
tree5496b8b5274d9333794f90acdc31b39001707be9
parent9149b28c87c7a037dfd244aa5d4c1409b6593dca (diff)
downloaduscxml-940de61e5b6d8651f6ea8b1626c92f5d80cb723c.zip
uscxml-940de61e5b6d8651f6ea8b1626c92f5d80cb723c.tar.gz
uscxml-940de61e5b6d8651f6ea8b1626c92f5d80cb723c.tar.bz2
Polished xhtml invoker
-rw-r--r--CMakeLists.txt19
-rw-r--r--src/uscxml/URL.cpp4
-rw-r--r--src/uscxml/plugins/invoker/CMakeLists.txt2
-rw-r--r--src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.cpp220
-rw-r--r--src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.h4
-rw-r--r--src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.html234
-rw-r--r--src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.inc.h657
-rw-r--r--src/uscxml/server/HTTPServer.cpp5
-rw-r--r--src/uscxml/server/HTTPServer.h7
-rw-r--r--test/uscxml/templates/xhtml-invoker.html17
-rw-r--r--test/uscxml/test-xhtml-invoker.scxml126
11 files changed, 1178 insertions, 117 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9809bcc..e7df3af 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1106,6 +1106,25 @@ if (ENABLE_COTIRE)
include(cotire)
endif()
+#
+# We cannot do this in subdirs?!
+#
+
+if (NOT BUILD_MINIMAL)
+ # include html template in source file
+ find_program(XXD_BINARY xxd)
+ if (XXD_BINARY)
+ add_custom_command(
+ OUTPUT ${CMAKE_SOURCE_DIR}/src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.inc.h
+ COMMAND ${XXD_BINARY} -i template/xhtml-invoker.html template/xhtml-invoker.inc.h
+ DEPENDS ${CMAKE_SOURCE_DIR}/src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.html
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/uscxml/plugins/invoker/xhtml
+ COMMENT "Running xxd on uscxml/plugins/invoker/xhtml/template/xhtml-invoker.html"
+ )
+ LIST(APPEND USCXML_FILES ${CMAKE_SOURCE_DIR}/src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.inc.h)
+ endif()
+endif()
+
# build library
if (BUILD_AS_PLUGINS)
add_library(uscxml ${USCXML_FILES})
diff --git a/src/uscxml/URL.cpp b/src/uscxml/URL.cpp
index b245149..9ba015c 100644
--- a/src/uscxml/URL.cpp
+++ b/src/uscxml/URL.cpp
@@ -568,8 +568,8 @@ void URLFetcher::fetchURL(URL& url) {
// (curlError = curl_easy_setopt(handle, CURLOPT_FORBID_REUSE, 1)) == CURLE_OK ||
// LOG(ERROR) << "Cannot force noreuse: " << curl_easy_strerror(curlError);
- (curlError = curl_easy_setopt(handle, CURLOPT_VERBOSE, 1)) == CURLE_OK ||
- LOG(ERROR) << "Cannot set verbose: " << curl_easy_strerror(curlError);
+// (curlError = curl_easy_setopt(handle, CURLOPT_VERBOSE, 1)) == CURLE_OK ||
+// LOG(ERROR) << "Cannot set verbose: " << curl_easy_strerror(curlError);
(curlError = curl_easy_setopt(handle, CURLOPT_WRITEDATA, url._impl.get())) == CURLE_OK ||
LOG(ERROR) << "Cannot register this as write userdata: " << curl_easy_strerror(curlError);
diff --git a/src/uscxml/plugins/invoker/CMakeLists.txt b/src/uscxml/plugins/invoker/CMakeLists.txt
index 2d55aa1..03f22a6 100644
--- a/src/uscxml/plugins/invoker/CMakeLists.txt
+++ b/src/uscxml/plugins/invoker/CMakeLists.txt
@@ -87,7 +87,7 @@ if (NOT BUILD_MINIMAL)
file(GLOB_RECURSE XHTML_INVOKER
xhtml/*.cpp
xhtml/*.h
- )
+ )
if (BUILD_AS_PLUGINS)
source_group("" FILES ${XHTML_INVOKER})
add_library(
diff --git a/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.cpp b/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.cpp
index eb82edb..861e922 100644
--- a/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.cpp
+++ b/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.cpp
@@ -58,7 +58,6 @@ XHTMLInvoker::~XHTMLInvoker() {
boost::shared_ptr<InvokerImpl> XHTMLInvoker::create(InterpreterImpl* interpreter) {
boost::shared_ptr<XHTMLInvoker> invoker = boost::shared_ptr<XHTMLInvoker>(new XHTMLInvoker());
invoker->_interpreter = interpreter;
-// _ioProc = interpreter->getFactory()->createIOProcessor("comet", interpreter);
return invoker;
}
@@ -68,95 +67,107 @@ bool XHTMLInvoker::httpRecvRequest(const HTTPServer::Request& req) {
// these are the XHR requests
if (iequals(req.data.at("header").at("X-Requested-With").atom, "XMLHttpRequest")) {
if (iequals(req.data.at("type").atom, "get")) {
- // the long-polling GET
+ // this is the incoming the long-polling GET
if (_longPoll) {
+ // cancel old longPoller
evhttp_send_error(_longPoll.evhttpReq, 204, NULL);
_longPoll.evhttpReq = NULL;
}
+
_longPoll = req;
if (!_outQueue.empty()) {
- send(_outQueue.front());
+ // do we have some send requests pending?
+ HTTPServer::Reply reply =_outQueue.front();
+ reply.setRequest(_longPoll);
+ HTTPServer::reply(reply);
_outQueue.pop_front();
+ _longPoll.evhttpReq = NULL;
}
return true;
+
} else {
- // a POST request
+ // an incomping event per POST request
Event ev(req);
if (ev.data["header"].hasKey("X-SCXML-Name")) {
ev.name = ev.data["header"]["X-SCXML-Name"].atom;
} else {
ev.name = req.data.at("type").atom;
}
- ev.origin = _invokeId;
// initialize data
- ev.data = Data::fromJSON(req.data.at("content").atom);
- if (ev.data.empty()) {
- if (req.dom) {
- ev.dom = req.dom;
- } else {
- ev.content = req.content;
- }
- }
+ ev.data = req.data.at("content");
+ ev.eventType = Event::EXTERNAL;
- ev.data.compound["Connection"] = req.data;
- // content is already on ev.raw
- ev.data.compound["Connection"].compound.erase("content");
-
HTTPServer::Reply reply(req);
HTTPServer::reply(reply);
-
- returnEvent(ev);
+
+ returnEvent(ev, true);
return true;
}
}
// initial request for a document
if (!req.data.hasKey("query") && // no query parameters
- iequals(req.data.at("type").atom, "get") && // request type is GET
- req.content.length() == 0) { // no content
-
+ iequals(req.data.at("type").atom, "get") && // request type is GET
+ req.content.length() == 0) { // no content
+
+ // send template to establish long polling
HTTPServer::Reply reply(req);
- std::string content;
- std::stringstream ss;
- if (_invokeReq.dom) {
-// ss << _invokeReq.getFirstDOMElement();
- ss << _invokeReq.dom;
- content = ss.str();
- } else if(!_invokeReq.data.empty()) {
- ss << _invokeReq.data;
- content = ss.str();
- } else if (_invokeReq.content.length() > 0) {
- content = _invokeReq.content;
- } else {
- URL templateURL("templates/xhtml-invoker.html");
- templateURL.toAbsolute(_interpreter->getBaseURI());
- templateURL.download(true);
- content = templateURL.getInContent();
+ // _invokeReq.content will contain the actual content as we needed to replace expressions in the interpreter thread
+
+ if (!_invokeReq.data.empty()) {
+ // just reply with given data as json, this time and for ever
+ reply.content = _invokeReq.content;
+ reply.headers["Content-type"] = "application/json";
+ HTTPServer::reply(reply);
+ return true;
+
+ } else if (_invokeReq.dom) {
+ // there is some XML given with the content
+ if (HAS_ATTR_CAST(_invokeReq.dom, "type")) {
+ // it's special XML to send per Comet later on, default to sending template and enqueue
+ _longPoll.evhttpReq = NULL;
+ _outQueue = std::deque<HTTPServer::Reply>();
+
+ HTTPServer::Reply reply;
+ reply.content = _invokeReq.content;
+ reply.headers["Content-type"] = "application/xml";
+ _outQueue.push_back(reply);
+
+ // no return here - we wan to send the template below
+
+ } else {
+ // it's plain XML now and forever
+ reply.content = _invokeReq.content;
+ reply.headers["Content-type"] = "application/xml";
+ HTTPServer::reply(reply);
+ return true;
+ }
+ } else if (_invokeReq.content.size() > 0) {
+
+ // just reply as text this time and for ever
+ reply.content = _invokeReq.content;
+ reply.headers["Content-type"] = "text/plain";
+ HTTPServer::reply(reply);
+ return true;
}
- std::cout << content;
-
- _interpreter->getDataModel().replaceExpressions(content);
- reply.content = content;
-
- // application/xhtml+xml
- reply.headers["Content-Type"] = "text/html; charset=utf-8";
-// reply.headers["Content-Type"] = "application/xhtml+xml; charset=utf-8";
+ /*
+ * Return our template to establish a two way communication via comet
+ * If we want to replace expressions in the temaplte, we have to do it in invoke()
+ * for thread safety of the datamodel.
+ */
+
+ // this file is generated from template/xhtml-invoker.xhtml via xxd
+ #include "template/xhtml-invoker.inc.h"
- // aggressive caching in IE will return all XHR get requests instantenously with the template otherwise
+ // aggressive caching in IE will return all XHR get requests instantenously otherwise
reply.headers["Cache-Control"] = "no-cache";
-// reply.headers["Cache-Control"] = "max-age=3600";
+ reply.headers["Content-Type"] = "text/html; charset=utf-8";
+ reply.content = std::string((const char*)template_xhtml_invoker_html, template_xhtml_invoker_html_len);
HTTPServer::reply(reply);
-
- // queue invoke request for initial html
- _longPoll.evhttpReq = NULL;
- _outQueue = std::deque<SendRequest>();
- SendRequest sendReq(_invokeReq);
- send(sendReq);
-
return true;
}
@@ -171,43 +182,29 @@ Data XHTMLInvoker::getDataModelVariables() {
void XHTMLInvoker::send(const SendRequest& req) {
tthread::lock_guard<tthread::recursive_mutex> lock(_mutex);
- SendRequest reqCopy(req);
- _interpreter->getDataModel().replaceExpressions(reqCopy.content);
- Data json = Data::fromJSON(reqCopy.content);
- if (!json.empty()) {
- reqCopy.data = json;
- }
-
- if (!_longPoll) {
- _outQueue.push_back(reqCopy);
- return;
- }
- reply(reqCopy, _longPoll);
- _longPoll.evhttpReq = NULL;
-}
-
-void XHTMLInvoker::reply(const SendRequest& req, const HTTPServer::Request& longPoll) {
- HTTPServer::Reply reply(longPoll);
-
- // is there JSON in the content?
- std::string content = req.content;
+ HTTPServer::Reply reply;
+
if (req.dom) {
+ // XML
std::stringstream ss;
-// Arabica::DOM::Node<std::string> content = req.dom.getDocumentElement();
- Arabica::DOM::Node<std::string> content = req.dom;
- if (content && content.getNodeType() == Arabica::DOM::Node_base::ELEMENT_NODE && iequals(content.getLocalName(), "content")) {
- Arabica::DOM::Element<std::string> contentElem = Arabica::DOM::Element<std::string>(content);
- reply.headers["X-SCXML-Type"] = (HAS_ATTR(contentElem, "type") ? ATTR(contentElem, "type") : "replacechildren");
- reply.headers["X-SCXML-XPath"] = (HAS_ATTR(contentElem, "xpath") ? ATTR(contentElem, "xpath") : "/html/body");
+ if (req.dom.getNodeType() == Arabica::DOM::Node_base::ELEMENT_NODE) {
+ Arabica::DOM::Element<std::string> contentElem = Arabica::DOM::Element<std::string>(req.dom);
+
+ if (HAS_ATTR(contentElem, "type"))
+ reply.headers["X-SCXML-Type"] = ATTR(contentElem, "type");
+ if (HAS_ATTR(contentElem, "xpath"))
+ reply.headers["X-SCXML-XPath"] = ATTR(contentElem, "xpath");
if (HAS_ATTR(contentElem, "attr"))
reply.headers["X-SCXML-Attr"] = ATTR(contentElem, "attr");
}
-// ss << req.getFirstDOMElement();
+
ss << req.dom;
reply.content = ss.str();
reply.headers["Content-Type"] = "application/xml";
+
} else if (!req.data.empty()) {
+ // JSON
reply.content = Data::toJSON(req.data);
reply.headers["Content-Type"] = "application/json";
} else if (req.content.length() > 0) {
@@ -215,21 +212,47 @@ void XHTMLInvoker::reply(const SendRequest& req, const HTTPServer::Request& long
reply.headers["Content-Type"] = "text/plain";
}
- if (req.params.find("Content-Type") != req.params.end())
- reply.headers["Content-Type"] = req.params.find("Content-Type")->first;
+ // TODO: Params to set variables?
+
+ _interpreter->getDataModel().replaceExpressions(reply.content);
+ if (!_longPoll) {
+ _outQueue.push_back(reply);
+ return;
+ }
+ reply.setRequest(_longPoll);
HTTPServer::reply(reply);
+ _longPoll.evhttpReq = NULL;
}
-
+
void XHTMLInvoker::cancel(const std::string sendId) {
HTTPServer::unregisterServlet(this);
}
void XHTMLInvoker::invoke(const InvokeRequest& req) {
_invokeReq = req;
- HTTPServer::registerServlet(_interpreter->getName() + "/" + req.invokeid + ".html", this);
- if (_url.size() == 0) {
- returnErrorExecution("No HTTP server running");
+
+ // make sure _invokeReq.content contains correct and substituted string
+ if (!_invokeReq.data.empty()) {
+ _invokeReq.content = Data::toJSON(_invokeReq.data);
+ } else if (_invokeReq.dom) {
+ std::stringstream ss;
+ ss << _invokeReq.dom;
+ _invokeReq.content = ss.str();
+ }
+ _interpreter->getDataModel().replaceExpressions(_invokeReq.content);
+
+ std::string browserURL;
+ if (req.src.size() > 0) {
+ // no src given, send browser off to some remote url
+ browserURL = req.src;
+ } else {
+ // invoke to talk to us
+ HTTPServer::registerServlet(_interpreter->getName() + "/" + req.invokeid + ".html", this);
+ if (_url.size() == 0) {
+ returnErrorExecution("No HTTP server running");
+ }
+ browserURL = _url.c_str();
}
#if __APPLE__
# if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
@@ -237,28 +260,31 @@ void XHTMLInvoker::invoke(const InvokeRequest& req) {
// see http://stackoverflow.com/questions/4177744/c-osx-open-default-browser
CFURLRef url = CFURLCreateWithBytes (
NULL, // allocator
- (UInt8*)_url.c_str(), // URLBytes
- _url.length(), // length
+ (UInt8*)browserURL.c_str(), // URLBytes
+ browserURL.length(), // length
kCFStringEncodingASCII, // encoding
NULL // baseURL
);
- LSOpenCFURLRef(url,0);
- CFRelease(url);
- return;
+ if (LSOpenCFURLRef(url,0) == errSecSuccess) {
+ if (url)
+ CFRelease(url);
+ return;
+ }
# endif
#endif
#ifdef _WIN32
// see http://support.microsoft.com/kb/224816
- ShellExecute(NULL, "open", _url.c_str(), NULL, NULL, SW_SHOWNORMAL);
+ ShellExecute(NULL, "open", browserURL.c_str(), NULL, NULL, SW_SHOWNORMAL);
return;
#endif
#ifdef HAS_XDG_OPEN
std::string systemCmd;
systemCmd = "xdg-open ";
- systemCmd += _url;
- system(systemCmd.c_str());
- return;
+ systemCmd += browserURL;
+ if (system(systemCmd.c_str()) >= 0)
+ return;
#endif
+ LOG(ERROR) << "Could not open a HTML browser, access '" << browserURL << "' yourself.";
}
} \ No newline at end of file
diff --git a/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.h b/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.h
index 773df31..386af3d 100644
--- a/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.h
+++ b/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.h
@@ -57,11 +57,11 @@ public:
protected:
HTTPServer::Request _longPoll;
- std::deque<SendRequest> _outQueue;
+ std::deque<HTTPServer::Reply> _outQueue;
tthread::recursive_mutex _mutex;
InvokeRequest _invokeReq;
- IOProcessor _ioProc;
+
std::string _url;
};
diff --git a/src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.html b/src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.html
new file mode 100644
index 0000000..2a1de09
--- /dev/null
+++ b/src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.html
@@ -0,0 +1,234 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+
+ <!-- Get domLoaded event across browsers -->
+ <script type="text/javascript">
+ // see http://stackoverflow.com/questions/1206937/javascript-domready
+ var domLoaded = function(callback) {
+ /* Internet Explorer */
+ /*@cc_on
+ @if (@_win32 || @_win64)
+ document.write('<script id="ieScriptLoad" defer src="//:"><\/script>');
+ document.getElementById('ieScriptLoad').onreadystatechange = function() {
+ if (this.readyState == 'complete') {
+ var head= document.getElementsByTagName('head')[0];
+ var script= document.createElement('script');
+ script.type= 'text/javascript';
+ script.src= 'http://wicked-good-xpath.googlecode.com/files/wgxpath.install.js';
+ head.appendChild(script);
+ wgxpath.install();
+
+ // see http://stackoverflow.com/questions/1811116/ie-support-for-dom-importnode
+ document.importNode = function(node, allChildren) {
+ switch (node.nodeType) {
+ case document.ELEMENT_NODE:
+ var newNode = document.createElementNS(node.namespaceURI, node.nodeName);
+ if(node.attributes && node.attributes.length > 0)
+ for(var i = 0, il = node.attributes.length; i < il; i++)
+ newNode.setAttribute(node.attributes[i].nodeName, node.getAttribute(node.attributes[i].nodeName));
+ if(allChildren && node.childNodes && node.childNodes.length > 0)
+ for(var i = 0, il = node.childNodes.length; i < il; i++)
+ newNode.appendChild(document.importNode(node.childNodes[i], allChildren));
+ return newNode;
+ break;
+ case document.TEXT_NODE:
+ case document.CDATA_SECTION_NODE:
+ case document.COMMENT_NODE:
+ return document.createTextNode(node.nodeValue);
+ break;
+ }
+ }
+
+ callback();
+ }
+ };
+ @end @*/
+ /* Mozilla, Chrome, Opera */
+ if (document.addEventListener) {
+ document.addEventListener('DOMContentLoaded', callback, false);
+ return;
+ }
+ /* Safari, iCab, Konqueror */
+ if (/KHTML|WebKit|iCab/i.test(navigator.userAgent)) {
+ var DOMLoadTimer = setInterval(function () {
+ if (/loaded|complete/i.test(document.readyState)) {
+ callback();
+ clearInterval(DOMLoadTimer);
+ }
+ }, 10);
+ return;
+ }
+ /* Other web browsers */
+ window.onload = callback;
+ };
+ </script>
+
+ <script type="text/javascript">
+
+ function CometSession(options) {
+ /**
+ * Support for two-channel asynchronous http communication
+ */
+ for (var key in options) {
+ if (options.hasOwnProperty(key)) {
+ this[key] = options[key];
+ }
+ }
+ var self = this;
+
+ this.xhr = (window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("MSXML2.XMLHTTP.3.0"));
+ this.cometPoll = (window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("MSXML2.XMLHTTP.3.0"));
+
+ this.createUUID = function() {
+ // http://www.ietf.org/rfc/rfc4122.txt
+ var s = [];
+ var hexDigits = "0123456789abcdef";
+ for (var i = 0; i < 36; i++) {
+ s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
+ }
+ s[14] = "4"; // bits 12-15 of the time_hi_and_version field to 0010
+ s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
+ s[8] = s[13] = s[18] = s[23] = "-";
+ var uuid = s.join("");
+ return uuid;
+ }
+
+ this.longpoll = function() {
+ self.cometPoll.onreadystatechange = function() {
+ if (self.cometPoll.readyState === 4) {
+ if (self.cometPoll.status !== 200) {
+ self.longpoll();
+ return;
+ }
+ self.onRcvd(self.cometPoll);
+ self.longpoll();
+ }
+ };
+ // use token until we have a context
+ self.cometPoll.open("GET", self.server + (self.query ? "?" + self.query : ""));
+ self.cometPoll.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
+ self.cometPoll.setRequestHeader("Connection", "close");
+ self.cometPoll.send(null);
+ };
+
+ this.post = function(name, data, contentType) {
+ self.xhr.open("POST", self.server + (self.query ? "?" + self.query : ""));
+ self.xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
+ self.xhr.setRequestHeader('X-SCXML-Name', name);
+ if (contentType) {
+ self.xhr.setRequestHeader('Content-Type', contentType);
+ }
+ self.xhr.send(data);
+ }
+
+ // serialize an object to be send
+ this.send = function(name, thing) {
+ var data;
+ // see also: https://raw.github.com/douglascrockford/JSON-js/master/cycle.js
+ // dispatch over thingy type here
+ if (typeof thing === "object") {
+ var seen = [];
+ // will not work on opera as thing is checked for cycles first
+ data = JSON.stringify(thing, function(key, val) {
+ if (isNode(val)) {
+ // return a selection of attributes
+ return {
+ id: val.id,
+ tagName: val.tagName,
+ localName: val.localName
+ };
+ }
+ if (isWindow(val)) {
+ return;
+ }
+ if (typeof val === "object") {
+ if (seen.indexOf(val) >= 0)
+ return;
+ seen.push(val)
+ }
+ return val
+ });
+ } else {
+ data = thing;
+ }
+ this.post(name, data, "application/json");
+ }
+
+ // helper function to determine whether something is a html node
+ var isNode = function(o){
+ return (
+ typeof Node === "object" ? o instanceof Node :
+ o && typeof o === "object" && typeof o.nodeType === "number" && typeof o.nodeName==="string"
+ );
+ }
+
+ // helper function to determine whether something is a window
+ var isWindow = function(o){
+ return (
+ typeof Window === "object" ? o instanceof Window :
+ o && typeof o === "object" && typeof o.menubar === "object"
+ );
+ }
+
+ }
+
+ </script>
+
+ <script type="text/javascript">
+ domLoaded(function () {
+ scxml = new CometSession({
+ //element: document.getElementById("${scxml.invokeId}"),
+ server: document.URL,
+ onRcvd : function(data) {
+ if (data.responseXML) {
+ var type = data.getResponseHeader("X-SCXML-Type") || "replacechildren";
+ var domTarget = data.getResponseHeader("X-SCXML-XPath") || "/html/body";
+ var domAttr = data.getResponseHeader("X-SCXML-Attr");
+ var result = document.evaluate(domTarget, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+
+ for (var i = 0, l = result.snapshotLength; i < l; i++) {
+ var item = result.snapshotItem(i);
+ var node = document.importNode(data.responseXML.firstChild, true);
+ switch (type) {
+ case "firstchild":
+ item.insertBefore(node, item.firstChild);
+ break;
+ case "lastchild":
+ item.appendChild(node);
+ break;
+ case "previoussibling":
+ item.parentNode.insertBefore(node, item);
+ break;
+ case "nextsibling":
+ item.parentNode.insertBefore(node, item.nextSibling);
+ break;
+ case "replace":
+ item.parentNode.replaceChild(node, item);
+ break;
+ case "delete":
+ item.parentNode.removeChild(item);
+ break;
+ case "addattribute":
+ item.setAttribute(domAttr, node);
+ break;
+ case "replacechildren":
+ while(item.hasChildNodes()) {
+ item.removeChild(item.firstChild);
+ }
+ item.appendChild(node);
+ default:
+ break;
+ }
+ }
+ }
+ }
+ });
+ scxml.longpoll();
+ _parent = scxml;
+ });
+ </script>
+
+ </head>
+ <body></body>
+</html>
diff --git a/src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.inc.h b/src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.inc.h
new file mode 100644
index 0000000..a12b15e
--- /dev/null
+++ b/src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.inc.h
@@ -0,0 +1,657 @@
+unsigned char template_xhtml_invoker_html[] = {
+ 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3d,
+ 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e,
+ 0x77, 0x33, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x31, 0x39, 0x39, 0x39, 0x2f,
+ 0x78, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x0a, 0x09, 0x3c, 0x68, 0x65,
+ 0x61, 0x64, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x20,
+ 0x68, 0x74, 0x74, 0x70, 0x2d, 0x65, 0x71, 0x75, 0x69, 0x76, 0x3d, 0x22,
+ 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79, 0x70, 0x65,
+ 0x22, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3d, 0x22, 0x74,
+ 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3b, 0x63, 0x68, 0x61,
+ 0x72, 0x73, 0x65, 0x74, 0x3d, 0x75, 0x74, 0x66, 0x2d, 0x38, 0x22, 0x20,
+ 0x2f, 0x3e, 0x0a, 0x0a, 0x09, 0x09, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x47,
+ 0x65, 0x74, 0x20, 0x64, 0x6f, 0x6d, 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64,
+ 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x63, 0x72, 0x6f, 0x73,
+ 0x73, 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x73, 0x20, 0x2d,
+ 0x2d, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
+ 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f,
+ 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x3e,
+ 0x0a, 0x09, 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x73, 0x65, 0x65, 0x20, 0x68,
+ 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x6f,
+ 0x76, 0x65, 0x72, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x31, 0x32,
+ 0x30, 0x36, 0x39, 0x33, 0x37, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63,
+ 0x72, 0x69, 0x70, 0x74, 0x2d, 0x64, 0x6f, 0x6d, 0x72, 0x65, 0x61, 0x64,
+ 0x79, 0x0a, 0x09, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20, 0x64, 0x6f, 0x6d,
+ 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61,
+ 0x63, 0x6b, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2a,
+ 0x20, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x20, 0x45, 0x78,
+ 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x20, 0x2a, 0x2f, 0x0a, 0x09, 0x09,
+ 0x09, 0x09, 0x2f, 0x2a, 0x40, 0x63, 0x63, 0x5f, 0x6f, 0x6e, 0x0a, 0x09,
+ 0x09, 0x09, 0x09, 0x40, 0x69, 0x66, 0x20, 0x28, 0x40, 0x5f, 0x77, 0x69,
+ 0x6e, 0x33, 0x32, 0x20, 0x7c, 0x7c, 0x20, 0x40, 0x5f, 0x77, 0x69, 0x6e,
+ 0x36, 0x34, 0x29, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x77,
+ 0x72, 0x69, 0x74, 0x65, 0x28, 0x27, 0x3c, 0x73, 0x63, 0x72, 0x69, 0x70,
+ 0x74, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x69, 0x65, 0x53, 0x63, 0x72, 0x69,
+ 0x70, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x22, 0x20, 0x64, 0x65, 0x66, 0x65,
+ 0x72, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x2f, 0x2f, 0x3a, 0x22, 0x3e,
+ 0x3c, 0x5c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x27, 0x29,
+ 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d,
+ 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x65, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65,
+ 0x6e, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x27, 0x69, 0x65, 0x53, 0x63,
+ 0x72, 0x69, 0x70, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x27, 0x29, 0x2e, 0x6f,
+ 0x6e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x63,
+ 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e,
+ 0x72, 0x65, 0x61, 0x64, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d,
+ 0x3d, 0x20, 0x27, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x27,
+ 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x76,
+ 0x61, 0x72, 0x20, 0x68, 0x65, 0x61, 0x64, 0x3d, 0x20, 0x64, 0x6f, 0x63,
+ 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x65, 0x74, 0x45, 0x6c, 0x65,
+ 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x54, 0x61, 0x67, 0x4e, 0x61,
+ 0x6d, 0x65, 0x28, 0x27, 0x68, 0x65, 0x61, 0x64, 0x27, 0x29, 0x5b, 0x30,
+ 0x5d, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x76, 0x61,
+ 0x72, 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3d, 0x20, 0x64, 0x6f,
+ 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74,
+ 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x27, 0x73, 0x63,
+ 0x72, 0x69, 0x70, 0x74, 0x27, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2e, 0x74, 0x79,
+ 0x70, 0x65, 0x3d, 0x20, 0x27, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x6a, 0x61,
+ 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x27, 0x3b, 0x0a, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
+ 0x2e, 0x73, 0x72, 0x63, 0x3d, 0x20, 0x27, 0x68, 0x74, 0x74, 0x70, 0x3a,
+ 0x2f, 0x2f, 0x77, 0x69, 0x63, 0x6b, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x6f,
+ 0x64, 0x2d, 0x78, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66,
+ 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x77, 0x67, 0x78, 0x70, 0x61, 0x74, 0x68,
+ 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x2e, 0x6a, 0x73, 0x27,
+ 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x68, 0x65, 0x61,
+ 0x64, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x69, 0x6c,
+ 0x64, 0x28, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x29, 0x3b, 0x0a, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x77, 0x67, 0x78, 0x70, 0x61, 0x74,
+ 0x68, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x28, 0x29, 0x3b,
+ 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x73, 0x65, 0x65, 0x20, 0x68,
+ 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x6f,
+ 0x76, 0x65, 0x72, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x31, 0x38,
+ 0x31, 0x31, 0x31, 0x31, 0x36, 0x2f, 0x69, 0x65, 0x2d, 0x73, 0x75, 0x70,
+ 0x70, 0x6f, 0x72, 0x74, 0x2d, 0x66, 0x6f, 0x72, 0x2d, 0x64, 0x6f, 0x6d,
+ 0x2d, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x0a,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d,
+ 0x65, 0x6e, 0x74, 0x2e, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f,
+ 0x64, 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x61, 0x6c, 0x6c, 0x43,
+ 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x29, 0x20, 0x7b, 0x0a, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x73, 0x77, 0x69, 0x74,
+ 0x63, 0x68, 0x20, 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x6f, 0x64,
+ 0x65, 0x54, 0x79, 0x70, 0x65, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20, 0x63, 0x61, 0x73, 0x65,
+ 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x4c,
+ 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x3a, 0x0a,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x76, 0x61, 0x72, 0x20, 0x6e, 0x65, 0x77, 0x4e, 0x6f, 0x64, 0x65,
+ 0x20, 0x3d, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e,
+ 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e,
+ 0x74, 0x4e, 0x53, 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x61, 0x6d,
+ 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x55, 0x52, 0x49, 0x2c, 0x20, 0x6e,
+ 0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65,
+ 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x2e,
+ 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x20, 0x26,
+ 0x26, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69,
+ 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68,
+ 0x20, 0x3e, 0x20, 0x30, 0x29, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72,
+ 0x28, 0x76, 0x61, 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x30, 0x2c, 0x20,
+ 0x69, 0x6c, 0x20, 0x3d, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x74,
+ 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x6c, 0x65, 0x6e,
+ 0x67, 0x74, 0x68, 0x3b, 0x20, 0x69, 0x20, 0x3c, 0x20, 0x69, 0x6c, 0x3b,
+ 0x20, 0x69, 0x2b, 0x2b, 0x29, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6e,
+ 0x65, 0x77, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x41, 0x74,
+ 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x6e, 0x6f, 0x64, 0x65,
+ 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x5b,
+ 0x69, 0x5d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x2c,
+ 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x67, 0x65, 0x74, 0x41, 0x74, 0x74,
+ 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x2e,
+ 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x5b, 0x69,
+ 0x5d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x29, 0x29,
+ 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x69, 0x66, 0x28, 0x61, 0x6c, 0x6c, 0x43, 0x68, 0x69,
+ 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x20, 0x26, 0x26, 0x20, 0x6e, 0x6f, 0x64,
+ 0x65, 0x2e, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73,
+ 0x20, 0x26, 0x26, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x68, 0x69,
+ 0x6c, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67,
+ 0x74, 0x68, 0x20, 0x3e, 0x20, 0x30, 0x29, 0x0a, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66,
+ 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x30,
+ 0x2c, 0x20, 0x69, 0x6c, 0x20, 0x3d, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x2e,
+ 0x63, 0x68, 0x69, 0x6c, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x2e, 0x6c,
+ 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x20, 0x69, 0x20, 0x3c, 0x20, 0x69,
+ 0x6c, 0x3b, 0x20, 0x69, 0x2b, 0x2b, 0x29, 0x0a, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x6e, 0x65, 0x77, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x70,
+ 0x65, 0x6e, 0x64, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x28, 0x64, 0x6f, 0x63,
+ 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74,
+ 0x4e, 0x6f, 0x64, 0x65, 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x68,
+ 0x69, 0x6c, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x5b, 0x69, 0x5d, 0x2c,
+ 0x20, 0x61, 0x6c, 0x6c, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e,
+ 0x29, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
+ 0x6e, 0x65, 0x77, 0x4e, 0x6f, 0x64, 0x65, 0x3b, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x72,
+ 0x65, 0x61, 0x6b, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x20, 0x20, 0x20, 0x20, 0x63, 0x61, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x63,
+ 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x4e,
+ 0x4f, 0x44, 0x45, 0x3a, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x20, 0x20, 0x20, 0x20, 0x63, 0x61, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x63,
+ 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x44, 0x41, 0x54, 0x41, 0x5f,
+ 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x44, 0x45,
+ 0x3a, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x20,
+ 0x20, 0x63, 0x61, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65,
+ 0x6e, 0x74, 0x2e, 0x43, 0x4f, 0x4d, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x4e,
+ 0x4f, 0x44, 0x45, 0x3a, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
+ 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x78, 0x74, 0x4e, 0x6f, 0x64, 0x65,
+ 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x56, 0x61,
+ 0x6c, 0x75, 0x65, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b,
+ 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x7d,
+ 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x28, 0x29, 0x3b,
+ 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x7d, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x40, 0x65, 0x6e,
+ 0x64, 0x20, 0x40, 0x2a, 0x2f, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2a,
+ 0x20, 0x4d, 0x6f, 0x7a, 0x69, 0x6c, 0x6c, 0x61, 0x2c, 0x20, 0x43, 0x68,
+ 0x72, 0x6f, 0x6d, 0x65, 0x2c, 0x20, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x20,
+ 0x2a, 0x2f, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x28, 0x64,
+ 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x64, 0x64, 0x45,
+ 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72,
+ 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x64, 0x6f, 0x63,
+ 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x64, 0x64, 0x45, 0x76, 0x65,
+ 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x28, 0x27,
+ 0x44, 0x4f, 0x4d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x6f,
+ 0x61, 0x64, 0x65, 0x64, 0x27, 0x2c, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x62,
+ 0x61, 0x63, 0x6b, 0x2c, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x29, 0x3b,
+ 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
+ 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09,
+ 0x2f, 0x2a, 0x20, 0x53, 0x61, 0x66, 0x61, 0x72, 0x69, 0x2c, 0x20, 0x69,
+ 0x43, 0x61, 0x62, 0x2c, 0x20, 0x4b, 0x6f, 0x6e, 0x71, 0x75, 0x65, 0x72,
+ 0x6f, 0x72, 0x20, 0x2a, 0x2f, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x69, 0x66,
+ 0x20, 0x28, 0x2f, 0x4b, 0x48, 0x54, 0x4d, 0x4c, 0x7c, 0x57, 0x65, 0x62,
+ 0x4b, 0x69, 0x74, 0x7c, 0x69, 0x43, 0x61, 0x62, 0x2f, 0x69, 0x2e, 0x74,
+ 0x65, 0x73, 0x74, 0x28, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x6f,
+ 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x29,
+ 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x76, 0x61, 0x72,
+ 0x20, 0x44, 0x4f, 0x4d, 0x4c, 0x6f, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65,
+ 0x72, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72,
+ 0x76, 0x61, 0x6c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x20, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x69, 0x66, 0x20, 0x28, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x7c,
+ 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x2f, 0x69, 0x2e, 0x74,
+ 0x65, 0x73, 0x74, 0x28, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,
+ 0x2e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x29,
+ 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x63,
+ 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x28, 0x29, 0x3b, 0x0a, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x49,
+ 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x28, 0x44, 0x4f, 0x4d, 0x4c,
+ 0x6f, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x29, 0x3b, 0x0a, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x7d, 0x2c, 0x20, 0x31, 0x30, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2a, 0x20, 0x4f, 0x74,
+ 0x68, 0x65, 0x72, 0x20, 0x77, 0x65, 0x62, 0x20, 0x62, 0x72, 0x6f, 0x77,
+ 0x73, 0x65, 0x72, 0x73, 0x20, 0x2a, 0x2f, 0x0a, 0x09, 0x09, 0x09, 0x09,
+ 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x6f, 0x6e, 0x6c, 0x6f, 0x61,
+ 0x64, 0x20, 0x3d, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b,
+ 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x7d, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x3c,
+ 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0a, 0x0a, 0x09, 0x09,
+ 0x3c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65,
+ 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73,
+ 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x0a,
+ 0x09, 0x09, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20,
+ 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
+ 0x28, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x29, 0x20, 0x7b, 0x0a,
+ 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2a, 0x2a, 0x0a, 0x09, 0x09, 0x09, 0x09,
+ 0x20, 0x2a, 0x20, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x66,
+ 0x6f, 0x72, 0x20, 0x74, 0x77, 0x6f, 0x2d, 0x63, 0x68, 0x61, 0x6e, 0x6e,
+ 0x65, 0x6c, 0x20, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e,
+ 0x6f, 0x75, 0x73, 0x20, 0x68, 0x74, 0x74, 0x70, 0x20, 0x63, 0x6f, 0x6d,
+ 0x6d, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x09,
+ 0x09, 0x09, 0x09, 0x20, 0x2a, 0x2f, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x66,
+ 0x6f, 0x72, 0x20, 0x28, 0x76, 0x61, 0x72, 0x20, 0x6b, 0x65, 0x79, 0x20,
+ 0x69, 0x6e, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x29, 0x20,
+ 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28,
+ 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x68, 0x61, 0x73, 0x4f,
+ 0x77, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x28, 0x6b,
+ 0x65, 0x79, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x20,
+ 0x20, 0x20, 0x20, 0x74, 0x68, 0x69, 0x73, 0x5b, 0x6b, 0x65, 0x79, 0x5d,
+ 0x20, 0x3d, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5b, 0x6b,
+ 0x65, 0x79, 0x5d, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x7d,
+ 0x0a, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x76,
+ 0x61, 0x72, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x20, 0x3d, 0x20, 0x74, 0x68,
+ 0x69, 0x73, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x78, 0x68, 0x72, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x28, 0x77, 0x69, 0x6e, 0x64, 0x6f,
+ 0x77, 0x2e, 0x58, 0x4d, 0x4c, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x20, 0x3f, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x58,
+ 0x4d, 0x4c, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x28, 0x29, 0x20, 0x3a, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x41, 0x63,
+ 0x74, 0x69, 0x76, 0x65, 0x58, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x28,
+ 0x22, 0x4d, 0x53, 0x58, 0x4d, 0x4c, 0x32, 0x2e, 0x58, 0x4d, 0x4c, 0x48,
+ 0x54, 0x54, 0x50, 0x2e, 0x33, 0x2e, 0x30, 0x22, 0x29, 0x29, 0x3b, 0x0a,
+ 0x09, 0x09, 0x09, 0x09, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d,
+ 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x6c, 0x20, 0x3d, 0x20, 0x28, 0x77, 0x69,
+ 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x58, 0x4d, 0x4c, 0x48, 0x74, 0x74, 0x70,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x3f, 0x20, 0x6e, 0x65,
+ 0x77, 0x20, 0x58, 0x4d, 0x4c, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x28, 0x29, 0x20, 0x3a, 0x20, 0x6e, 0x65, 0x77,
+ 0x20, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x58, 0x4f, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x28, 0x22, 0x4d, 0x53, 0x58, 0x4d, 0x4c, 0x32, 0x2e, 0x58,
+ 0x4d, 0x4c, 0x48, 0x54, 0x54, 0x50, 0x2e, 0x33, 0x2e, 0x30, 0x22, 0x29,
+ 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x09, 0x09,
+ 0x74, 0x68, 0x69, 0x73, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55,
+ 0x55, 0x49, 0x44, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x2f, 0x2f, 0x20, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77,
+ 0x77, 0x2e, 0x69, 0x65, 0x74, 0x66, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x72,
+ 0x66, 0x63, 0x2f, 0x72, 0x66, 0x63, 0x34, 0x31, 0x32, 0x32, 0x2e, 0x74,
+ 0x78, 0x74, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20,
+ 0x73, 0x20, 0x3d, 0x20, 0x5b, 0x5d, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x76, 0x61, 0x72, 0x20, 0x68, 0x65, 0x78, 0x44, 0x69, 0x67, 0x69,
+ 0x74, 0x73, 0x20, 0x3d, 0x20, 0x22, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35,
+ 0x36, 0x37, 0x38, 0x39, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x22, 0x3b,
+ 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x76,
+ 0x61, 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x20, 0x69, 0x20,
+ 0x3c, 0x20, 0x33, 0x36, 0x3b, 0x20, 0x69, 0x2b, 0x2b, 0x29, 0x20, 0x7b,
+ 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x5b, 0x69, 0x5d, 0x20,
+ 0x3d, 0x20, 0x68, 0x65, 0x78, 0x44, 0x69, 0x67, 0x69, 0x74, 0x73, 0x2e,
+ 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x28, 0x4d, 0x61, 0x74, 0x68, 0x2e,
+ 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x28, 0x4d, 0x61, 0x74, 0x68, 0x2e, 0x72,
+ 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x28, 0x29, 0x20, 0x2a, 0x20, 0x30, 0x78,
+ 0x31, 0x30, 0x29, 0x2c, 0x20, 0x31, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x5b, 0x31,
+ 0x34, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x34, 0x22, 0x3b, 0x20, 0x20, 0x2f,
+ 0x2f, 0x20, 0x62, 0x69, 0x74, 0x73, 0x20, 0x31, 0x32, 0x2d, 0x31, 0x35,
+ 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65,
+ 0x5f, 0x68, 0x69, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x73,
+ 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x6f,
+ 0x20, 0x30, 0x30, 0x31, 0x30, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73,
+ 0x5b, 0x31, 0x39, 0x5d, 0x20, 0x3d, 0x20, 0x68, 0x65, 0x78, 0x44, 0x69,
+ 0x67, 0x69, 0x74, 0x73, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x28,
+ 0x28, 0x73, 0x5b, 0x31, 0x39, 0x5d, 0x20, 0x26, 0x20, 0x30, 0x78, 0x33,
+ 0x29, 0x20, 0x7c, 0x20, 0x30, 0x78, 0x38, 0x2c, 0x20, 0x31, 0x29, 0x3b,
+ 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x62, 0x69, 0x74, 0x73, 0x20, 0x36, 0x2d,
+ 0x37, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6c, 0x6f,
+ 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x71, 0x5f, 0x68, 0x69, 0x5f, 0x61, 0x6e,
+ 0x64, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x74,
+ 0x6f, 0x20, 0x30, 0x31, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x5b,
+ 0x38, 0x5d, 0x20, 0x3d, 0x20, 0x73, 0x5b, 0x31, 0x33, 0x5d, 0x20, 0x3d,
+ 0x20, 0x73, 0x5b, 0x31, 0x38, 0x5d, 0x20, 0x3d, 0x20, 0x73, 0x5b, 0x32,
+ 0x33, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x2d, 0x22, 0x3b, 0x0a, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20, 0x75, 0x75, 0x69, 0x64, 0x20,
+ 0x3d, 0x20, 0x73, 0x2e, 0x6a, 0x6f, 0x69, 0x6e, 0x28, 0x22, 0x22, 0x29,
+ 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72,
+ 0x6e, 0x20, 0x75, 0x75, 0x69, 0x64, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09,
+ 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x74,
+ 0x68, 0x69, 0x73, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x70, 0x6f, 0x6c, 0x6c,
+ 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28,
+ 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x65, 0x6c,
+ 0x66, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x6c, 0x2e,
+ 0x6f, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65,
+ 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x28, 0x73, 0x65, 0x6c, 0x66,
+ 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x6c, 0x2e, 0x72,
+ 0x65, 0x61, 0x64, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d,
+ 0x3d, 0x20, 0x34, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x69, 0x66, 0x20, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63,
+ 0x6f, 0x6d, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x20, 0x21, 0x3d, 0x3d, 0x20, 0x32, 0x30, 0x30, 0x29,
+ 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73,
+ 0x65, 0x6c, 0x66, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x70, 0x6f, 0x6c, 0x6c,
+ 0x28, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x6f, 0x6e, 0x52, 0x63, 0x76, 0x64, 0x28,
+ 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x50, 0x6f,
+ 0x6c, 0x6c, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x70, 0x6f, 0x6c,
+ 0x6c, 0x28, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d,
+ 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x3b, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x75, 0x73, 0x65, 0x20, 0x74, 0x6f, 0x6b,
+ 0x65, 0x6e, 0x20, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x20, 0x77, 0x65, 0x20,
+ 0x68, 0x61, 0x76, 0x65, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65,
+ 0x78, 0x74, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x65, 0x6c, 0x66,
+ 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x6c, 0x2e, 0x6f,
+ 0x70, 0x65, 0x6e, 0x28, 0x22, 0x47, 0x45, 0x54, 0x22, 0x2c, 0x20, 0x73,
+ 0x65, 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x2b,
+ 0x20, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79,
+ 0x20, 0x3f, 0x20, 0x22, 0x3f, 0x22, 0x20, 0x2b, 0x20, 0x73, 0x65, 0x6c,
+ 0x66, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 0x3a, 0x20, 0x22, 0x22,
+ 0x29, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x65, 0x6c,
+ 0x66, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x6c, 0x2e,
+ 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65,
+ 0x61, 0x64, 0x65, 0x72, 0x28, 0x27, 0x58, 0x2d, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x65, 0x64, 0x2d, 0x57, 0x69, 0x74, 0x68, 0x27, 0x2c,
+ 0x20, 0x27, 0x58, 0x4d, 0x4c, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x27, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x50,
+ 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x28, 0x22, 0x43, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0x20, 0x22,
+ 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x22, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74,
+ 0x50, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x6e, 0x75,
+ 0x6c, 0x6c, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x3b, 0x0a,
+ 0x09, 0x09, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x74, 0x68, 0x69,
+ 0x73, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20,
+ 0x64, 0x61, 0x74, 0x61, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
+ 0x74, 0x54, 0x79, 0x70, 0x65, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x78, 0x68, 0x72, 0x2e, 0x6f,
+ 0x70, 0x65, 0x6e, 0x28, 0x22, 0x50, 0x4f, 0x53, 0x54, 0x22, 0x2c, 0x20,
+ 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20,
+ 0x2b, 0x20, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x71, 0x75, 0x65, 0x72,
+ 0x79, 0x20, 0x3f, 0x20, 0x22, 0x3f, 0x22, 0x20, 0x2b, 0x20, 0x73, 0x65,
+ 0x6c, 0x66, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 0x3a, 0x20, 0x22,
+ 0x22, 0x29, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x65,
+ 0x6c, 0x66, 0x2e, 0x78, 0x68, 0x72, 0x2e, 0x73, 0x65, 0x74, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x28,
+ 0x27, 0x58, 0x2d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64,
+ 0x2d, 0x57, 0x69, 0x74, 0x68, 0x27, 0x2c, 0x20, 0x27, 0x58, 0x4d, 0x4c,
+ 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x27,
+ 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x65, 0x6c, 0x66,
+ 0x2e, 0x78, 0x68, 0x72, 0x2e, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x28, 0x27, 0x58,
+ 0x2d, 0x53, 0x43, 0x58, 0x4d, 0x4c, 0x2d, 0x4e, 0x61, 0x6d, 0x65, 0x27,
+ 0x2c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x69, 0x66, 0x20, 0x28, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
+ 0x74, 0x54, 0x79, 0x70, 0x65, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x78, 0x68, 0x72, 0x2e,
+ 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65,
+ 0x61, 0x64, 0x65, 0x72, 0x28, 0x27, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
+ 0x74, 0x2d, 0x54, 0x79, 0x70, 0x65, 0x27, 0x2c, 0x20, 0x63, 0x6f, 0x6e,
+ 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x29, 0x3b, 0x0a, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73,
+ 0x65, 0x6c, 0x66, 0x2e, 0x78, 0x68, 0x72, 0x2e, 0x73, 0x65, 0x6e, 0x64,
+ 0x28, 0x64, 0x61, 0x74, 0x61, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09,
+ 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x2f,
+ 0x2f, 0x20, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x20,
+ 0x61, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x74, 0x6f,
+ 0x20, 0x62, 0x65, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x3d,
+ 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x61,
+ 0x6d, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x29, 0x20, 0x7b,
+ 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20, 0x64, 0x61,
+ 0x74, 0x61, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2f, 0x20,
+ 0x73, 0x65, 0x65, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x3a, 0x20, 0x68, 0x74,
+ 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x72, 0x61, 0x77, 0x2e, 0x67, 0x69,
+ 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x6f, 0x75,
+ 0x67, 0x6c, 0x61, 0x73, 0x63, 0x72, 0x6f, 0x63, 0x6b, 0x66, 0x6f, 0x72,
+ 0x64, 0x2f, 0x4a, 0x53, 0x4f, 0x4e, 0x2d, 0x6a, 0x73, 0x2f, 0x6d, 0x61,
+ 0x73, 0x74, 0x65, 0x72, 0x2f, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x6a,
+ 0x73, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x64, 0x69,
+ 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x20,
+ 0x74, 0x68, 0x69, 0x6e, 0x67, 0x79, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20,
+ 0x68, 0x65, 0x72, 0x65, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x66,
+ 0x20, 0x28, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69,
+ 0x6e, 0x67, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x22, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x76, 0x61, 0x72, 0x20, 0x73, 0x65, 0x65, 0x6e, 0x20, 0x3d, 0x20,
+ 0x5b, 0x5d, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2f,
+ 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x77, 0x6f,
+ 0x72, 0x6b, 0x20, 0x6f, 0x6e, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x20,
+ 0x61, 0x73, 0x20, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x73, 0x20,
+ 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20,
+ 0x63, 0x79, 0x63, 0x6c, 0x65, 0x73, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74,
+ 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x64, 0x61, 0x74, 0x61, 0x20,
+ 0x3d, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e,
+ 0x67, 0x69, 0x66, 0x79, 0x28, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2c, 0x20,
+ 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6b, 0x65, 0x79,
+ 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x28, 0x69, 0x73, 0x4e, 0x6f,
+ 0x64, 0x65, 0x28, 0x76, 0x61, 0x6c, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x72, 0x65,
+ 0x74, 0x75, 0x72, 0x6e, 0x20, 0x61, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x74, 0x74, 0x72,
+ 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x7b, 0x0a,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x64, 0x3a,
+ 0x20, 0x76, 0x61, 0x6c, 0x2e, 0x69, 0x64, 0x2c, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x74, 0x61, 0x67, 0x4e, 0x61, 0x6d,
+ 0x65, 0x3a, 0x20, 0x76, 0x61, 0x6c, 0x2e, 0x74, 0x61, 0x67, 0x4e, 0x61,
+ 0x6d, 0x65, 0x2c, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x20,
+ 0x76, 0x61, 0x6c, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x4e, 0x61, 0x6d,
+ 0x65, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x3b,
+ 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x28, 0x69, 0x73, 0x57,
+ 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x28, 0x76, 0x61, 0x6c, 0x29, 0x29, 0x20,
+ 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x72, 0x65,
+ 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x66,
+ 0x20, 0x28, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x76, 0x61, 0x6c,
+ 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
+ 0x22, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x69, 0x66, 0x20, 0x28, 0x73, 0x65, 0x65, 0x6e, 0x2e, 0x69, 0x6e,
+ 0x64, 0x65, 0x78, 0x4f, 0x66, 0x28, 0x76, 0x61, 0x6c, 0x29, 0x20, 0x3e,
+ 0x3d, 0x20, 0x30, 0x29, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x65, 0x65, 0x6e, 0x2e, 0x70,
+ 0x75, 0x73, 0x68, 0x28, 0x76, 0x61, 0x6c, 0x29, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x76, 0x61, 0x6c, 0x0a,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x29, 0x3b, 0x0a, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x64, 0x61, 0x74, 0x61, 0x20, 0x3d,
+ 0x20, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x74, 0x68, 0x69, 0x73,
+ 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20,
+ 0x64, 0x61, 0x74, 0x61, 0x2c, 0x20, 0x22, 0x61, 0x70, 0x70, 0x6c, 0x69,
+ 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x22,
+ 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x68, 0x65, 0x6c,
+ 0x70, 0x65, 0x72, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x20, 0x74, 0x6f, 0x20, 0x64, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e,
+ 0x65, 0x20, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x73, 0x6f,
+ 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x73, 0x20, 0x61,
+ 0x20, 0x68, 0x74, 0x6d, 0x6c, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x0a, 0x09,
+ 0x09, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20, 0x69, 0x73, 0x4e, 0x6f, 0x64,
+ 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x28, 0x6f, 0x29, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x72,
+ 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x0a, 0x09, 0x09, 0x09, 0x09,
+ 0x20, 0x20, 0x20, 0x20, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x4e,
+ 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x22, 0x6f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x22, 0x20, 0x3f, 0x20, 0x6f, 0x20, 0x69, 0x6e, 0x73,
+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x6f, 0x66, 0x20, 0x4e, 0x6f, 0x64, 0x65,
+ 0x20, 0x3a, 0x20, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20,
+ 0x6f, 0x20, 0x26, 0x26, 0x20, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20,
+ 0x6f, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63,
+ 0x74, 0x22, 0x20, 0x26, 0x26, 0x20, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66,
+ 0x20, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x20,
+ 0x3d, 0x3d, 0x3d, 0x20, 0x22, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22,
+ 0x20, 0x26, 0x26, 0x20, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x6f,
+ 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x3d, 0x3d, 0x3d,
+ 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x20, 0x20, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a,
+ 0x0a, 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x68, 0x65, 0x6c, 0x70,
+ 0x65, 0x72, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20,
+ 0x74, 0x6f, 0x20, 0x64, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x65,
+ 0x20, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x73, 0x6f, 0x6d,
+ 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20,
+ 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x76,
+ 0x61, 0x72, 0x20, 0x69, 0x73, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x20,
+ 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f,
+ 0x29, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x72, 0x65, 0x74,
+ 0x75, 0x72, 0x6e, 0x20, 0x28, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20,
+ 0x20, 0x20, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x57, 0x69, 0x6e,
+ 0x64, 0x6f, 0x77, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x22, 0x6f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x22, 0x20, 0x3f, 0x20, 0x6f, 0x20, 0x69, 0x6e, 0x73,
+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x6f, 0x66, 0x20, 0x57, 0x69, 0x6e, 0x64,
+ 0x6f, 0x77, 0x20, 0x3a, 0x20, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20,
+ 0x20, 0x20, 0x6f, 0x20, 0x26, 0x26, 0x20, 0x74, 0x79, 0x70, 0x65, 0x6f,
+ 0x66, 0x20, 0x6f, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x22, 0x6f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x22, 0x20, 0x26, 0x26, 0x20, 0x74, 0x79, 0x70, 0x65,
+ 0x6f, 0x66, 0x20, 0x6f, 0x2e, 0x6d, 0x65, 0x6e, 0x75, 0x62, 0x61, 0x72,
+ 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
+ 0x22, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x29, 0x3b, 0x0a, 0x09,
+ 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x09, 0x09,
+ 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x73, 0x63,
+ 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0a, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x3c,
+ 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d,
+ 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63,
+ 0x72, 0x69, 0x70, 0x74, 0x22, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x64, 0x6f,
+ 0x6d, 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x28, 0x66, 0x75, 0x6e, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09,
+ 0x09, 0x09, 0x73, 0x63, 0x78, 0x6d, 0x6c, 0x20, 0x3d, 0x20, 0x6e, 0x65,
+ 0x77, 0x20, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69,
+ 0x6f, 0x6e, 0x28, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2f,
+ 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x64, 0x6f, 0x63,
+ 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x65, 0x74, 0x45, 0x6c, 0x65,
+ 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x22, 0x24, 0x7b,
+ 0x73, 0x63, 0x78, 0x6d, 0x6c, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65,
+ 0x49, 0x64, 0x7d, 0x22, 0x29, 0x2c, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x64, 0x6f, 0x63, 0x75,
+ 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x55, 0x52, 0x4c, 0x2c, 0x0a, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x6f, 0x6e, 0x52, 0x63, 0x76, 0x64, 0x20, 0x3a, 0x20,
+ 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x64, 0x61, 0x74,
+ 0x61, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69,
+ 0x66, 0x20, 0x28, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x72, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x58, 0x4d, 0x4c, 0x29, 0x20, 0x7b, 0x0a, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20, 0x74, 0x79,
+ 0x70, 0x65, 0x20, 0x3d, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x67, 0x65,
+ 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61,
+ 0x64, 0x65, 0x72, 0x28, 0x22, 0x58, 0x2d, 0x53, 0x43, 0x58, 0x4d, 0x4c,
+ 0x2d, 0x54, 0x79, 0x70, 0x65, 0x22, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x22,
+ 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x63, 0x68, 0x69, 0x6c, 0x64,
+ 0x72, 0x65, 0x6e, 0x22, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x76, 0x61, 0x72, 0x20, 0x64, 0x6f, 0x6d, 0x54, 0x61, 0x72, 0x67,
+ 0x65, 0x74, 0x20, 0x3d, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x67, 0x65,
+ 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61,
+ 0x64, 0x65, 0x72, 0x28, 0x22, 0x58, 0x2d, 0x53, 0x43, 0x58, 0x4d, 0x4c,
+ 0x2d, 0x58, 0x50, 0x61, 0x74, 0x68, 0x22, 0x29, 0x20, 0x7c, 0x7c, 0x20,
+ 0x22, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x22,
+ 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x76, 0x61, 0x72,
+ 0x20, 0x64, 0x6f, 0x6d, 0x41, 0x74, 0x74, 0x72, 0x20, 0x3d, 0x20, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x28, 0x22, 0x58,
+ 0x2d, 0x53, 0x43, 0x58, 0x4d, 0x4c, 0x2d, 0x41, 0x74, 0x74, 0x72, 0x22,
+ 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x76, 0x61,
+ 0x72, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x64,
+ 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x65, 0x76, 0x61, 0x6c,
+ 0x75, 0x61, 0x74, 0x65, 0x28, 0x64, 0x6f, 0x6d, 0x54, 0x61, 0x72, 0x67,
+ 0x65, 0x74, 0x2c, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,
+ 0x2c, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x2c, 0x20, 0x58, 0x50, 0x61, 0x74,
+ 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x4f, 0x52, 0x44, 0x45,
+ 0x52, 0x45, 0x44, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x4e, 0x41,
+ 0x50, 0x53, 0x48, 0x4f, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x2c, 0x20,
+ 0x6e, 0x75, 0x6c, 0x6c, 0x29, 0x3b, 0x0a, 0x0a, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x76, 0x61, 0x72, 0x20,
+ 0x69, 0x20, 0x3d, 0x20, 0x30, 0x2c, 0x20, 0x6c, 0x20, 0x3d, 0x20, 0x72,
+ 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68,
+ 0x6f, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x20, 0x69, 0x20,
+ 0x3c, 0x20, 0x6c, 0x3b, 0x20, 0x69, 0x2b, 0x2b, 0x29, 0x20, 0x7b, 0x0a,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20,
+ 0x69, 0x74, 0x65, 0x6d, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c,
+ 0x74, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x74,
+ 0x65, 0x6d, 0x28, 0x69, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x20,
+ 0x3d, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x69,
+ 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x28, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x58,
+ 0x4d, 0x4c, 0x2e, 0x66, 0x69, 0x72, 0x73, 0x74, 0x43, 0x68, 0x69, 0x6c,
+ 0x64, 0x2c, 0x20, 0x74, 0x72, 0x75, 0x65, 0x29, 0x3b, 0x0a, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68,
+ 0x20, 0x28, 0x74, 0x79, 0x70, 0x65, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x63, 0x61, 0x73, 0x65, 0x20,
+ 0x22, 0x66, 0x69, 0x72, 0x73, 0x74, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x22,
+ 0x3a, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x69, 0x74, 0x65, 0x6d, 0x2e, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x42,
+ 0x65, 0x66, 0x6f, 0x72, 0x65, 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x2c, 0x20,
+ 0x69, 0x74, 0x65, 0x6d, 0x2e, 0x66, 0x69, 0x72, 0x73, 0x74, 0x43, 0x68,
+ 0x69, 0x6c, 0x64, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x3b, 0x0a, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x63, 0x61, 0x73, 0x65, 0x20,
+ 0x22, 0x6c, 0x61, 0x73, 0x74, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x22, 0x3a,
+ 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69,
+ 0x74, 0x65, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x43, 0x68,
+ 0x69, 0x6c, 0x64, 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x29, 0x3b, 0x0a, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x62, 0x72, 0x65, 0x61,
+ 0x6b, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x63, 0x61, 0x73, 0x65, 0x20, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f,
+ 0x75, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x22, 0x3a, 0x0a,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x74,
+ 0x65, 0x6d, 0x2e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x64,
+ 0x65, 0x2e, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x42, 0x65, 0x66, 0x6f,
+ 0x72, 0x65, 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x74, 0x65,
+ 0x6d, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x63, 0x61, 0x73, 0x65, 0x20, 0x22, 0x6e,
+ 0x65, 0x78, 0x74, 0x73, 0x69, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x22, 0x3a,
+ 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69,
+ 0x74, 0x65, 0x6d, 0x2e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4e, 0x6f,
+ 0x64, 0x65, 0x2e, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x42, 0x65, 0x66,
+ 0x6f, 0x72, 0x65, 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x74,
+ 0x65, 0x6d, 0x2e, 0x6e, 0x65, 0x78, 0x74, 0x53, 0x69, 0x62, 0x6c, 0x69,
+ 0x6e, 0x67, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x3b, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x63, 0x61, 0x73, 0x65, 0x20, 0x22,
+ 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x22, 0x3a, 0x0a, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x74, 0x65, 0x6d,
+ 0x2e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x2e,
+ 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64,
+ 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x29,
+ 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x62,
+ 0x72, 0x65, 0x61, 0x6b, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x63, 0x61, 0x73, 0x65, 0x20, 0x22, 0x64, 0x65, 0x6c,
+ 0x65, 0x74, 0x65, 0x22, 0x3a, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x69, 0x74, 0x65, 0x6d, 0x2e, 0x70, 0x61, 0x72,
+ 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x6d, 0x6f,
+ 0x76, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x28, 0x69, 0x74, 0x65, 0x6d,
+ 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x62, 0x72, 0x65, 0x61, 0x6b, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x63, 0x61, 0x73, 0x65, 0x20, 0x22, 0x61, 0x64,
+ 0x64, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x22, 0x3a,
+ 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69,
+ 0x74, 0x65, 0x6d, 0x2e, 0x73, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69,
+ 0x62, 0x75, 0x74, 0x65, 0x28, 0x64, 0x6f, 0x6d, 0x41, 0x74, 0x74, 0x72,
+ 0x2c, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x3b,
+ 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x63, 0x61,
+ 0x73, 0x65, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x63,
+ 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x3a, 0x0a, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x77, 0x68, 0x69, 0x6c,
+ 0x65, 0x28, 0x69, 0x74, 0x65, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x43, 0x68,
+ 0x69, 0x6c, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x28, 0x29, 0x29, 0x20,
+ 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x69, 0x74, 0x65, 0x6d, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65,
+ 0x43, 0x68, 0x69, 0x6c, 0x64, 0x28, 0x69, 0x74, 0x65, 0x6d, 0x2e, 0x66,
+ 0x69, 0x72, 0x73, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x29, 0x3b, 0x0a,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x74,
+ 0x65, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x69,
+ 0x6c, 0x64, 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x29, 0x3b, 0x0a, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x64, 0x65, 0x66, 0x61, 0x75,
+ 0x6c, 0x74, 0x3a, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
+ 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09,
+ 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x29,
+ 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x73, 0x63, 0x78, 0x6d, 0x6c, 0x2e,
+ 0x6c, 0x6f, 0x6e, 0x67, 0x70, 0x6f, 0x6c, 0x6c, 0x28, 0x29, 0x3b, 0x0a,
+ 0x09, 0x09, 0x09, 0x09, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x20,
+ 0x3d, 0x20, 0x73, 0x63, 0x78, 0x6d, 0x6c, 0x3b, 0x0a, 0x09, 0x09, 0x09,
+ 0x7d, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69,
+ 0x70, 0x74, 0x3e, 0x0a, 0x0a, 0x09, 0x3c, 0x2f, 0x68, 0x65, 0x61, 0x64,
+ 0x3e, 0x0a, 0x09, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x62,
+ 0x6f, 0x64, 0x79, 0x3e, 0x0a, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e,
+ 0x0a
+};
+unsigned int template_xhtml_invoker_html_len = 7837;
diff --git a/src/uscxml/server/HTTPServer.cpp b/src/uscxml/server/HTTPServer.cpp
index bbcbd37..48d2f96 100644
--- a/src/uscxml/server/HTTPServer.cpp
+++ b/src/uscxml/server/HTTPServer.cpp
@@ -408,7 +408,10 @@ void HTTPServer::httpRecvReqCallback(struct evhttp_request *req, void *callbackD
}
request.data.compound["content"].atom.clear();
} else if (iequals(contentType.substr(0, 16), "application/json")) {
- request.data.compound["content"] = Data::fromJSON(request.data.compound["content"].atom);
+ Data json = Data::fromJSON(request.data.compound["content"].atom);
+ if (!json.empty()) {
+ request.data.compound["content"] = json;
+ }
} else if (iequals(contentType.substr(0, 15), "application/xml")) {
NameSpacingParser parser = NameSpacingParser::fromXML(request.data.compound["content"].atom);
if (parser.errorsReported()) {
diff --git a/src/uscxml/server/HTTPServer.h b/src/uscxml/server/HTTPServer.h
index b1816bc..dc9af53 100644
--- a/src/uscxml/server/HTTPServer.h
+++ b/src/uscxml/server/HTTPServer.h
@@ -71,7 +71,14 @@ public:
class Reply {
public:
+ Reply() : status(200), type("get"), evhttpReq(NULL) {}
Reply(Request req) : status(200), type(req.data.compound["type"].atom), evhttpReq(req.evhttpReq) {}
+
+ void setRequest(Request req) {
+ type = req.data.compound["type"].atom;
+ evhttpReq = req.evhttpReq;
+ }
+
int status;
std::string type;
std::map<std::string, std::string> headers;
diff --git a/test/uscxml/templates/xhtml-invoker.html b/test/uscxml/templates/xhtml-invoker.html
index 7773231..bacfe79 100644
--- a/test/uscxml/templates/xhtml-invoker.html
+++ b/test/uscxml/templates/xhtml-invoker.html
@@ -1,6 +1,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+
+ <!-- Get domLoaded event across browsers -->
<script type="text/javascript">
// see http://stackoverflow.com/questions/1206937/javascript-domready
var domLoaded = function(callback) {
@@ -60,8 +62,8 @@
/* Other web browsers */
window.onload = callback;
};
-
- </script>
+ </script>
+
<script type="text/javascript">
function CometSession(options) {
@@ -110,10 +112,13 @@
self.cometPoll.send(null);
};
- this.post = function(name, data) {
+ this.post = function(name, data, contentType) {
self.xhr.open("POST", self.server + (self.query ? "?" + self.query : ""));
self.xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
self.xhr.setRequestHeader('X-SCXML-Name', name);
+ if (contentType) {
+ self.xhr.setRequestHeader('Content-Type', contentType);
+ }
self.xhr.send(data);
}
@@ -147,7 +152,7 @@
} else {
data = thing;
}
- this.post(name, data);
+ this.post(name, data, "application/json");
}
// helper function to determine whether something is a html node
@@ -173,8 +178,8 @@
<script type="text/javascript">
domLoaded(function () {
scxml = new CometSession({
- element: document.getElementById("${scxml.invokeId}"),
- server: "${scxml.server}",
+ //element: document.getElementById("${scxml.invokeId}"),
+ server: document.URL,
onRcvd : function(data) {
if (data.responseXML) {
var type = data.getResponseHeader("X-SCXML-Type") || "replacechildren";
diff --git a/test/uscxml/test-xhtml-invoker.scxml b/test/uscxml/test-xhtml-invoker.scxml
index aec4db3..0d85ffd 100644
--- a/test/uscxml/test-xhtml-invoker.scxml
+++ b/test/uscxml/test-xhtml-invoker.scxml
@@ -4,19 +4,129 @@
<script src="http://uscxml.tk.informatik.tu-darmstadt.de/scripts/dump.js" />
- <state id="start">
- <invoke type="xhtml" id="xhtml1">
- <!-- replacechildren (default), firstchild, lastchild, previoussibling, nextsibling, replace, delete, addattribute -->
+ <script>
+ var entered = {};
+ </script>
+
+ <state id="noBackChannelInlineDOM">
+ <invoke type="xhtml" id="xhtml4">
+ <!-- provide initial content as a inline DOM -->
+ <content>
+ <html:p>We can never get this data into SCXML, just wait 3s!</html:p>
+ <html:form id="form1">
+ First name1: <html:input type="text" name="firstname" /><html:br />
+ Last name1: <html:input type="text" name="lastname" />
+ <html:input type="submit" value="Submit" />
+ </html:form>
+ </content>
+ <finalize>
+ <script>dump(_event);</script>
+ </finalize>
+ </invoke>
+
+ <onentry>
+ <send event="continue" delay="3s" />
+ </onentry>
+
+ <transition event="continue" target="backChannelDomOPContent" />
+ </state>
+
+ <state id="backChannelDomOPContent">
+ <invoke type="xhtml" id="xhtml3">
+ <!-- provide initial content as a DOM operation, this will load the template for backchanneling via _parent -->
<content type="replacechildren" xpath="/html/body">
- <html:form onmouseover="scxml.send('onmouseover', arguments[0])">
+ <html:p>Enter some details to continue!</html:p>
+ <html:form id="form1" onsubmit="_parent.send('form.submitted', [ document.forms['form1'].elements[0].value, document.forms['form1'].elements[1].value ]); return false;">
First name1: <html:input type="text" name="firstname" /><html:br />
Last name1: <html:input type="text" name="lastname" />
- <html:input onclick="scxml.send('onclick', arguments[0])" type="button" value="Submit" />
+ <html:input type="submit" value="Submit" />
</html:form>
</content>
+ <finalize>
+ <script>dump(_event);</script>
+ </finalize>
+ </invoke>
+
+ <transition event="form.submitted">
+ <script>
+ entered.first = _event.data[0];
+ entered.second = _event.data[1];
+ </script>
+ <send target="#_xhtml3">
+ <!-- replace children in body by a form and register onclick on submit button -->
+ <content type="replacechildren" xpath="/html/body">
+ <html:p>Thank you!</html:p>
+ </content>
+ </send>
+ <send event="continue" delay="1000ms" />
+ </transition>
+
+ <transition event="continue" target="backChannelNoContent" />
+
+ </state>
+
+ <state id="backChannelNoContent">
+ <!-- without a src and no content, we invoke with a back channel via template/xhtml-invoker.xhtml for later sends -->
+ <invoke type="xhtml" id="xhtml2">
+ <finalize>
+ <script>dump(_event);</script>
+ </finalize>
</invoke>
- <state id="idle">
+ <state id="waitForStabilize">
+ <onentry>
+ <send event="continue" delay="10ms" />
+ </onentry>
+ <transition event="continue" target="backChannelNoContentInitContent" />
+ </state>
+
+ <state id="backChannelNoContentInitContent">
+ <onentry>
+ <!-- template initialized empty body and the scxml session -->
+ <send target="#_xhtml2">
+ <!-- replace children in body by a form and register onclick on submit button -->
+ <content type="replacechildren" xpath="/html/body">
+ <html:p>Enter some more details to continue!</html:p>
+ <html:form id="form1" onsubmit="_parent.send('form.submitted', [ document.forms['form1'].elements[0].value, document.forms['form1'].elements[1].value ]); return false;">
+ First name1 (${entered.first}): <html:input type="text" name="firstname" /><html:br />
+ Last name1 (${entered.second}): <html:input type="text" name="lastname" />
+ <html:input type="submit" value="Submit" />
+ </html:form>
+ </content>
+ </send>
+ </onentry>
+
+ <transition event="form.submitted">
+ <send target="#_xhtml2">
+ <!-- replace children in body by a form and register onclick on submit button -->
+ <content type="replacechildren" xpath="/html/body">
+ <html:p>Thank you!</html:p>
+ </content>
+ </send>
+ <send event="continue" delay="1000ms" />
+ </transition>
+
+ <transition event="continue" target="arbitraryURL" />
+
+ </state>
+ </state>
+
+ <state id="arbitraryURL">
+ <!-- simply open some arbitrary URL, we cannot communicate with these -->
+ <invoke src="http://www.heise.de" type="xhtml" id="xhtml1" />
+ <onentry>
+ <!-- we need a delayed send for this to be a stable configuration for the invoker -->
+ <send event="continue" delay="10ms" />
+ </onentry>
+ <transition event="continue" target="quit" />
+ </state>
+
+
+
+ <!-- <invoke type="xhtml" id="xhtml1">
+ </invoke> -->
+
+ <!-- state id="idle">
<transition target="idle" event="onmouseover">
<log expr="dump(_event)" />
</transition>
@@ -27,7 +137,7 @@
</content>
</send>
</transition>
- </state>
+ </state -->
- </state>
+ <final id="quit" />
</scxml> \ No newline at end of file