text: !function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.dom2hscript=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){var d=a("./parser"),e=function(a){for(var b=a.style,c={},d=0;d<b.length;++d){var e=b.item(d);c[e]=b[e]}return c},f=function(a){if(!a.tagName&&a.nodeType===Node.TEXT_NODE)return JSON.stringify(a.textContent);if(a.attributes){for(var b={},c=0;c<a.attributes.length;c++){var d=a.attributes[c];d.name&&"undefined"!=typeof d.value&&("style"==d.name?b.style=e(a):b[d.name]=d.value)}var g="h('"+a.tagName;b.id&&(g=g+"#"+b.id,delete b.id),b.class&&(g=g+"."+b.class.replace(/ /g,"."),delete b.class),g+="',",g+=JSON.stringify(b);g+=",[";for(var c=0;c<a.childNodes.length;c++)g+=f(a.childNodes[c])+",";return g+="])"}},g=function(a){return f(d(a))};c.parseDOM=f,c.parseHTML=g,b.exports=c},{"./parser":2}],2:[function(a,b,c){var d;if(!window.DOMParser)throw new Error("DOMParser required");!function(a){"use strict";var b=a.prototype,c=b.parseFromString;try{if((new a).parseFromString("","text/html"))return}catch(a){}b.parseFromString=function(a,b){if(/^\s*text\/html\s*(?:;|$)/i.test(b)){var d=document.implementation.createHTMLDocument("");return a.toLowerCase().indexOf("<!doctype")>-1?d.documentElement.innerHTML=a:d.body.innerHTML=a,d}return c.apply(this,arguments)}}(DOMParser),d=new DOMParser,b.exports=function(a,b){var c,e=d.parseFromString(a,"text/html");c=a.substring(0,10).match(/\<body.+/gi)?e.getElementsByTagName("body")[0]:e.getElementsByTagName("body")[0].firstChild;var f=c.getElementsByTagName("parsererror");if(f&&f.length>0){if(b===!0)throw new Error(f[0].textContent);for(var g=0;g<f.length;g++)f[g].parentElement.removeChild(f[g])}return c}},{}]},{},[1])(1)});