diff --git a/pom.xml b/pom.xml
index f3db6aa..eae8007 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,6 +8,7 @@
3.0.5.RELEASE
+ 7.2.0.v20101020
@@ -19,11 +20,6 @@
-
- org.glassfish
- javax.servlet
- 3.0
- org.slf4jslf4j-api
@@ -51,6 +47,12 @@
jdk15
+
+ org.eclipse.jetty
+ jetty-server
+ ${jettyVersion}
+
+
org.springframework
@@ -104,6 +106,13 @@
maven-checkstyle-plugin2.9.1
+
+
+ org.mortbay.jetty
+ jetty-maven-plugin
+ ${jettyVersion}
+
+
diff --git a/src/main/java/de/ctdo/bunti/artnet/ArtNetSocketImpl.java b/src/main/java/de/ctdo/bunti/artnet/ArtNetSocketImpl.java
index 76bf67f..e98a316 100644
--- a/src/main/java/de/ctdo/bunti/artnet/ArtNetSocketImpl.java
+++ b/src/main/java/de/ctdo/bunti/artnet/ArtNetSocketImpl.java
@@ -34,20 +34,26 @@ public class ArtNetSocketImpl implements ArtNetSocket {
@Override
public final boolean unicastPacket(ArtNetPacket pack, String address) {
- InetAddress targetAdress;
- try {
- targetAdress = InetAddress.getByName(address);
-
- DatagramPacket packet = new DatagramPacket(pack.getRawData(), pack.getLength(), targetAdress, DEFAULT_PORT);
-
- socket.send(packet);
- //socket.send(packet, targetAdress);
-
- } catch (UnknownHostException e) {
- logger.error(e.getMessage(), e);
- } catch (IOException e) {
- logger.error(e.getMessage(), e);
- }
+
+ if(socket != null) {
+
+ InetAddress targetAdress;
+ try {
+ targetAdress = InetAddress.getByName(address);
+
+ DatagramPacket packet = new DatagramPacket(pack.getRawData(), pack.getLength(), targetAdress, DEFAULT_PORT);
+
+ socket.send(packet);
+ //socket.send(packet, targetAdress);
+
+ return true;
+
+ } catch (UnknownHostException e) {
+ logger.error(e.getMessage(), e);
+ } catch (IOException e) {
+ logger.error(e.getMessage(), e);
+ }
+ }
return false;
}
diff --git a/src/main/java/de/ctdo/bunti/artnet/ByteUtils.java b/src/main/java/de/ctdo/bunti/artnet/ByteUtils.java
index 8e363ab..3496ffd 100644
--- a/src/main/java/de/ctdo/bunti/artnet/ByteUtils.java
+++ b/src/main/java/de/ctdo/bunti/artnet/ByteUtils.java
@@ -21,81 +21,15 @@ package de.ctdo.bunti.artnet;
public class ByteUtils {
private final byte[] data;
- private final int length;
-
+
public ByteUtils(byte[] data) {
this.data = data;
- this.length = data.length;
}
- public static final int byteToUint(byte b) {
- return (b < 0 ? 256 + b : b);
- }
-
- public static final String hex(int value, int digits) {
- String stuff = Integer.toHexString(value).toUpperCase();
- int length = stuff.length();
- if (length > digits) {
- return stuff.substring(length - digits);
-
- } else if (length < digits) {
- return "00000000".substring(8 - (digits - length)) + stuff;
- }
- return stuff;
- }
-
- public final boolean compareBytes(byte[] other, int offset, int length) {
- boolean isEqual = (offset + length) < data.length;
- for (int i = 0; i < length && isEqual; i++) {
- isEqual = data[offset++] == other[i];
- }
- return isEqual;
- }
-
- public final byte[] getByteChunk(byte[] buffer, int offset, int len) {
- if (buffer == null) {
- buffer = new byte[len];
- }
- System.arraycopy(data, offset, buffer, 0, len);
- return buffer;
- }
-
public final byte[] getBytes() {
return data;
}
- /**
- * Gets a 16bit int (Big Endian, MSB first) from the buffer at the given
- * offset.
- *
- * @param offset
- * @return
- */
- public final int getInt16(int offset) {
- return (byteToUint(data[offset]) << 8) | byteToUint(data[offset + 1]);
- }
-
- /**
- * Gets a 16bit int (Little Endian, LSB first) from the buffer at the given
- * offset.
- *
- * @param offset
- * @return
- */
- public final int getInt16LE(int offset) {
- return (byteToUint(data[offset + 1]) << 8) | byteToUint(data[offset]);
- }
-
- /**
- * Gets an 8bit int from the buffer at the given offset.
- *
- * @param offset
- * @return
- */
- public final int getInt8(int offset) {
- return byteToUint(data[offset]);
- }
-
public final int getLength() {
return data.length;
}
@@ -118,22 +52,4 @@ public class ByteUtils {
data[offset] = (byte) (val & 0xff);
}
- public final String toHex(int length) {
- String result = "";
- String ascii = "";
- for (int i = 0; i < length; i++) {
- if (0 == i % 16) {
- result += hex(i, 4) + ": ";
- ascii = " ";
- }
- result += hex(byteToUint(data[i]), 2);
- ascii += data[i] > 0x1f && data[i] < 0x7f ? (char) data[i] : ".";
- if (7 == i % 8) {
- result += " ";
- ascii += " ";
- }
- result += (15 == i % 16 ? ascii + "\n" : " ");
- }
- return result;
- }
}
diff --git a/src/main/java/de/ctdo/bunti/artnet/SimpleArtNetSender.java b/src/main/java/de/ctdo/bunti/artnet/SimpleArtNetSender.java
index b80832b..8645dfe 100644
--- a/src/main/java/de/ctdo/bunti/artnet/SimpleArtNetSender.java
+++ b/src/main/java/de/ctdo/bunti/artnet/SimpleArtNetSender.java
@@ -4,6 +4,6 @@ import java.util.Map;
public interface SimpleArtNetSender {
- void sendDMXData(Map dmxdata, String adr);
+ boolean sendDMXData(Map dmxData, String adr);
}
diff --git a/src/main/java/de/ctdo/bunti/artnet/SimpleArtNetSenderImpl.java b/src/main/java/de/ctdo/bunti/artnet/SimpleArtNetSenderImpl.java
index c336955..ed2b514 100644
--- a/src/main/java/de/ctdo/bunti/artnet/SimpleArtNetSenderImpl.java
+++ b/src/main/java/de/ctdo/bunti/artnet/SimpleArtNetSenderImpl.java
@@ -2,6 +2,7 @@ package de.ctdo.bunti.artnet;
import java.util.Map;
+import de.ctdo.bunti.dmx.DMX;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -13,31 +14,40 @@ public class SimpleArtNetSenderImpl implements SimpleArtNetSender {
private ArtNetSocket socket;
private int sequence = 0;
-
+
@Autowired
public final void setSocket(ArtNetSocket socket) {
this.socket = socket;
}
-
-
+
@Override
- public final void sendDMXData(Map dmxdata, String adr) {
+ public final boolean sendDMXData(Map dmxData, String adr) {
+
+ if(dmxData == null || adr == null || adr.isEmpty()) {
+ return false;
+ }
ArtDmxPacket packet = new ArtDmxPacket();
- int size = dmxdata.size();
-
- byte[] arr = new byte[size];
-
- for (int i = 0; i < dmxdata.size(); i++) {
- arr[i] = (byte)(dmxdata.get(i) & 0xff);
- }
+ byte[] arr = getByteArrayFromDataMap(dmxData);
packet.setSequenceID(sequence++);
packet.setDMX(arr, arr.length);
packet.setUniverse(0, 0);
- socket.unicastPacket(packet, adr);
-
+ return socket.unicastPacket(packet, adr);
}
+
+ private byte[] getByteArrayFromDataMap(Map dmxData) {
+ int size = dmxData.size();
+ byte[] arr = new byte[size];
+
+ for (int i = 0; i < dmxData.size(); i++) {
+ arr[i] = (byte)(dmxData.get(i + DMX.DMX_STARTADDRESS_OFFSET) & 0xff);
+ }
+
+ return arr;
+ }
+
+
}
diff --git a/src/main/java/de/ctdo/bunti/artnet/packets/ArtNetPacket.java b/src/main/java/de/ctdo/bunti/artnet/packets/ArtNetPacket.java
index d4a7afa..3696ef9 100644
--- a/src/main/java/de/ctdo/bunti/artnet/packets/ArtNetPacket.java
+++ b/src/main/java/de/ctdo/bunti/artnet/packets/ArtNetPacket.java
@@ -67,9 +67,5 @@ public abstract class ArtNetPacket {
data.setInt16(PROTOCOL_VERSION, 10);
}
- @Override
- public final String toString() {
- return data.toHex(getLength());
- }
}
diff --git a/src/main/java/de/ctdo/bunti/dmx/DMX.java b/src/main/java/de/ctdo/bunti/dmx/DMX.java
index 5f655b4..d3f7af4 100644
--- a/src/main/java/de/ctdo/bunti/dmx/DMX.java
+++ b/src/main/java/de/ctdo/bunti/dmx/DMX.java
@@ -7,6 +7,12 @@ public final class DMX {
public static final int DMX_CHANNEL_VALUE_MAX = 255;
public static final int DMX_CHANNEL_VALUE_MIN = 0;
+ /**
+ * Offset by which startaddress differs from DMX512 data location
+ */
+ public static final int DMX_STARTADDRESS_OFFSET = 1;
+
+
private DMX() {
}
diff --git a/src/main/java/de/ctdo/bunti/dmx/DMXMixerImpl.java b/src/main/java/de/ctdo/bunti/dmx/DMXMixerImpl.java
index 4a83382..95eaaae 100644
--- a/src/main/java/de/ctdo/bunti/dmx/DMXMixerImpl.java
+++ b/src/main/java/de/ctdo/bunti/dmx/DMXMixerImpl.java
@@ -16,7 +16,6 @@ import java.util.HashMap;
import java.util.Map;
@Component
-
public class DMXMixerImpl implements DMXMixer, ApplicationListener {
private static final Logger LOGGER = LoggerFactory.getLogger(DMXMixerImpl.class);
private String artNetDeviceAddress;
@@ -35,7 +34,7 @@ public class DMXMixerImpl implements DMXMixer, ApplicationListener
-
+
-
+
-
+
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties
index 77c96ac..4f21ffe 100644
--- a/src/main/resources/log4j.properties
+++ b/src/main/resources/log4j.properties
@@ -5,7 +5,7 @@ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
# Print the date in ISO 8601 format
#log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
-log4j.appender.stdout.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %c: %m
+log4j.appender.stdout.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %c: %m%n
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=application.log
diff --git a/src/main/webapp/js/jquery-1.6.2.min.js b/src/main/webapp/js/jquery-1.6.2.min.js
deleted file mode 100644
index 31e01a9..0000000
--- a/src/main/webapp/js/jquery-1.6.2.min.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.6.2
- * http://jquery.com/
- *
- * Copyright 2011, John Resig
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- * Copyright 2011, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- *
- * Date: Thu Jun 30 14:16:56 2011 -0400
- */
-(function(a,b){function cv(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cs(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"":"")+""),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cr(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cq(){cn=b}function cp(){setTimeout(cq,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bx(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bm(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(be,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bl(a){f.nodeName(a,"input")?bk(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bk)}function bk(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bj(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bi(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bh(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(a,b){return(a&&a!=="*"?a+".":"")+b.replace(z,"`").replace(A,"&")}function M(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;ic)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function K(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function E(){return!0}function D(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z])/ig,x=function(a,b){return b.toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!A){A=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||D.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c
a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0},m&&f.extend(p,{position:"absolute",left:-1e3,top:-1e3});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="