(function(t,e,n,r,i){new function(s,o,u,c){"use strict";var a,l;this.Rexjs=t=s.exports=(a=e.create,l=u||(o?function(t,e){o.set.call(t,e)}:function(t,e){for(t.$Rexjs_prototype=e;c(e).forEach(function(n){t.hasOwnProperty(n)||(t[n]=e[n])}),e=i(e););}),function t(e,n){var r,s,o={constructor:{value:e,configurable:!0,writable:!0}};switch(typeof n){case"function":r=n,s=n.prototype;break;case"undefined":r=i(t),s=this.constructor.prototype;break;default:r=a(null,o),s=null}return l(e,r),e.prototype=a(s,o),e}),this.value=function(t){return e.prototype.hasOwnProperty("__proto__")?(r(t,"__proto__",e.getOwnPropertyDescriptor(e.prototype,"__proto__")),t):t}(new t(t,null)),r(n,"Rexjs",this)}("object"==typeof exports&&"object"==typeof module?module:{},e.getOwnPropertyDescriptor(e.prototype,"__proto__"),e.setPrototypeOf,e.getOwnPropertyNames),new function(t,i){"use strict";var s,o;this.apply=t.apply,this.bind=t.bind,this.call=t.call,this.hasOwnProperty=e.prototype.hasOwnProperty,this.global=n,this.static=(s=e.getOwnPropertyDescriptor,function(t){for(var e in t){var n=s(t,e);n.enumerable=!1,r(this,e,n)}}),this.props=(o=this.static,function(t){o.call(this.prototype,t)}),this.toString=i===t.prototype?t.toString:function(){return"function "+(this.name||"")+"() { native code }"},this.static.call(i,this)}(Function,i(t)),new function(e){"use strict";var n;this.hasOwnProperty=e.hasOwnProperty,this.isPrototypeOf=e.isPrototypeOf,this.propertyIsEnumerable=e.propertyIsEnumerable,this.toString=function(){return"[Rexjs "+this.constructor.name+"]"},this.toLocaleString=(n=this.toString,function(){return n.call(this)}),this.valueOf=function(){return this},t.static.call(t.prototype,this)}(e.prototype),new function(e){"use strict";var n,r;this.every=function(t,e,n,r){if(r){for(var i=0,s=t.length;i-1||this.push(t)},this)},length:0}),n.getOwnPropertyNames(e.prototype).forEach(function(t){if(!i.prototype.hasOwnProperty(t)&&"toString"!==t){var e={};e[t]=this[t],i.props(e)}},e.prototype),i}(Array,Object,t.toArray),this.URL=function(e,n){function r(t,i){if(null!=t&&(t=e(t),!n(this,t)&&i)){var s=new r(i);n(this,s.origin+("/"===t[0]?"":s.dirname+"/")+t)}}return(r=new t(r)).props({ext:"",dirname:"",filename:"",hash:"",get host(){var t=this.hostname;if(t){var e=this.port;return t+(e?":"+e:"")}return""},hostname:"",get href(){var t=this.protocal;return(t?t+(this.host?"//"+(this.username?this.username+"@":"")+this.host:"/"):"")+this.pathname+this.search+this.hash},get origin(){var t=this.host;return t?this.protocal+"//"+t:""},get pathname(){var t=this.filename,e=this.dirname;return t?e+("/"===e[e.length-1]?"":"/")+t:e},port:"",protocal:"",search:"",toString:function(){return this.href},username:""}),r}(function(t){return"string"!=typeof t&&(t=null==t?"":t.toString()),r(t.trim())},function(t,r){var s=r.match(e);if(!s)throw"Invalid URL: "+r;var o=[],u=i(s,1),c=i(s,2),a=i(s,3),l=i(s,4),h=i(s,5),p=i(s,6);switch(t.protocal=u,t.hostname=a,t.username=c,t.port=l,t.filename=p,t.ext=i(s,7),t.search=i(s,8),t.hash=i(s,9),u){case"http:":case"https:":if(!t.hostname)return!1;break;case"":break;default:var f;switch(r=decodeURI(r),!0){case t.search.length>0:f=r.indexOf("?");break;case t.hash.length>0:f=r.indexOf("#");break;default:f=r.length}if(t.hostname=t.port="","data:"===u)return t.dirname=r.substring(u.length,f),t.filename=t.ext="",!0;h=r.substring(u.length,f-p.length),t.search=decodeURI(t.search),t.hash=decodeURI(t.hash)}return h.split(n).forEach(function(t){switch(t){case".":break;case"..":o.splice(o.length-1);break;case"":break;default:o.push(t)}}),p||"/"!==h[h.length-1]||o.push(""),t.dirname="/"+o.join("/"),u.length>0}),t.static(this)}(Rexjs,/^(?:([^:/?#.]+:)(?:\/+(?:([^/?#]*)@)?([\w\d\-\u0100-\uffff.%]*)(?::([0-9]+))?)?)?(?:([^?#]*?)([^\/]+?(\.[^.?#\/]+))?)?(?:(\?[^#]*))?(?:(#.*))?$/,/\/|\\/g,encodeURI,function(t,e){return t[e]||""}),new function(Rexjs,URL,Module,global){(function(){this.IteratorIndex=function(){function t(t){this.max=t}return(t=new Rexjs(t)).props({current:0,increase:function(t){var e=this.current+t,n=this.max;this.current=e>n?n:e},max:0}),t}(),this.IteratorResult=function(){function t(t,e){this.value=t,this.done=e}return(t=new Rexjs(t)).props({value:void 0,done:!1}),t}(),this.Iterator=function(t,e){function n(e){if(null!=e){var n=e.length;if("number"==typeof n||"number"==typeof(n=e.size))return this.index=new t(n),void(this.iterable=e)}throw"TypeError: uniterable object "+e}return(n=new Rexjs(n)).props({close:function(t){return this.index.increase(1/0),new e(t,this.closed)},get closed(){var t=this.index;return t.current>=t.max},index:null,iterable:null,get next(){var t=this.result;return this.index.increase(1),t},get result(){return new e(this.iterable[this.index.current],this.closed)}}),n}(this.IteratorIndex,this.IteratorResult),this.FunctionIterator=function(t,e,n,r){function i(e,n,i){t.call(this,e),this.boundThis=n,this.boundArguments=r(i),this.observers=[],this.index.max=1/0}return(i=new Rexjs(i,t)).props({boundThis:null,boundArguments:null,close:function(t){return this.index.increase(NaN),new e(t,this.closed)},get closed(){return n(this.index.current)},exception:"",get next(){return this.result},observe:function(t){this.observers.push(t)},observers:null,get result(){try{return new e(this.closed?void 0:this.iterable.apply(this.boundThis,this.boundArguments),this.closed)}catch(t){if(0===this.observers.length)throw t;return this.exception=t,this.index.current=this.unobserve(),this.result}},unobserve:function(){return this.observers.pop()}}),i}(this.Iterator,this.IteratorResult,isNaN,Rexjs.toArray),this.Generator=function(t){function e(e){this.iterator=e instanceof t?e:new t(e)}return(e=new Rexjs(e)).props({iterator:null,next:function(){return this.iterator.next},return:function(t){return this.iterator.close(t)},throw:function(t){throw t}}),e}(this.Iterator)}).call(this,1/0),function(t,e,n,r){r=!Object.setPrototypeOf&&!e(Object.prototype,"__proto__")?function(e){switch(!0){case e instanceof Rexjs:break;case n.call(e,"$Rexjs_prototype"):return e.$Rexjs_prototype}return t(e)}:t,this.ClassProperty=function(){function t(t,e,n){this.name=t,this.value=e,n&&(this.type=n)}return(t=new Rexjs(t)).props({name:"",static:!1,type:"value",value:null}),t}(),this.StaticProperty=function(t){function e(e,n,r){t.call(this,e,n,r)}return(e=new Rexjs(e,t)).props({static:!0}),e}(this.ClassProperty),this.Super=function(e){function n(){}return(n=new Rexjs(n)).static({callConstructor:function(e,n,r){return this.returnedThis(n,t(e).constructor.apply(n,r))},execMethod:function(t,e,n){return e.apply(t,n)},getProperty:function(t,n,r){var i=e(t,r);if(i)return i.hasOwnProperty("get")?i.get.call(n):i.value},returnedThis:function(t,e){return"object"==typeof e&&e||t},setProperty:function(t,n,r,i){var s=e(t,r);if(s&&s.hasOwnProperty("set")){var o=s.set;return o&&o.call(n,i),i}return n[r]=i,i}}),n}(function(i,s){for(var o=r(i);o;){if(n.call(o,s))return e(o,s);o=t(o)}return null}),this.Class=function(t,e){function n(){}return(n=new Rexjs(n)).static({create:function(t,n,r){var i=n[r].value;if("function"!=typeof i)throw"Class extends value "+i.toString()+" is not a constructor or null";for(var s=new Rexjs(i,t),o=s.prototype,u=0,c=n.length;u-1||e(r,t).enumerable&&(n[t]=r[t])},this.destructed),n}}),n}(Object.getOwnPropertyNames,Object.getOwnPropertyDescriptor),this.SpreadItem=function(t,e){function n(t){this.value=t}return(n=new Rexjs(n)).static({assign:function(e,n){return t(n,function(t,n){e[n]=t}),e},combine:function(r){var i=[];return t(arguments,function(t){t instanceof n?e.apply(i,t.value):i.push(t)},null,!0),i},combineBy:function(t){return this.combine.apply(this,t)}}),n.props({value:null}),n}(Rexjs.forEach,Array.prototype.push),this.SwitchCondition=function(){function t(t){this.value=t}return(t=new Rexjs(t)).props({case:function(t){switch(!0){case this.matched:break;case this.value===t:this.matched=!0;break;default:return!1}return!0},default:function(){return!this.matched&&(this.matched=!0,!0)},matched:!1,value:null}),t}()}.call(this),function(){this.ModuleCompiler=function(){function t(){}return(t=new Rexjs(t)).props({compile:function(t){this.deps=[],this.result=t.origin},deps:null,exec:function(t){var e=this;t.load(function(){Module.export("default",e.result)})},result:null}),t}(),this.JavaScriptCompiler=function(t,e,n,r){function i(){t.call(this)}return(i=new Rexjs(i,t)).props({compile:function(t){var r=new e;r.parse(new n(t.name,t.origin)),this.result=r.build(),this.deps=r.deps},exec:function(t){r(this.result)}}),i}(this.ModuleCompiler,Rexjs.ECMAScriptParser,Rexjs.File,eval),this.JSONCompiler=function(t,e){function n(){t.call(this)}return(n=new Rexjs(n,t)).props({compile:function(t){this.result=e(t.origin),this.deps=[]}}),n}(this.ModuleCompiler,JSON.parse)}.call(this),function(t,e,n,r,i,s,o,u,c){this.Module=Module=function(a,l,h,p,f,d,m){function y(t,n,r){var i=u.parseName(t),s=i.href;if(l.hasOwnProperty(s)){var o=l[s];return"function"!=typeof n||this.ended||o.load(n),o}switch(this.exports=p(null),this.imports=[],this.listeners=[],this.name=i,this.status=e,this.targets=[],l[s]=this,typeof n){case"string":return void this.ready(n,r);case"function":return void this.load(n)}d(this,r)}return(y=new Rexjs(y)).static({STATUS_NONE:t,STATUS_LOADING:e,STATUS_COMPILING:n,STATUS_READY:r,STATUS_ENDED:i,STATUS_COMPLETED:s,STATUS_ERROR:o,get cache(){return l},defaultOf:function(t,e){return this.import(t,e).default},export:function(t,e,n){f((n||h[h.length-1]).exports,t,{get:function(){return e},configurable:!1,enumerable:!0})},exportAs:function(t,e,n){if(e){var r=this.import(e,n);for(var i in t)this.export(i,r[t[i]])}else for(var i in t)this.export(i,t[i])},exportFrom:function(t,e){var n=this.import(t,e);for(var r in n)"default"!==r&&this.export(r,n[r])},import:function(t,e){return l[u.parseName(t,e).href].exports},memberOf:function(t,e,n){return this.import(e,n)[t]},moduleOf:function(t,e){return this.import(t,e)},get stack(){return h}}),y.props({compiler:null,get completed(){return(this.status&s)===s},get ended(){return(this.status&i)===i},get error(){return(this.status&o)===o},exports:null,eval:function(){var t=0,e=0,n=this.imports;this.status;return(this.status&r)===r&&(!!this.completed||(n.forEach(function(e){t+=+e.completed}),(e=t/n.length)<1?(c(this,+e.toFixed(2)),!1):(this.compiler.exec(this),!0)))},imports:null,listen:function(t){this.ended?t.call(this,1):this.listeners.push(t)},listeners:null,load:function(t){this.completed||(h.push(this),t.call(global,Rexjs),h.pop(),this.status=s,c(this))},name:null,origin:"",ready:function(t,e){var i,s=this.name,o=this.imports;this.origin=t,this.status=n,this.compiler=i=new(u.compilers[s.ext]||a),i.compile(this),this.status=r,i.deps.forEach(function(t){var n=u.parseName(t,s.href).href,r=l.hasOwnProperty(n)?l[n]:new y(n,null,e);o.indexOf(r)>-1||(m(this,r,r,m),o.push(r),r.targets.push(this))},this),this.eval()},status:t,targets:null}),y}(this.ModuleCompiler,{},[],Object.create,Object.defineProperty,function(t,e){u.readFile(t.name,function(n){t.ready(n,e)},function(e){t.status=o,t.origin=e,console.error('加载模块 "'+t.name.href+'" 错误:'+e+"。"),c(t)},e)},function(t,e,n,r){var i=n.imports;if(i.indexOf(t)>-1)throw"Module has been imported by each other "+t.name.href+" "+e.name.href;i.forEach(function(n){r(t,e,n,r)})}),this.ModuleReady=function(t,e,n){function r(){this.compilers={".js":t,".json":e},u=this}return(r=new Rexjs(r)).static({get current(){return u}}),r.props({compilers:null,parseName:function(){n("parseName")},readFile:function(){n("readFile")}}),r}(this.JavaScriptCompiler,this.JSONCompiler,function(t){throw"应该在创建 ModuleReady 的子类时,重新定义该方法:"+t}),new this.ModuleReady}.call(this,parseInt(0,2),parseInt(10,2),parseInt(100,2),parseInt(1e3,2),parseInt(1e4,2),parseInt(111e3,2),parseInt(101e4,2),null,function(t,e){var n=t.listeners;"number"!=typeof e&&(e=1),t.completed&&(t.targets.forEach(function(t){t.eval()}),n=n.splice(0)),n.forEach(function(n){n.call(t,e)})}),function(){this.JSXTemplate=function(t,e,n){function r(e){for(var r={},i=1,s=arguments.length;i:,\s]+/g,/(?:-|_)\w/g,{},Math.round(2560+256*Math.random()),Object.getOwnPropertyNames,Object.prototype.hasOwnProperty),this.CSSCompiler=function(s,o,u,c,a,l,h){function p(t,e){i.call(this)}return(p=new t(p,i)).static({disableSelectorMap:function(){c=!1}}),p.props({compile:function(t){var e=t.name.href;this.deps=[],cssText=this.compileURLs(t.origin,e),c&&(this.selectorMap=new s(e),cssText=this.compileSelectors(h(cssText,n.implementation.createHTMLDocument("").head).sheet.cssRules)),this.result=cssText+"\n/*# sourceURL="+e+" */"},compileSelectors:function(t){var e="";return r(t,function(t){switch(t.type){case o.STYLE_RULE:return void(e+=a.call(this.selectorMap,t.selectorText)+"{"+t.style.cssText+"}");case o.MEDIA_RULE:e+="@media "+t.conditionText;break;case o.KEYFRAMES_RULE:e+="@keyframes "+t.name;break;case o.SUPPORTS_RULE:e+="@supports "+t.conditionText;break;case o.IMPORT_RULE:return void this.deps.push(t.href);case o.NAMESPACE_RULE:if("selector-map"===t.prefix)return void(this.selectorMap=s.getSelectorMapByNS(t.namespaceURI));default:return void(e+=t.cssText)}e+="{",e+=this.compileSelectors(t.cssRules),e+="}"},this,!0),e},compileURLs:function(t,e){return t.replace(u,function(t,n,r,i,s){return i?n+new URL(i,e).href+s:t})},exec:function(t){var r=this,i=this.selectorMap;l.call(i,t.imports.map(function(t){return t.compiler.selectorMap})),this.style=h(this.result,n.head),t.load(function(){e.export("compiler",r),e.export("default",i)})},selectorMap:null,style:null}),p}(this.CSSSelectorMap,CSSRule,new RegExp([/\/\*[\s\S]*?\*\//.source,/"(?:\\(?:[^\r]|\r\n?)|[^"\\\r\n\u2028\u2029]+)*"|'(?:\\(?:[^\r]|\r\n?)|[^'\\\r\n\u2028\u2029]+)*'/.source,/(\burl\s*\(\s*(['"]?))(.*?)(\2\s*\))/.source].join("|"),"g"),!0,this.CSSSelectorMap.prototype.parse,this.CSSSelectorMap.prototype.merge,function(t,e){var r=n.createElement("style");return r.type="text/css",r.textContent=t,e.appendChild(r),r})}).call(this,t.ModuleCompiler),function(i,s,o,u){this.BrowserReady=function(e,r,s,u,c){function a(){var t;i.call(this),(t=this.compilers)[".html"]=e,t[".css"]=r,n.addEventListener("DOMContentLoaded",c)}return(a=new t(a,i)).props({parseName:function(t,e){var n=new o(t,e?new o(e,u).href:u);if(""===n.filename){var r=n.pathname;return new o(n.origin+(r||"/index")+".js"+n.search+n.hash)}return n},readFile:function(t,e,n,r){var i=new s;i.addEventListener("load",function(){(200===this.status?e:n)(this.responseText)}),i.open("get",t.href,!r),i.send()}}),a}(this.HTMLCompiler,this.CSSCompiler,XMLHttpRequest,new o(u?u.getAttribute("href"):"./",location.href).href,function(){var t=0;r(n.querySelectorAll('script[type="text/rexjs"]'),function(n){if(n.hasAttribute("src"))return n.hasAttribute("data-sourcemaps")&&(s.sourceMaps=!0),void new e(n.getAttribute("src"));new e("inline-script-"+t+++".js",n.textContent)},null,!0)})}.call(this,t.ModuleReady,t.ECMAScriptParser,t.URL,n.querySelector("base")),new this.BrowserReady,t.static(this)}(Rexjs,Rexjs.Module,document,Rexjs.forEach);