aqueous
Version:
Proportional vertical layouts
18 lines • 26.6 kB
JavaScript
/*!
* =============================================================
* Ender: open module JavaScript framework (https://enderjs.com)
* Build: ender build placebo-js
* Packages: ender-core@2.0.0 ender-commonjs@1.0.8 placebo-js@1.0.8
* =============================================================
*/
(function(){/*!
* Ender: open module JavaScript framework (client-lib)
* http://enderjs.com
* License MIT
*/
function e(e,r){var n;if(this.length=0,"string"==typeof e&&(e=t._select(this.selector=e,r)),null==e)return this;if("function"==typeof e)t._closure(e,r);else if("object"!=typeof e||e.nodeType||(n=e.length)!==+n||e==e.window)this[this.length++]=e;else for(this.length=n=n>0?~~n:0;n--;)this[n]=e[n]}function t(t,r){return new e(t,r)}function r(e){if("$"+e in r._cache)return r._cache["$"+e];if("$"+e in r._modules)return r._cache["$"+e]=r._modules["$"+e]._load();if(e in window)return window[e];throw new Error('Requested module "'+e+'" has not been defined.')}function n(e,t){return r._cache["$"+e]=t}function i(e,t){this.id=e,this.fn=t,r._modules["$"+e]=this}t.fn=t.prototype=e.prototype,t._reserved={reserved:1,ender:1,expose:1,noConflict:1,fn:1},e.prototype.$=t,e.prototype.splice=function(){throw new Error("Not implemented")},e.prototype.forEach=function(e,t){var r,n;for(r=0,n=this.length;n>r;++r)r in this&&e.call(t||this[r],this[r],r,this);return this},t.ender=function(r,n){var i=n?e.prototype:t;for(var a in r)!(a in t._reserved)&&(i[a]=r[a]);return i},t._select=function(e,t){return e?(t||document).querySelectorAll(e):[]},t._closure=function(e){e.call(document,t)},"undefined"!=typeof module&&module.exports&&(module.exports=t);t.expose=function(e,r){t.expose.old[e]=window[e],window[e]=r},t.expose.old={},t.noConflict=function(e){if(window.$=t.expose.old.$,e)for(var r in t.expose.old)window[r]=t.expose.old[r];return this},t.expose("$",t),t.expose("ender",t);/*!
* Ender: open module JavaScript framework (module-lib)
* http://enderjs.com
* License MIT
*/
var a=this;r._cache={},r._modules={},i.prototype.require=function(e){var t,n;if("."==e.charAt(0)){for(t=(this.id.replace(/\/.*?$/,"/")+e.replace(/\.js$/,"")).split("/");~(n=t.indexOf("."));)t.splice(n,1);for(;(n=t.lastIndexOf(".."))>0;)t.splice(n-1,2);e=t.join("/")}return r(e)},i.prototype._load=function(){var e=this,t=/^\.\.\//g,r=/^\.\/[^\/]+$/g;return e._loaded||(e._loaded=!0,e.exports={},e.fn.call(a,e,e.exports,function(n){return n.match(t)?n=e.id.replace(/[^\/]+\/[^\/]+$/,"")+n.replace(t,""):n.match(r)&&(n=e.id.replace(/\/[^\/]+$/,"")+n.replace(".","")),e.require(n)},a)),e.exports},i.createPackage=function(e,t,n){var a,o;for(a in t)new i(e+"/"+a,t[a]),(o=a.match(/^(.+)\/index$/))&&new i(e+"/"+o[1],t[a]);n&&(r._modules["$"+e]=r._modules["$"+e+"/"+n])},t&&t.expose&&(t.expose("global",a),t.expose("require",r),t.expose("provide",n),t.expose("Module",i)),i.createPackage("placebo-js",{placebo:function(e,t,r,n){!function(e){"use strict";function t(e,r,n,i,a,o,l){var s,u=e[e.length-1];return u.children.length>0&&(u=u.children[u.children.length-1]),r.extra&&0!==Object.getOwnPropertyNames(r.extra).length?(r.extra["class"]?u.setAttribute("class",((u.getAttribute("class")||"")+" "+r.extra["class"]).replace(/^\s/,"")):r.extra.id?u.setAttribute("id",((u.getAttribute("id")||"")+" "+r.extra.id).replace(/^\s/,"")):r.extra.node?(e.push(document.createElement(r.extra.node)),i+=1,n.push(i),a.push(o)):r.extra.contains?u.getAttribute("data-placebo-prevent-children")||(s=document.createElement(r.extra.contains),u.appendChild(s)):r.extra.child?u.getAttribute("data-placebo-prevent-children")||(s=document.createElement(r.extra.child),u.appendChild(s)):r.extra.immediate_child?(e.push(document.createElement(r.extra.immediate_child)),i+=1,n.push(i),a.push(o)):r.extra.after?(e.push(document.createElement(r.extra.after)),i+=1,n.splice(0,0,i),a.push(o)):r.extra.attr?u.setAttribute(r.extra.attr,""):r.extra.attr_is?u.setAttribute(r.extra.attr_is,r.extra.value):r.extra.attr_has_word?u.setAttribute(r.extra.attr_has_word,r.extra.value):r.extra.attr_starts_hyphen?u.setAttribute(r.extra.attr_starts_hyphen,r.extra.value):r.extra.attr_starts?u.setAttribute(r.extra.attr_starts,r.extra.value):r.extra.attr_ends?u.setAttribute(r.extra.attr_ends,r.extra.value):r.extra.attr_has?u.setAttribute(r.extra.attr_has,r.extra.value):r.extra.pseudo&&("checked"===r.extra.pseudo?u.checked=!0:"disabled"===r.extra.pseudo?u.disabled=!0:"empty"===r.extra.pseudo?(u.innerHTML="",u.setAttribute("data-placebo-prevent-children","true")):"enabled"===r.extra.pseudo?u.disabled=!1:"first-child"===r.extra.pseudo?a[a.length-1]=function(e,t){t.insertBefore(e,t.childNodes[0])}:"first-of-type"===r.extra.pseudo?a[a.length-1]=function(e,t){var r,n=!1;for(r=0;r<t.children.length;r+=1)t.children[r].nodeName!==u.nodeName||n||(n=!0,t.insertBefore(e,t.children[r]));n||t.appendChild(e)}:"focus"===r.extra.pseudo?l.push(function(){u.focus()}):"in-range"===r.extra.pseudo?u.getAttribute("min")&&u.getAttribute("max")?u.setAttribute("value",Math.floor(Math.random()*Number(u.getAttribute("max"))+Number(u.getAttribute("min")))):u.getAttribute("max")?u.setAttribute("value",Math.floor(Math.random()*Number(u.getAttribute("max")))):u.getAttribute("min")&&u.setAttribute("value",Math.floor(Math.random()*(2*Number(u.getAttribute("min")))+Number(u.getAttribute("min")))):"lang"===r.extra.pseudo?u.setAttribute("lang",r.extra.value):"last-of-type"===r.extra.pseudo?a[a.length-1]=function(e,t){var r,n,i=!1;for(n=0;n<t.children.length;n+=1)t.children[n].nodeName===u.nodeName&&(r=t.children[n],i=!0);i&&r.nextElementSibling?t.insertBefore(e,r.nextElementSibling):t.appendChild(e)}:"nth-child"===r.extra.pseudo?a[a.length-1]=function(e,t){t.children[Number(r.extra.value)-1]?t.insertBefore(e,t.children[Number(r.extra.value)-1]):t.appendChild(e)}:"nth-last-of-type"===r.extra.pseudo?a[a.length-1]=function(e,t){var n,i=[];for(n=0;n<t.children.length;n+=1)t.children[n].nodeName===u.nodeName&&i.push(t.children[n]);i.length>=Number(r.extra.value)?t.insertBefore(e,i[i.length-Number(r.extra.value)+1]):t.appendChild(e)}:"nth-of-type"===r.extra.pseudo?a[a.length-1]=function(e,t){var n,i=[];for(n=0;n<t.children.length;n+=1)t.children[n].nodeName===u.nodeName&&i.push(t.children[n]);i.length>=Number(r.extra.value)?t.insertBefore(e,i[Number(r.extra.value)-1]):t.appendChild(e)}:"only-of-type"===r.extra.pseudo?a[a.length-1]=function(e,t){var r;for(r=0;r<t.children.length;r+=1)if(t.children[r].nodeName===u.nodeName){for(;t.children[r].hasChildNodes();)t.children[r].removeChild(t.children[r].firstChild);t.removeChild(t.children[r])}t.appendChild(e)}:"only-child"===r.extra.pseudo?a[a.length-1]=function(e,t){for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}:"optional"===r.extra.pseudo?u.required=!1:"out-of-range"===r.extra.pseudo?u.getAttribute("max")&&u.setAttribute("value",Math.floor(Math.random()*(2*Number(u.getAttribute("max")))+Number(u.getAttribute("max")))):"read-only"===r.extra.pseudo?(u.readyOnly=!0,u.setAttribute("readonly",""),u.contentEditable=!1):"read-write"===r.extra.pseudo?(u.readOnly=!1,u.contentEditable=!0):"required"===r.extra.pseudo?u.required=!0:"target"===r.extra.pseudo&&u.getAttribute("id")&&history.pushState({},document.title,"#"+u.getAttribute("id"))),t(e,r.extra,n,i,a,o,l)):[e,n,a,l]}function r(e){var r,i,a,o,l,s,u=n.parse(e),c=[],d=function(e,t){t.appendChild(e)};if("*"===u.node){for(i=document.querySelectorAll("*"),s=0;s<i.length;s+=1)c.push(i[s].cloneNode(!0));r=[0],a=[d],l=[]}else o=t([document.createElement(u.node)],u,[0],1,[d],d,[]),c=o[0],r=o[1],a=o[2],l=o[3];return{done:l,elements:c,"export":function(e){var t;for(t=0;t<this.elements.length;t+=1)e(this.elements[t]);return this},html:function(){var e,t=document.createElement("div");for(e=0;e<this.elements.length;e+=1)t.appendChild(this.elements[e]);return t.innerHTML},loadOrder:r,on:function(e,t){var r;for(r=0;r<this.elements.length;r+=1)this.elements[r].addEventListener(e,t);return this},place:function(e){function t(e,t){var r;for(r=0;r<t.length;r+=1)if(e>t[r])return!1;return!0}function r(e,n,i,a){var o;if(!e||e.length<1)return a;for(o=0;o<e.length;o+=1)if(t(e[o],e))return a[0].push(n[o]),a[1].push(i[o]),e.splice(o,1),n.splice(o,1),i.splice(o,1),r(e,n,i,a)}var n,i,a,o=[];if(!e){if(!document.body)throw"Placebo requires a document with a body!";e=[document.body]}for("string"==typeof e?e=document.querySelectorAll(e):e.placebo?e=e.elements:e.length||(e=[e]),o=r(this.loadOrder,this.elements,this.special,[[],[]]),n=0;n<o[0].length;n+=1)for(a=0;a<e.length;a+=1)o[1][n](o[0][n],e[a]);for(i=0;i<this.done.length;i+=1)this.done[i](e);return this},placebo:!0,special:a,style:function(e){var t,r,n=Object.getOwnPropertyNames(e);for(t=0;t<n.length;t+=1)for(r=0;r<this.elements.length;r+=1)this.elements[r].style[n[t]]=e[n[t]];return this},text:function(e){var t;for(t=0;t<this.elements.length;t+=1)this.elements[t].innerHTML=e;return this}}}var n=function(){function e(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}function t(e,t,r,n,i,a){this.message=e,this.expected=t,this.found=r,this.offset=n,this.line=i,this.column=a,this.name="SyntaxError"}function r(e){function r(t){function r(t,r,n){var i,a;for(i=r;n>i;i++)a=e.charAt(i),"\n"===a?(t.seenCR||t.line++,t.column=1,t.seenCR=!1):"\r"===a||"\u2028"===a||"\u2029"===a?(t.line++,t.column=1,t.seenCR=!0):(t.column++,t.seenCR=!1)}return dr!==t&&(dr>t&&(dr=0,pr={line:1,column:1,seenCR:!1}),r(pr,dr,t),dr=t),pr}function n(e){hr>ur||(ur>hr&&(hr=ur,fr=[]),fr.push(e))}function i(n,i,a){function o(e){var t=1;for(e.sort(function(e,t){return e.description<t.description?-1:e.description>t.description?1:0});t<e.length;)e[t-1]===e[t]?e.splice(t,1):t++}function l(e,t){function r(e){function t(e){return e.charCodeAt(0).toString(16).toUpperCase()}return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(e){return"\\x0"+t(e)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(e){return"\\x"+t(e)}).replace(/[\u0180-\u0FFF]/g,function(e){return"\\u0"+t(e)}).replace(/[\u1080-\uFFFF]/g,function(e){return"\\u"+t(e)})}var n,i,a,o=new Array(e.length);for(a=0;a<e.length;a++)o[a]=e[a].description;return n=e.length>1?o.slice(0,-1).join(", ")+" or "+o[e.length-1]:o[0],i=t?'"'+r(t)+'"':"end of input","Expected "+n+" but "+i+" found."}var s=r(a),u=a<e.length?e.charAt(a):null;return null!==i&&o(i),new t(null!==n?n:l(i,u),i,u,a,s.line,s.column)}function a(){var e,t,r;return e=ur,t=l(),t===M&&(t=O),t!==M?(r=s(),r===M&&(r=O),r!==M?(cr=e,t=S(t,r),e=t):(ur=e,e=k)):(ur=e,e=k),e}function o(){var t;return B.test(e.charAt(ur))?(t=e.charAt(ur),ur++):(t=M,0===vr&&n(P)),t}function l(){var t,r,i;for(t=ur,r=[],i=o(),i===M&&(42===e.charCodeAt(ur)?(i=L,ur++):(i=M,0===vr&&n(T)));i!==M;)r.push(i),i=o(),i===M&&(42===e.charCodeAt(ur)?(i=L,ur++):(i=M,0===vr&&n(T)));return r!==M&&(cr=t,r=H(r)),t=r}function s(){var e;return e=u(),e===M&&(e=c(),e===M&&(e=d(),e===M&&(e=p(),e===M&&(e=y(),e===M&&(e=x(),e===M&&(e=m(),e===M&&(e=A(),e===M&&(e=b(),e===M&&(e=h()))))))))),e}function u(){var e;return e=f(),e===M&&(e=v()),e}function c(){var t,r,i,a,o;return t=ur,58===e.charCodeAt(ur)?(r=I,ur++):(r=M,0===vr&&n(U)),r!==M?(58===e.charCodeAt(ur)?(i=I,ur++):(i=M,0===vr&&n(U)),i===M&&(i=O),i!==M?(e.substr(ur,6)===z?(a=z,ur+=6):(a=M,0===vr&&n(D)),a===M&&(e.substr(ur,5)===G?(a=G,ur+=5):(a=M,0===vr&&n(J)),a===M&&(e.substr(ur,6)===K?(a=K,ur+=6):(a=M,0===vr&&n(Q)),a===M&&(e.substr(ur,7)===V?(a=V,ur+=7):(a=M,0===vr&&n(W)),a===M&&(e.substr(ur,8)===X?(a=X,ur+=8):(a=M,0===vr&&n(Y)),a===M&&(e.substr(ur,5)===Z?(a=Z,ur+=5):(a=M,0===vr&&n(ee)),a===M&&(e.substr(ur,7)===te?(a=te,ur+=7):(a=M,0===vr&&n(re)),a===M&&(e.substr(ur,11)===ne?(a=ne,ur+=11):(a=M,0===vr&&n(ie)),a===M&&(e.substr(ur,12)===ae?(a=ae,ur+=12):(a=M,0===vr&&n(oe)),a===M&&(e.substr(ur,10)===le?(a=le,ur+=10):(a=M,0===vr&&n(se)),a===M&&(e.substr(ur,13)===ue?(a=ue,ur+=13):(a=M,0===vr&&n(ce)),a===M&&(e.substr(ur,5)===de?(a=de,ur+=5):(a=M,0===vr&&n(pe)),a===M&&(e.substr(ur,5)===he?(a=he,ur+=5):(a=M,0===vr&&n(fe)),a===M&&(e.substr(ur,8)===ve?(a=ve,ur+=8):(a=M,0===vr&&n(ye)),a===M&&(e.substr(ur,7)===be?(a=be,ur+=7):(a=M,0===vr&&n(xe)),a===M&&(e.substr(ur,10)===me?(a=me,ur+=10):(a=M,0===vr&&n(Ae)),a===M&&(e.substr(ur,12)===ge?(a=ge,ur+=12):(a=M,0===vr&&n(Ce)),a===M&&(e.substr(ur,4)===_e?(a=_e,ur+=4):(a=M,0===vr&&n(we)),a===M&&(e.substr(ur,12)===je?(a=je,ur+=12):(a=M,0===vr&&n(Ne)),a===M&&(e.substr(ur,10)===$e?(a=$e,ur+=10):(a=M,0===vr&&n(Ee)),a===M&&(e.substr(ur,8)===qe?(a=qe,ur+=8):(a=M,0===vr&&n(Me)),a===M&&(e.substr(ur,12)===Fe?(a=Fe,ur+=12):(a=M,0===vr&&n(Re)),a===M&&(e.substr(ur,9)===ke?(a=ke,ur+=9):(a=M,0===vr&&n(Oe)),a===M&&(e.substr(ur,10)===Se?(a=Se,ur+=10):(a=M,0===vr&&n(Be)),a===M&&(e.substr(ur,8)===Pe?(a=Pe,ur+=8):(a=M,0===vr&&n(Le)),a===M&&(e.substr(ur,4)===Te?(a=Te,ur+=4):(a=M,0===vr&&n(He)),a===M&&(e.substr(ur,9)===Ie?(a=Ie,ur+=9):(a=M,0===vr&&n(Ue)),a===M&&(e.substr(ur,6)===ze?(a=ze,ur+=6):(a=M,0===vr&&n(De)),a===M&&(e.substr(ur,5)===Ge?(a=Ge,ur+=5):(a=M,0===vr&&n(Je)),a===M&&(e.substr(ur,7)===Ke?(a=Ke,ur+=7):(a=M,0===vr&&n(Qe))))))))))))))))))))))))))))))),a!==M?(o=s(),o===M&&(o=O),o!==M?(cr=t,r=Ve(a,o),t=r):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k),t}function d(){var t,r,i,a,l,u,c;if(t=ur,58===e.charCodeAt(ur)?(r=I,ur++):(r=M,0===vr&&n(U)),r!==M)if(e.substr(ur,4)===We?(i=We,ur+=4):(i=M,0===vr&&n(Xe)),i===M&&(e.substr(ur,9)===Ye?(i=Ye,ur+=9):(i=M,0===vr&&n(Ze)),i===M&&(e.substr(ur,14)===et?(i=et,ur+=14):(i=M,0===vr&&n(tt)),i===M&&(e.substr(ur,16)===rt?(i=rt,ur+=16):(i=M,0===vr&&n(nt)),i===M&&(e.substr(ur,11)===it?(i=it,ur+=11):(i=M,0===vr&&n(at)))))),i!==M)if(40===e.charCodeAt(ur)?(a=ot,ur++):(a=M,0===vr&&n(lt)),a!==M){for(l=[],u=o(),u===M&&(st.test(e.charAt(ur))?(u=e.charAt(ur),ur++):(u=M,0===vr&&n(ut)));u!==M;)l.push(u),u=o(),u===M&&(st.test(e.charAt(ur))?(u=e.charAt(ur),ur++):(u=M,0===vr&&n(ut)));l!==M?(41===e.charCodeAt(ur)?(u=ct,ur++):(u=M,0===vr&&n(dt)),u!==M?(c=s(),c===M&&(c=O),c!==M?(cr=t,r=pt(i,l,c),t=r):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k)}else ur=t,t=k;else ur=t,t=k;else ur=t,t=k;return t}function p(){var t,r,i,a,o,u,c,d;return t=ur,58===e.charCodeAt(ur)?(r=I,ur++):(r=M,0===vr&&n(U)),r!==M?(e.substr(ur,3)===ht?(i=ht,ur+=3):(i=M,0===vr&&n(ft)),i!==M?(40===e.charCodeAt(ur)?(a=ot,ur++):(a=M,0===vr&&n(lt)),a!==M?(o=l(),o===M&&(o=O),o!==M?(u=s(),u===M&&(u=O),u!==M?(41===e.charCodeAt(ur)?(c=ct,ur++):(c=M,0===vr&&n(dt)),c!==M?(d=s(),d===M&&(d=O),d!==M?(cr=t,r=vt(i,o,u,d),t=r):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k),t}function h(){var t,r,i,a,o;return t=ur,91===e.charCodeAt(ur)?(r=yt,ur++):(r=M,0===vr&&n(bt)),r!==M?(i=C(),i===M&&(i=_(),i===M&&(i=$(),i===M&&(i=w(),i===M&&(i=j(),i===M&&(i=N(),i===M&&(i=g())))))),i!==M?(93===e.charCodeAt(ur)?(a=xt,ur++):(a=M,0===vr&&n(mt)),a!==M?(o=s(),o===M&&(o=O),o!==M?(cr=t,r=At(i,o),t=r):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k),t}function f(){var t,r,i,a;if(t=ur,46===e.charCodeAt(ur)?(r=gt,ur++):(r=M,0===vr&&n(Ct)),r!==M){for(i=[],a=o();a!==M;)i.push(a),a=o();i!==M?(a=s(),a===M&&(a=O),a!==M?(cr=t,r=_t(i,a),t=r):(ur=t,t=k)):(ur=t,t=k)}else ur=t,t=k;return t}function v(){var t,r,i,a;if(t=ur,35===e.charCodeAt(ur)?(r=wt,ur++):(r=M,0===vr&&n(jt)),r!==M){for(i=[],a=o();a!==M;)i.push(a),a=o();i!==M?(a=s(),a===M&&(a=O),a!==M?(cr=t,r=Nt(i,a),t=r):(ur=t,t=k)):(ur=t,t=k)}else ur=t,t=k;return t}function y(){var t,r,i,a,o,u;return t=ur,32===e.charCodeAt(ur)?(r=$t,ur++):(r=M,0===vr&&n(Et)),r===M&&(r=O),r!==M?(44===e.charCodeAt(ur)?(i=qt,ur++):(i=M,0===vr&&n(Mt)),i!==M?(32===e.charCodeAt(ur)?(a=$t,ur++):(a=M,0===vr&&n(Et)),a===M&&(a=O),a!==M?(o=l(),o!==M?(u=s(),u===M&&(u=O),u!==M?(cr=t,r=Ft(o,u),t=r):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k),t}function b(){var t,r,i,a;return t=ur,32===e.charCodeAt(ur)?(r=$t,ur++):(r=M,0===vr&&n(Et)),r!==M?(i=l(),i!==M?(a=s(),a===M&&(a=O),a!==M?(cr=t,r=Rt(i,a),t=r):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k),t}function x(){var t,r,i,a,o,u;return t=ur,32===e.charCodeAt(ur)?(r=$t,ur++):(r=M,0===vr&&n(Et)),r===M&&(r=O),r!==M?(62===e.charCodeAt(ur)?(i=kt,ur++):(i=M,0===vr&&n(Ot)),i!==M?(32===e.charCodeAt(ur)?(a=$t,ur++):(a=M,0===vr&&n(Et)),a===M&&(a=O),a!==M?(o=l(),o!==M?(u=s(),u===M&&(u=O),u!==M?(cr=t,r=St(o,u),t=r):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k),t}function m(){var t,r,i,a,o,u;return t=ur,32===e.charCodeAt(ur)?(r=$t,ur++):(r=M,0===vr&&n(Et)),r===M&&(r=O),r!==M?(43===e.charCodeAt(ur)?(i=Bt,ur++):(i=M,0===vr&&n(Pt)),i!==M?(32===e.charCodeAt(ur)?(a=$t,ur++):(a=M,0===vr&&n(Et)),a===M&&(a=O),a!==M?(o=l(),o!==M?(u=s(),u===M&&(u=O),u!==M?(cr=t,r=Lt(o,u),t=r):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k),t}function A(){var t,r,i,a,o,u;return t=ur,32===e.charCodeAt(ur)?(r=$t,ur++):(r=M,0===vr&&n(Et)),r===M&&(r=O),r!==M?(126===e.charCodeAt(ur)?(i=Tt,ur++):(i=M,0===vr&&n(Ht)),i!==M?(32===e.charCodeAt(ur)?(a=$t,ur++):(a=M,0===vr&&n(Et)),a===M&&(a=O),a!==M?(o=l(),o!==M?(u=s(),u===M&&(u=O),u!==M?(cr=t,r=It(o,u),t=r):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k)):(ur=t,t=k),t}function g(){var e,t,r;for(e=ur,t=[],r=o();r!==M;)t.push(r),r=o();return t!==M&&(cr=e,t=Ut(t)),e=t}function C(){var t,r,i,a,l,s,u;for(t=ur,r=[],i=o();i!==M;)r.push(i),i=o();if(r!==M)if(32===e.charCodeAt(ur)?(i=$t,ur++):(i=M,0===vr&&n(Et)),i===M&&(i=O),i!==M)if(61===e.charCodeAt(ur)?(a=zt,ur++):(a=M,0===vr&&n(Dt)),a!==M)if(32===e.charCodeAt(ur)?(l=$t,ur++):(l=M,0===vr&&n(Et)),l===M&&(l=O),l!==M){for(s=[],Gt.test(e.charAt(ur))?(u=e.charAt(ur),ur++):(u=M,0===vr&&n(Jt));u!==M;)s.push(u),Gt.test(e.charAt(ur))?(u=e.charAt(ur),ur++):(u=M,0===vr&&n(Jt));s!==M?(cr=t,r=Kt(r,s),t=r):(ur=t,t=k)}else ur=t,t=k;else ur=t,t=k;else ur=t,t=k;else ur=t,t=k;return t}function _(){var t,r,i,a,l,s,u;for(t=ur,r=[],i=o();i!==M;)r.push(i),i=o();if(r!==M)if(32===e.charCodeAt(ur)?(i=$t,ur++):(i=M,0===vr&&n(Et)),i===M&&(i=O),i!==M)if(e.substr(ur,2)===Qt?(a=Qt,ur+=2):(a=M,0===vr&&n(Vt)),a!==M)if(32===e.charCodeAt(ur)?(l=$t,ur++):(l=M,0===vr&&n(Et)),l===M&&(l=O),l!==M){for(s=[],Gt.test(e.charAt(ur))?(u=e.charAt(ur),ur++):(u=M,0===vr&&n(Jt));u!==M;)s.push(u),Gt.test(e.charAt(ur))?(u=e.charAt(ur),ur++):(u=M,0===vr&&n(Jt));s!==M?(cr=t,r=Wt(r,s),t=r):(ur=t,t=k)}else ur=t,t=k;else ur=t,t=k;else ur=t,t=k;else ur=t,t=k;return t}function w(){var t,r,i,a,l,s,u;for(t=ur,r=[],i=o();i!==M;)r.push(i),i=o();if(r!==M)if(32===e.charCodeAt(ur)?(i=$t,ur++):(i=M,0===vr&&n(Et)),i===M&&(i=O),i!==M)if(e.substr(ur,2)===Xt?(a=Xt,ur+=2):(a=M,0===vr&&n(Yt)),a!==M)if(32===e.charCodeAt(ur)?(l=$t,ur++):(l=M,0===vr&&n(Et)),l===M&&(l=O),l!==M){for(s=[],Gt.test(e.charAt(ur))?(u=e.charAt(ur),ur++):(u=M,0===vr&&n(Jt));u!==M;)s.push(u),Gt.test(e.charAt(ur))?(u=e.charAt(ur),ur++):(u=M,0===vr&&n(Jt));s!==M?(cr=t,r=Zt(r,s),t=r):(ur=t,t=k)}else ur=t,t=k;else ur=t,t=k;else ur=t,t=k;else ur=t,t=k;return t}function j(){var t,r,i,a,l,s,u;for(t=ur,r=[],i=o();i!==M;)r.push(i),i=o();if(r!==M)if(32===e.charCodeAt(ur)?(i=$t,ur++):(i=M,0===vr&&n(Et)),i===M&&(i=O),i!==M)if(e.substr(ur,2)===er?(a=er,ur+=2):(a=M,0===vr&&n(tr)),a!==M)if(32===e.charCodeAt(ur)?(l=$t,ur++):(l=M,0===vr&&n(Et)),l===M&&(l=O),l!==M){for(s=[],Gt.test(e.charAt(ur))?(u=e.charAt(ur),ur++):(u=M,0===vr&&n(Jt));u!==M;)s.push(u),Gt.test(e.charAt(ur))?(u=e.charAt(ur),ur++):(u=M,0===vr&&n(Jt));s!==M?(cr=t,r=rr(r,s),t=r):(ur=t,t=k)}else ur=t,t=k;else ur=t,t=k;else ur=t,t=k;else ur=t,t=k;return t}function N(){var t,r,i,a,l,s,u;for(t=ur,r=[],i=o();i!==M;)r.push(i),i=o();if(r!==M)if(32===e.charCodeAt(ur)?(i=$t,ur++):(i=M,0===vr&&n(Et)),i===M&&(i=O),i!==M)if(e.substr(ur,2)===nr?(a=nr,ur+=2):(a=M,0===vr&&n(ir)),a!==M)if(32===e.charCodeAt(ur)?(l=$t,ur++):(l=M,0===vr&&n(Et)),l===M&&(l=O),l!==M){for(s=[],Gt.test(e.charAt(ur))?(u=e.charAt(ur),ur++):(u=M,0===vr&&n(Jt));u!==M;)s.push(u),Gt.test(e.charAt(ur))?(u=e.charAt(ur),ur++):(u=M,0===vr&&n(Jt));s!==M?(cr=t,r=ar(r,s),t=r):(ur=t,t=k)}else ur=t,t=k;else ur=t,t=k;else ur=t,t=k;else ur=t,t=k;return t}function $(){var t,r,i,a,l,s,u;for(t=ur,r=[],i=o();i!==M;)r.push(i),i=o();if(r!==M)if(32===e.charCodeAt(ur)?(i=$t,ur++):(i=M,0===vr&&n(Et)),i===M&&(i=O),i!==M)if(e.substr(ur,2)===or?(a=or,ur+=2):(a=M,0===vr&&n(lr)),a!==M)if(32===e.charCodeAt(ur)?(l=$t,ur++):(l=M,0===vr&&n(Et)),l===M&&(l=O),l!==M){for(s=[],Gt.test(e.charAt(ur))?(u=e.charAt(ur),ur++):(u=M,0===vr&&n(Jt));u!==M;)s.push(u),Gt.test(e.charAt(ur))?(u=e.charAt(ur),ur++):(u=M,0===vr&&n(Jt));s!==M?(cr=t,r=sr(r,s),t=r):(ur=t,t=k)}else ur=t,t=k;else ur=t,t=k;else ur=t,t=k;else ur=t,t=k;return t}var E,q=arguments.length>1?arguments[1]:{},M={},F={start:a},R=a,k=M,O=null,S=function(e,t){return{node:e.join("")||"div",extra:t}},B=/^[^.#,>+~[\]|=\^$*:)( ]/,P={type:"class",value:"[^.#,>+~[\\]|=\\^$*:)( ]",description:"[^.#,>+~[\\]|=\\^$*:)( ]"},L="*",T={type:"literal",value:"*",description:'"*"'},H=function(e){return e},I=":",U={type:"literal",value:":",description:'":"'},z="active",D={type:"literal",value:"active",description:'"active"'},G="after",J={type:"literal",value:"after",description:'"after"'},K="before",Q={type:"literal",value:"before",description:'"before"'},V="checked",W={type:"literal",value:"checked",description:'"checked"'},X="disabled",Y={type:"literal",value:"disabled",description:'"disabled"'},Z="empty",ee={type:"literal",value:"empty",description:'"empty"'},te="enabled",re={type:"literal",value:"enabled",description:'"enabled"'},ne="first-child",ie={type:"literal",value:"first-child",description:'"first-child"'},ae="first-letter",oe={type:"literal",value:"first-letter",description:'"first-letter"'},le="first-line",se={type:"literal",value:"first-line",description:'"first-line"'},ue="first-of-type",ce={type:"literal",value:"first-of-type",description:'"first-of-type"'},de="focus",pe={type:"literal",value:"focus",description:'"focus"'},he="hover",fe={type:"literal",value:"hover",description:'"hover"'},ve="in-range",ye={type:"literal",value:"in-range",description:'"in-range"'},be="invalid",xe={type:"literal",value:"invalid",description:'"invalid"'},me="last-child",Ae={type:"literal",value:"last-child",description:'"last-child"'},ge="last-of-type",Ce={type:"literal",value:"last-of-type",description:'"last-of-type"'},_e="link",we={type:"literal",value:"link",description:'"link"'},je="only-of-type",Ne={type:"literal",value:"only-of-type",description:'"only-of-type"'},$e="only-child",Ee={type:"literal",value:"only-child",description:'"only-child"'},qe="optional",Me={type:"literal",value:"optional",description:'"optional"'},Fe="out-of-range",Re={type:"literal",value:"out-of-range",description:'"out-of-range"'},ke="read-only",Oe={type:"literal",value:"read-only",description:'"read-only"'},Se="read-write",Be={type:"literal",value:"read-write",description:'"read-write"'},Pe="required",Le={type:"literal",value:"required",description:'"required"'},Te="root",He={type:"literal",value:"root",description:'"root"'},Ie="selection",Ue={type:"literal",value:"selection",description:'"selection"'},ze="target",De={type:"literal",value:"target",description:'"target"'},Ge="valid",Je={type:"literal",value:"valid",description:'"valid"'},Ke="visited",Qe={type:"literal",value:"visited",description:'"visited"'},Ve=function(e,t){var r={};return r.pseudo=e,r.extra=t||{},r},We="lang",Xe={type:"literal",value:"lang",description:'"lang"'},Ye="nth-child",Ze={type:"literal",value:"nth-child",description:'"nth-child"'},et="nth-last-child",tt={type:"literal",value:"nth-last-child",description:'"nth-last-child"'},rt="nth-last-of-type",nt={type:"literal",value:"nth-last-of-type",description:'"nth-last-of-type"'},it="nth-of-type",at={type:"literal",value:"nth-of-type",description:'"nth-of-type"'},ot="(",lt={type:"literal",value:"(",description:'"("'},st=/^[0-9]/,ut={type:"class",value:"[0-9]",description:"[0-9]"},ct=")",dt={type:"literal",value:")",description:'")"'},pt=function(e,t,r){var n={};return n.pseudo=e,n.value=t.join(""),n.extra=r||{},n},ht="not",ft={type:"literal",value:"not",description:'"not"'},vt=function(e,t,r,n){var i={};return i.pseudo=e,i.value={},i.value.node=t.join("")||"div",i.value.extra=r,i.extra=n||{},i},yt="[",bt={type:"literal",value:"[",description:'"["'},xt="]",mt={type:"literal",value:"]",description:'"]"'},At=function(e,t){return e.extra=t||{},e},gt=".",Ct={type:"literal",value:".",description:'"."'},_t=function(e,t){return{"class":e.join(""),extra:t||{}}},wt="#",jt={type:"literal",value:"#",description:'"#"'},Nt=function(e,t){return{id:e.join(""),extra:t||{}}},$t=" ",Et={type:"literal",value:" ",description:'" "'},qt=",",Mt={type:"literal",value:",",description:'","'},Ft=function(e,t){return{node:e.join(""),extra:t||{}}},Rt=function(e,t){return{contains:e.join(""),extra:t||{}}},kt=">",Ot={type:"literal",value:">",description:'">"'},St=function(e,t){return{child:e.join(""),extra:t||{}}},Bt="+",Pt={type:"literal",value:"+",description:'"+"'},Lt=function(e,t){return{immediate_child:e.join(""),extra:t||{}}},Tt="~",Ht={type:"literal",value:"~",description:'"~"'},It=function(e,t){return{after:e.join(""),extra:t||{}}},Ut=function(e){return{attr:e.join("")}},zt="=",Dt={type:"literal",value:"=",description:'"="'},Gt=/^[^\]]/,Jt={type:"class",value:"[^\\]]",description:"[^\\]]"},Kt=function(e,t){return{attr_is:e.join(""),value:t.join("")}},Qt="~=",Vt={type:"literal",value:"~=",description:'"~="'},Wt=function(e,t){return{attr_has_word:e.join(""),value:t.join("")}},Xt="|=",Yt={type:"literal",value:"|=",description:'"|="'},Zt=function(e,t){return{attr_starts_hyphen:e.join(""),value:t.join("")}},er="^=",tr={type:"literal",value:"^=",description:'"^="'},rr=function(e,t){return{attr_starts:e.join(""),value:t.join("")}},nr="$=",ir={type:"literal",value:"$=",description:'"$="'},ar=function(e,t){return{attr_ends:e.join(""),value:t.join("")}},or="*=",lr={type:"literal",value:"*=",description:'"*="'},sr=function(e,t){return{attr_has:e.join(""),value:t.join("")}},ur=0,cr=0,dr=0,pr={line:1,column:1,seenCR:!1},hr=0,fr=[],vr=0;if("startRule"in q){if(!(q.startRule in F))throw new Error("Can't start parsing from rule \""+q.startRule+'".');R=F[q.startRule]}if(E=R(),E!==M&&ur===e.length)return E;throw E!==M&&ur<e.length&&n({type:"end",description:"end of input"}),i(null,fr,hr)}return e(t,Error),{SyntaxError:t,parse:r}}();"function"==typeof define&&define.amd?define(function(){return r}):e.placebo=r}(this)},ender:function(e,r,n,i){!function(e){"use strict";var t=n("placebo-js");e.ender(t),e.ender({placebo:t})}(t)}},"placebo"),r("placebo-js"),r("placebo-js/ender")}).call(window);