var MageryCompiler=function(t){var e={};function r(a){if(e[a])return e[a].exports;var n=e[a]={exports:{},id:a,loaded:false};t[a].call(n.exports,n,n.exports,r);n.loaded=true;return n.exports}r.m=t;r.c=e;r.p="";return r(0)}([function(module,exports,__webpack_require__){exports.compileToString=__webpack_require__(1).compileToString;exports.compile=function(target,templates,runtime){runtime=runtime||window.Magery;templates=templates||{};if(typeof target==="string"){return exports.compile(document.querySelectorAll(target),templates,runtime)}var compiled=eval(exports.compileToString(target))(runtime);for(var k in compiled){templates[k]=compiled[k]}return templates}},function(t,e,r){var a=r(2);var n=r(3);var i=["data-tagname","data-each","data-if","data-unless","data-key"];function u(t){return"p.lookup(data, "+JSON.stringify(t)+")"}function o(t){var e=[];a.eachAttribute(t,function(t,r){if(i.indexOf(t)===-1&&t.substr(0,2)!=="on"){e.push(JSON.stringify(t)+": "+c(r))}});return"{"+e.join(", ")+"}"}function f(t,e){var r=e.indexOf("(");var a=e.lastIndexOf(")");var n=e.substring(0,r);var i=e.substring(r+1,a);return"p.eventListener("+JSON.stringify(t)+", "+JSON.stringify(n.split("."))+", "+JSON.stringify("["+i+"]")+", "+"data, "+"handlers);\n"}function s(t){var e="";a.eachAttribute(t,function(t,r){var a=t.match(/^on(.*)/);if(a){e+=f(a[1],r)}});return e}function l(t,e,r,l){if(t.tagName==="TEMPLATE-EMBED"){return}if(t.tagName==="TEMPLATE-CHILDREN"){r("inner();\n");return}if(!l&&t.tagName==="TEMPLATE"&&t.getAttribute("data-tagname")){e.push(t);return}if(t.getAttribute("data-each")){var d=t.getAttribute("data-each").split(/\s+in\s+/);var p=d[0];var m=a.propertyPath(d[1]);r("p.each("+"data, "+JSON.stringify(p)+", "+u(m)+", "+"function (data) {\n")}if(t.getAttribute("data-if")){var v=a.propertyPath(t.getAttribute("data-if"));r("if (p.isTruthy("+u(v)+")) {\n")}if(t.getAttribute("data-unless")){var h=a.propertyPath(t.getAttribute("data-unless"));r("if (!p.isTruthy("+u(h)+")) {\n")}var y=t.tagName=="TEMPLATE"&&t.content?t.content.childNodes:t.childNodes;var b=true;if(t.tagName=="TEMPLATE-CALL"){r("p.render("+"templates"+", "+c(t.getAttribute("template"))+", "+o(t)+", handlers"+", "+(t.getAttribute("data-key")?c(t.getAttribute("data-key")):"null")+", function () {"+s(t)+"}"+(y.length?", p.wrapChildren(function (p) {":");")+"\n");b=false}else if(t.tagName.indexOf("-")!==-1){r("p.render("+"templates"+", "+JSON.stringify(t.tagName.toLowerCase())+", "+o(t)+", handlers"+", "+(t.getAttribute("data-key")?c(t.getAttribute("data-key")):"null")+", function () {"+s(t)+"}"+(y.length?", p.wrapChildren(function (p) {":");")+"\n");b=false}else{var A=t.tagName;if(A==="TEMPLATE"&&t.getAttribute("data-tagname")){A=t.getAttribute("data-tagname").toUpperCase()}if(l){if(t.getAttribute("data-key")){r("p.enterTag("+JSON.stringify(A)+", "+"root_key || "+c(t.getAttribute("data-key"))+");\n")}else{r("p.enterTag("+JSON.stringify(A)+", root_key || null);\n")}}else if(t.getAttribute("data-key")){r("p.enterTag("+JSON.stringify(A)+", "+c(t.getAttribute("data-key"))+");\n")}else{r("p.enterTag("+JSON.stringify(A)+", null);\n")}a.eachAttribute(t,function(t,e){if(t==="data-template"){t="data-bind"}if(i.indexOf(t)!==-1){return}var a=t.match(/^on(.*)/);if(a){r(f(a[1],e))}else if(n.attributes[t]&n.BOOLEAN_ATTRIBUTE){if(e===""){r("p.attribute("+JSON.stringify(t)+", true);\n")}else{r("if (p.isTruthy("+c(e)+")) {\n");r("p.attribute("+JSON.stringify(t)+", true);\n");r("}\n")}}else{r("p.attribute("+JSON.stringify(t)+", "+c(e)+");\n")}});if(l){r("if (extra_attrs) { extra_attrs(); }\n")}}a.eachNode(y,function(t){g(t,e,r,false)});if(b){r("p.exitTag();\n")}else if(y.length){r("}));\n")}if(t.getAttribute("data-unless")){r("}\n")}if(t.getAttribute("data-if")){r("}\n")}if(t.getAttribute("data-each")){r("});\n")}}function c(t,e){var r=t.split(/{{\s*|\s*}}/);var n=r.length;var i=-1;while(++i]+)/.exec(t.tagName);return e&&e[1].toLowerCase()};e.shallowClone=function(t){var e={};for(var r in t){e[r]=t[r]}return e};e.eachAttribute=function(t,e){var r=t.attributes;for(var a=0,n=t.attributes.length;a