diff --git a/dist/vue.js b/dist/vue.js index d1aa122ec7a..545496ea7f1 100644 --- a/dist/vue.js +++ b/dist/vue.js @@ -1184,7 +1184,7 @@ CompilerProto.compileNode = function (node) { prefix = config.prefix + '-' // parse if has attributes if (attrs && attrs.length) { - var attr, isDirective, exps, exp, directive + var attr, isDirective, exps, exp, directive, dirname // loop through all attributes i = attrs.length while (i--) { @@ -1200,7 +1200,8 @@ CompilerProto.compileNode = function (node) { j = exps.length while (j--) { exp = exps[j] - directive = Directive.parse(attr.name.slice(prefix.length), exp, this, node) + dirname = attr.name.slice(prefix.length) + directive = Directive.parse(dirname, exp, this, node) if (directive) { this.bindDirective(directive) } @@ -1216,7 +1217,9 @@ CompilerProto.compileNode = function (node) { } } - if (isDirective) node.removeAttribute(attr.name) + if (isDirective && dirname !== 'cloak') { + node.removeAttribute(attr.name) + } } } // recursively compile childNodes @@ -2911,6 +2914,7 @@ function reset () { }); require.register("vue/src/directives/index.js", function(exports, require, module){ var utils = require('../utils'), + config = require('../config'), transition = require('../transition') module.exports = { @@ -2956,6 +2960,15 @@ module.exports = { this.lastVal = value } } + }, + + cloak: { + bind: function () { + var el = this.el + this.compiler.observer.once('hook:ready', function () { + el.removeAttribute(config.prefix + '-cloak') + }) + } } } diff --git a/dist/vue.min.js b/dist/vue.min.js index e9a99a95b5d..35eac53d9f1 100644 --- a/dist/vue.min.js +++ b/dist/vue.min.js @@ -3,5 +3,5 @@ (c) 2014 Evan You License: MIT */ -!function(){"use strict";function e(t,i,n){var r=e.resolve(t);if(null==r){n=n||t,i=i||"root";var s=new Error('Failed to require "'+n+'" from "'+i+'"');throw s.path=n,s.parent=i,s.require=!0,s}var o=e.modules[r];if(!o._resolving&&!o.exports){var a={};a.exports={},a.client=a.component=!0,o._resolving=!0,o.call(this,a.exports,e.relative(r),a),delete o._resolving,o.exports=a.exports}return o.exports}e.modules={},e.aliases={},e.resolve=function(t){"/"===t.charAt(0)&&(t=t.slice(1));for(var i=[t,t+".js",t+".json",t+"/index.js",t+"/index.json"],n=0;nn;++n)i[n].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}}),e.register("vue/src/main.js",function(e,t,i){function n(e){var t=this;e=r(e,t.options,!0),u.processOptions(e);var i=function(i,n){n||(i=r(i,e,!0)),t.call(this,i,!0)},s=i.prototype=Object.create(t.prototype);u.defProtected(s,"constructor",i);var a=e.methods;if(a)for(var c in a)c in o.prototype||"function"!=typeof a[c]||(s[c]=a[c]);return i.extend=n,i.super=t,i.options=e,i}function r(e,t,i){if(e=e||u.hash(),!t)return e;for(var n in t)if("el"!==n&&"methods"!==n){var s=e[n],o=t[n],a=u.typeOf(s);i&&"Function"===a&&o?(e[n]=[s],Array.isArray(o)?e[n]=e[n].concat(o):e[n].push(o)):i&&"Object"===a?r(s,o):void 0===s&&(e[n]=o)}return e}var s=t("./config"),o=t("./viewmodel"),a=t("./directives"),c=t("./filters"),u=t("./utils");o.config=function(e,t){if("string"==typeof e){if(void 0===t)return s[e];s[e]=t}else u.extend(s,e);return this},o.directive=function(e,t){return t?(a[e]=t,this):a[e]},o.filter=function(e,t){return t?(c[e]=t,this):c[e]},o.component=function(e,t){return t?(u.components[e]=u.toConstructor(t),this):u.components[e]},o.partial=function(e,t){return t?(u.partials[e]=u.toFragment(t),this):u.partials[e]},o.transition=function(e,t){return t?(u.transitions[e]=t,this):u.transitions[e]},o.require=function(e){return t("./"+e)},o.use=function(e){if("string"==typeof e)try{e=t(e)}catch(i){return u.warn("Cannot find plugin: "+e)}"function"==typeof e?e(o):e.install&&e.install(o)},o.extend=n,o.nextTick=u.nextTick,i.exports=o}),e.register("vue/src/emitter.js",function(e,t,i){var n,r="emitter";try{n=t(r)}catch(s){n=t("events").EventEmitter,n.prototype.off=function(){var e=arguments.length>1?this.removeListener:this.removeAllListeners;return e.apply(this,arguments)}}i.exports=n}),e.register("vue/src/config.js",function(e,t,i){function n(){s.forEach(function(e){o.attrs[e]=r+"-"+e})}var r="v",s=["pre","text","repeat","partial","with","component","component-id","transition"],o=i.exports={debug:!1,silent:!1,enterClass:"v-enter",leaveClass:"v-leave",attrs:{},get prefix(){return r},set prefix(e){r=e,n()}};n()}),e.register("vue/src/utils.js",function(e,t,i){function n(){return Object.create(null)}var r,s=t("./config"),o=s.attrs,a=Object.prototype.toString,c=Array.prototype.join,u=window.console,l="classList"in document.documentElement,h=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.setTimeout,f=i.exports={hash:n,components:n(),partials:n(),transitions:n(),attr:function(e,t,i){var n=o[t],r=e.getAttribute(n);return i||null===r||e.removeAttribute(n),r},defProtected:function(e,t,i,n,r){e.hasOwnProperty(t)||Object.defineProperty(e,t,{value:i,enumerable:!!n,configurable:!!r})},typeOf:function(e){return a.call(e).slice(8,-1)},bind:function(e,t){return function(i){return e.call(t,i)}},toText:function(e){var t=typeof e;return"string"===t||"boolean"===t||"number"===t&&e==e?e:"object"===t&&null!==e?JSON.stringify(e):""},extend:function(e,t,i){for(var n in t)i&&e[n]||(e[n]=t[n])},unique:function(e){for(var t,i=f.hash(),n=e.length,r=[];n--;)t=e[n],i[t]||(i[t]=1,r.push(t));return r},toFragment:function(e){if("string"!=typeof e)return e;if("#"===e.charAt(0)){var t=document.getElementById(e.slice(1));if(!t)return;e=t.innerHTML}var i,n=document.createElement("div"),r=document.createDocumentFragment();for(n.innerHTML=e.trim();i=n.firstChild;)r.appendChild(i);return r},toConstructor:function(e){return r=r||t("./viewmodel"),"Object"===f.typeOf(e)?r.extend(e):"function"==typeof e?e:null},processOptions:function(e){var t,i=e.components,n=e.partials,r=e.template;if(i)for(t in i)i[t]=f.toConstructor(i[t]);if(n)for(t in n)n[t]=f.toFragment(n[t]);r&&(e.template=f.toFragment(r))},log:function(){s.debug&&u&&u.log(c.call(arguments," "))},warn:function(){!s.silent&&u&&(u.warn(c.call(arguments," ")),s.debug&&u.trace())},nextTick:function(e){h(e,0)},addClass:function(e,t){if(l)e.classList.add(t);else{var i=" "+e.className+" ";i.indexOf(" "+t+" ")<0&&(e.className=(i+t).trim())}},removeClass:function(e,t){if(l)e.classList.remove(t);else{for(var i=" "+e.className+" ",n=" "+t+" ";i.indexOf(n)>=0;)i=i.replace(n," ");e.className=i.trim()}}}}),e.register("vue/src/compiler.js",function(e,t,i){function n(e,t){var i=this;i.init=!0,t=i.options=t||m(),c.processOptions(t);var n=i.data=t.data||{};g(e,n,!0),g(e,t.methods,!0),g(i,t.compilerOptions);var a=i.setupElement(t);v("\nnew VM instance:",a.tagName,"\n"),i.vm=e,i.bindings=m(),i.dirs=[],i.deferred=[],i.exps=[],i.computed=[],i.childCompilers=[],i.emitter=new s,b(e,"$",m()),b(e,"$el",a),b(e,"$compiler",i),b(e,"$root",r(i).vm);var u=i.parentCompiler,l=c.attr(a,"component-id");u&&(u.childCompilers.push(i),b(e,"$parent",u.vm),l&&(i.childId=l,u.vm.$[l]=e)),i.setupObserver();var h=t.computed;if(h)for(var f in h)i.createBinding(f);i.execHook("created"),g(n,e),o.observe(n,"",i.observer),i.repeat&&(b(n,"$index",i.repeatIndex,!1,!0),i.createBinding("$index")),Object.defineProperty(e,"$data",{enumerable:!1,get:function(){return i.data},set:function(e){var t=i.data;o.unobserve(t,"",i.observer),i.data=e,o.copyPaths(e,t),o.observe(e,"",i.observer)}}),i.compile(a,!0),i.deferred.forEach(i.bindDirective,i),i.parseDeps(),i.init=!1,i.execHook("ready")}function r(e){for(;e.parentCompiler;)e=e.parentCompiler;return e}var s=t("./emitter"),o=t("./observer"),a=t("./config"),c=t("./utils"),u=t("./binding"),l=t("./directive"),h=t("./text-parser"),f=t("./deps-parser"),p=t("./exp-parser"),d=Array.prototype.slice,v=c.log,m=c.hash,g=c.extend,b=c.defProtected,y=Object.prototype.hasOwnProperty,_=["created","ready","beforeDestroy","afterDestroy","enteredView","leftView"],x=n.prototype;x.setupElement=function(e){var t=this.el="string"==typeof e.el?document.querySelector(e.el):e.el||document.createElement(e.tagName||"div"),i=e.template;if(i)if(e.replace&&1===i.childNodes.length){var n=i.childNodes[0].cloneNode(!0);t.parentNode&&(t.parentNode.insertBefore(n,t),t.parentNode.removeChild(t)),t=n}else t.innerHTML="",t.appendChild(i.cloneNode(!0));e.id&&(t.id=e.id),e.className&&(t.className=e.className);var r=e.attributes;if(r)for(var s in r)t.setAttribute(s,r[s]);return t},x.setupObserver=function(){function e(e,t){o.on("hook:"+e,function(){t.call(i.vm,r)})}function t(e){n[e]||i.createBinding(e)}var i=this,n=i.bindings,r=i.options,o=i.observer=new s;o.proxies=m(),o.on("get",function(e){t(e),f.catcher.emit("get",n[e])}).on("set",function(e,i){o.emit("change:"+e,i),t(e),n[e].update(i)}).on("mutate",function(e,i,r){o.emit("change:"+e,i,r),t(e),n[e].pub()}),_.forEach(function(t){var i=r[t];if(Array.isArray(i))for(var n=i.length;n--;)e(t,i[n]);else i&&e(t,i)})},x.compile=function(e,t){var i=this,n=e.nodeType,r=e.tagName;if(1===n&&"SCRIPT"!==r){if(null!==c.attr(e,"pre"))return;var s,o,a,u,h=c.attr(e,"component")||r.toLowerCase(),f=i.getOption("components",h);if(s=c.attr(e,"repeat"))u=l.parse("repeat",s,i,e),u&&(u.Ctor=f,i.deferred.push(u));else if(t!==!0&&((o=c.attr(e,"with"))||f))u=l.parse("with",o||"",i,e),u&&(u.Ctor=f,i.deferred.push(u));else{if(e.vue_trans=c.attr(e,"transition"),a=c.attr(e,"partial")){var p=i.getOption("partials",a);p&&(e.innerHTML="",e.appendChild(p.cloneNode(!0)))}i.compileNode(e)}}else 3===n&&i.compileTextNode(e)},x.compileNode=function(e){var t,i,n=d.call(e.attributes),r=a.prefix+"-";if(n&&n.length){var s,o,c,u,f;for(t=n.length;t--;){if(s=n[t],o=!1,0===s.name.indexOf(r))for(o=!0,c=l.split(s.value),i=c.length;i--;)u=c[i],f=l.parse(s.name.slice(r.length),u,this,e),f&&this.bindDirective(f);else u=h.parseAttr(s.value),u&&(f=l.parse("attr",s.name+":"+u,this,e),f&&this.bindDirective(f));o&&e.removeAttribute(s.name)}}e.childNodes.length&&d.call(e.childNodes).forEach(this.compile,this)},x.compileTextNode=function(e){var t=h.parse(e.nodeValue);if(t){for(var i,n,r,s,o,c,u=0,f=t.length;f>u;u++)n=t[u],r=c=null,n.key?">"===n.key.charAt(0)?(o=n.key.slice(1).trim(),s=this.getOption("partials",o),s&&(i=s.cloneNode(!0),c=d.call(i.childNodes))):n.html?(i=document.createComment(a.prefix+"-html"),r=l.parse("html",n.key,this,i)):(i=document.createTextNode(""),r=l.parse("text",n.key,this,i)):i=document.createTextNode(n),e.parentNode.insertBefore(i,e),r&&this.bindDirective(r),c&&c.forEach(this.compile,this);e.parentNode.removeChild(e)}},x.bindDirective=function(e){if(this.dirs.push(e),e.isEmpty||!e._update)return e.bind&&e.bind(),void 0;var t,i=this,n=e.key;if(e.isExp)t=i.createBinding(n,!0,e.isFn);else{for(;i&&!i.hasKey(n);)i=i.parentCompiler;i=i||this,t=i.bindings[n]||i.createBinding(n)}t.instances.push(e),e.binding=t,e.bind&&e.bind(),e.update(t.val(),!0)},x.createBinding=function(e,t,i){v(" created binding: "+e);var n=this,r=n.bindings,s=n.options.computed,a=new u(n,e,t,i);if(t)n.defineExp(e,a);else if(r[e]=a,a.root)s&&s[e]?n.defineComputed(e,a,s[e]):n.defineProp(e,a);else{o.ensurePath(n.data,e);var c=e.slice(0,e.lastIndexOf("."));r[c]||n.createBinding(c)}return a},x.defineProp=function(e,t){var i=this,n=i.data,r=n.__observer__;e in n||(n[e]=void 0),!r||e in r.values||o.convert(n,e),t.value=n[e],Object.defineProperty(i.vm,e,{get:function(){return i.data[e]},set:function(t){i.data[e]=t}})},x.defineExp=function(e,t){var i=p.parse(e,this);i&&(this.markComputed(t,i),this.exps.push(t))},x.defineComputed=function(e,t,i){this.markComputed(t,i);var n={get:t.value.$get,set:t.value.$set};Object.defineProperty(this.vm,e,n)},x.markComputed=function(e,t){e.isComputed=!0,e.isFn?e.value=t:("function"==typeof t&&(t={$get:t}),e.value={$get:c.bind(t.$get,this.vm),$set:t.$set?c.bind(t.$set,this.vm):void 0}),this.computed.push(e)},x.getOption=function(e,t){var i=this.options,n=this.parentCompiler;return i[e]&&i[e][t]||(n?n.getOption(e,t):c[e]&&c[e][t])},x.execHook=function(e){e="hook:"+e,this.observer.emit(e),this.emitter.emit(e)},x.hasKey=function(e){var t=e.split(".")[0];return y.call(this.data,t)||y.call(this.vm,t)},x.parseDeps=function(){this.computed.length&&f.parse(this.computed)},x.destroy=function(){if(!this.destroyed){var e,t,i,n,r,s=this,a=s.vm,c=s.el,u=s.dirs,l=s.exps,h=s.bindings;for(s.execHook("beforeDestroy"),o.unobserve(s.data,"",s.observer),e=u.length;e--;)i=u[e],i.binding&&i.binding.compiler!==s&&(n=i.binding.instances,n&&n.splice(n.indexOf(i),1)),i.unbind();for(e=l.length;e--;)l[e].unbind();for(t in h)r=h[t],r&&r.unbind();var f=s.parentCompiler,p=s.childId;f&&(f.childCompilers.splice(f.childCompilers.indexOf(s),1),p&&delete f.vm.$[p]),c===document.body?c.innerHTML="":a.$remove(),this.destroyed=!0,s.execHook("afterDestroy"),s.observer.off(),s.emitter.off()}},i.exports=n}),e.register("vue/src/viewmodel.js",function(e,t,i){function n(e){new o(this,e)}function r(e){return"string"==typeof e?document.querySelector(e):e}function s(e,t){var i=t[0],n=e.$compiler.bindings[i];return n?n.compiler.vm:null}var o=t("./compiler"),a=t("./utils"),c=t("./transition"),u=a.defProtected,l=a.nextTick,h=n.prototype;u(h,"$set",function(e,t){var i=e.split("."),n=s(this,i);if(n){for(var r=0,o=i.length-1;o>r;r++)n=n[i[r]];n[i[r]]=t}}),u(h,"$watch",function(e,t){function i(){var e=arguments;a.nextTick(function(){t.apply(n,e)})}var n=this;t._fn=i,n.$compiler.observer.on("change:"+e,i)}),u(h,"$unwatch",function(e,t){var i=["change:"+e],n=this.$compiler.observer;t&&i.push(t._fn),n.off.apply(n,i)}),u(h,"$destroy",function(){this.$compiler.destroy()}),u(h,"$broadcast",function(){for(var e,t=this.$compiler.childCompilers,i=t.length;i--;)e=t[i],e.emitter.emit.apply(e.emitter,arguments),e.vm.$broadcast.apply(e.vm,arguments)}),u(h,"$dispatch",function(){var e=this.$compiler,t=e.emitter,i=e.parentCompiler;t.emit.apply(t,arguments),i&&i.vm.$dispatch.apply(i.vm,arguments)}),["emit","on","off","once"].forEach(function(e){u(h,"$"+e,function(){var t=this.$compiler.emitter;t[e].apply(t,arguments)})}),u(h,"$appendTo",function(e,t){e=r(e);var i=this.$el;c(i,1,function(){e.appendChild(i),t&&l(t)},this.$compiler)}),u(h,"$remove",function(e){var t=this.$el,i=t.parentNode;i&&c(t,-1,function(){i.removeChild(t),e&&l(e)},this.$compiler)}),u(h,"$before",function(e,t){e=r(e);var i=this.$el,n=e.parentNode;n&&c(i,1,function(){n.insertBefore(i,e),t&&l(t)},this.$compiler)}),u(h,"$after",function(e,t){e=r(e);var i=this.$el,n=e.parentNode,s=e.nextSibling;n&&c(i,1,function(){s?n.insertBefore(i,s):n.appendChild(i),t&&l(t)},this.$compiler)}),i.exports=n}),e.register("vue/src/binding.js",function(e,t,i){function n(e,t,i,n){this.id=s++,this.value=void 0,this.isExp=!!i,this.isFn=n,this.root=!this.isExp&&-1===t.indexOf("."),this.compiler=e,this.key=t,this.instances=[],this.subs=[],this.deps=[],this.unbound=!1}var r=t("./batcher"),s=0,o=n.prototype;o.update=function(e){(!this.isComputed||this.isFn)&&(this.value=e),r.queue(this)},o._update=function(){for(var e=this.instances.length,t=this.val();e--;)this.instances[e].update(t);this.pub()},o.val=function(){return this.isComputed&&!this.isFn?this.value.$get():this.value},o.pub=function(){for(var e=this.subs.length;e--;)this.subs[e].update()},o.unbind=function(){this.unbound=!0;for(var e=this.instances.length;e--;)this.instances[e].unbind();e=this.deps.length;for(var t;e--;)t=this.deps[e].subs,t.splice(t.indexOf(this),1)},i.exports=n}),e.register("vue/src/observer.js",function(e,t,i){function n(e){if("function"==typeof e){for(var t=this.length,i=[];t--;)e(this[t])&&i.push(this.splice(t,1)[0]);return i.reverse()}return"number"!=typeof e&&(e=this.indexOf(e)),e>-1?this.splice(e,1)[0]:void 0}function r(e,t){if("function"==typeof e){for(var i,n=this.length,r=[];n--;)i=e(this[n]),void 0!==i&&r.push(this.splice(n,1,i)[0]);return r.reverse()}return"number"!=typeof e&&(e=this.indexOf(e)),e>-1?this.splice(e,1,t)[0]:void 0}function s(e){for(var t in e)a(e,t)}function o(e,t){var i=e.__observer__;if(i||(i=new v,b(e,"__observer__",i)),i.path=t,k)e.__proto__=C;else for(var n in C)b(e,n,C[n])}function a(e,t){var i=t.charAt(0);if("$"!==i&&"_"!==i||"$index"===t){var n=e.__observer__,r=n.values,s=r[t]=e[t];n.emit("set",t,s),Array.isArray(s)&&n.emit("set",t+".length",s.length),Object.defineProperty(e,t,{get:function(){var e=r[t];return $.shouldGet&&g(e)!==_&&n.emit("get",t),e},set:function(e){var i=r[t];p(i,t,n),r[t]=e,l(e,i),n.emit("set",t,e),f(e,t,n)}}),f(s,t,n)}}function c(e){d=d||t("./viewmodel");var i=g(e);return!(i!==_&&i!==x||e instanceof d)}function u(e){var t=g(e),i=e&&e.__observer__;if(t===x)i.emit("set","length",e.length);else if(t===_){var n,r;for(n in e)r=e[n],i.emit("set",n,r),u(r)}}function l(e,t){if(g(t)===_&&g(e)===_){var i,n,r,s;for(i in t)i in e||(r=t[i],n=g(r),n===_?(s=e[i]={},l(s,r)):e[i]=n===x?[]:void 0)}}function h(e,t){for(var i,n=t.split("."),r=0,s=n.length-1;s>r;r++)i=n[r],e[i]||(e[i]={},e.__observer__&&a(e,i)),e=e[i];g(e)===_&&(i=n[r],i in e||(e[i]=void 0,e.__observer__&&a(e,i)))}function f(e,t,i){if(c(e)){var n,r=t?t+".":"",a=!!e.__observer__;a||b(e,"__observer__",new v),n=e.__observer__,n.values=n.values||m.hash(),i.proxies=i.proxies||{};var l=i.proxies[r]={get:function(e){i.emit("get",r+e)},set:function(e,t){i.emit("set",r+e,t)},mutate:function(e,n,s){var o=e?r+e:t;i.emit("mutate",o,n,s);var a=s.method;"sort"!==a&&"reverse"!==a&&i.emit("set",o+".length",n.length)}};if(n.on("get",l.get).on("set",l.set).on("mutate",l.mutate),a)u(e);else{var h=g(e);h===_?s(e):h===x&&o(e)}}}function p(e,t,i){if(e&&e.__observer__){t=t?t+".":"";var n=i.proxies[t];n&&(e.__observer__.off("get",n.get).off("set",n.set).off("mutate",n.mutate),i.proxies[t]=null)}}var d,v=t("./emitter"),m=t("./utils"),g=m.typeOf,b=m.defProtected,y=Array.prototype.slice,_="Object",x="Array",w=["push","pop","shift","unshift","splice","sort","reverse"],k={}.__proto__,C=Object.create(Array.prototype);w.forEach(function(e){b(C,e,function(){var t=Array.prototype[e].apply(this,arguments);return this.__observer__.emit("mutate",this.__observer__.path,this,{method:e,args:y.call(arguments),result:t}),t},!k)}),b(C,"remove",n,!k),b(C,"set",r,!k),b(C,"replace",r,!k);var $=i.exports={shouldGet:!1,observe:f,unobserve:p,ensurePath:h,convert:a,copyPaths:l,watchArray:o}}),e.register("vue/src/directive.js",function(e,t,i){function n(e,t,i,n,o){this.compiler=n,this.vm=n.vm,this.el=o;var a=""===t;if("function"==typeof e)this[a?"bind":"_update"]=e;else for(var c in e)"unbind"===c||"update"===c?this["_"+c]=e[c]:this[c]=e[c];if(a)return this.isEmpty=!0,void 0;this.expression=t.trim(),this.rawKey=i,r(this,i),this.isExp=!v.test(this.key)||d.test(this.key);var u=this.expression.slice(i.length).match(f);if(u){this.filters=[];for(var l,h=0,p=u.length;p>h;h++)l=s(u[h],this.compiler),l&&this.filters.push(l);this.filters.length||(this.filters=null)}else this.filters=null}function r(e,t){var i=t;if(t.indexOf(":")>-1){var n=t.match(h);i=n?n[2].trim():i,e.arg=n?n[1].trim():null}e.key=i}function s(e,t){var i=e.slice(1).match(p);if(i){i=i.map(function(e){return e.replace(/'/g,"").trim()});var n=i[0],r=t.getOption("filters",n)||c[n];return r?{name:n,apply:r,args:i.length>1?i.slice(1):null}:(o.warn("Unknown filter: "+n),void 0)}}var o=t("./utils"),a=t("./directives"),c=t("./filters"),u=/(?:['"](?:\\.|[^'"])*['"]|\((?:\\.|[^\)])*\)|\\.|[^,])+/g,l=/^(?:['"](?:\\.|[^'"])*['"]|\\.|[^\|]|\|\|)+/,h=/^([\w-$ ]+):(.+)$/,f=/\|[^\|]+/g,p=/[^\s']+|'[^']+'/g,d=/^\$(parent|root)\./,v=/^[\w\.$]+$/,m=n.prototype;m.update=function(e,t){(t||e!==this.value)&&(this.value=e,this._update&&this._update(this.filters?this.applyFilters(e):e))},m.applyFilters=function(e){for(var t,i=e,n=0,r=this.filters.length;r>n;n++)t=this.filters[n],i=t.apply.call(this.vm,i,t.args);return i},m.unbind=function(){this.el&&this.vm&&(this._unbind&&this._unbind(),this.vm=this.el=this.binding=this.compiler=null)},n.split=function(e){return e.indexOf(",")>-1?e.match(u)||[""]:[e]},n.parse=function(e,t,i,r){var s=i.getOption("directives",e)||a[e];if(!s)return o.warn("unknown directive: "+e);var c;if(t.indexOf("|")>-1){var u=t.match(l);u&&(c=u[0].trim())}else c=t.trim();return c||""===t?new n(s,t,c,i,r):o.warn("invalid directive expression: "+t)},i.exports=n}),e.register("vue/src/exp-parser.js",function(e,t,i){function n(e){return e=e.replace(d,"").replace(v,",").replace(p,"").replace(m,"").replace(g,""),e?e.split(/,+/):[]}function r(e,t){for(var i="",n=0,r=t;t&&!t.hasKey(e);)t=t.parentCompiler,n++;if(t){for(;n--;)i+="$parent.";t.bindings[e]||"$"===e.charAt(0)||t.createBinding(e)}else r.createBinding(e);return i}function s(e,t){var i;try{i=new Function(e)}catch(n){a.warn("Invalid expression: "+t)}return i}function o(e){return"$"===e.charAt(0)?"\\"+e:e}var a=t("./utils"),c=/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/g,u=/"(\d+)"/g,l=new RegExp("constructor".split("").join("['\"+, ]*")),h=/\\u\d\d\d\d/,f="break,case,catch,continue,debugger,default,delete,do,else,false,finally,for,function,if,in,instanceof,new,null,return,switch,this,throw,true,try,typeof,var,void,while,with,undefined,abstract,boolean,byte,char,class,const,double,enum,export,extends,final,float,goto,implements,import,int,interface,long,native,package,private,protected,public,short,static,super,synchronized,throws,transient,volatile,arguments,let,yield,Math",p=new RegExp(["\\b"+f.replace(/,/g,"\\b|\\b")+"\\b"].join("|"),"g"),d=/\/\*(?:.|\n)*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|'[^']*'|"[^"]*"|[\s\t\n]*\.[\s\t\n]*[$\w\.]+/g,v=/[^\w$]+/g,m=/\b\d[^,]*/g,g=/^,+|,+$/g;i.exports={parse:function(e,t){function i(e){var t=g.length;return g[t]=e,'"'+t+'"'}function f(e){var i=e.charAt(0);e=e.slice(1);var n="this."+r(e,t)+e;return m[e]||(v+=n+";",m[e]=1),i+n}function p(e,t){return g[t]}if(h.test(e)||l.test(e))return a.warn("Unsafe expression: "+e),function(){};var d=n(e);if(!d.length)return s("return "+e,e);d=a.unique(d);var v="",m=a.hash(),g=[],b=new RegExp("[^$\\w\\.]("+d.map(o).join("|")+")[$\\w\\.]*\\b","g"),y=("return "+e).replace(c,i).replace(b,f).replace(u,p);return y=v+y,s(y,e)}}}),e.register("vue/src/text-parser.js",function(e){function t(e){if(!n.test(e))return null;for(var t,i,s,o=[];t=e.match(n);)i=t.index,i>0&&o.push(e.slice(0,i)),s={key:t[1].trim()},r.test(t[0])&&(s.html=!0),o.push(s),e=e.slice(i+t[0].length);return e.length&&o.push(e),o}function i(e){var i=t(e);if(!i)return null;for(var n,r=[],s=0,o=i.length;o>s;s++)n=i[s],r.push(n.key||'"'+n+'"');return r.join("+")}var n=/{{{?([^{}]+?)}?}}/,r=/{{{[^{}]+}}}/;e.parse=t,e.parseAttr=i}),e.register("vue/src/deps-parser.js",function(e,t,i){function n(e){if(!e.isFn){s.log("\n- "+e.key);var t=s.hash();e.deps=[],a.on("get",function(i){var n=t[i.key];n&&n.compiler===i.compiler||(t[i.key]=i,s.log(" - "+i.key),e.deps.push(i),i.subs.push(e))}),e.value.$get(),a.off("get")}}var r=t("./emitter"),s=t("./utils"),o=t("./observer"),a=new r;i.exports={catcher:a,parse:function(e){s.log("\nparsing dependencies..."),o.shouldGet=!0,e.forEach(n),o.shouldGet=!1,s.log("\ndone.")}}}),e.register("vue/src/filters.js",function(e,t,i){var n={enter:13,tab:9,"delete":46,up:38,left:37,right:39,down:40,esc:27};i.exports={capitalize:function(e){return e||0===e?(e=e.toString(),e.charAt(0).toUpperCase()+e.slice(1)):""},uppercase:function(e){return e||0===e?e.toString().toUpperCase():""},lowercase:function(e){return e||0===e?e.toString().toLowerCase():""},currency:function(e,t){if(!e&&0!==e)return"";var i=t&&t[0]||"$",n=Math.floor(e).toString(),r=n.length%3,s=r>0?n.slice(0,r)+(n.length>3?",":""):"",o="."+e.toFixed(2).slice(-2);return i+s+n.slice(r).replace(/(\d{3})(?=\d)/g,"$1,")+o},pluralize:function(e,t){return t.length>1?t[e-1]||t[t.length-1]:t[e-1]||t[0]+"s"},key:function(e,t){if(e){var i=n[t[0]];return i||(i=parseInt(t[0],10)),function(t){t.keyCode===i&&e.call(this,t)}}}}}),e.register("vue/src/transition.js",function(e,t,i){function n(e,t,i){if(!o)return i(),c.CSS_SKIP;var n=e.classList,r=e.vue_trans_cb;if(t>0){r&&(e.removeEventListener(o,r),e.vue_trans_cb=null),n.add(a.enterClass),i();{e.clientHeight}return n.remove(a.enterClass),c.CSS_E}n.add(a.leaveClass);var s=function(t){t.target===e&&(e.removeEventListener(o,s),e.vue_trans_cb=null,i(),n.remove(a.leaveClass))};return e.addEventListener(o,s),e.vue_trans_cb=s,c.CSS_L}function r(e,t,i,n,r){var s=r.getOption("transitions",n);if(!s)return i(),c.JS_SKIP;var o=s.enter,a=s.leave;return t>0?"function"!=typeof o?(i(),c.JS_SKIP_E):(o(e,i),c.JS_E):"function"!=typeof a?(i(),c.JS_SKIP_L):(a(e,i),c.JS_L)}function s(){var e=document.createElement("vue"),t="transitionend",i={transition:t,mozTransition:t,webkitTransition:"webkitTransitionEnd"};for(var n in i)if(void 0!==e.style[n])return i[n]}var o=s(),a=t("./config"),c={CSS_E:1,CSS_L:2,JS_E:3,JS_L:4,CSS_SKIP:-1,JS_SKIP:-2,JS_SKIP_E:-3,JS_SKIP_L:-4,INIT:-5,SKIP:-6},u=i.exports=function(e,t,i,s){var o=function(){i(),s.execHook(t>0?"enteredView":"leftView")};if(s.init)return o(),c.INIT;var a=e.vue_trans;return a?r(e,t,o,a,s):""===a?n(e,t,o):(o(),c.SKIP)};u.codes=c}),e.register("vue/src/batcher.js",function(e,t){function i(){for(var e=0;et;t++)this.buildItem(e.args[t],n+t)},pop:function(){var e=this.vms.pop();e&&e.$destroy()},unshift:function(e){e.args.forEach(this.buildItem,this)},shift:function(){var e=this.vms.shift();e&&e.$destroy()},splice:function(e){var t,i,n=e.args[0],r=e.args[1],s=e.args.length-2,o=this.vms.splice(n,r);for(t=0,i=o.length;i>t;t++)o[t].$destroy();for(t=0;s>t;t++)this.buildItem(e.args[t+2],n+t)},sort:function(){var e,t,i,n,r=this.vms,s=this.collection,o=s.length,a=new Array(o);for(e=0;o>e;e++)for(n=s[e],t=0;o>t;t++)if(i=r[t],i.$data===n){a[e]=i;break}for(e=0;o>e;e++)this.container.insertBefore(a[e].$el,this.ref);this.vms=a},reverse:function(){var e=this.vms;e.reverse();for(var t=0,i=e.length;i>t;t++)this.container.insertBefore(e[t].$el,this.ref)}};i.exports={bind:function(){var e=this.el,i=this.container=e.parentNode;n=n||t("../viewmodel"),this.Ctor=this.Ctor||n,this.hasTrans=e.hasAttribute(a.attrs.transition),this.childId=o.attr(e,"component-id"),this.ref=document.createComment(a.prefix+"-repeat-"+this.key),i.insertBefore(this.ref,e),i.removeChild(e),this.initiated=!1,this.collection=null,this.vms=null;var r=this;this.mutationListener=function(e,t,i){var n=i.method;u[n].call(r,i),"push"!==n&&"pop"!==n&&r.updateIndex(),("push"===n||"unshift"===n||"splice"===n)&&r.changed()}},update:function(e,t){this.reset(),this.container.vue_dHandlers=o.hash(),this.initiated||e&&e.length||(this.buildItem(),this.initiated=!0),e=this.collection=e||[],this.vms=[],this.childId&&(this.vm.$[this.childId]=this.vms),e.__observer__||r.watchArray(e,null,new s),e.__observer__.on("mutate",this.mutationListener),e.length&&(e.forEach(this.buildItem,this),t||this.changed())},changed:function(){if(!this.queued){this.queued=!0;var e=this;setTimeout(function(){e.compiler.parseDeps(),e.queued=!1},0)}},buildItem:function(e,t){var i,n,r,s=this.el.cloneNode(!0),a=this.container,u=this.vms,l=this.collection;e&&(i=u.length>t?u[t].$el:this.ref,i.parentNode||(i=i.vue_ref),s.vue_trans=o.attr(s,"transition",!0),c(s,1,function(){a.insertBefore(s,i)},this.compiler),"Object"!==o.typeOf(e)&&(r=!0,e={value:e})),n=new this.Ctor({el:s,data:e,compilerOptions:{repeat:!0,repeatIndex:t,parentCompiler:this.compiler,delegator:a}}),e?(u.splice(t,0,n),r&&e.__observer__.on("set",function(e,t){"value"===e&&(l[n.$index]=t)})):n.$destroy()},updateIndex:function(){for(var e=this.vms.length;e--;)this.vms[e].$data.$index=e},reset:function(){if(this.childId&&delete this.vm.$[this.childId],this.collection){this.collection.__observer__.off("mutate",this.mutationListener);for(var e=this.vms.length;e--;)this.vms[e].$destroy()}var t=this.container,i=t.vue_dHandlers;for(var n in i)t.removeEventListener(i[n].event,i[n]);t.vue_dHandlers=null},unbind:function(){this.reset()}}}),e.register("vue/src/directives/on.js",function(e,t,i){function n(e,t,i){for(;e&&e!==t;){if(e[i])return e;e=e.parentNode}}var r=t("../utils");i.exports={isFn:!0,bind:function(){this.compiler.repeat&&(this.el[this.expression]=!0,this.el.vue_viewmodel=this.vm)},update:function(e){if(this.reset(),"function"!=typeof e)return r.warn('Directive "on" expects a function value.');var t=this.compiler,i=this.arg,s=this.binding.isExp,o=this.binding.compiler.vm;if(t.repeat&&!this.vm.constructor.super&&"blur"!==i&&"focus"!==i){var a=t.delegator,c=this.expression,u=a.vue_dHandlers[c];if(u)return;u=a.vue_dHandlers[c]=function(t){var i=n(t.target,a,c);i&&(t.el=i,t.targetVM=i.vue_viewmodel,e.call(s?t.targetVM:o,t))},u.event=i,a.addEventListener(i,u)}else{var l=this.vm;this.handler=function(t){t.el=t.currentTarget,t.targetVM=l,e.call(o,t)},this.el.addEventListener(i,this.handler)}},reset:function(){this.el.removeEventListener(this.arg,this.handler),this.handler=null},unbind:function(){this.reset(),this.el.vue_viewmodel=null}}}),e.register("vue/src/directives/model.js",function(e,t,i){function n(e){return Array.prototype.filter.call(e.options,function(e){return e.selected}).map(function(e){return e.value||e.text})}var r=t("../utils"),s=navigator.userAgent.indexOf("MSIE 9.0")>0;i.exports={bind:function(){var e=this,t=e.el,i=t.type,n=t.tagName;e.lock=!1,e.event=e.compiler.options.lazy||"SELECT"===n||"checkbox"===i||"radio"===i?"change":"input",e.attr="checkbox"===i?"checked":"INPUT"===n||"SELECT"===n||"TEXTAREA"===n?"value":"innerHTML","SELECT"===n&&t.hasAttribute("multiple")&&(this.multi=!0);var o=!1;e.cLock=function(){o=!0},e.cUnlock=function(){o=!1},t.addEventListener("compositionstart",this.cLock),t.addEventListener("compositionend",this.cUnlock),e.set=e.filters?function(){if(!o){var i;try{i=t.selectionStart}catch(n){}e._set(),r.nextTick(function(){void 0!==i&&t.setSelectionRange(i,i)})}}:function(){o||(e.lock=!0,e._set(),r.nextTick(function(){e.lock=!1}))},t.addEventListener(e.event,e.set),s&&(e.onCut=function(){r.nextTick(function(){e.set()})},e.onDel=function(t){(46===t.keyCode||8===t.keyCode)&&e.set()},t.addEventListener("cut",e.onCut),t.addEventListener("keyup",e.onDel)) -},_set:function(){this.vm.$set(this.key,this.multi?n(this.el):this.el[this.attr])},update:function(e){if(!this.lock){var t=this.el;"SELECT"===t.tagName?(t.selectedIndex=-1,this.multi&&Array.isArray(e)?e.forEach(this.updateSelect,this):this.updateSelect(e)):"radio"===t.type?t.checked=e==t.value:"checkbox"===t.type?t.checked=!!e:t[this.attr]=r.toText(e)}},updateSelect:function(e){for(var t=this.el.options,i=t.length;i--;)if(t[i].value==e){t[i].selected=!0;break}},unbind:function(){var e=this.el;e.removeEventListener(this.event,this.set),e.removeEventListener("compositionstart",this.cLock),e.removeEventListener("compositionend",this.cUnlock),s&&(e.removeEventListener("cut",this.onCut),e.removeEventListener("keyup",this.onDel))}}}),e.register("vue/src/directives/with.js",function(e,t,i){var n;i.exports={bind:function(){this.isEmpty&&this.build()},update:function(e){this.component?this.component.$data=e:this.build(e)},build:function(e){n=n||t("../viewmodel");var i=this.Ctor||n;this.component=new i({el:this.el,data:e,compilerOptions:{parentCompiler:this.compiler}})},unbind:function(){this.component.$destroy()}}}),e.register("vue/src/directives/html.js",function(e,t,i){var n=t("../utils").toText,r=Array.prototype.slice;i.exports={bind:function(){8===this.el.nodeType&&(this.holder=document.createElement("div"),this.nodes=[])},update:function(e){e=n(e),this.holder?this.swap(e):this.el.innerHTML=e},swap:function(e){for(var t,i=this.el.parentNode,n=this.holder,s=this.nodes,o=s.length;o--;)i.removeChild(s[o]);for(n.innerHTML=e,s=this.nodes=r.call(n.childNodes),o=0,t=s.length;t>o;o++)i.insertBefore(s[o],this.el)}}}),e.register("vue/src/directives/style.js",function(e,t,i){function n(e){return e[1].toUpperCase()}var r=/-([a-z])/g,s=["webkit","moz","ms"];i.exports={bind:function(){var e=this.arg,t=e.charAt(0);"$"===t?(e=e.slice(1),this.prefixed=!0):"-"===t&&(e=e.slice(1)),this.prop=e.replace(r,n)},update:function(e){var t=this.prop;if(this.el.style[t]=e,this.prefixed){t=t.charAt(0).toUpperCase()+t.slice(1);for(var i=s.length;i--;)this.el.style[s[i]+t]=e}}}}),e.alias("component-emitter/index.js","vue/deps/emitter/index.js"),e.alias("component-emitter/index.js","emitter/index.js"),e.alias("vue/src/main.js","vue/index.js"),"object"==typeof exports?module.exports=e("vue"):"function"==typeof define&&define.amd?define(function(){return e("vue")}):window.Vue=e("vue")}(); \ No newline at end of file +!function(){"use strict";function e(t,i,n){var r=e.resolve(t);if(null==r){n=n||t,i=i||"root";var s=new Error('Failed to require "'+n+'" from "'+i+'"');throw s.path=n,s.parent=i,s.require=!0,s}var o=e.modules[r];if(!o._resolving&&!o.exports){var a={};a.exports={},a.client=a.component=!0,o._resolving=!0,o.call(this,a.exports,e.relative(r),a),delete o._resolving,o.exports=a.exports}return o.exports}e.modules={},e.aliases={},e.resolve=function(t){"/"===t.charAt(0)&&(t=t.slice(1));for(var i=[t,t+".js",t+".json",t+"/index.js",t+"/index.json"],n=0;nn;++n)i[n].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}}),e.register("vue/src/main.js",function(e,t,i){function n(e){var t=this;e=r(e,t.options,!0),u.processOptions(e);var i=function(i,n){n||(i=r(i,e,!0)),t.call(this,i,!0)},s=i.prototype=Object.create(t.prototype);u.defProtected(s,"constructor",i);var a=e.methods;if(a)for(var c in a)c in o.prototype||"function"!=typeof a[c]||(s[c]=a[c]);return i.extend=n,i.super=t,i.options=e,i}function r(e,t,i){if(e=e||u.hash(),!t)return e;for(var n in t)if("el"!==n&&"methods"!==n){var s=e[n],o=t[n],a=u.typeOf(s);i&&"Function"===a&&o?(e[n]=[s],Array.isArray(o)?e[n]=e[n].concat(o):e[n].push(o)):i&&"Object"===a?r(s,o):void 0===s&&(e[n]=o)}return e}var s=t("./config"),o=t("./viewmodel"),a=t("./directives"),c=t("./filters"),u=t("./utils");o.config=function(e,t){if("string"==typeof e){if(void 0===t)return s[e];s[e]=t}else u.extend(s,e);return this},o.directive=function(e,t){return t?(a[e]=t,this):a[e]},o.filter=function(e,t){return t?(c[e]=t,this):c[e]},o.component=function(e,t){return t?(u.components[e]=u.toConstructor(t),this):u.components[e]},o.partial=function(e,t){return t?(u.partials[e]=u.toFragment(t),this):u.partials[e]},o.transition=function(e,t){return t?(u.transitions[e]=t,this):u.transitions[e]},o.require=function(e){return t("./"+e)},o.use=function(e){if("string"==typeof e)try{e=t(e)}catch(i){return u.warn("Cannot find plugin: "+e)}"function"==typeof e?e(o):e.install&&e.install(o)},o.extend=n,o.nextTick=u.nextTick,i.exports=o}),e.register("vue/src/emitter.js",function(e,t,i){var n,r="emitter";try{n=t(r)}catch(s){n=t("events").EventEmitter,n.prototype.off=function(){var e=arguments.length>1?this.removeListener:this.removeAllListeners;return e.apply(this,arguments)}}i.exports=n}),e.register("vue/src/config.js",function(e,t,i){function n(){s.forEach(function(e){o.attrs[e]=r+"-"+e})}var r="v",s=["pre","text","repeat","partial","with","component","component-id","transition"],o=i.exports={debug:!1,silent:!1,enterClass:"v-enter",leaveClass:"v-leave",attrs:{},get prefix(){return r},set prefix(e){r=e,n()}};n()}),e.register("vue/src/utils.js",function(e,t,i){function n(){return Object.create(null)}var r,s=t("./config"),o=s.attrs,a=Object.prototype.toString,c=Array.prototype.join,u=window.console,l="classList"in document.documentElement,h=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.setTimeout,f=i.exports={hash:n,components:n(),partials:n(),transitions:n(),attr:function(e,t,i){var n=o[t],r=e.getAttribute(n);return i||null===r||e.removeAttribute(n),r},defProtected:function(e,t,i,n,r){e.hasOwnProperty(t)||Object.defineProperty(e,t,{value:i,enumerable:!!n,configurable:!!r})},typeOf:function(e){return a.call(e).slice(8,-1)},bind:function(e,t){return function(i){return e.call(t,i)}},toText:function(e){var t=typeof e;return"string"===t||"boolean"===t||"number"===t&&e==e?e:"object"===t&&null!==e?JSON.stringify(e):""},extend:function(e,t,i){for(var n in t)i&&e[n]||(e[n]=t[n])},unique:function(e){for(var t,i=f.hash(),n=e.length,r=[];n--;)t=e[n],i[t]||(i[t]=1,r.push(t));return r},toFragment:function(e){if("string"!=typeof e)return e;if("#"===e.charAt(0)){var t=document.getElementById(e.slice(1));if(!t)return;e=t.innerHTML}var i,n=document.createElement("div"),r=document.createDocumentFragment();for(n.innerHTML=e.trim();i=n.firstChild;)r.appendChild(i);return r},toConstructor:function(e){return r=r||t("./viewmodel"),"Object"===f.typeOf(e)?r.extend(e):"function"==typeof e?e:null},processOptions:function(e){var t,i=e.components,n=e.partials,r=e.template;if(i)for(t in i)i[t]=f.toConstructor(i[t]);if(n)for(t in n)n[t]=f.toFragment(n[t]);r&&(e.template=f.toFragment(r))},log:function(){s.debug&&u&&u.log(c.call(arguments," "))},warn:function(){!s.silent&&u&&(u.warn(c.call(arguments," ")),s.debug&&u.trace())},nextTick:function(e){h(e,0)},addClass:function(e,t){if(l)e.classList.add(t);else{var i=" "+e.className+" ";i.indexOf(" "+t+" ")<0&&(e.className=(i+t).trim())}},removeClass:function(e,t){if(l)e.classList.remove(t);else{for(var i=" "+e.className+" ",n=" "+t+" ";i.indexOf(n)>=0;)i=i.replace(n," ");e.className=i.trim()}}}}),e.register("vue/src/compiler.js",function(e,t,i){function n(e,t){var i=this;i.init=!0,t=i.options=t||m(),c.processOptions(t);var n=i.data=t.data||{};g(e,n,!0),g(e,t.methods,!0),g(i,t.compilerOptions);var a=i.setupElement(t);v("\nnew VM instance:",a.tagName,"\n"),i.vm=e,i.bindings=m(),i.dirs=[],i.deferred=[],i.exps=[],i.computed=[],i.childCompilers=[],i.emitter=new s,b(e,"$",m()),b(e,"$el",a),b(e,"$compiler",i),b(e,"$root",r(i).vm);var u=i.parentCompiler,l=c.attr(a,"component-id");u&&(u.childCompilers.push(i),b(e,"$parent",u.vm),l&&(i.childId=l,u.vm.$[l]=e)),i.setupObserver();var h=t.computed;if(h)for(var f in h)i.createBinding(f);i.execHook("created"),g(n,e),o.observe(n,"",i.observer),i.repeat&&(b(n,"$index",i.repeatIndex,!1,!0),i.createBinding("$index")),Object.defineProperty(e,"$data",{enumerable:!1,get:function(){return i.data},set:function(e){var t=i.data;o.unobserve(t,"",i.observer),i.data=e,o.copyPaths(e,t),o.observe(e,"",i.observer)}}),i.compile(a,!0),i.deferred.forEach(i.bindDirective,i),i.parseDeps(),i.init=!1,i.execHook("ready")}function r(e){for(;e.parentCompiler;)e=e.parentCompiler;return e}var s=t("./emitter"),o=t("./observer"),a=t("./config"),c=t("./utils"),u=t("./binding"),l=t("./directive"),h=t("./text-parser"),f=t("./deps-parser"),p=t("./exp-parser"),d=Array.prototype.slice,v=c.log,m=c.hash,g=c.extend,b=c.defProtected,y=Object.prototype.hasOwnProperty,_=["created","ready","beforeDestroy","afterDestroy","enteredView","leftView"],x=n.prototype;x.setupElement=function(e){var t=this.el="string"==typeof e.el?document.querySelector(e.el):e.el||document.createElement(e.tagName||"div"),i=e.template;if(i)if(e.replace&&1===i.childNodes.length){var n=i.childNodes[0].cloneNode(!0);t.parentNode&&(t.parentNode.insertBefore(n,t),t.parentNode.removeChild(t)),t=n}else t.innerHTML="",t.appendChild(i.cloneNode(!0));e.id&&(t.id=e.id),e.className&&(t.className=e.className);var r=e.attributes;if(r)for(var s in r)t.setAttribute(s,r[s]);return t},x.setupObserver=function(){function e(e,t){o.on("hook:"+e,function(){t.call(i.vm,r)})}function t(e){n[e]||i.createBinding(e)}var i=this,n=i.bindings,r=i.options,o=i.observer=new s;o.proxies=m(),o.on("get",function(e){t(e),f.catcher.emit("get",n[e])}).on("set",function(e,i){o.emit("change:"+e,i),t(e),n[e].update(i)}).on("mutate",function(e,i,r){o.emit("change:"+e,i,r),t(e),n[e].pub()}),_.forEach(function(t){var i=r[t];if(Array.isArray(i))for(var n=i.length;n--;)e(t,i[n]);else i&&e(t,i)})},x.compile=function(e,t){var i=this,n=e.nodeType,r=e.tagName;if(1===n&&"SCRIPT"!==r){if(null!==c.attr(e,"pre"))return;var s,o,a,u,h=c.attr(e,"component")||r.toLowerCase(),f=i.getOption("components",h);if(s=c.attr(e,"repeat"))u=l.parse("repeat",s,i,e),u&&(u.Ctor=f,i.deferred.push(u));else if(t!==!0&&((o=c.attr(e,"with"))||f))u=l.parse("with",o||"",i,e),u&&(u.Ctor=f,i.deferred.push(u));else{if(e.vue_trans=c.attr(e,"transition"),a=c.attr(e,"partial")){var p=i.getOption("partials",a);p&&(e.innerHTML="",e.appendChild(p.cloneNode(!0)))}i.compileNode(e)}}else 3===n&&i.compileTextNode(e)},x.compileNode=function(e){var t,i,n=d.call(e.attributes),r=a.prefix+"-";if(n&&n.length){var s,o,c,u,f,p;for(t=n.length;t--;){if(s=n[t],o=!1,0===s.name.indexOf(r))for(o=!0,c=l.split(s.value),i=c.length;i--;)u=c[i],p=s.name.slice(r.length),f=l.parse(p,u,this,e),f&&this.bindDirective(f);else u=h.parseAttr(s.value),u&&(f=l.parse("attr",s.name+":"+u,this,e),f&&this.bindDirective(f));o&&"cloak"!==p&&e.removeAttribute(s.name)}}e.childNodes.length&&d.call(e.childNodes).forEach(this.compile,this)},x.compileTextNode=function(e){var t=h.parse(e.nodeValue);if(t){for(var i,n,r,s,o,c,u=0,f=t.length;f>u;u++)n=t[u],r=c=null,n.key?">"===n.key.charAt(0)?(o=n.key.slice(1).trim(),s=this.getOption("partials",o),s&&(i=s.cloneNode(!0),c=d.call(i.childNodes))):n.html?(i=document.createComment(a.prefix+"-html"),r=l.parse("html",n.key,this,i)):(i=document.createTextNode(""),r=l.parse("text",n.key,this,i)):i=document.createTextNode(n),e.parentNode.insertBefore(i,e),r&&this.bindDirective(r),c&&c.forEach(this.compile,this);e.parentNode.removeChild(e)}},x.bindDirective=function(e){if(this.dirs.push(e),e.isEmpty||!e._update)return void(e.bind&&e.bind());var t,i=this,n=e.key;if(e.isExp)t=i.createBinding(n,!0,e.isFn);else{for(;i&&!i.hasKey(n);)i=i.parentCompiler;i=i||this,t=i.bindings[n]||i.createBinding(n)}t.instances.push(e),e.binding=t,e.bind&&e.bind(),e.update(t.val(),!0)},x.createBinding=function(e,t,i){v(" created binding: "+e);var n=this,r=n.bindings,s=n.options.computed,a=new u(n,e,t,i);if(t)n.defineExp(e,a);else if(r[e]=a,a.root)s&&s[e]?n.defineComputed(e,a,s[e]):n.defineProp(e,a);else{o.ensurePath(n.data,e);var c=e.slice(0,e.lastIndexOf("."));r[c]||n.createBinding(c)}return a},x.defineProp=function(e,t){var i=this,n=i.data,r=n.__observer__;e in n||(n[e]=void 0),!r||e in r.values||o.convert(n,e),t.value=n[e],Object.defineProperty(i.vm,e,{get:function(){return i.data[e]},set:function(t){i.data[e]=t}})},x.defineExp=function(e,t){var i=p.parse(e,this);i&&(this.markComputed(t,i),this.exps.push(t))},x.defineComputed=function(e,t,i){this.markComputed(t,i);var n={get:t.value.$get,set:t.value.$set};Object.defineProperty(this.vm,e,n)},x.markComputed=function(e,t){e.isComputed=!0,e.isFn?e.value=t:("function"==typeof t&&(t={$get:t}),e.value={$get:c.bind(t.$get,this.vm),$set:t.$set?c.bind(t.$set,this.vm):void 0}),this.computed.push(e)},x.getOption=function(e,t){var i=this.options,n=this.parentCompiler;return i[e]&&i[e][t]||(n?n.getOption(e,t):c[e]&&c[e][t])},x.execHook=function(e){e="hook:"+e,this.observer.emit(e),this.emitter.emit(e)},x.hasKey=function(e){var t=e.split(".")[0];return y.call(this.data,t)||y.call(this.vm,t)},x.parseDeps=function(){this.computed.length&&f.parse(this.computed)},x.destroy=function(){if(!this.destroyed){var e,t,i,n,r,s=this,a=s.vm,c=s.el,u=s.dirs,l=s.exps,h=s.bindings;for(s.execHook("beforeDestroy"),o.unobserve(s.data,"",s.observer),e=u.length;e--;)i=u[e],i.binding&&i.binding.compiler!==s&&(n=i.binding.instances,n&&n.splice(n.indexOf(i),1)),i.unbind();for(e=l.length;e--;)l[e].unbind();for(t in h)r=h[t],r&&r.unbind();var f=s.parentCompiler,p=s.childId;f&&(f.childCompilers.splice(f.childCompilers.indexOf(s),1),p&&delete f.vm.$[p]),c===document.body?c.innerHTML="":a.$remove(),this.destroyed=!0,s.execHook("afterDestroy"),s.observer.off(),s.emitter.off()}},i.exports=n}),e.register("vue/src/viewmodel.js",function(e,t,i){function n(e){new o(this,e)}function r(e){return"string"==typeof e?document.querySelector(e):e}function s(e,t){var i=t[0],n=e.$compiler.bindings[i];return n?n.compiler.vm:null}var o=t("./compiler"),a=t("./utils"),c=t("./transition"),u=a.defProtected,l=a.nextTick,h=n.prototype;u(h,"$set",function(e,t){var i=e.split("."),n=s(this,i);if(n){for(var r=0,o=i.length-1;o>r;r++)n=n[i[r]];n[i[r]]=t}}),u(h,"$watch",function(e,t){function i(){var e=arguments;a.nextTick(function(){t.apply(n,e)})}var n=this;t._fn=i,n.$compiler.observer.on("change:"+e,i)}),u(h,"$unwatch",function(e,t){var i=["change:"+e],n=this.$compiler.observer;t&&i.push(t._fn),n.off.apply(n,i)}),u(h,"$destroy",function(){this.$compiler.destroy()}),u(h,"$broadcast",function(){for(var e,t=this.$compiler.childCompilers,i=t.length;i--;)e=t[i],e.emitter.emit.apply(e.emitter,arguments),e.vm.$broadcast.apply(e.vm,arguments)}),u(h,"$dispatch",function(){var e=this.$compiler,t=e.emitter,i=e.parentCompiler;t.emit.apply(t,arguments),i&&i.vm.$dispatch.apply(i.vm,arguments)}),["emit","on","off","once"].forEach(function(e){u(h,"$"+e,function(){var t=this.$compiler.emitter;t[e].apply(t,arguments)})}),u(h,"$appendTo",function(e,t){e=r(e);var i=this.$el;c(i,1,function(){e.appendChild(i),t&&l(t)},this.$compiler)}),u(h,"$remove",function(e){var t=this.$el,i=t.parentNode;i&&c(t,-1,function(){i.removeChild(t),e&&l(e)},this.$compiler)}),u(h,"$before",function(e,t){e=r(e);var i=this.$el,n=e.parentNode;n&&c(i,1,function(){n.insertBefore(i,e),t&&l(t)},this.$compiler)}),u(h,"$after",function(e,t){e=r(e);var i=this.$el,n=e.parentNode,s=e.nextSibling;n&&c(i,1,function(){s?n.insertBefore(i,s):n.appendChild(i),t&&l(t)},this.$compiler)}),i.exports=n}),e.register("vue/src/binding.js",function(e,t,i){function n(e,t,i,n){this.id=s++,this.value=void 0,this.isExp=!!i,this.isFn=n,this.root=!this.isExp&&-1===t.indexOf("."),this.compiler=e,this.key=t,this.instances=[],this.subs=[],this.deps=[],this.unbound=!1}var r=t("./batcher"),s=0,o=n.prototype;o.update=function(e){(!this.isComputed||this.isFn)&&(this.value=e),r.queue(this)},o._update=function(){for(var e=this.instances.length,t=this.val();e--;)this.instances[e].update(t);this.pub()},o.val=function(){return this.isComputed&&!this.isFn?this.value.$get():this.value},o.pub=function(){for(var e=this.subs.length;e--;)this.subs[e].update()},o.unbind=function(){this.unbound=!0;for(var e=this.instances.length;e--;)this.instances[e].unbind();e=this.deps.length;for(var t;e--;)t=this.deps[e].subs,t.splice(t.indexOf(this),1)},i.exports=n}),e.register("vue/src/observer.js",function(e,t,i){function n(e){if("function"==typeof e){for(var t=this.length,i=[];t--;)e(this[t])&&i.push(this.splice(t,1)[0]);return i.reverse()}return"number"!=typeof e&&(e=this.indexOf(e)),e>-1?this.splice(e,1)[0]:void 0}function r(e,t){if("function"==typeof e){for(var i,n=this.length,r=[];n--;)i=e(this[n]),void 0!==i&&r.push(this.splice(n,1,i)[0]);return r.reverse()}return"number"!=typeof e&&(e=this.indexOf(e)),e>-1?this.splice(e,1,t)[0]:void 0}function s(e){for(var t in e)a(e,t)}function o(e,t){var i=e.__observer__;if(i||(i=new v,b(e,"__observer__",i)),i.path=t,k)e.__proto__=C;else for(var n in C)b(e,n,C[n])}function a(e,t){var i=t.charAt(0);if("$"!==i&&"_"!==i||"$index"===t){var n=e.__observer__,r=n.values,s=r[t]=e[t];n.emit("set",t,s),Array.isArray(s)&&n.emit("set",t+".length",s.length),Object.defineProperty(e,t,{get:function(){var e=r[t];return $.shouldGet&&g(e)!==_&&n.emit("get",t),e},set:function(e){var i=r[t];p(i,t,n),r[t]=e,l(e,i),n.emit("set",t,e),f(e,t,n)}}),f(s,t,n)}}function c(e){d=d||t("./viewmodel");var i=g(e);return!(i!==_&&i!==x||e instanceof d)}function u(e){var t=g(e),i=e&&e.__observer__;if(t===x)i.emit("set","length",e.length);else if(t===_){var n,r;for(n in e)r=e[n],i.emit("set",n,r),u(r)}}function l(e,t){if(g(t)===_&&g(e)===_){var i,n,r,s;for(i in t)i in e||(r=t[i],n=g(r),n===_?(s=e[i]={},l(s,r)):e[i]=n===x?[]:void 0)}}function h(e,t){for(var i,n=t.split("."),r=0,s=n.length-1;s>r;r++)i=n[r],e[i]||(e[i]={},e.__observer__&&a(e,i)),e=e[i];g(e)===_&&(i=n[r],i in e||(e[i]=void 0,e.__observer__&&a(e,i)))}function f(e,t,i){if(c(e)){var n,r=t?t+".":"",a=!!e.__observer__;a||b(e,"__observer__",new v),n=e.__observer__,n.values=n.values||m.hash(),i.proxies=i.proxies||{};var l=i.proxies[r]={get:function(e){i.emit("get",r+e)},set:function(e,t){i.emit("set",r+e,t)},mutate:function(e,n,s){var o=e?r+e:t;i.emit("mutate",o,n,s);var a=s.method;"sort"!==a&&"reverse"!==a&&i.emit("set",o+".length",n.length)}};if(n.on("get",l.get).on("set",l.set).on("mutate",l.mutate),a)u(e);else{var h=g(e);h===_?s(e):h===x&&o(e)}}}function p(e,t,i){if(e&&e.__observer__){t=t?t+".":"";var n=i.proxies[t];n&&(e.__observer__.off("get",n.get).off("set",n.set).off("mutate",n.mutate),i.proxies[t]=null)}}var d,v=t("./emitter"),m=t("./utils"),g=m.typeOf,b=m.defProtected,y=Array.prototype.slice,_="Object",x="Array",w=["push","pop","shift","unshift","splice","sort","reverse"],k={}.__proto__,C=Object.create(Array.prototype);w.forEach(function(e){b(C,e,function(){var t=Array.prototype[e].apply(this,arguments);return this.__observer__.emit("mutate",this.__observer__.path,this,{method:e,args:y.call(arguments),result:t}),t},!k)}),b(C,"remove",n,!k),b(C,"set",r,!k),b(C,"replace",r,!k);var $=i.exports={shouldGet:!1,observe:f,unobserve:p,ensurePath:h,convert:a,copyPaths:l,watchArray:o}}),e.register("vue/src/directive.js",function(e,t,i){function n(e,t,i,n,o){this.compiler=n,this.vm=n.vm,this.el=o;var a=""===t;if("function"==typeof e)this[a?"bind":"_update"]=e;else for(var c in e)"unbind"===c||"update"===c?this["_"+c]=e[c]:this[c]=e[c];if(a)return void(this.isEmpty=!0);this.expression=t.trim(),this.rawKey=i,r(this,i),this.isExp=!v.test(this.key)||d.test(this.key);var u=this.expression.slice(i.length).match(f);if(u){this.filters=[];for(var l,h=0,p=u.length;p>h;h++)l=s(u[h],this.compiler),l&&this.filters.push(l);this.filters.length||(this.filters=null)}else this.filters=null}function r(e,t){var i=t;if(t.indexOf(":")>-1){var n=t.match(h);i=n?n[2].trim():i,e.arg=n?n[1].trim():null}e.key=i}function s(e,t){var i=e.slice(1).match(p);if(i){i=i.map(function(e){return e.replace(/'/g,"").trim()});var n=i[0],r=t.getOption("filters",n)||c[n];return r?{name:n,apply:r,args:i.length>1?i.slice(1):null}:void o.warn("Unknown filter: "+n)}}var o=t("./utils"),a=t("./directives"),c=t("./filters"),u=/(?:['"](?:\\.|[^'"])*['"]|\((?:\\.|[^\)])*\)|\\.|[^,])+/g,l=/^(?:['"](?:\\.|[^'"])*['"]|\\.|[^\|]|\|\|)+/,h=/^([\w-$ ]+):(.+)$/,f=/\|[^\|]+/g,p=/[^\s']+|'[^']+'/g,d=/^\$(parent|root)\./,v=/^[\w\.$]+$/,m=n.prototype;m.update=function(e,t){(t||e!==this.value)&&(this.value=e,this._update&&this._update(this.filters?this.applyFilters(e):e))},m.applyFilters=function(e){for(var t,i=e,n=0,r=this.filters.length;r>n;n++)t=this.filters[n],i=t.apply.call(this.vm,i,t.args);return i},m.unbind=function(){this.el&&this.vm&&(this._unbind&&this._unbind(),this.vm=this.el=this.binding=this.compiler=null)},n.split=function(e){return e.indexOf(",")>-1?e.match(u)||[""]:[e]},n.parse=function(e,t,i,r){var s=i.getOption("directives",e)||a[e];if(!s)return o.warn("unknown directive: "+e);var c;if(t.indexOf("|")>-1){var u=t.match(l);u&&(c=u[0].trim())}else c=t.trim();return c||""===t?new n(s,t,c,i,r):o.warn("invalid directive expression: "+t)},i.exports=n}),e.register("vue/src/exp-parser.js",function(e,t,i){function n(e){return e=e.replace(d,"").replace(v,",").replace(p,"").replace(m,"").replace(g,""),e?e.split(/,+/):[]}function r(e,t){for(var i="",n=0,r=t;t&&!t.hasKey(e);)t=t.parentCompiler,n++;if(t){for(;n--;)i+="$parent.";t.bindings[e]||"$"===e.charAt(0)||t.createBinding(e)}else r.createBinding(e);return i}function s(e,t){var i;try{i=new Function(e)}catch(n){a.warn("Invalid expression: "+t)}return i}function o(e){return"$"===e.charAt(0)?"\\"+e:e}var a=t("./utils"),c=/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/g,u=/"(\d+)"/g,l=new RegExp("constructor".split("").join("['\"+, ]*")),h=/\\u\d\d\d\d/,f="break,case,catch,continue,debugger,default,delete,do,else,false,finally,for,function,if,in,instanceof,new,null,return,switch,this,throw,true,try,typeof,var,void,while,with,undefined,abstract,boolean,byte,char,class,const,double,enum,export,extends,final,float,goto,implements,import,int,interface,long,native,package,private,protected,public,short,static,super,synchronized,throws,transient,volatile,arguments,let,yield,Math",p=new RegExp(["\\b"+f.replace(/,/g,"\\b|\\b")+"\\b"].join("|"),"g"),d=/\/\*(?:.|\n)*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|'[^']*'|"[^"]*"|[\s\t\n]*\.[\s\t\n]*[$\w\.]+/g,v=/[^\w$]+/g,m=/\b\d[^,]*/g,g=/^,+|,+$/g;i.exports={parse:function(e,t){function i(e){var t=g.length;return g[t]=e,'"'+t+'"'}function f(e){var i=e.charAt(0);e=e.slice(1);var n="this."+r(e,t)+e;return m[e]||(v+=n+";",m[e]=1),i+n}function p(e,t){return g[t]}if(h.test(e)||l.test(e))return a.warn("Unsafe expression: "+e),function(){};var d=n(e);if(!d.length)return s("return "+e,e);d=a.unique(d);var v="",m=a.hash(),g=[],b=new RegExp("[^$\\w\\.]("+d.map(o).join("|")+")[$\\w\\.]*\\b","g"),y=("return "+e).replace(c,i).replace(b,f).replace(u,p);return y=v+y,s(y,e)}}}),e.register("vue/src/text-parser.js",function(e){function t(e){if(!n.test(e))return null;for(var t,i,s,o=[];t=e.match(n);)i=t.index,i>0&&o.push(e.slice(0,i)),s={key:t[1].trim()},r.test(t[0])&&(s.html=!0),o.push(s),e=e.slice(i+t[0].length);return e.length&&o.push(e),o}function i(e){var i=t(e);if(!i)return null;for(var n,r=[],s=0,o=i.length;o>s;s++)n=i[s],r.push(n.key||'"'+n+'"');return r.join("+")}var n=/{{{?([^{}]+?)}?}}/,r=/{{{[^{}]+}}}/;e.parse=t,e.parseAttr=i}),e.register("vue/src/deps-parser.js",function(e,t,i){function n(e){if(!e.isFn){s.log("\n- "+e.key);var t=s.hash();e.deps=[],a.on("get",function(i){var n=t[i.key];n&&n.compiler===i.compiler||(t[i.key]=i,s.log(" - "+i.key),e.deps.push(i),i.subs.push(e))}),e.value.$get(),a.off("get")}}var r=t("./emitter"),s=t("./utils"),o=t("./observer"),a=new r;i.exports={catcher:a,parse:function(e){s.log("\nparsing dependencies..."),o.shouldGet=!0,e.forEach(n),o.shouldGet=!1,s.log("\ndone.")}}}),e.register("vue/src/filters.js",function(e,t,i){var n={enter:13,tab:9,"delete":46,up:38,left:37,right:39,down:40,esc:27};i.exports={capitalize:function(e){return e||0===e?(e=e.toString(),e.charAt(0).toUpperCase()+e.slice(1)):""},uppercase:function(e){return e||0===e?e.toString().toUpperCase():""},lowercase:function(e){return e||0===e?e.toString().toLowerCase():""},currency:function(e,t){if(!e&&0!==e)return"";var i=t&&t[0]||"$",n=Math.floor(e).toString(),r=n.length%3,s=r>0?n.slice(0,r)+(n.length>3?",":""):"",o="."+e.toFixed(2).slice(-2);return i+s+n.slice(r).replace(/(\d{3})(?=\d)/g,"$1,")+o},pluralize:function(e,t){return t.length>1?t[e-1]||t[t.length-1]:t[e-1]||t[0]+"s"},key:function(e,t){if(e){var i=n[t[0]];return i||(i=parseInt(t[0],10)),function(t){t.keyCode===i&&e.call(this,t)}}}}}),e.register("vue/src/transition.js",function(e,t,i){function n(e,t,i){if(!o)return i(),c.CSS_SKIP;var n=e.classList,r=e.vue_trans_cb;if(t>0){r&&(e.removeEventListener(o,r),e.vue_trans_cb=null),n.add(a.enterClass),i();{e.clientHeight}return n.remove(a.enterClass),c.CSS_E}n.add(a.leaveClass);var s=function(t){t.target===e&&(e.removeEventListener(o,s),e.vue_trans_cb=null,i(),n.remove(a.leaveClass))};return e.addEventListener(o,s),e.vue_trans_cb=s,c.CSS_L}function r(e,t,i,n,r){var s=r.getOption("transitions",n);if(!s)return i(),c.JS_SKIP;var o=s.enter,a=s.leave;return t>0?"function"!=typeof o?(i(),c.JS_SKIP_E):(o(e,i),c.JS_E):"function"!=typeof a?(i(),c.JS_SKIP_L):(a(e,i),c.JS_L)}function s(){var e=document.createElement("vue"),t="transitionend",i={transition:t,mozTransition:t,webkitTransition:"webkitTransitionEnd"};for(var n in i)if(void 0!==e.style[n])return i[n]}var o=s(),a=t("./config"),c={CSS_E:1,CSS_L:2,JS_E:3,JS_L:4,CSS_SKIP:-1,JS_SKIP:-2,JS_SKIP_E:-3,JS_SKIP_L:-4,INIT:-5,SKIP:-6},u=i.exports=function(e,t,i,s){var o=function(){i(),s.execHook(t>0?"enteredView":"leftView")};if(s.init)return o(),c.INIT;var a=e.vue_trans;return a?r(e,t,o,a,s):""===a?n(e,t,o):(o(),c.SKIP)};u.codes=c}),e.register("vue/src/batcher.js",function(e,t){function i(){for(var e=0;et;t++)this.buildItem(e.args[t],n+t)},pop:function(){var e=this.vms.pop();e&&e.$destroy()},unshift:function(e){e.args.forEach(this.buildItem,this)},shift:function(){var e=this.vms.shift();e&&e.$destroy()},splice:function(e){var t,i,n=e.args[0],r=e.args[1],s=e.args.length-2,o=this.vms.splice(n,r);for(t=0,i=o.length;i>t;t++)o[t].$destroy();for(t=0;s>t;t++)this.buildItem(e.args[t+2],n+t)},sort:function(){var e,t,i,n,r=this.vms,s=this.collection,o=s.length,a=new Array(o);for(e=0;o>e;e++)for(n=s[e],t=0;o>t;t++)if(i=r[t],i.$data===n){a[e]=i;break}for(e=0;o>e;e++)this.container.insertBefore(a[e].$el,this.ref);this.vms=a},reverse:function(){var e=this.vms;e.reverse();for(var t=0,i=e.length;i>t;t++)this.container.insertBefore(e[t].$el,this.ref)}};i.exports={bind:function(){var e=this.el,i=this.container=e.parentNode;n=n||t("../viewmodel"),this.Ctor=this.Ctor||n,this.hasTrans=e.hasAttribute(a.attrs.transition),this.childId=o.attr(e,"component-id"),this.ref=document.createComment(a.prefix+"-repeat-"+this.key),i.insertBefore(this.ref,e),i.removeChild(e),this.initiated=!1,this.collection=null,this.vms=null;var r=this;this.mutationListener=function(e,t,i){var n=i.method;u[n].call(r,i),"push"!==n&&"pop"!==n&&r.updateIndex(),("push"===n||"unshift"===n||"splice"===n)&&r.changed()}},update:function(e,t){this.reset(),this.container.vue_dHandlers=o.hash(),this.initiated||e&&e.length||(this.buildItem(),this.initiated=!0),e=this.collection=e||[],this.vms=[],this.childId&&(this.vm.$[this.childId]=this.vms),e.__observer__||r.watchArray(e,null,new s),e.__observer__.on("mutate",this.mutationListener),e.length&&(e.forEach(this.buildItem,this),t||this.changed())},changed:function(){if(!this.queued){this.queued=!0;var e=this;setTimeout(function(){e.compiler.parseDeps(),e.queued=!1},0)}},buildItem:function(e,t){var i,n,r,s=this.el.cloneNode(!0),a=this.container,u=this.vms,l=this.collection;e&&(i=u.length>t?u[t].$el:this.ref,i.parentNode||(i=i.vue_ref),s.vue_trans=o.attr(s,"transition",!0),c(s,1,function(){a.insertBefore(s,i)},this.compiler),"Object"!==o.typeOf(e)&&(r=!0,e={value:e})),n=new this.Ctor({el:s,data:e,compilerOptions:{repeat:!0,repeatIndex:t,parentCompiler:this.compiler,delegator:a}}),e?(u.splice(t,0,n),r&&e.__observer__.on("set",function(e,t){"value"===e&&(l[n.$index]=t)})):n.$destroy()},updateIndex:function(){for(var e=this.vms.length;e--;)this.vms[e].$data.$index=e},reset:function(){if(this.childId&&delete this.vm.$[this.childId],this.collection){this.collection.__observer__.off("mutate",this.mutationListener);for(var e=this.vms.length;e--;)this.vms[e].$destroy()}var t=this.container,i=t.vue_dHandlers;for(var n in i)t.removeEventListener(i[n].event,i[n]);t.vue_dHandlers=null},unbind:function(){this.reset()}}}),e.register("vue/src/directives/on.js",function(e,t,i){function n(e,t,i){for(;e&&e!==t;){if(e[i])return e;e=e.parentNode}}var r=t("../utils");i.exports={isFn:!0,bind:function(){this.compiler.repeat&&(this.el[this.expression]=!0,this.el.vue_viewmodel=this.vm)},update:function(e){if(this.reset(),"function"!=typeof e)return r.warn('Directive "on" expects a function value.');var t=this.compiler,i=this.arg,s=this.binding.isExp,o=this.binding.compiler.vm;if(t.repeat&&!this.vm.constructor.super&&"blur"!==i&&"focus"!==i){var a=t.delegator,c=this.expression,u=a.vue_dHandlers[c];if(u)return;u=a.vue_dHandlers[c]=function(t){var i=n(t.target,a,c);i&&(t.el=i,t.targetVM=i.vue_viewmodel,e.call(s?t.targetVM:o,t))},u.event=i,a.addEventListener(i,u)}else{var l=this.vm;this.handler=function(t){t.el=t.currentTarget,t.targetVM=l,e.call(o,t)},this.el.addEventListener(i,this.handler)}},reset:function(){this.el.removeEventListener(this.arg,this.handler),this.handler=null},unbind:function(){this.reset(),this.el.vue_viewmodel=null}}}),e.register("vue/src/directives/model.js",function(e,t,i){function n(e){return Array.prototype.filter.call(e.options,function(e){return e.selected}).map(function(e){return e.value||e.text})}var r=t("../utils"),s=navigator.userAgent.indexOf("MSIE 9.0")>0;i.exports={bind:function(){var e=this,t=e.el,i=t.type,n=t.tagName;e.lock=!1,e.event=e.compiler.options.lazy||"SELECT"===n||"checkbox"===i||"radio"===i?"change":"input",e.attr="checkbox"===i?"checked":"INPUT"===n||"SELECT"===n||"TEXTAREA"===n?"value":"innerHTML","SELECT"===n&&t.hasAttribute("multiple")&&(this.multi=!0);var o=!1;e.cLock=function(){o=!0},e.cUnlock=function(){o=!1},t.addEventListener("compositionstart",this.cLock),t.addEventListener("compositionend",this.cUnlock),e.set=e.filters?function(){if(!o){var i;try{i=t.selectionStart}catch(n){}e._set(),r.nextTick(function(){void 0!==i&&t.setSelectionRange(i,i)})}}:function(){o||(e.lock=!0,e._set(),r.nextTick(function(){e.lock=!1}))},t.addEventListener(e.event,e.set),s&&(e.onCut=function(){r.nextTick(function(){e.set() +})},e.onDel=function(t){(46===t.keyCode||8===t.keyCode)&&e.set()},t.addEventListener("cut",e.onCut),t.addEventListener("keyup",e.onDel))},_set:function(){this.vm.$set(this.key,this.multi?n(this.el):this.el[this.attr])},update:function(e){if(!this.lock){var t=this.el;"SELECT"===t.tagName?(t.selectedIndex=-1,this.multi&&Array.isArray(e)?e.forEach(this.updateSelect,this):this.updateSelect(e)):"radio"===t.type?t.checked=e==t.value:"checkbox"===t.type?t.checked=!!e:t[this.attr]=r.toText(e)}},updateSelect:function(e){for(var t=this.el.options,i=t.length;i--;)if(t[i].value==e){t[i].selected=!0;break}},unbind:function(){var e=this.el;e.removeEventListener(this.event,this.set),e.removeEventListener("compositionstart",this.cLock),e.removeEventListener("compositionend",this.cUnlock),s&&(e.removeEventListener("cut",this.onCut),e.removeEventListener("keyup",this.onDel))}}}),e.register("vue/src/directives/with.js",function(e,t,i){var n;i.exports={bind:function(){this.isEmpty&&this.build()},update:function(e){this.component?this.component.$data=e:this.build(e)},build:function(e){n=n||t("../viewmodel");var i=this.Ctor||n;this.component=new i({el:this.el,data:e,compilerOptions:{parentCompiler:this.compiler}})},unbind:function(){this.component.$destroy()}}}),e.register("vue/src/directives/html.js",function(e,t,i){var n=t("../utils").toText,r=Array.prototype.slice;i.exports={bind:function(){8===this.el.nodeType&&(this.holder=document.createElement("div"),this.nodes=[])},update:function(e){e=n(e),this.holder?this.swap(e):this.el.innerHTML=e},swap:function(e){for(var t,i=this.el.parentNode,n=this.holder,s=this.nodes,o=s.length;o--;)i.removeChild(s[o]);for(n.innerHTML=e,s=this.nodes=r.call(n.childNodes),o=0,t=s.length;t>o;o++)i.insertBefore(s[o],this.el)}}}),e.register("vue/src/directives/style.js",function(e,t,i){function n(e){return e[1].toUpperCase()}var r=/-([a-z])/g,s=["webkit","moz","ms"];i.exports={bind:function(){var e=this.arg,t=e.charAt(0);"$"===t?(e=e.slice(1),this.prefixed=!0):"-"===t&&(e=e.slice(1)),this.prop=e.replace(r,n)},update:function(e){var t=this.prop;if(this.el.style[t]=e,this.prefixed){t=t.charAt(0).toUpperCase()+t.slice(1);for(var i=s.length;i--;)this.el.style[s[i]+t]=e}}}}),e.alias("component-emitter/index.js","vue/deps/emitter/index.js"),e.alias("component-emitter/index.js","emitter/index.js"),e.alias("vue/src/main.js","vue/index.js"),"object"==typeof exports?module.exports=e("vue"):"function"==typeof define&&define.amd?define(function(){return e("vue")}):window.Vue=e("vue")}(); \ No newline at end of file diff --git a/src/directives/index.js b/src/directives/index.js index df33379c943..2c6740db493 100644 --- a/src/directives/index.js +++ b/src/directives/index.js @@ -51,8 +51,8 @@ module.exports = { bind: function () { var el = this.el this.compiler.observer.once('hook:ready', function () { - el.removeAttribute(config.prefix + '-cloak') - }) + el.removeAttribute(config.prefix + '-cloak') + }) } }