text: /**
   * @overview better-dom: Live extension playground
   * @version 2.1.2 Thu, 22 Jan 2015 17:50:19 GMT
   * @copyright 2013-2015 Maksim Chemerisuk
   * @license MIT
   * @see https://github.com/chemerisuk/better-dom
   */
  !function(){"use strict";function t(){}function e(n){if(!(this instanceof e)){if(n){var r=n.__2001002__;return r?r:new e(n)}return new t}n&&(n.__2001002__=this,this[0]=n,this._={handler2001002:[],watcher2001002:{},extension2001002:[],context2001002:{}})}function n(t){return e.call(this,t.documentElement)}function r(t,e){var n=arguments[2];void 0===n&&(n="$Element");var r="http://chemerisuk.github.io/better-dom/"+n+".html#"+t,i="invalid call `"+n+("DOM"===n?".":"#")+t+"(";i+=c.map.call(e,String).join(", ")+")`;",this.message=i+" check "+r+" to verify the function arguments"}function i(t,e){r.call(this,t,e,"DOM")}function o(t,n,r,i,o,a){if("number"==typeof t){var u=n.__2001002__;return u?u[t]:void 0}if(9>g){var s=i.ownerDocument.documentElement;switch(t){case"which":return n.keyCode;case"button":var c=n.button;return 1&c?1:2&c?3:4&c?2:0;case"pageX":return n.clientX+s.scrollLeft-s.clientLeft;case"pageY":return n.clientY+s.scrollTop-s.clientTop;case"preventDefault":return function(){return n.returnValue=!1};case"stopPropagation":return function(){return n.cancelBubble=!0}}}switch(t){case"type":return r;case"defaultPrevented":return"defaultPrevented"in n?n.defaultPrevented:n.returnValue===!1;case"target":return e(o);case"currentTarget":return e(a);case"relatedTarget":return e(n.relatedTarget||n[(n.toElement===i?"from":"to")+"Element"])}var f=n[t];return"function"==typeof f?function(){return f.apply(n,arguments)}:f}function a(t,e,n,r,i,u){var s=i[0],l=te[t],p=q(e,s),h=function(e){if(e=e||f.event,a.skip!==t&&(h._type!==y||e.srcUrn===t)){var l=e.target||e.srcElement||s.ownerDocument.documentElement,m=p?p(l):s,d=r||[];m&&(u&&i.off(t,n),d=r?d.map(function(n){return o(n,e,t,s,l,m)}):c.slice.call(e.__2001002__||[0],1),n.apply(i,d)===!1&&(9>g?e.returnValue=!1:e.preventDefault()))}};return l&&(h=l(h,t)||h),9>g&&!("on"+(h._type||t)in s)&&(h._type=y),h.type=t,h.callback=n,h.selector=e,h}var u=Array.prototype.slice,s=Array.prototype,c={computeStyle:function(t){return 9>g?t.currentStyle:t.ownerDocument.defaultView.getComputedStyle(t)},injectElement:function(t){return t&&1===t.nodeType?t.ownerDocument.getElementsByTagName("head")[0].appendChild(t):void 0},every:s.every,each:s.forEach,filter:s.filter,map:s.map,slice:s.slice,isArray:Array.isArray,keys:Object.keys,safeCall:function(t,e,n,r){"string"==typeof e&&(e=t[e]);try{return e.call(t,n,r)}catch(i){return f.setTimeout(function(){throw i},1),!1}},getLegacyFile:function(t){if(10>g){var e=s.filter.call(l.scripts,function(t){return t.src.indexOf("better-dom-legacy.js")>=0});if(e.length<1)throw new Error("In order to use live extensions in IE < 10 you have to include extra files. See https://github.com/chemerisuk/better-dom#notes-about-old-ies for details.");return e[0].src.replace(".js","."+t)}}};e.prototype={toString:function(){return"<"+this[0].tagName.toLowerCase()+">"},version:"2.1.2"},t.prototype=new e,t.prototype.toString=function(){return""},n.prototype=new e,n.prototype.toString=function(){return"#document"};var f=window,l=document,p=l.documentElement,h=f.navigator.userAgent,m=f.ScriptEngineMajorVersion,g=m&&m(),d=~h.indexOf("Android")&&h.indexOf("Chrome")<0,v=f.WebKitAnimationEvent?"-webkit-":"",y="dataavailable",w=function(){return this},b=function(){return!0},E=function(){return!1},x=new n(l);x.register=function(r,i,o){var a=o?e.prototype:n.prototype;null==i&&(i=function(t,e){return e}),c.keys(r).forEach(function(e){var n=[e].concat(r[e]);a[e]=i.apply(null,n),o&&(t.prototype[e]=o.apply(null,n))})},r.prototype=new TypeError,i.prototype=new TypeError;var _={"(":1,")":2,"^":3,">":4,"+":5,"*":6,"`":7,"[":8,".":8,"#":8},A=/`[^`]*`|\[[^\]]*\]|\.[^()>^+*`[#]+|[^()>^+*`[#.]+|\^+|./g,T=/\s*([\w\-]+)(?:=((?:`([^`]*)`)|[^\s]*))?/g,C=/(\$+)(?:@(-)?(\d+)?)?/g,S=/\./g,k=/\$/g,D={"":""},O=function(t,e,n,r){var i=n&&n.indexOf('"')>=0?"'":'"';return"string"==typeof r?n=r:"string"!=typeof n&&(n=e)," "+e+"="+i+n+i},L=function(t,e){return function(n){var r=e?n.lastIndexOf("<"):n.indexOf(">");return n.slice(0,r)+t+n.slice(r)}},N=function(t){return D[t]||(D[t]="<"+t+"></"+t+">")},M=function(t,e){var n,r=Array(t);for(n=0;t>n;++n)r[n]=e.replace(C,function(e,r,i,o){var a=(i?t-n-1:n)+(o?+o:1);return(r+a).slice(-r.length).replace(k,"0")});return r},j=/[&<>"']/g,F={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};"area base br col hr img input link meta param command keygen source".split(" ").forEach(function(t){D[t]="<"+t+">"}),x.emmet=function(t,e){var n,r,o;if("string"!=typeof t)throw new i("emmet",arguments);if(e&&(t=x.format(t,e)),t in D)return D[t];var a=[],u=[];o=t.match(A),n=0,r=o.length;for(var s;r>n;){s=o[n++];var c=s[0],f=_[c];if(f){if("("!==s)for(var l=0,p="^"===c?s.length:1;p>l;++l)for(;a[0]!==c&&_[a[0]]>=f;){var h=a.shift();if(u.push(h),"^"===c&&">"===h)break}")"===s?a.shift():(("["===c||"`"===c)&&u.push(s.slice(1,-1)),"."===c&&u.push(s.slice(1).replace(S," ")),a.unshift(c))}else u.push(s)}n=r=o=void 0,u=u.concat(a),a=[],n=0,r=u.length;for(var m;r>n;){if(m=u[n++],m in _){var g=a.shift(),d=a.shift();switch("string"==typeof d&&(d=[N(d)]),m){case".":g=L(' class="'+g+'"');break;case"#":g=L(' id="'+g+'"');break;case"[":g=L(g.replace(T,O));break;case"*":d=M(+g,d.join(""));break;case"`":a.unshift(d),d=[g.replace(j,function(t){return F[t]})];break;default:g="string"==typeof g?N(g):g.join(""),">"===m?g=L(g,!0):d.push(g)}m="function"==typeof g?d.map(g):d}a.unshift(m)}return n=r=void 0,u=1===u.length?N(a[0]):a[0].join("")};var P=D;x.register({create:"",createAll:"All"},function(t,n){return function(t,r){var i=this[0].ownerDocument,o=this._.sandbox2001002;o||(o=i.createElement("div"),this._.sandbox2001002=o);var a,u;if(t&&t in P)a=i.createElement(t),n&&(a=[new e(a)]);else for(t=t.trim(),t="<"===t[0]&&">"===t[t.length-1]?r?x.format(t,r):t:x.emmet(t,r),o.innerHTML=t,a=n?[]:null;u=o.firstChild;)if(o.removeChild(u),1===u.nodeType){if(!n){a=u;break}a.push(new e(u))}return n?a:e(a)}});var B,I=/^(\w*)(?:#([\w\-]+))?(?:\[([\w\-\=]+)\])?(?:\.([\w\-]+))?$/,H="m oM msM mozM webkitM".split(" ").reduce(function(t,e){var n=e+"atchesSelector";return t||p[n]&&n},null),q=function(t,e){if("string"!=typeof t)return null;var n=I.exec(t);return n&&(n[1]&&(n[1]=n[1].toLowerCase()),n[3]&&(n[3]=n[3].split("=")),n[4]&&(n[4]=" "+n[4]+" ")),function(r){var i,o,a,u;for(n||H||(u=(e||r.ownerDocument).querySelectorAll(t));r&&1===r.nodeType;r=r.parentNode){if(n)a=!(n[1]&&r.nodeName.toLowerCase()!==n[1]||n[2]&&r.id!==n[2]||n[3]&&(n[3][1]?r.getAttribute(n[3][0])!==n[3][1]:!r.hasAttribute(n[3][0]))||n[4]&&!((" "+r.className+" ").indexOf(n[4])>=0));else if(H)a=r[H](t);else{i=0,o=u.length;for(var s;o>i;)if(s=u[i++],s===r)return s;i=o=void 0}if(a||!e||r===e)break}return a&&r}},R=/^(?:on|do)[A-Z]/,U=function(t,n,r,i){var o=r.hasOwnProperty("constructor")&&r.constructor,a=q(t);return function(t,u){var s=e(t);if(!~s._.extension2001002.indexOf(i)&&a(t)&&(s._.extension2001002.push(i),u===!0||n(s)!==!1)){var f=Object.keys(r).filter(function(t){var e=r[t];return R.exec(t)?(s[t]=function(){return e.apply(s,arguments)},!u):"constructor"!==t?(s[t]=e,!u&&"_"===t[0]):void 0});o&&c.safeCall(s,o),f.forEach(function(t){delete s[t]})}}};10>g?B="-ms-behavior:url("+c.getLegacyFile("htc")+") !important":(B=v+"animation-name:DOM2001002 !important;",B+=v+"animation-duration:1ms !important"),x.register({extend:function(t,e,n){if(2===arguments.length&&(n=e,e=!0),"boolean"==typeof e&&(e=e?b:E),"function"==typeof n&&(n={constructor:n}),!n||"object"!=typeof n||"function"!=typeof e)throw new i("extend",arguments);var r=this[0],o=this._.mappings2001002;o||(this._.mappings2001002=o=[],10>g?r.attachEvent("on"+y,function(){var t=f.event;t.srcUrn===y&&o.forEach(function(e){e(t.srcElement)})}):(this.importStyles("@"+v+"keyframes DOM2001002","from {opacity:.99} to {opacity:1}"),r.addEventListener(v?"webkitAnimationStart":"animationstart",function(t){"DOM2001002"===t.animationName&&(o.forEach(function(e){e(t.target)}),t.stopImmediatePropagation())},!0)));var a=U(t,e,n,o.length);o.push(a),c.each.call(r.ownerDocument.querySelectorAll(t),a),this.importStyles(t,B)}}),x.register({importScripts:function(){var t=u.call(arguments,0),e=this[0].ownerDocument,n=function(){var r,o=t.shift(),a=typeof o;if("string"===a)r=e.createElement("script"),r.src=o,r.onload=n,r.async=!0,c.injectElement(r);else if("function"===a)o();else if(o)throw new i("importScripts",arguments)};n()}}),x.register({importStyles:function(t,e){var n=this._.styles2001002;if(!n){var r=this[0].ownerDocument,o=c.injectElement(r.createElement("style"));n=o.sheet||o.styleSheet,this._.styles2001002=n}if("string"!=typeof t||"string"!=typeof e)throw new i("importStyles",arguments);t.split(",").forEach(function(t){try{n.cssRules?n.insertRule(t+"{"+e+"}",n.cssRules.length):"@"!==t[0]?n.addRule(t,e):n.cssText+=t+"{"+e+"}"}catch(r){}})}}),x.register({mock:function(e,n){if(!e)return new t;var r=x.create(e,n),i=this._.mappings2001002,o=function(t){i.forEach(function(e){e(t,!0)}),c.each.call(t.children,o)};return o(r[0]),r}}),x.register({child:!1,children:!0},function(t,n){return function(i){if(n){if(i&&"string"!=typeof i)throw new r(t,arguments)}else if(i&&"number"!=typeof i)throw new r(t,arguments);var o=this[0],a=q(i),u=o.children;return 9>g&&(u=c.filter.call(u,function(t){return 1===t.nodeType})),n?(a&&(u=c.filter.call(u,a)),c.map.call(u,e)):(0>i&&(i=u.length+i),e(u[i]))}},function(e,n){return function(){return n?[]:new t}});var $=/[\n\t\r]/g;x.register({hasClass:[E,"contains",function(t,e){return(" "+t[0].className+" ").replace($," ").indexOf(" "+e+" ")>=0}],addClass:[w,"add",function(t,e){t.hasClass(e)||(t[0].className+=" "+e)}],removeClass:[w,"remove",function(t,e){t[0].className=(" "+t[0].className+" ").replace($," ").replace(" "+e+" "," ").trim()}],toggleClass:[E,"toggle",function(t,e){var n=t.hasClass(e);return n?t.removeClass(e):t[0].className+=" "+e,!n}]},function(t,e,n,i){return p.classList&&(i=function(t,e){return t[0].classList[n](e)}),e===E?function(e,o){if("boolean"==typeof o&&"toggle"===n)return this[o?"addClass":"removeClass"](e),o;if("string"!=typeof e)throw new r(t,arguments);return i(this,e)}:function(){var e,n,o=arguments;e=0,n=o.length;for(var a;n>e;){if(a=o[e++],"string"!=typeof a)throw new r(t,arguments);i(this,a)}return e=n=void 0,this}},function(t,e){return e}),x.register({clone:function(t){if("boolean"!=typeof t)throw new r("clone",arguments);var n,i=this[0];return 9>g?(n=x.create(i.outerHTML),t||n.set("")):n=new e(i.cloneNode(t)),n}},null,function(){return function(){return new t}}),x.register({contains:function(t){var n=this[0];if(t instanceof e){var i=t[0];return i===n?!0:n.contains?n.contains(i):16&n.compareDocumentPosition(i)}throw new r("contains",arguments)}},null,function(){return E});var z=/\-./g,V=["Webkit","O","Moz","ms"],X={get:{},set:{},find:function(t,e){var n=t.replace(z,function(t){return t[1].toUpperCase()});return n in e||(n=V.map(function(t){return t+n[0].toUpperCase()+n.slice(1)}).filter(function(t){return t in e})[0]),this.get[t]=this.set[t]=n}},W=["Top","Right","Bottom","Left"],Y={font:["fontStyle","fontSize","/","lineHeight","fontFamily"],padding:W.map(function(t){return"padding"+t}),margin:W.map(function(t){return"margin"+t}),"border-width":W.map(function(t){return"border"+t+"Width"}),"border-style":W.map(function(t){return"border"+t+"Style"})};" float fill-opacity font-weight line-height opacity orphans widows z-index zoom ".split(" ").forEach(function(t){var e=t.replace(z,function(t){return t[1].toUpperCase()});"float"===t?(e="cssFloat"in p.style?"cssFloat":"styleFloat",X.get[t]=X.set[t]=e):(X.get[t]=e,X.set[t]=function(t,n){n[e]=t.toString()})}),c.keys(Y).forEach(function(t){var e=Y[t];X.get[t]=function(t){var n=[],r=function(e,r){return n.push("/"===e?e:t[e]),!n[r]};return e.some(r)?"":n.join(" ")},X.set[t]=function(n,r){n&&"cssText"in r?r.cssText+=";"+t+":"+n:e.forEach(function(t){return r[t]="number"==typeof n?n+"px":n.toString()})}});var Z=X;x.register({css:function(t,e){var n,i=this,o=arguments.length,a=this[0],u=a.style;if(1===o&&("string"==typeof t||c.isArray(t))){var s=function(t){var e=Z.get[t]||Z.find(t,u),r="function"==typeof e?e(u):u[e];return r||(n||(n=c.computeStyle(a)),r="function"==typeof e?e(n):n[e]),r};return"string"==typeof t?s(t):t.map(s).reduce(function(e,n,r){return e[t[r]]=n,e},{})}if(2===o&&"string"==typeof t){var f=Z.set[t]||Z.find(t,u);"function"==typeof e&&(e=e(this)),null==e&&(e=""),"function"==typeof f?f(e,u):u[f]="number"==typeof e?e+"px":e.toString()}else{if(1!==o||!t||"object"!=typeof t)throw new r("css",arguments);c.keys(t).forEach(function(e){i.css(e,t[e])})}return this}},null,function(){return function(t){return 1===arguments.length&&c.isArray(t)?{}:1!==arguments.length||"string"!=typeof t?this:void 0}});var J=9>g?"toUpperCase":"toLowerCase";x.register({define:function(t,e,n){var i=this,o=this[0];if("string"!=typeof t||"function"!=typeof e||"function"!=typeof n)throw new r("define",arguments);var a=t[J](),u=o.setAttribute,s=o.removeAttribute;if(9>g){var c=o.getAttribute(t);null!==c&&(o[a]=c)}return Object.defineProperty(o,t,{get:function(){var t=o.getAttribute(a,1);return e.call(i,t)},set:function(t){var e=n.call(i,t);null==e?s.call(o,a,1):u.call(o,a,e,1)}}),o.setAttribute=function(t,n,r){a===t[J]()?o[t]=e.call(i,n):u.call(o,t,n,r)},o.removeAttribute=function(t,n){a===t[J]()?o[t]=e.call(i,null):s.call(o,t,n)},this}},null,function(){return w}),x.register({empty:function(){return this.set("")}},null,function(){return w});var K=l.getElementsByClassName?/^(?:(\w+)|\.([\w\-]+))$/:/^(?:(\w+))$/,G=/'|\\/g;x.register({find:"",findAll:"All"},function(t,n){return function(i){if("string"!=typeof i)throw new r(t,arguments);var o,a,u,s,f=this[0],l=K.exec(i);return l?(o=l[1]?f.getElementsByTagName(i):f.getElementsByClassName(l[2]),o&&!n&&(o=o[0])):(a=!0,s=f,f!==f.ownerDocument.documentElement&&((a=f.getAttribute("id"))?u=a.replace(G,"\\$&"):(u="DOM2001002",f.setAttribute("id",u)),u="[id='"+u+"'] ",i=u+i.split(",").join(","+u)),o=c.safeCall(s,"querySelector"+n,i),a||f.removeAttribute("id")),n?c.map.call(o,e):e(o)}},function(e,n){return function(){return n?[]:new t}});var Q={};"onfocusin"in l.documentElement?(Q.focus=function(t){t._type="focusin"},Q.blur=function(t){t._type="focusout"}):Q.focus=Q.blur=function(t){t.capturing=!0},l.createElement("input").validity&&(Q.invalid=function(t){t.capturing=!0}),9>g&&["submit","change","reset"].forEach(function(t){Q[t]=function(t){t._type="_"}});var te=Q,ee=a;x.register({fire:function(t){var e,n,i,o=this[0];if("string"!=typeof t)throw new r("fire",arguments);var a=te[t],u={};return a&&(u=a(u)||u),n=u._type||t,9>g?(e=o.ownerDocument.createEventObject(),e.__2001002__=arguments,"on"+n in o||(n=y),n===y&&(e.srcUrn=t),o.fireEvent("on"+n,e),i=e.returnValue!==!1):(e=o.ownerDocument.createEvent("HTMLEvents"),e.__2001002__=arguments,e.initEvent(n,!0,!0),i=o.dispatchEvent(e)),i&&o[t]&&(ee.skip=t,c.safeCall(o,t),ee.skip=null),i}},null,function(){return b});var ne={get:{},set:{}};"tabIndex readOnly maxLength cellSpacing cellPadding rowSpan colSpan useMap frameBorder contentEditable".split(" ").forEach(function(t){ne.get[t.toLowerCase()]=function(e){return e[t]}}),ne.get.style=function(t){return t.style.cssText},ne.set.style=function(t,e){t.style.cssText=e},ne.get.title=function(t){var e=t.ownerDocument;return(t===e.documentElement?e:t).title},ne.set.title=function(t,e){var n=t.ownerDocument;(t===n.documentElement?n:t).title=e},ne.get.type=function(t){return t.getAttribute("type")||t.type},9>g&&(ne.get.textContent=function(t){return t.innerText},ne.set.textContent=function(t,e){t.innerText=e},ne.set.innerHTML=function(t,e){try{t.innerHTML=e}catch(n){var r,i=t.ownerDocument.createElement("div");for(t.innerText="",i.innerHTML=e;r=i.firstChild;)t.appendChild(r)}});var re=ne,ie=/[A-Z]/g,oe=function(t,e){e=e.replace(ie,function(t){return"-"+t.toLowerCase()});var n=t.getAttribute("data-"+e);if(null!=n&&"{"===n[0]&&"}"===n[n.length-1])try{n=JSON.parse(n)}catch(r){}return n};x.register({get:function(t){var e=this,n=this[0],i=re.get[t];if(i)return i(n,t);if("string"==typeof t){if(t in n)return n[t];if("_"!==t[0])return n.getAttribute(t);var o=t.slice(1),a=this._;return o in a||(a[o]=oe(n,o)),a[o]}if(c.isArray(t))return t.reduce(function(t,n){return t[n]=e.get(n),t},{});if(void 0===t)return this.value();throw new r("get",arguments)}},null,function(){return function(){}}),x.register({after:["afterend",!0,function(t,e){t.parentNode.insertBefore(e,t.nextSibling)}],before:["beforebegin",!0,function(t,e){t.parentNode.insertBefore(e,t)}],prepend:["afterbegin",!1,function(t,e){t.insertBefore(e,t.firstChild)}],append:["beforeend",!1,function(t,e){t.appendChild(e)}],replace:["",!0,function(t,e){t.parentNode.replaceChild(e,t)}],remove:["",!0,function(t){t.parentNode.removeChild(t)}]},function(t,n,r,i){return function(){var t=u.call(arguments,0),o=this,a=this[0];if(r&&!a.parentNode)return this;var s=n?"":a.ownerDocument.createDocumentFragment();return t.forEach(function(t){"function"==typeof t&&(t=t(o)),"string"==typeof t?"string"==typeof s?s+=t.trim():t=x.createAll(t):t instanceof e&&(t=[t]),c.isArray(t)&&("string"==typeof s&&(t=x.createAll(s).concat(t),s=a.ownerDocument.createDocumentFragment()),t.forEach(function(t){s.appendChild(t[0])}))}),"string"==typeof s?a.insertAdjacentHTML(n,s):i(a,s),this}},function(){return w}),x.register({map:function(t,e){if("function"!=typeof t)throw new r("map",arguments);return[t.call(e,this)]}},null,function(){return function(){return[]}});var ae=function(t){var e=c.computeStyle(t);return"hidden"===e.visibility||"none"===e.display},ue={":focus":function(t){return t===t.ownerDocument.activeElement},":visible":function(t){return!ae(t)},":hidden":ae};x.register({matches:function(t){if(!t||"string"!=typeof t)throw new r("matches",arguments);var e=ue[t]||q(t);return!!e(this[0])}},null,function(){return E}),x.register({off:function(t,e,n){if("string"!=typeof t)throw new r("off",arguments);void 0===n&&(n=e,e=void 0);var i=this[0];return this._.handler2001002=this._.handler2001002.filter(function(r){var o=t!==r.type;return o=o||e&&e!==r.selector,(o=o||n&&n!==r.callback)?!0:(t=r._type||r.type,void(9>g?i.detachEvent("on"+t,r):i.removeEventListener(t,r,!!r.capturing)))}),this}},null,function(){return w}),x.register({offset:function(){var t=this[0],e=t.ownerDocument.documentElement,n=e.clientTop,r=e.clientLeft,i=f.pageYOffset||e.scrollTop,o=f.pageXOffset||e.scrollLeft,a=t.getBoundingClientRect();return{top:a.top+i-n,left:a.left+o-r,right:a.right+o-r,bottom:a.bottom+i-n,width:a.right-a.left,height:a.bottom-a.top}}},null,function(){return function(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}}),x.register({on:!1,once:!0},function(t,e){return function(n,i,o,a){var u=this;if("string"==typeof n){if("function"==typeof o&&(a=o,"string"==typeof i?o=null:(o=i,i=null)),"function"==typeof i&&(a=i,i=null,o=null),"function"!=typeof a)throw new r(t,arguments);var s=this[0],f=ee(n,i,a,o,this,e);9>g?s.attachEvent("on"+(f._type||n),f):s.addEventListener(f._type||n,f,!!f.capturing),this._.handler2001002.push(f)}else{if("object"!=typeof n)throw new r(t,arguments);c.isArray(n)?n.forEach(function(e){u[t](e,i,o,a)}):c.keys(n).forEach(function(e){u[t](e,n[e])})}return this}},function(){return w}),x.register({set:function(t,e){var n,i=this,o=this[0],a=re.set[t],u=this._.watcher2001002[t];if(u&&(n=this.get(t)),1===arguments.length&&"object"!=typeof t)return this.value(t);if("string"==typeof t)"_"===t[0]?this._[t.slice(1)]=e:("function"==typeof e&&(e=e(this)),a?a(o,e):null==e?o.removeAttribute(t):t in o?o[t]=e:o.setAttribute(t,e),(9>g||d)&&(o.className=o.className));else if(c.isArray(t))t.forEach(function(t){i.set(t,e)});else{if("object"!=typeof t)throw new r("set",arguments);c.keys(t).forEach(function(e){i.set(e,t[e])})}return u&&n!==e&&u.forEach(function(t){c.safeCall(i,t,e,n)}),this}},null,function(){return w}),x.register({next:"nextSibling",prev:"previousSibling",nextAll:"nextSibling",prevAll:"previousSibling",closest:"parentNode"},function(t,n){return function(i){if(i&&"string"!=typeof i)throw new r(t,arguments);var o="All"===t.slice(-3),a=q(i),u=o?[]:null,s=this[0];for(a&&"closest"===t||(s=s[n]);s;s=s[n])if(1===s.nodeType&&(!a||a(s))){if(!o)break;u.push(s)}return o?c.map.call(u,e):e(s)}},function(e){return function(){return"All"===e.slice(-3)?[]:new t}}),x.register({value:function(t){var n,r=this[0];if(void 0===t){switch(r.tagName){case"SELECT":return~r.selectedIndex?r.options[r.selectedIndex].value:"";case"OPTION":n=r.hasAttribute("value")?"value":"text";break;default:n=r.type&&"value"in r?"value":"innerHTML"}return r[n]}if(t instanceof e)return this.set("").append(t);switch("function"==typeof t&&(t=t(this)),"string"!=typeof t&&(t=null==t?"":String(t)),r.tagName){case"INPUT":case"OPTION":n="value";break;case"SELECT":return c.every.call(r.options,function(e){return!(e.selected=e.value===t)})&&(r.selectedIndex=-1),this;case"TEXTAREA":n=9>g?"innerText":"value";break;default:n="innerHTML"}return this.set(n,t)}},null,function(){return w});var se=["timing-function","property","duration","delay"].map(function(t){return"transition-"+t}),ce=function(t){var e=parseFloat(t)||0;return e&&"ms"!==t.slice(-2)?1e3*e:e},fe=function(t){var e=t[3],n=t[2];return Math.max.apply(Math,n.map(function(t,n){return ce(t)+(ce(e[n])||0)}))};se.concat("animation-duration").forEach(function(t){Z.find(t,p.style)});var le=function(t,e,n,r,i){var o,a;if(d||10>g)return null;if(n){if(a=ce(e[Z.get["animation-duration"]]),!a)return;o=[v+"animation-direction:"+(r?"normal":"reverse"),v+"animation-name:"+n,"visibility:inherit"]}else{var u=se.map(function(t,n){return e[Z.get[t]].split(n?", ":/, (?!\d)/)});if(a=fe(u),!a)return;if(u[1].indexOf("all")<0){var s=u[1].indexOf("visibility");0>s&&(s=u[2].indexOf("0s")),0>s&&(s=u[1].length),u[0][s]="linear",u[1][s]="visibility",u[r?2:3][s]="0s",u[r?3:2][s]=a+"ms"}o=u.map(function(t,e){for(var n=0,r=t.length;r>n;++n)t[n]=t[n]||t[n-1]||"initial";return v+se[e]+":"+t.join(", ")}),o.push("visibility:"+(r?"hidden":"inherit"),"will-change:"+u[1].join(", "))}return{cssText:o.join(";"),initialCssText:t.style.cssText,handleEvent:function(e){if(e.target===t){if(n){if(e.animationName!==n)return}else if("visibility"!==e.propertyName)return;e.stopPropagation(),i()}}}},pe=v?"webkitTransitionEnd":"transitionend",he=v?"webkitAnimationEnd":"animationend";x.register({show:!1,hide:!0,toggle:null},function(t,e){return function(n,i){var o=this;if("string"!=typeof n&&(i=n,n=null),i&&"function"!=typeof i)throw new r(t,arguments);var a=this[0],u=a.style,s=c.computeStyle(a),f=e,l=this._.frame2001002,p=function(){h?(a.removeEventListener(m,h,!0),u.cssText=h.initialCssText):o.set("aria-hidden",String(f)),u.visibility=f?"hidden":"inherit",o._.frame2001002=null,i&&i(o)};if("boolean"!=typeof f&&(f="hidden"!==s.visibility),l&&x.cancelFrame(l),a.ownerDocument.documentElement.contains(a)){var h=le(a,s,n,f,p),m=n?he:pe;this._.frame2001002=x.requestFrame(h?function(){a.addEventListener(m,h,!0),u.cssText=h.initialCssText+h.cssText,o.set("aria-hidden",String(f))}:p)}else p();return this}},function(){return w}),x.register({watch:function(t,e){var n=this._.watcher2001002;return n[t]||(n[t]=[]),n[t].push(e),this},unwatch:function(t,e){var n=this._.watcher2001002;return n[t]&&(n[t]=n[t].filter(function(t){return t!==e})),this}},null,function(){return w}),x.constructor=function(t){var r=t&&t.nodeType,i=9===r?n:e;return i(1===r||9===r?t:null)};var me=/\{([\w\-]+)\}/g;x.format=function(t,e){return"string"!=typeof t&&(t=String(t)),e&&"object"==typeof e||(e={}),t.replace(me,function(t,n,r){return n in e&&(t=e[n],"function"==typeof t&&(t=t(r)),t=String(t)),t})};var ge=f.requestAnimationFrame,de=f.cancelAnimationFrame,ve=0;ge&&de||["ms","moz","webkit","o"].forEach(function(t){ge=ge||f[t+"RequestAnimationFrame"],de=de||f[t+"CancelAnimationFrame"]}),x.requestFrame=function(t){if(ge)return ge.call(f,t);var e=Date.now(),n=Math.max(0,16-(e-ve));return ve=e+n,f.setTimeout(function(){t(e+n)},n)},x.cancelFrame=function(t){de?de.call(f,t):f.clearTimeout(t)};var ye=f.DOM;x.noConflict=function(){return f.DOM===x&&(f.DOM=ye),x},f.DOM=x}();