<commit_before>/**
 * elf.js
 * 
 * @copyright http://www.elfjs.org
 * 
 * @version 0.0.1
 * @license MIT
 * 
 */
"use strict";!function(e){function t(){return Array.prototype.slice.apply(this,arguments)}function n(e){return Array.isArray(e)}function r(e){return void 0!==e&&null!==e}function i(e){return r(e)&&"object"==typeof e}function o(e){return r(e)&&"string"==typeof e}function a(e,t,n){for(var r=n||0,i=t.length,o=0;o<i;o++)if(t.charAt(o)!==e.charAt(r+o))return!1;return!0}function u(e){return JSON.parse(e)}function c(e){return JSON.stringify(e)}function s(e){return ut.innerHTML=e,ut.textContent}function f(e,t){return e.hasOwnProperty(t)}function l(e,t,n,r){return Object.defineProperty(e,t,p(n,r))}function p(e,t){return{configurable:!0,enumerable:!!t,writable:!0,value:e}}function h(e){return function(){return e()||S()}}function d(e){for(var t=[],i=e.length,o=0;o<i;o++){var a=e[o];n(a)?t.push.apply(t,d(a)):r(a)&&t.push(a)}return t}function m(e,t){return g(e,t),function(){x(e,t)}}function v(e,t){if(i(e)&&i(t)){for(var n in e){if(!f(t,n))return!1;if(!v(e[n],t[n]))return!1}for(var n in t)if(!f(e,n))return!1;return!0}return e===t}function g(e,t){if(-1===e.indexOf(t))return e.push(t),1===e.length}function x(e,t){var n=e.indexOf(t);if(-1!==n)return e.splice(n,1),0===e.length}function y(e,t){return function(n){n.apply(e,t||[])}}function b(e,t){for(;e.length;)t(e.pop())}function E(e,t){return function(n,r){for(var i,o,a=0,u=0,c=0,s=!1,f=!1,l=r||0,p=e.length,h="\\";l<p;l++)if(i=o,o=e.charAt(l),s)"'"===o&&i!==h&&(s=!1);else if(f)'"'===o&&i!==h&&(f=!1);else if(0!==a||0!==u||0!==c||o!==n)switch(o){case"{":a++;break;case"}":a--;break;case"(":u++;break;case")":u--;break;case"[":c++;break;case"]":c--;break;case"'":s=!0;break;case'"':f=!0}else if(t(l))break;return l}}function k(e){return e.toLowerCase()}function w(e,t){function n(){var e=p.responseText,n=1223===p.status?200:p.status;0===n&&(n=e?200:0);var r={},i=(p.getAllResponseHeaders()||"").trim();i&&i.split("\n").forEach(function(e){var t=e.trim().split(":"),n=t.shift().trim(),i=t.join(":").trim();r[n]=i}),200<=n&&n<300?t.next({status:n,headers:r,text:function(){return e},json:function(){return u(e)}}):t.loss(p),S()}function r(){t.loss(p),S()}var i="load",o="error",a="Content-Type",c="X-Requested-With",s=e.method||"GET",l=e.headers||{},p=new XMLHttpRequest;p.open(s.toUpperCase(),e.url,!0),M(p,i,n),M(p,o,r),f(l,a)||T(p,a,"application/x-www-form-urlencoded; charset=UTF-8"),f(l,c)||T(p,c,"XMLHttpRequest");for(var h in l)T(p,h,l[h]);return p.send(e.body),function(){q(p,i,n),q(p,o,r),p.abort()}}function O(e,t){function n(e){delete nt[i],t.next({status:200,headers:{},text:function(){return c(e)},json:function(){return e}}),S()}function r(e){delete nt[i],t.loss(e),S()}var i="Elf"+(1e9*Math.random()|0),o=L("script");return nt[i]=n,M(o,"error",r),D(o,"type","text/javascript"),D(o,"src",e.url),j(at,o),function(){nt[i]&&(nt[i]=ot),F(o)}}function T(e,t,n){e.setRequestHeader(t,n)}function S(){zt&&(zt=!1,nt.setTimeout(function(){Ht.forEach(y()),zt=!0}))}function R(e){return{dispose:m(Ht,e)}}function A(e){return rt.createComment(e)}function C(e){return rt.createTextNode(e)}function L(e,t){return t?rt.createElementNS(t,e):rt.createElement(e)}function j(e){d(t.call(arguments,1)).forEach(e.appendChild,e)}function F(e){e.parentNode&&e.parentNode.removeChild(e)}function N(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function P(e,t){e.dispatchEvent(new t.constructor(t.type,t))}function M(e,t,n){e.addEventListener(t,n,!1)}function q(e,t,n){e.removeEventListener(t,n,!1)}function D(e,t,n){switch(Ut[t]||0){case 0:e.setAttribute(t,n);break;case 1:e[t].cssText=V(n);break;case 2:e[t]=!1!==n||n;break;case 3:e[t]=n}}function I(e,t){switch(Ut[t]||0){case 0:e.removeAttribute(t);break;case 1:e[t].cssText="";break;case 2:e[t]=!1;break;case 3:e[t]=""}}function V(e){return i(e)?Ke(e,function(e,t){return t.replace(ct,function(e){return"-"+k(e)})+":"+e}).join(";"):e}function H(e){return e.match(st)[0]}function z(e){var t=e.match(lt);if(t)return{keys:t[1],body:t[2]}}function X(e){for(var t,n={props:{}};t=e.match(pt);e=e.substr(t[0].length)){var r=t[1],i=t[3]||t[4]||t[5]||"";"elf-each"!==r?"elf-when"!==r?n.props[r]=i:n.when=i.trim():n.each=z(i)}return n}function U(e){function t(t){return a(e,vt,t)}function n(t){return a(e,mt,t)&&st.test(e.charAt(t+2))}function r(t){return a(e,dt,t)&&st.test(e.charAt(t+1))}function i(o){return o=e.indexOf(dt,o),o>=0?t(o)||n(o)||r(o)?o:i(o+1):h}function o(t){return E(e,function(){return!0})(xt,t)}function u(e,t){e&&(s[c]=e,c>0?s[c-1].children.push(e):l.push(e),t&&c++)}for(var c=0,s=[],l=[],p=0,h=e.length;p<h;)t(p)?p=function(t){return t=e.indexOf(gt,t),t>=0?t:h}(p+4)+3:n(p)?function(t,n){for(var r=H(e.slice(t+2,n));c>0&&s[--c].qname!==r;);}(p,p=o(p+2)+1):r(p)?function(t,n){var r=H(e.slice(t+1,n)),i=X(e.slice(t+1+r.length,n)),o=f(Yt,r)||"/"===e.charAt(n-2);u({each:i.each,when:i.when,props:i.props,qname:r,level:c,children:[]},!o)}(p,p=o(p+1)+1):function(t,n){u(e.slice(t,n).trim())}(p,p=i(p));return l.length,l[0]||""}function Y(e){return o(e)?G(e):e.each&&e.level>0?K(e):e.when?J(e):B(e)}function B(e){return"Elf.v(Elf.c("+c(e.qname)+"),"+Z(e)+","+W(e)+")"}function K(e){return"Elf.m("+e.each.body+",function("+e.each.keys+"){with(this){return "+(e.when?J(e):B(e))+"}},this)"}function J(e){return"(("+e.when+")?"+B(e)+":null)"}function W(e){return"["+e.children.map(Y).join(",")+"]"}function G(e){function t(t,n){o.push(c(s(e.slice(t,n))))}for(var n=0,r=0,i=-2,o=[];-1!==(r=e.indexOf("{{",i+2))&&-1!==(i=e.indexOf("}}",r+2));n=i+2)n<r&&t(n,r),r<i-2&&function(t,n){var r=$(s(e.slice(t,n)));r&&o.push("("+r+")")}(r+2,i);return n<e.length&&t(n,e.length),o.join("+")}function $(e){for(var t,n=-1,r="|",i=e.length,o=E(e,function(t){return e.charAt(t+1)!==r&&e.charAt(t-1)!==r});n<i;){var a=e.slice(n+1,n=o(r,n+1)).trim();if(a)if(t){var u=a.match(ht);u&&(t="Elf.t("+c(u[1])+","+t+(u[2]?","+u[2]:"")+")")}else t=a}return t}function Z(e){return"{"+Ke(e.props,function(e,t){return"cmd"===t?c(t)+":Elf.d("+G(e)+")":a(t,Ft)?c(t)+":function($event){with(this){return "+e+"}}.bind(this)":c(t)+":"+G(e)}).join(",")+"}"}function Q(e,t){return new Function("define",e)(ie(t)),It[t]}function _(e,t){return Q(nt.ts.transpile(e,{module:nt.ts.ModuleKind.AMD,target:nt.ts.ScriptTarget.ES5,experimentalDecorators:!0,emitDecoratorMetadata:!0,inlineSourceMap:!0,noEmitHelpers:!0,sourceMap:!0,jsx:nt.ts.JsxEmit.React,jsxFactory:"Elf.createElement"},t)+"\n//# sourceURL="+t+".map",t)}function ee(e,t){var n=C(e),r=L("style");return D(r,"type","text/css"),D(r,"from",t),j(r,n),j(at,r),te(r,t)}function te(e,t){return ve({exports:e,dirname:le(t)})}function ne(e){return function(t,n){return $e(function(r){nt.Sass.compile(t,{style:nt.Sass.style.expanded,indentedSyntax:e},function(e){e.status?r.loss(e):ee(e.text,n).then(r.next)})})}}function re(e,t){return te(u(e),t)}function ie(e){return function(){var n=t.call(arguments),r=n.pop(),i=n.pop()||[],o=n.pop()||e;It[o]=ve({dirname:le(e),depends:i,trustor:r})}}function oe(e){return function(t){return(It[t]||ue(ce(t)||se(/^\//.test(t)?t:/^\./.test(t)?e+"/"+t:(Vt.baseURL||"")+"/"+t))).then(function(e){return e.exports||(e.exports=ae(e))})}}function ae(e){var t={},n={exports:{}};return"function"==typeof e.trustor?ge(e.depends.map(function(r){return"require"===r?t:"exports"===r?n.exports:"module"===r?n:oe(e.dirname)(r)})).then(function(r){function i(t){return r[e.depends.indexOf(t)]}return e.trustor.apply(nt,r.map(function(e){return e===t?i:e}))||n.exports}):ve(e.trustor)}function ue(e){return It[e]||(It[e]=xe({url:fe(e)}).then(function(t){return(Kt[k(e.substr(e.lastIndexOf(".")+1))]||te)(t.text(),e)}))}function ce(e){return Vt.mapping&&Vt.mapping[e]}function se(e){var t=it.host,n=it.protocol,r=e.split(/\/+/);/\w+:$/.test(r[0])&&(n=r.shift(),t=r.shift(),r.unshift());for(var i=0;i<r.length;)"."!==r[i]?(".."===r[i]&&i>0&&r.splice(--i,2),++i):r.splice(i,1);var o=r.join("/");return r.pop().indexOf(".")<0&&(o=o+"."+(Vt.defaultExtension||"js")),n+"//"+t+"/"+o.replace(/^\/+/,"")}function fe(e){return Vt.routing?Vt.routing(e):e}function le(e){return e.replace(/[^\/]+$/,"")}function pe(e){this[Tt]===yt&&(this[Tt]=bt,this[St]=e,this[wt].forEach(y(this,[e])))}function he(e){this[Tt]===yt&&(this[Tt]=Et,this[St]=e,this[Ot].forEach(y(this,[e])))}function de(e,t){Jt.isPrototypeOf(e)?(e.then(t.next),e.fail(t.loss)):t.next(e)}function me(e,t){Jt.isPrototypeOf(e)?(e.then(t.next),e.fail(t.loss)):t.loss(e)}function ve(e){return $e(function(t){t.next(e)})}function ge(e){return $e(function(t){var n=0,r=e.length,i=new Array(r);r?e.forEach(function(e,o){de(e,{next:function(e){i[o]=e,++n===r&&t.next(i)},loss:t.loss})}):t.next(i)})}function xe(e){return $e(function(t){return e.jsonp?O(e,t):w(e,t)})}function ye(){this.bubbles=!1}function be(){this.refresh=!1}function Ee(e){var t={},n=e.target[Rt];for(var r in e)f(Bt,r)&&(t[r]=e[r]);e.stopPropagation(),t.refresh=!0,t.originalEvent=e,t.stopPropagation=ye,t.preventRefresh=be,t.preventDefault=function(){this.originalEvent.preventDefault(),this.defaultPrevented=!0},n.dispatchEvent(t),t.refresh&&S()}function ke(e,t){return i(e)&&i(t)?e.type===t.type:e===t}function we(e,t){var n={append:{},remove:{},update:{}};for(var r in e)f(t,r)?v(e[r],t[r])||(n.update[r]={oldValue:e[r],newValue:t[r]}):n.remove[r]=e[r];for(var r in t)f(e,r)||(n.append[r]=t[r]);return n}function Oe(e){return k(e.substr(Ft.length))}function Te(e){return Xt[e]||e}function Se(e,t,n,r,i,o,a){for(var u=0;u<e.length;u++){var c=Qe(e[u],i),s=c.initial(n,r,o);s.append&&j(t,s.target),a.push(c)}}function Re(e,t,n,r,i,o){for(var u in e)a(u,Ft)?i.attachEvent(Oe(u),e[u]):o&&D(t,Te(u),e[u])}function Ae(e,t,n,r,i,o){for(var a=0;a<e.length;a++){var u=Ze(e[a]);u[Nt]&&u[Nt](t,n,r,i),o.push(u)}}function Ce(e,t,n){e&&(n.refs[e]=t)}function Le(e,t){e[Nt]&&t.push(e[Nt].bind(e))}function je(e,t){b(e,function(e){e.dispose(t)})}function Fe(e,t,n,r,i,o){for(var u in e)a(u,Ft)?i.detachEvent(Oe(u),e[u]):o&&I(t,Te(u))}function Ne(e,t){b(e,function(e){e[Pt]&&e[Pt](t)})}function Pe(e,t){e&&delete t.refs[e]}function Me(e){e[Pt]&&e[Pt]()}function qe(e,t,n){e.dispose(function(e,r){n&&q(t,r,Ee)})}function De(e,t,n,r){e!==t&&(Pe(e,r),Ce(t,n,r))}function Ie(e,t,n,r,i,o,a,u){for(var c,s,f=[],l=!1,p={},h={},d=0;d<t.length;d++){var m=t[d],v=m.key||d;p[v]={value:m,index:d}}for(var d=0;d<u.length;d++){var g=u[d],m=g.element,v=m.key||d;h[v]={value:m,index:d}}for(var d=0;d<u.length;d++){var g=u[d],m=g.element,v=m.key||d,x=function(e,t){var n=p[t];return n&&ke(e,n.value)?n.index:-1}(m,v);-1===x&&g.dispose()}for(var d=0;d<t.length;d++){var m=t[d],v=m.key||d,x=function(e,t){var n=h[t];return n&&ke(e,n.value)?n.index:-1}(m,v);-1===x?(c=Qe(m,o),s=c.initial(r,i,a),l=!0):(c=u[x],s=c.renewal(r,i,a,m)),(l||s.append||x<d)&&j(n,s.target),f.push(c)}b(u,ot),u.push.apply(u,f)}function Ve(e,t,n,r,i,o,u){var c=we(e,t),s=c.append,f=c.remove,l=c.update;Fe(s,n,r,i,o,u),Re(f,n,r,i,o,u);for(var p in l)a(p,Ft)?o.emitter.replace(Oe(p),l[p].oldValue,l[p].newValue):u&&D(n,Te(p),l[p].newValue)}function He(e,t,n,r,i,o,a){for(var u=[],c=0;c<a.length;c++){var s=function(e){for(var n=0;n<t.length;n++)if(e instanceof t[n])return n;return-1}(a[c]);-1===s&&a[c][Pt]&&a[c][Pt](n)}for(var c=0;c<t.length;c++){var s=function(e){for(var t=0;t<a.length;t++)if(a[t]instanceof e)return t;return-1}(t[c]);if(-1===s){var f=Ze(t[c]);f[Nt]&&f[Nt](n,r,i,o),u.push(f)}else u.push(a[s])}b(a,ot),a.push.apply(a,u)}function ze(e,t){var n=this,r=n.connate,i=n.emitter,o=n.example;i.enqueue(e,t)&&r&&M(o,e,Ee)}function Xe(e,t){var n=this,r=n.connate,i=n.emitter,o=n.example;i.unqueue(e,t)&&r&&q(o,e,Ee)}function Ue(e,t){var n=this,r=n.connate,i=n.creator;r===t&&P(i,e.originalEvent)}function Ye(e,t){var n=this,r=n.connate,i=n.emitter,o=n.example,a=n.creator;r===t&&i.trigger(e.type,y(o,[e])),e.bubbles&&a.trigger(e,t)}function Be(e){var t=this,n=t.connate,r=t.example;e.target=r,t.trigger(e,n)}function Ke(e,t,r){if(n(e))return e.forEach(t,r);var i=[];for(var o in e)i.push(t.call(r,e[o],o,e));return i}function Je(e){return function(t){return e[t]||Mt[t]||k(t)}}function We(e){return function(t){for(var n,r=[];n=t.match(ft);t=t.substr(n[0].length)){var i=n[1];f(e,i)?m(r,e[i]):f(qt,i)&&m(r,qt[i])}return r}}function Ge(e){return function(n,i){var o=t.call(arguments,1);if(f(e,n)){var a=Ze(e[n]);return a.transform.apply(a,o)}if(f(Dt,n)){var a=Ze(Dt[n]);return a.transform.apply(a,o)}return r(i)?i:""}}function $e(e){var t=Object.create(Jt);return t.constructor(e),t}function Ze(e){return e[jt]||(e[jt]=new e)}function Qe(e,t){return Object.create(r(e)?i(e)?o(e.type)?$t:Gt:Zt:Qt,{element:p(e),creator:p(t)})}function _e(e,t,n){var r=Object.create(e.prototype);return l(r,Rt,n),l(r,"props",t),l(r,"refs",{}),r.constructor(),r}function et(e,t,n){var r=L(e,t);return l(r,Rt,n),r}function tt(){function e(e){return n[e]||(n[e]=[])}function t(e){return n[e]}var n={};return{enqueue:function(t,r){return e(t)&&g(n[t],r)},unqueue:function(e,r){return t(e)&&x(n[e],r)},replace:function(e,r,i){if(t(e)){var o=n[e].indexOf(r);if(-1!==o)return n[e].splice(o,1,i),!0}return!1},trigger:function(e,r){t(e)&&n[e].forEach(r)},dispose:function(e){Ke(n,e),n={}}}}var nt=window,rt=document,it=location,ot=function(){},at=rt.querySelector("head"),ut=rt.createElement("code"),ct=/[A-Z]/g,st=/[-:\w]+/,ft=/[,\s]*([^,\s]+)[,\s]*/,lt=/([^\s].*)\s+(?:in|of)\s+(.*[^\s])/,pt=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"|'([^']*)'|([^\s"'<>\/=]+)))?/,ht=/([\w]+)(?:\s+([\s\S]*)?)?/,dt="<",mt="</",vt="\x3c!--",gt="--\x3e",xt=">",yt="PENDING",bt="RESOLVED",Et="REJECTED",kt="ELF:DISPOSE",wt="ELF:SUCCESS",Ot="ELF:FAILURE",Tt="ELF:PROCESS",St="ELF:CONTENT",Rt="ELF:RENDERER",At="ELF:COMPONENT",Ct="ELF:DIRECTIVE",Lt="ELF:TRANSFORM",jt="ELF:SINGLETON",Ft="on",Nt="onInitial",Pt="onDispose",Mt={},qt={},Dt={},It={},Vt={},Ht=[],zt=!0,Xt={autoFocus:"autofocus",autoPlay:"autoplay",class:"className",for:"htmlFor",novalidate:"noValidate",formnovalidate:"formNoValidate",readonly:"readOnly",accentHeight:"accent-height",acceptCharset:"accept-charset",alignmentBaseline:"alignment-baseline",altimgHeight:"altimg-height",altimgValign:"altimg-valign",altimgWidth:"altimg-width",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",httpEquiv:"http-equiv",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlSpace:"xml:space"},Ut={async:2,autofocus:2,autoplay:2,checked:2,className:3,controls:2,default:2,defaultValue:3,defaultChecked:2,defer:2,disabled:2,hidden:2,htmlFor:3,innerHTML:3,loop:2,multiple:2,muted:2,noValidate:2,formNoValidate:2,open:2,readOnly:2,required:2,reversed:2,scoped:2,selected:2,style:1,value:3,children:9},Yt={area:0,base:0,br:0,col:0,embed:0,hr:0,img:0,input:0,keygen:0,link:0,menuitem:0,meta:0,param:0,source:0,track:0,wbr:0},Bt={altKey:0,animationName:0,bubbles:0,button:0,buttons:0,cancelable:0,changedTouches:0,charCode:0,clientX:0,clientY:0,clipboardData:0,ctrlKey:0,data:0,dataTransfer:0,defaultPrevented:0,deltaMode:0,deltaX:0,deltaY:0,deltaZ:0,detail:0,elapsedTime:0,eventPhase:0,isTrusted:0,key:0,keyCode:0,locale:0,location:0,metaKey:0,pageX:0,pageY:0,propertyName:0,pseudoElement:0,relatedTarget:0,repeat:0,screenX:0,screenY:0,shiftKey:0,target:0,targetTouches:0,timeStamp:0,touches:0,type:0,which:0},Kt={js:Q,ts:_,tsx:_,css:ee,sass:ne(!0),scss:ne(!1),json:re},Jt={constructor:function(e){l(this,Tt,yt),l(this,wt,[]),l(this,Ot,[]),l(this,St);try{l(this,kt,e({next:pe.bind(this),loss:he.bind(this)}))}catch(e){he.call(this,e)}},dispose:function(){this[kt]&&this[kt]()},then:function(e){return $e(function(t){return this[Tt]===yt?m(this[wt],function(n){de(e(n),t)}):this[Tt]===bt?de(e(this[St]),t):this[Tt]===Et?t.loss(this[St]):void 0}.bind(this))},fail:function(e){return $e(function(t){return this[Tt]===yt?m(this[Ot],function(n){me(e(n),t)}):this[Tt]===Et?me(e(this[St]),t):this[Tt]===bt?t.next(this[St]):void 0}.bind(this))}},Wt={initial:function(e,t,n){var r=this,i=r.element,o=Qe(i,r),a=o.initial(e,t,n);return r.connate=!0,r.manager=o,a},renewal:function(e,t,n,r){return this.manager.renewal(e,t,n,r)},dispose:function(e){this.manager.dispose(e)},trigger:Ue},Gt={initial:function(e,t,n){var r=this,i=r.element,o=i.props,a=i.type,u=i.cmd,c=i.ref,s=!1,f=[],l=tt(),p=_e(a,o,r),h=Qe(p.render(),r),d=h.initial(p,t,n);return r.connate=s,r.behests=f,r.emitter=l,r.example=p,r.manager=h,Re(o,p,e,t,r,s),Ae(u,p,e,t,o,f),Ce(c,p,e),Le(p,n),d},renewal:function(e,t,n,r){var i,o=this,a=o.element,u=o.connate,c=o.behests,s=o.example,f=o.manager,l=r.props,p=r.cmd,h=r.ref,d=f.element,m=s.render(),v=a.props,g=a.cmd,x=a.ref;return o.element=r,ke(d,m)?i=f.renewal(e,t,n,m):(f=Qe(m,o),i=f.initial(s,t,n),o.manager=f),Ve(v,l,s,e,t,o,u),He(g,p,s,e,t,l,c),De(x,h,s,e),i},dispose:function(e){var t=this,n=t.element.ref,r=t.connate,i=t.behests,o=t.example,a=t.emitter,u=t.manager;Me(o),Pe(n,e),Ne(i,o),qe(a,o,r),u.dispose(o)},trigger:Ye,attachEvent:ze,detachEvent:Xe,dispatchEvent:Be},$t={initial:function(e,t,n){var r=this,i=r.element,o=i.props,a=o.children,u=i.type,c=i.cmd,s=i.ref,f=!0;"svg"===u&&(t="http://www.w3.org/2000/svg"),"math"===u&&(t="http://www.w3.org/2000/MathML");var l=[],p=[],h=tt(),d=et(u,t,r);return r.connate=f,r.members=l,r.behests=p,r.emitter=h,r.example=d,Ce(s,d,e),Se(a,d,e,t,r,n,l),Re(o,d,e,t,r,f),Ae(c,d,e,t,o,p),{target:d,append:!0}},renewal:function(e,t,n,r){var i=this,o=i.element,a=i.connate,u=i.behests,c=i.example,s=i.members,f=r.props,l=f.children,p=r.type,h=r.cmd,d=r.ref;"svg"===p&&(t="http://www.w3.org/2000/svg"),"math"===p&&(t="http://www.w3.org/2000/MathML");var m=o.props,v=m.children,g=o.cmd;return De(o.ref,d,c,e),Ie(v,l,c,e,t,i,n,s),Ve(m,f,c,e,t,i,a),He(g,h,c,e,t,f,u),{target:c,append:!1}},dispose:function(e){var t=this,n=t.element.ref,r=t.connate,i=t.behests,o=t.members,a=t.example,u=t.emitter;Pe(n,e),je(o,e),Ne(i,a),qe(u,a,r),F(a)},trigger:Ye,attachEvent:ze,detachEvent:Xe,dispatchEvent:Be},Zt={initial:function(){var e=this,t=e.element,n=C(t);return e.example=n,{target:n,append:!0}},renewal:function(e,t,n,r){var i=this,o=i.example,a=i.element,u=r;return a!==u&&(i.element=u,o.textContent=r),{target:o,append:!1}},dispose:function(){F(this.example)}},Qt={initial:function(){var e=this,t=A("");return e.example=t,{target:t,append:!0}},renewal:function(){return{target:this.example,append:!1}},dispose:function(){F(this.example)}};e.Promise=$e,e.Trustor=Kt,e.require=function(e){return oe(Vt.baseURL||"")(e)},e.setTimeout=function(e,t){return{dispose:nt.clearTimeout.bind(nt,nt.setTimeout(h(e),t))}},e.setInterval=function(e,t){return{dispose:nt.clearInterval.bind(nt,nt.setInterval(h(e),t))}},e.setImmediate=function(e){return{dispose:nt.cancelAnimationFrame.bind(nt.requestAnimationFrame(h(e)))}},e.createClass=function(e){return function(t){return t.prototype=e,t}(function(e){return function(){e.apply(this,arguments)}}(e.constructor||ot))},e.createEvent=function(e,t){return{type:e,bubbles:!!t,refresh:!1,cancelable:!1,defaultPrevented:!1,target:null,preventDefault:ot,preventRefresh:be,stopPropagation:ye}},e.attachEvent=function(e,t,n){f(e,Rt)?e[Rt].attachEvent(t,n):M(e,t,n)},e.detachEvent=function(e,t,n){f(e,Rt)?e[Rt].detachEvent(t,n):q(e,t,n)},e.dispatchEvent=function(e,t){f(e,Rt)?e[Rt].dispatchEvent(t):P(e,t.originalEvent||t)},e.createElement=function(e,n){var i=n||{},o=d(t.call(arguments,2)),a={props:{},type:e,cmd:i.cmd||[],key:i.key,ref:i.ref};for(var u in i)"cmd"!==u&&"key"!==u&&"ref"!==u&&r(i[u])&&(a.props[u]=i[u]);return l(a.props,"children",o),a},e.redactElement=function(n){if(o(n)){var i={},a={},u={};d(t.call(arguments,1)).forEach(function(e){f(e,At)&&l(i,e[At],e),f(e,Ct)&&l(a,e[Ct],e),f(e,Lt)&&l(u,e[Lt],e)});var c={v:e.createElement,m:Ke,c:Je(i),d:We(a),t:Ge(u)},s=new Function("Elf","with(this){return "+Y(U(n.trim()))+"}");return function(){return s.call(r(this)&&this!==nt?this:{},c)}}return n},e.Component=function(e,t){return function(n){return t&&(n.prototype.render=t),l(n,At,e)}},e.Directive=function(e){return function(t){return l(t,Ct,e)}},e.Transform=function(e){return function(t){return l(t,Lt,e)}},e.render=function(e,t,n){function r(){u&&u.dispose(),f.dispose()}function i(){l=f.renewal(s,null,c,e),a(),o()}function o(){b(c,y())}function a(){l.append&&(N(t),j(t,l.target))}var u,c=[],s={refs:{},dispose:r,forceUpdate:i},f=Object.create(Wt,{element:p(e),creator:p(t)}),l=f.initial(s,null,c);return n&&(u=R(i)),a(),o(),s},e.depend=function(){d(t.call(arguments)).forEach(function(e){f(e,At)&&l(Mt,e[At],e),f(e,Ct)&&l(qt,e[Ct],e),f(e,Lt)&&l(Dt,e[Lt],e)})},e.config=function(e){Vt=e},e.set=function(e,t){It[e]=te(t,e)}}(this.Elf={});<commit_msg>elfjs 0.0.1<commit_after>/**
 * elf.js
 * 
 * @copyright http://www.elfjs.org
 * 
 * @version 0.0.1
 * @license MIT
 * 
 */
"use strict";!function(e){function t(){return Array.prototype.slice.apply(this,arguments)}function n(e){return Array.isArray(e)}function r(e){return void 0!==e&&null!==e}function i(e){return r(e)&&"object"==typeof e}function o(e){return r(e)&&"string"==typeof e}function a(e,t,n){for(var r=n||0,i=t.length,o=0;o<i;o++)if(t.charAt(o)!==e.charAt(r+o))return!1;return!0}function u(e){return JSON.parse(e)}function c(e){return JSON.stringify(e)}function s(e){return ut.innerHTML=e,ut.textContent}function l(e,t){return e.hasOwnProperty(t)}function f(e,t,n,r){return Object.defineProperty(e,t,p(n,r))}function p(e,t){return{configurable:!0,enumerable:!!t,writable:!0,value:e}}function h(e){return function(){return e()||S()}}function d(e){for(var t=[],i=e.length,o=0;o<i;o++){var a=e[o];n(a)?t.push.apply(t,d(a)):r(a)&&t.push(a)}return t}function m(e,t){return g(e,t),function(){x(e,t)}}function v(e,t){if(i(e)&&i(t)){for(var n in e){if(!l(t,n))return!1;if(!v(e[n],t[n]))return!1}for(var n in t)if(!l(e,n))return!1;return!0}return e===t}function g(e,t){if(-1===e.indexOf(t))return e.push(t),1===e.length}function x(e,t){var n=e.indexOf(t);if(-1!==n)return e.splice(n,1),0===e.length}function y(e,t){return function(n){n.apply(e,t||[])}}function b(e,t){for(;e.length;)t(e.pop())}function E(e,t){return function(n,r){for(var i,o,a=0,u=0,c=0,s=!1,l=!1,f=r||0,p=e.length,h="\\";f<p;f++)if(i=o,o=e.charAt(f),s)"'"===o&&i!==h&&(s=!1);else if(l)'"'===o&&i!==h&&(l=!1);else if(0!==a||0!==u||0!==c||o!==n)switch(o){case"{":a++;break;case"}":a--;break;case"(":u++;break;case")":u--;break;case"[":c++;break;case"]":c--;break;case"'":s=!0;break;case'"':l=!0}else if(t(f))break;return f}}function k(e){return e.toLowerCase()}function w(e,t){function n(){var e=p.responseText,n=1223===p.status?200:p.status;0===n&&(n=e?200:0);var r={},i=(p.getAllResponseHeaders()||"").trim();i&&i.split("\n").forEach(function(e){var t=e.trim().split(":"),n=t.shift().trim(),i=t.join(":").trim();r[n]=i}),200<=n&&n<300?t.next({status:n,headers:r,text:function(){return e},json:function(){return u(e)}}):t.loss(p),S()}function r(){t.loss(p),S()}var i="load",o="error",a="Content-Type",c="X-Requested-With",s=e.method||"GET",f=e.headers||{},p=new XMLHttpRequest;p.open(s.toUpperCase(),e.url,!0),M(p,i,n),M(p,o,r),l(f,a)||T(p,a,"application/x-www-form-urlencoded; charset=UTF-8"),l(f,c)||T(p,c,"XMLHttpRequest");for(var h in f)T(p,h,f[h]);return p.send(e.body),function(){q(p,i,n),q(p,o,r),p.abort()}}function O(e,t){function n(e){delete nt[i],t.next({status:200,headers:{},text:function(){return c(e)},json:function(){return e}}),S()}function r(e){delete nt[i],t.loss(e),S()}var i="Elf"+(1e9*Math.random()|0),o=L("script");return nt[i]=n,M(o,"error",r),D(o,"type","text/javascript"),D(o,"src",e.url),j(at,o),function(){nt[i]&&(nt[i]=ot),F(o)}}function T(e,t,n){e.setRequestHeader(t,n)}function S(){zt&&(zt=!1,nt.setTimeout(function(){Ht.forEach(y()),zt=!0}))}function R(e){return{dispose:m(Ht,e)}}function A(e){return rt.createComment(e)}function C(e){return rt.createTextNode(e)}function L(e,t){return t?rt.createElementNS(t,e):rt.createElement(e)}function j(e){d(t.call(arguments,1)).forEach(e.appendChild,e)}function F(e){e.parentNode&&e.parentNode.removeChild(e)}function N(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function P(e,t){e.dispatchEvent(new t.constructor(t.type,t))}function M(e,t,n){e.addEventListener(t,n,!1)}function q(e,t,n){e.removeEventListener(t,n,!1)}function D(e,t,n){switch(Ut[t]||0){case 0:e.setAttribute(t,n);break;case 1:e[t].cssText=V(n);break;case 2:e[t]=!1!==n||n;break;case 3:e[t]=n}}function I(e,t){switch(Ut[t]||0){case 0:e.removeAttribute(t);break;case 1:e[t].cssText="";break;case 2:e[t]=!1;break;case 3:e[t]=""}}function V(e){return i(e)?Ke(e,function(e,t){return t.replace(ct,function(e){return"-"+k(e)})+":"+e}).join(";"):e}function H(e){return e.match(st)[0]}function z(e){var t=e.match(ft);if(t)return{keys:t[1],body:t[2]}}function X(e){for(var t,n={props:{}};t=e.match(pt);e=e.substr(t[0].length)){var r=t[1],i=t[3]||t[4]||t[5]||"";"elf-each"!==r?"elf-when"!==r?n.props[r]=i:n.when=i.trim():n.each=z(i)}return n}function U(e){function t(t){return a(e,vt,t)}function n(t){return a(e,mt,t)&&st.test(e.charAt(t+2))}function r(t){return a(e,dt,t)&&st.test(e.charAt(t+1))}function i(o){return o=e.indexOf(dt,o),o>=0?t(o)||n(o)||r(o)?o:i(o+1):h}function o(t){return E(e,function(){return!0})(xt,t)}function u(e,t){e&&(s[c]=e,c>0?s[c-1].children.push(e):f.push(e),t&&c++)}for(var c=0,s=[],f=[],p=0,h=e.length;p<h;)t(p)?p=function(t){return t=e.indexOf(gt,t),t>=0?t:h}(p+4)+3:n(p)?function(t,n){var r=H(e.slice(t+2,n));if(!l(Yt,r))for(;c>0&&s[--c].qname!==r;);}(p,p=o(p+2)+1):r(p)?function(t,n){var r=H(e.slice(t+1,n)),i=X(e.slice(t+1+r.length,n)),o=l(Yt,r)||"/"===e.charAt(n-2);u({each:i.each,when:i.when,props:i.props,qname:r,level:c,children:[]},!o)}(p,p=o(p+1)+1):function(t,n){u(e.slice(t,n).trim())}(p,p=i(p));return f.length,f[0]||""}function Y(e){return o(e)?G(e):e.each&&e.level>0?K(e):e.when?J(e):B(e)}function B(e){return"Elf.v(Elf.c("+c(e.qname)+"),"+Z(e)+","+W(e)+")"}function K(e){return"Elf.m("+e.each.body+",function("+e.each.keys+"){with(this){return "+(e.when?J(e):B(e))+"}},this)"}function J(e){return"(("+e.when+")?"+B(e)+":null)"}function W(e){return"["+e.children.map(Y).join(",")+"]"}function G(e){function t(t,n){o.push(c(s(e.slice(t,n))))}for(var n=0,r=0,i=-2,o=[];-1!==(r=e.indexOf("{{",i+2))&&-1!==(i=e.indexOf("}}",r+2));n=i+2)n<r&&t(n,r),r<i-2&&function(t,n){var r=$(s(e.slice(t,n)));r&&o.push("("+r+")")}(r+2,i);return n<e.length&&t(n,e.length),o.join("+")}function $(e){for(var t,n=-1,r="|",i=e.length,o=E(e,function(t){return e.charAt(t+1)!==r&&e.charAt(t-1)!==r});n<i;){var a=e.slice(n+1,n=o(r,n+1)).trim();if(a)if(t){var u=a.match(ht);u&&(t="Elf.t("+c(u[1])+","+t+(u[2]?","+u[2]:"")+")")}else t=a}return t}function Z(e){return"{"+Ke(e.props,function(e,t){return"cmd"===t?c(t)+":Elf.d("+G(e)+")":a(t,Ft)?c(t)+":function($event){with(this){return "+e+"}}.bind(this)":c(t)+":"+G(e)}).join(",")+"}"}function Q(e,t){return new Function("define",e)(ie(t)),It[t]}function _(e,t){return Q(nt.ts.transpile(e,{module:nt.ts.ModuleKind.AMD,target:nt.ts.ScriptTarget.ES5,experimentalDecorators:!0,emitDecoratorMetadata:!0,inlineSourceMap:!0,noEmitHelpers:!0,sourceMap:!0,jsx:nt.ts.JsxEmit.React,jsxFactory:"Elf.createElement"},t)+"\n//# sourceURL="+t+".map",t)}function ee(e,t){var n=C(e),r=L("style");return D(r,"type","text/css"),D(r,"from",t),j(r,n),j(at,r),te(r,t)}function te(e,t){return ve({exports:e,dirname:fe(t)})}function ne(e){return function(t,n){return $e(function(r){nt.Sass.compile(t,{style:nt.Sass.style.expanded,indentedSyntax:e},function(e){e.status?r.loss(e):ee(e.text,n).then(r.next)})})}}function re(e,t){return te(u(e),t)}function ie(e){return function(){var n=t.call(arguments),r=n.pop(),i=n.pop()||[],o=n.pop()||e;It[o]=ve({dirname:fe(e),depends:i,trustor:r})}}function oe(e){return function(t){return(It[t]||ue(ce(t)||se(/^\//.test(t)?t:/^\./.test(t)?e+"/"+t:(Vt.baseURL||"")+"/"+t))).then(function(e){return e.exports||(e.exports=ae(e))})}}function ae(e){var t={},n={exports:{}};return"function"==typeof e.trustor?ge(e.depends.map(function(r){return"require"===r?t:"exports"===r?n.exports:"module"===r?n:oe(e.dirname)(r)})).then(function(r){function i(t){return r[e.depends.indexOf(t)]}return e.trustor.apply(nt,r.map(function(e){return e===t?i:e}))||n.exports}):ve(e.trustor)}function ue(e){return It[e]||(It[e]=xe({url:le(e)}).then(function(t){return(Kt[k(e.substr(e.lastIndexOf(".")+1))]||te)(t.text(),e)}))}function ce(e){return Vt.mapping&&Vt.mapping[e]}function se(e){var t=it.host,n=it.protocol,r=e.split(/\/+/);/\w+:$/.test(r[0])&&(n=r.shift(),t=r.shift(),r.unshift());for(var i=0;i<r.length;)"."!==r[i]?(".."===r[i]&&i>0&&r.splice(--i,2),++i):r.splice(i,1);var o=r.join("/");return r.pop().indexOf(".")<0&&(o=o+"."+(Vt.defaultExtension||"js")),n+"//"+t+"/"+o.replace(/^\/+/,"")}function le(e){return Vt.routing?Vt.routing(e):e}function fe(e){return e.replace(/[^\/]+$/,"")}function pe(e){this[Tt]===yt&&(this[Tt]=bt,this[St]=e,this[wt].forEach(y(this,[e])))}function he(e){this[Tt]===yt&&(this[Tt]=Et,this[St]=e,this[Ot].forEach(y(this,[e])))}function de(e,t){Jt.isPrototypeOf(e)?(e.then(t.next),e.fail(t.loss)):t.next(e)}function me(e,t){Jt.isPrototypeOf(e)?(e.then(t.next),e.fail(t.loss)):t.loss(e)}function ve(e){return $e(function(t){t.next(e)})}function ge(e){return $e(function(t){var n=0,r=e.length,i=new Array(r);r?e.forEach(function(e,o){de(e,{next:function(e){i[o]=e,++n===r&&t.next(i)},loss:t.loss})}):t.next(i)})}function xe(e){return $e(function(t){return e.jsonp?O(e,t):w(e,t)})}function ye(){this.bubbles=!1}function be(){this.refresh=!1}function Ee(e){var t={},n=e.target[Rt];for(var r in e)l(Bt,r)&&(t[r]=e[r]);e.stopPropagation(),t.refresh=!0,t.originalEvent=e,t.stopPropagation=ye,t.preventRefresh=be,t.preventDefault=function(){this.originalEvent.preventDefault(),this.defaultPrevented=!0},n.dispatchEvent(t),t.refresh&&S()}function ke(e,t){return i(e)&&i(t)?e.type===t.type:e===t}function we(e,t){var n={append:{},remove:{},update:{}};for(var r in e)l(t,r)?v(e[r],t[r])||(n.update[r]={oldValue:e[r],newValue:t[r]}):n.remove[r]=e[r];for(var r in t)l(e,r)||(n.append[r]=t[r]);return n}function Oe(e){return k(e.substr(Ft.length))}function Te(e){return Xt[e]||e}function Se(e,t,n,r,i,o,a){for(var u=0;u<e.length;u++){var c=Qe(e[u],i),s=c.initial(n,r,o);s.append&&j(t,s.target),a.push(c)}}function Re(e,t,n,r,i,o){for(var u in e)a(u,Ft)?i.attachEvent(Oe(u),e[u]):o&&D(t,Te(u),e[u])}function Ae(e,t,n,r,i,o){for(var a=0;a<e.length;a++){var u=Ze(e[a]);u[Nt]&&u[Nt](t,n,r,i),o.push(u)}}function Ce(e,t,n){e&&(n.refs[e]=t)}function Le(e,t){e[Nt]&&t.push(e[Nt].bind(e))}function je(e,t){b(e,function(e){e.dispose(t)})}function Fe(e,t,n,r,i,o){for(var u in e)a(u,Ft)?i.detachEvent(Oe(u),e[u]):o&&I(t,Te(u))}function Ne(e,t){b(e,function(e){e[Pt]&&e[Pt](t)})}function Pe(e,t){e&&delete t.refs[e]}function Me(e){e[Pt]&&e[Pt]()}function qe(e,t,n){e.dispose(function(e,r){n&&q(t,r,Ee)})}function De(e,t,n,r){e!==t&&(Pe(e,r),Ce(t,n,r))}function Ie(e,t,n,r,i,o,a,u){for(var c,s,l=[],f=!1,p={},h={},d=0;d<t.length;d++){var m=t[d],v=m.key||d;p[v]={value:m,index:d}}for(var d=0;d<u.length;d++){var g=u[d],m=g.element,v=m.key||d;h[v]={value:m,index:d}}for(var d=0;d<u.length;d++){var g=u[d],m=g.element,v=m.key||d,x=function(e,t){var n=p[t];return n&&ke(e,n.value)?n.index:-1}(m,v);-1===x&&g.dispose()}for(var d=0;d<t.length;d++){var m=t[d],v=m.key||d,x=function(e,t){var n=h[t];return n&&ke(e,n.value)?n.index:-1}(m,v);-1===x?(c=Qe(m,o),s=c.initial(r,i,a),f=!0):(c=u[x],s=c.renewal(r,i,a,m)),(f||s.append||x<d)&&j(n,s.target),l.push(c)}b(u,ot),u.push.apply(u,l)}function Ve(e,t,n,r,i,o,u){var c=we(e,t),s=c.append,l=c.remove,f=c.update;Fe(s,n,r,i,o,u),Re(l,n,r,i,o,u);for(var p in f)a(p,Ft)?o.emitter.replace(Oe(p),f[p].oldValue,f[p].newValue):u&&D(n,Te(p),f[p].newValue)}function He(e,t,n,r,i,o,a){for(var u=[],c=0;c<a.length;c++){var s=function(e){for(var n=0;n<t.length;n++)if(e instanceof t[n])return n;return-1}(a[c]);-1===s&&a[c][Pt]&&a[c][Pt](n)}for(var c=0;c<t.length;c++){var s=function(e){for(var t=0;t<a.length;t++)if(a[t]instanceof e)return t;return-1}(t[c]);if(-1===s){var l=Ze(t[c]);l[Nt]&&l[Nt](n,r,i,o),u.push(l)}else u.push(a[s])}b(a,ot),a.push.apply(a,u)}function ze(e,t){var n=this,r=n.connate,i=n.emitter,o=n.example;i.enqueue(e,t)&&r&&M(o,e,Ee)}function Xe(e,t){var n=this,r=n.connate,i=n.emitter,o=n.example;i.unqueue(e,t)&&r&&q(o,e,Ee)}function Ue(e,t){var n=this,r=n.connate,i=n.creator;r===t&&P(i,e.originalEvent)}function Ye(e,t){var n=this,r=n.connate,i=n.emitter,o=n.example,a=n.creator;r===t&&i.trigger(e.type,y(o,[e])),e.bubbles&&a.trigger(e,t)}function Be(e){var t=this,n=t.connate,r=t.example;e.target=r,t.trigger(e,n)}function Ke(e,t,r){if(n(e))return e.forEach(t,r);var i=[];for(var o in e)i.push(t.call(r,e[o],o,e));return i}function Je(e){return function(t){return e[t]||Mt[t]||k(t)}}function We(e){return function(t){for(var n,r=[];n=t.match(lt);t=t.substr(n[0].length)){var i=n[1];l(e,i)?m(r,e[i]):l(qt,i)&&m(r,qt[i])}return r}}function Ge(e){return function(n,i){var o=t.call(arguments,1);if(l(e,n)){var a=Ze(e[n]);return a.transform.apply(a,o)}if(l(Dt,n)){var a=Ze(Dt[n]);return a.transform.apply(a,o)}return r(i)?i:""}}function $e(e){var t=Object.create(Jt);return t.constructor(e),t}function Ze(e){return e[jt]||(e[jt]=new e)}function Qe(e,t){return Object.create(r(e)?i(e)?o(e.type)?$t:Gt:Zt:Qt,{element:p(e),creator:p(t)})}function _e(e,t,n){var r=Object.create(e.prototype);return f(r,Rt,n),f(r,"props",t),f(r,"refs",{}),r.constructor(),r}function et(e,t,n){var r=L(e,t);return f(r,Rt,n),r}function tt(){function e(e){return n[e]||(n[e]=[])}function t(e){return n[e]}var n={};return{enqueue:function(t,r){return e(t)&&g(n[t],r)},unqueue:function(e,r){return t(e)&&x(n[e],r)},replace:function(e,r,i){if(t(e)){var o=n[e].indexOf(r);if(-1!==o)return n[e].splice(o,1,i),!0}return!1},trigger:function(e,r){t(e)&&n[e].forEach(r)},dispose:function(e){Ke(n,e),n={}}}}var nt=window,rt=document,it=location,ot=function(){},at=rt.querySelector("head"),ut=rt.createElement("code"),ct=/[A-Z]/g,st=/[-:\w]+/,lt=/[,\s]*([^,\s]+)[,\s]*/,ft=/([^\s].*)\s+(?:in|of)\s+(.*[^\s])/,pt=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"|'([^']*)'|([^\s"'<>\/=]+)))?/,ht=/([\w]+)(?:\s+([\s\S]*)?)?/,dt="<",mt="</",vt="\x3c!--",gt="--\x3e",xt=">",yt="PENDING",bt="RESOLVED",Et="REJECTED",kt="ELF:DISPOSE",wt="ELF:SUCCESS",Ot="ELF:FAILURE",Tt="ELF:PROCESS",St="ELF:CONTENT",Rt="ELF:RENDERER",At="ELF:COMPONENT",Ct="ELF:DIRECTIVE",Lt="ELF:TRANSFORM",jt="ELF:SINGLETON",Ft="on",Nt="onInitial",Pt="onDispose",Mt={},qt={},Dt={},It={},Vt={},Ht=[],zt=!0,Xt={autoFocus:"autofocus",autoPlay:"autoplay",class:"className",for:"htmlFor",novalidate:"noValidate",formnovalidate:"formNoValidate",readonly:"readOnly",accentHeight:"accent-height",acceptCharset:"accept-charset",alignmentBaseline:"alignment-baseline",altimgHeight:"altimg-height",altimgValign:"altimg-valign",altimgWidth:"altimg-width",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",httpEquiv:"http-equiv",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlSpace:"xml:space"},Ut={async:2,autofocus:2,autoplay:2,checked:2,className:3,controls:2,default:2,defaultValue:3,defaultChecked:2,defer:2,disabled:2,hidden:2,htmlFor:3,innerHTML:3,loop:2,multiple:2,muted:2,noValidate:2,formNoValidate:2,open:2,readOnly:2,required:2,reversed:2,scoped:2,selected:2,style:1,value:3,children:9},Yt={area:0,base:0,br:0,col:0,embed:0,hr:0,img:0,input:0,keygen:0,link:0,menuitem:0,meta:0,param:0,source:0,track:0,wbr:0},Bt={altKey:0,animationName:0,bubbles:0,button:0,buttons:0,cancelable:0,changedTouches:0,charCode:0,clientX:0,clientY:0,clipboardData:0,ctrlKey:0,data:0,dataTransfer:0,defaultPrevented:0,deltaMode:0,deltaX:0,deltaY:0,deltaZ:0,detail:0,elapsedTime:0,eventPhase:0,isTrusted:0,key:0,keyCode:0,locale:0,location:0,metaKey:0,pageX:0,pageY:0,propertyName:0,pseudoElement:0,relatedTarget:0,repeat:0,screenX:0,screenY:0,shiftKey:0,target:0,targetTouches:0,timeStamp:0,touches:0,type:0,which:0},Kt={js:Q,ts:_,tsx:_,css:ee,sass:ne(!0),scss:ne(!1),json:re},Jt={constructor:function(e){f(this,Tt,yt),f(this,wt,[]),f(this,Ot,[]),f(this,St);try{f(this,kt,e({next:pe.bind(this),loss:he.bind(this)}))}catch(e){he.call(this,e)}},dispose:function(){this[kt]&&this[kt]()},then:function(e){return $e(function(t){return this[Tt]===yt?m(this[wt],function(n){de(e(n),t)}):this[Tt]===bt?de(e(this[St]),t):this[Tt]===Et?t.loss(this[St]):void 0}.bind(this))},fail:function(e){return $e(function(t){return this[Tt]===yt?m(this[Ot],function(n){me(e(n),t)}):this[Tt]===Et?me(e(this[St]),t):this[Tt]===bt?t.next(this[St]):void 0}.bind(this))}},Wt={initial:function(e,t,n){var r=this,i=r.element,o=Qe(i,r),a=o.initial(e,t,n);return r.connate=!0,r.manager=o,a},renewal:function(e,t,n,r){return this.manager.renewal(e,t,n,r)},dispose:function(e){this.manager.dispose(e)},trigger:Ue},Gt={initial:function(e,t,n){var r=this,i=r.element,o=i.props,a=i.type,u=i.cmd,c=i.ref,s=!1,l=[],f=tt(),p=_e(a,o,r),h=Qe(p.render(),r),d=h.initial(p,t,n);return r.connate=s,r.behests=l,r.emitter=f,r.example=p,r.manager=h,Le(p,n),Ce(c,p,e),Re(o,p,e,t,r,s),Ae(u,p,e,t,o,l),d},renewal:function(e,t,n,r){var i,o=this,a=o.element,u=o.connate,c=o.behests,s=o.example,l=o.manager,f=r.props,p=r.cmd,h=r.ref,d=l.element,m=s.render(),v=a.props,g=a.cmd,x=a.ref;return o.element=r,ke(d,m)?i=l.renewal(e,t,n,m):(l=Qe(m,o),i=l.initial(s,t,n),o.manager=l),Ve(v,f,s,e,t,o,u),He(g,p,s,e,t,f,c),De(x,h,s,e),i},dispose:function(e){var t=this,n=t.element.ref,r=t.connate,i=t.behests,o=t.example,a=t.emitter,u=t.manager;Me(o),Pe(n,e),Ne(i,o),qe(a,o,r),u.dispose(o)},trigger:Ye,attachEvent:ze,detachEvent:Xe,dispatchEvent:Be},$t={initial:function(e,t,n){var r=this,i=r.element,o=i.props,a=o.children,u=i.type,c=i.cmd,s=i.ref,l=!0;"svg"===u&&(t="http://www.w3.org/2000/svg"),"math"===u&&(t="http://www.w3.org/2000/MathML");var f=[],p=[],h=tt(),d=et(u,t,r);return r.connate=l,r.members=f,r.behests=p,r.emitter=h,r.example=d,Ce(s,d,e),Se(a,d,e,t,r,n,f),Re(o,d,e,t,r,l),Ae(c,d,e,t,o,p),{target:d,append:!0}},renewal:function(e,t,n,r){var i=this,o=i.element,a=i.connate,u=i.behests,c=i.example,s=i.members,l=r.props,f=l.children,p=r.type,h=r.cmd,d=r.ref;"svg"===p&&(t="http://www.w3.org/2000/svg"),"math"===p&&(t="http://www.w3.org/2000/MathML");var m=o.props,v=m.children,g=o.cmd;return De(o.ref,d,c,e),Ie(v,f,c,e,t,i,n,s),Ve(m,l,c,e,t,i,a),He(g,h,c,e,t,l,u),{target:c,append:!1}},dispose:function(e){var t=this,n=t.element.ref,r=t.connate,i=t.behests,o=t.members,a=t.example,u=t.emitter;Pe(n,e),je(o,e),Ne(i,a),qe(u,a,r),F(a)},trigger:Ye,attachEvent:ze,detachEvent:Xe,dispatchEvent:Be},Zt={initial:function(){var e=this,t=e.element,n=C(t);return e.example=n,{target:n,append:!0}},renewal:function(e,t,n,r){var i=this,o=i.example,a=i.element,u=r;return a!==u&&(i.element=u,o.textContent=r),{target:o,append:!1}},dispose:function(){F(this.example)}},Qt={initial:function(){var e=this,t=A("");return e.example=t,{target:t,append:!0}},renewal:function(){return{target:this.example,append:!1}},dispose:function(){F(this.example)}};e.Promise=$e,e.Trustor=Kt,e.require=function(e){return oe(Vt.baseURL||"")(e)},e.setTimeout=function(e,t){return{dispose:nt.clearTimeout.bind(nt,nt.setTimeout(h(e),t))}},e.setInterval=function(e,t){return{dispose:nt.clearInterval.bind(nt,nt.setInterval(h(e),t))}},e.setImmediate=function(e){return{dispose:nt.cancelAnimationFrame.bind(nt.requestAnimationFrame(h(e)))}},e.createClass=function(e){return function(t){return t.prototype=e,t}(function(e){return function(){e.apply(this,arguments)}}(e.constructor||ot))},e.createEvent=function(e,t){return{type:e,bubbles:!!t,refresh:!1,cancelable:!1,defaultPrevented:!1,target:null,preventDefault:ot,preventRefresh:be,stopPropagation:ye}},e.attachEvent=function(e,t,n){l(e,Rt)?e[Rt].attachEvent(t,n):M(e,t,n)},e.detachEvent=function(e,t,n){l(e,Rt)?e[Rt].detachEvent(t,n):q(e,t,n)},e.dispatchEvent=function(e,t){l(e,Rt)?e[Rt].dispatchEvent(t):P(e,t.originalEvent||t)},e.createElement=function(e,n){var i=n||{},o=d(t.call(arguments,2)),a={props:{},type:e,cmd:i.cmd||[],key:i.key,ref:i.ref};for(var u in i)"cmd"!==u&&"key"!==u&&"ref"!==u&&r(i[u])&&(a.props[u]=i[u]);return f(a.props,"children",o),a},e.redactElement=function(n){if(o(n)){var i={},a={},u={};d(t.call(arguments,1)).forEach(function(e){l(e,At)&&f(i,e[At],e),l(e,Ct)&&f(a,e[Ct],e),l(e,Lt)&&f(u,e[Lt],e)});var c={v:e.createElement,m:Ke,c:Je(i),d:We(a),t:Ge(u)},s=new Function("Elf","with(this){return "+Y(U(n.trim()))+"}");return function(){return s.call(r(this)&&this!==nt?this:{},c)}}return n},e.Component=function(e,t){return function(n){return t&&(n.prototype.render=t),f(n,At,e)}},e.Directive=function(e){return function(t){return f(t,Ct,e)}},e.Transform=function(e){return function(t){return f(t,Lt,e)}},e.render=function(e,t,n){function r(){u&&u.dispose(),l.dispose(),l=null,u=null,c=null,f=null}function i(){f=l.renewal(s,null,c,e),a(),o()}function o(){b(c,y())}function a(){f.append&&(N(t),j(t,f.target))}var u,c=[],s={refs:{},dispose:r,forceUpdate:i},l=Object.create(Wt,{element:p(e),creator:p(t)}),f=l.initial(s,null,c);return n&&(u=R(i)),a(),o(),s},e.depend=function(){d(t.call(arguments)).forEach(function(e){l(e,At)&&f(Mt,e[At],e),l(e,Ct)&&f(qt,e[Ct],e),l(e,Lt)&&f(Dt,e[Lt],e)})},e.config=function(e){Vt=e},e.set=function(e,t){It[e]=te(t,e)}}(this.Elf={});
{'fraction_non_alphanumeric': 0.3147704546952948, 'fraction_numerical': 0.013251873502845965, 'mean_word_length': 18.007518796992482, 'pattern_counts': {'":': 32, '<': 57, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 12, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4960146', 'n_tokens_mistral': 21690, 'n_tokens_neox': 21403, 'n_words': 828}