hg-sid
Version:
a front-end simple framework with mvc
1 lines • 25.6 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.sid=e():t.sid=e()}(this,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=13)}([function(t,e,n){"use strict";function r(t,e){return t===e||!(!o(t)||!o(e))&&JSON.stringify(t)===JSON.stringify(e)}function o(t){return null!==t&&"object"==typeof t}Object.defineProperty(e,"__esModule",{value:!0}),e.def=function(t,e,n,r){Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0,enumerable:!!r})},e.proxy=function(t,e,n){var r={enumerable:!0,configurable:!0,get:function(){},set:function(t){}};r.get=function(){return this[e][n]},r.set=function(t){this[e][n]=t},Object.defineProperty(t,n,r)},e.remove=function(t,e){t.some(function(n,r){if(e.id===n.id)return t.splice(r,1),!0})},e.noop=function(){},e.empty=function(){return{}},e.looseEqual=r,e.isObject=o,e.isEmpty=function(t){return null==t||"{}"===JSON.stringify(t)||"[]"===JSON.stringify(t)},e.looseIndexOf=function(t,e){for(var n=0;n<t.length;n++)if(r(t[n],e))return n;return-1}},function(t,e,n){"use strict";n.d(e,"b",function(){return o}),n.d(e,"a",function(){return i}),n.d(e,"d",function(){return s}),n.d(e,"c",function(){return c}),n.d(e,"e",function(){return a});var r=function(t){return Object.prototype.toString.call(t).replace(/\[object\s|\]/g,"")},o=function(t){return"Object"===r(t)},i=function(t){return"Array"===r(t)},s=function(t){return"String"===r(t)},c=function(t){return"String"===r(t)||"Number"===r(t)},a=function(t){for(var e=[],n=0,r=t.length;n<r;n++)e.push(t[n]);return e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),o=/[^\w.$]/;function i(t,e){return!!t.some(function(t){if(e.id===t.id)return!0})}var s=0,c=function(){function t(t,e,n){this.id=s++,this.obj=t,this.callback=n,this.deps=[],this.newDeps=[],"function"==typeof e?this.getter=e:(this.getter=function(t){if(!o.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}(e),this.getter||(this.getter=function(){})),this.value=this.get()}return t.prototype.get=function(){r.pushTarget(this);var t=this.getter.call(this.obj,this.obj);return r.popTarget(),this.cleanupDeps(),t},t.prototype.update=function(){var t=this.get();if(t!==this.value){var e=this.value;this.value=t,this.callback.call(this.obj,t,e)}},t.prototype.addDep=function(t){i(this.newDeps,t)||(this.newDeps.push(t),i(this.deps,t)||t.addWatcher(this))},t.prototype.cleanupDeps=function(){var t=this;this.deps.forEach(function(e){i(t.newDeps,e)||e.removeWatcher(t)});var e=this.deps;this.deps=this.newDeps,this.newDeps=e,this.newDeps.length=0},t.prototype.teardown=function(){for(var t=this.deps.length;t--;)this.deps[t].removeWatcher(this);this.deps=[]},t}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(9);function i(t){var e=t.computed;for(var n in e)"function"==typeof e[n]&&(t.computed[n]={get:e[n],set:r.noop})}function s(t){if(t.props){var e=t.props,n={};if(Array.isArray(e))e.forEach(function(t){n[t]={type:null}});else for(var r in e)n[r]=Object.assign({type:null},e[r]);t.props=n}}function c(t,e){void 0!==t[e]?Array.isArray(t[e])||(t[e]=[t[e]]):t[e]=[]}e.mergeOptions=function(t,e){void 0===t&&(t={}),void 0===e&&(e={}),i(t),i(e),s(e);var n=Object.assign({},t,e);return o.LIFECYCLE_HOOK.forEach(function(r){c(e,r),c(t,r),n[r]=t[r].concat(e[r])}),n.data=function(t,e){return void 0===t&&(t=r.empty),void 0===e&&(e=r.empty),function(){return Object.assign(t.call(this),e.call(this))}}(t.data,e.data),n.methods=Object.assign(t.methods||{},e.methods||{}),n.watch=function(t,e){void 0===t&&(t={}),void 0===e&&(e={});var n=Object.assign({},t);for(var r in e){var o=n[r],i=e[r];o&&!Array.isArray(o)&&(o=[o]),n[r]=o?o.concat(i):Array.isArray(i)?i:[i]}return n}(t.watch,e.watch),n.computed=Object.assign(t.computed||{},e.computed||{}),n},e.normalizeComputed=i,e.normalizeProp=s,e.normalizeLifecycle=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),o=n(17),i=n(0);function s(t,e){t.__proto__=e}function c(t,e,n){for(var r=0;r<n.length;r++)i.def(t,n[r],e[n[r]])}function a(t,e,n){var o=new r.default,i=f(n);Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){return r.default.target&&(o.depend(),i&&(i.dep.depend(),Array.isArray(n)&&function t(e){for(var n=void 0,r=0,o=e.length;r<o;r++)(n=e[r])&&n.__ob__&&n.__ob__.dep.depend(),Array.isArray(n)&&t(n)}(n))),n},set:function(t){t!==n&&(n=t,o.notify())}})}var u=function(){function t(t){(this.value=t,this.dep=new r.default,i.def(t,"__ob__",this),Array.isArray(t))?(("__proto__"in{}?s:c)(t,o.arrayMethods,Object.keys(o.arrayMethods)),this.observeArray(t)):this.walk(t)}return t.prototype.walk=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)a(t,e[n],t[e[n]])},t.prototype.observeArray=function(t){for(var e=0,n=t.length;e<n;e++)f(t[e])},t}();function f(t){var e;if("object"==typeof t)return t.hasOwnProperty("__ob__")&&t.__ob__ instanceof u?e=t.__ob__:Object.isExtensible(t)&&(e=new u(t)),e}e.default=f},function(t,e,n){"use strict";var r=n(26),o=n(27),i=n(29),s=n(11);n.d(e,"c",function(){return r.a}),n.d(e,"b",function(){return o.a}),n.d(e,"d",function(){return i.a}),n.d(e,"a",function(){return s.a})},function(t,e,n){"use strict";var r=function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tagName=e,this.children=r,this.key=void 0,n.hasOwnProperty("key")&&(this.key=n.key),this.properties=n;var o=0;this.children.forEach(function(e){e instanceof t&&(o+=e.count),o++}),this.count=o};r.prototype.$type="VNode",e.a=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(14),o=n(20),i=n(4);e.observe=i.default;var s=n(2);e.Watcher=s.default,o.initClassApi(r.default),e.default=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=0,i=function(){function t(){this.id=o++,this.watchers=[]}return t.prototype.addWatcher=function(t){this.watchers.push(t)},t.prototype.removeWatcher=function(t){r.remove(this.watchers,t)},t.prototype.depend=function(){t.target&&t.target.addDep(this)},t.prototype.notify=function(){this.watchers.forEach(function(t){t.update()})},t}();e.default=i;var s=[];e.pushTarget=function(t){i.target&&s.push(i.target),i.target=t},e.popTarget=function(){i.target=s.pop()}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LIFECYCLE_HOOK=["beforeCreate","created","beforeDestroy","destroyed"],e.callHook=function(t,e){var n=t.$options[e];if(n)for(var r=0,o=n.length;r<o;r++)n[r].call(t)}},function(t,e,n){"use strict";e.a=function(t,e,n){if(void 0===n)!function(t,e){i(e)?t[e]=null:o(e)?t.removeAttribute("class"):t.removeAttribute(e)}(t,e);else if("style"===e)if(Object(r.b)(n))for(var s in n)t.style[s]=n[s];else t.style.cssText=n;else if("value"===e){var c=t.tagName;"INPUT"===c||"TEXTAREA"===c?t.value=n:t.setAttribute(e,n)}else if(o(e)){var a=n.trim().split(" ");!function(t){for(var e=[],n=0;n<t.classList.length;n++)e.push(t.classList.item(n));e.forEach(function(e){t.classList.remove(e)})}(t),a.forEach(function(e){t.classList.add(e)})}else i(e)?t[e]=n:t.setAttribute(e,n)};var r=n(1);function o(t){return/^(className|class)$/.test(t)}function i(t){return/^on[A-Za-z]/.test(t)}},function(t,e,n){"use strict";var r=n(10),o=n(6);e.a=function t(e){var n=document.createElement(e.tagName),i=e.properties;for(var s in i)Object(r.a)(n,s,i[s]);return e.children.map(function(e){if(e){var r=e instanceof o.a?t(e):document.createTextNode(e);n.appendChild(r)}}),n}},function(t,e,n){"use strict";e.b=r;function r(t,e){let n={};if("string"==typeof t||void 0===t.name){for(let r of e)if(r.path===t||r.path===t.path){n=r;break}}else for(let r of e)if(r.name===t.name){n=r,t.query&&(n.query=t.query);break}return n}e.a=class{constructor(t){this.router=t,this.current={path:"/",query:{},name:"",fullPath:"/",route:{}}}transitionTo(t,e){const n=r(t,this.router.routes);this.transitionHook(n,()=>{this.current.route=n,this.current.name=n.name,this.current.path=n.path,this.current.query=n.query||function(){const t=location.hash,e=-1!==t.indexOf("?")?t.substring(t.indexOf("?")+1):"";let n={};return(e?e.split("&"):[]).forEach(t=>{let e=t.split("=");n[e[0]]=e[1]}),n}(),this.current.fullPath=function({path:t,query:e={},hash:n=""}){return(t||"/")+function(t){const e=t?Object.keys(t).map(e=>{const n=t[e];if(void 0===n)return"";if(null===n)return e;if(Array.isArray(n)){const t=[];return n.forEach(n=>{void 0!==n&&(null===n?t.push(e):t.push(e+"="+n))}),t.join("&")}return e+"="+n}).filter(t=>t.length>0).join("&"):null;return e?`?${e}`:""}(e)+n}(this.current),e&&e()})}transitionHook(t,e){let n=[].concat(this.router.beforeEach,this.current.route.beforeLeave,t.beforeEnter,this.router.afterEach),r=-1;const o=()=>{++r>n.length?e():n[r]?n[r](o):o()};o(r)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7),o=n.n(r),i=n(24),s=n(31);n.d(e,"Router",function(){return s.a}),o.a.use(i.a),e.default=o.a},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(e,"__esModule",{value:!0});var o=n(15),i=n(2),s=n(3),c=n(0),a=n(16),u=n(9),f=n(19),p=0,h=function(){function t(t){this.id=p++,this._init(t),this.active=!0}return t,t.prototype._init=function(t){var e=this;e.$children=[],e._watchers=[];var n=e.constructor;e.$options=s.mergeOptions(n.options,t);var r=e.$options.parent;r&&(r.$children.push(e),e.$parent=r),u.callHook(e,"beforeCreate"),a.default(e),u.callHook(e,"created"),f.default(e)},t.prototype.$updateProps=function(t){if(!c.isEmpty(t)){for(var e in this.$options.props){var n=t[e];n||(n=this.$options.props[e].default),c.looseEqual(this[e],n)||(this[e]=n)}}},t.prototype.$addChild=function(t,e){void 0===e&&(e={});var n=new t({parent:this,propsData:e}),r=function(t){var r=t;if(":"===t.charAt(0)&&(r=t.substr(1)),!n.$options.props[r])return"continue";":"===t.charAt(0)?new i.default(o,e[t],function(t,e){n[r]=t}):n[r]=e[t]},o=this;for(var s in e)r(s);return n},t.prototype.$watch=function(t,e){var n=new i.default(this,t,e);return this._watchers.push(n),function(){n.teardown()}},t.prototype.$destroy=function(){if(this.active){var t=this;u.callHook(t,"beforeDestroy");var e=t.$parent;for(e.$children.splice(e.$children.indexOf(t),1),t.$parent=null;t._watchers.length;)t._watchers.shift().teardown();for(;t._computed.length;)t._computed.shift().teardown();for(t.$off();0!==t.$children.length;){t.$children.pop().$destroy()}u.callHook(t,"destroyed"),this.active=!1}},t=r([o.default],t)}();e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.prototype;e._events={},e.$on=function(t,e){var n,r=this;return Array.isArray(t)?t.forEach(function(t){return r.$on(t,e)}):(Array.isArray(e)||(e=[e]),(n=this._events[t]||(this._events[t]=[])).push.apply(n,e)),this},e.$once=function(t,e){var n=this;return n.$on(t,function r(){n.$off(t,r),e.apply(n,arguments)}),n},e.$off=function(t,e){var n=this;if(!arguments.length)return this._events={},this;if(Array.isArray(t))return t.forEach(function(t){return n.$off(t,e)}),this;var r=this._events[t];if(!r)return this;if(!e)return this._events[t]=null,this;if(e){var o=void 0,i=r.length;if(Array.isArray(e))return void e.forEach(function(e){return n.$off(t,e)});for(;i--;)if((o=r[i])===e||o.fn===e){r.splice(i,1);break}}return this},e.$emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=this,o=r._events[t];return o&&o.forEach(function(t){return t.apply(r,e)}),r}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4),o=n(2),i=n(18),s=n(0);e.default=function(t){var e=t.$options;e.data&&function(t){var e=t._data=t.$options.data?t.$options.data.call(t):{};for(var n in r.default(e),t._data)s.proxy(t,"_data",n)}(t),e.props&&function(t){var e=t._props={},n=t.$options.propsData||{};for(var i in t.$options.props){var c=n[i];c||(c=t.$options.props[i].default),e[i]=c}r.default(e);var a=function(e){s.proxy(t,"_props",e),new o.default(t.$parent,e,function(n){t[e]=n})};for(var i in t._props)a(i)}(t),e.watch&&function(t){var e=function(e){var n=new o.default(t,function(){return e.split(".").reduce(function(t,e){return t[e]},t)},function(n,r){t.$options.watch[e].forEach(function(t){return t(n,r)})});t._watchers.push(n)};for(var n in t.$options.watch)e(n)}(t),e.computed&&function(t){var e=t._computed={};for(var n in t.$options.computed)e[n]=new i.default(t,n,t.$options.computed[n]).value;for(var n in r.default(e),t._computed)s.proxy(t,"_computed",n)}(t),e.methods&&function(t){for(var e in t.$options.methods)t[e]=t.$options.methods[e].bind(t),t.$on(e,t[e])}(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=Array.prototype;e.arrayMethods=Object.create(o);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(t){var n=o[t];r.def(e.arrayMethods,t,function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o,i=n.apply(this,e),s=this.__ob__;switch(t){case"push":case"unshift":o=e;break;case"splice":o=e.slice(2)}return o&&s.observeArray(o),s.dep.notify(),i})}),e.arrayMethods.$apply=function(){this.__ob__.observeArray(this),this.__ob__.dep.notify()}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),o=n(0),i=0,s=function(){function t(t,e,n){this.id=i++,this.key=e,this.option=n,this.dd=t,this.active=!0,this.watch=null,this.value=null,this._init()}return t.prototype._init=function(){var t=this;this.watch=new r.default(this.dd,this.option.get||o.noop,function(e){t.dd[t.key]=e}),this.value=this.watch.value},t.prototype.teardown=function(){this.active&&this.watch.teardown()},t}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){t.$parent&&(t.$innerEmit=t.$emit,t.$emit=function(e){for(var n,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];(n=t.$parent).$emit.apply(n,[e].concat(r)),t.$innerEmit.apply(t,[t,e].concat(r))})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(21),o=n(22),i=n(23);e.initClassApi=function(t){t.options={},r.initExtend(t),i.initMixin(t),o.initUse(t)}},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(3);e.initExtend=function(t){t.cid=0;var e=1;t.extend=function(t){void 0===t&&(t={});var n=function(t){function e(e){return t.call(this,e)||this}return r(e,t),e}(this);return n.cid=e++,n.options=o.mergeOptions(this.options,t),n.extend=this.extend,n.mixin=this.mixin,n.use=this.use,n}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initUse=function(t){t.use=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(!e.installed)return"function"==typeof e.install?e.install.apply(e,[t].concat(n)):e.apply(null,[t].concat(n)),e.installed=!0,this}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3);e.initMixin=function(t){t.mixin=function(t){return this.options=r.mergeOptions(this.options,t),this}}},function(t,e,n){"use strict";var r=n(25),o=n(30),i=n(5);e.a={install:function(t){t.$mount=function(t,e){var n=e.$getVTmpTree();e.$patch(n),t.appendChild(e.$el)},t.prototype.render=function(){return this.$options.render.call(this,this.$h.bind(this))},t.prototype.$h=function(t,e){for(var n=arguments.length,o=Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];return r.a.apply(void 0,[this,t,e].concat(o))},t.prototype.$getVTmpTree=function(t){var e=this,n=null;return this.$watch(function(){return n=e.render.call(e)},function(t){e.$patch(t)}),n},t.prototype.$patch=function(t){var e=Object(o.a)(t,this.$vTmpTree);if(this.$vDomTree){var n=Object(i.b)(this.$vDomTree,e);this.$el=Object(i.d)(this.$el,n)}else this.$el=Object(i.a)(e);this.$vTmpTree=t,this.$vDomTree=e,this.$initDOMBind(this.$el,t)},t.prototype.$initDOMBind=function(t,e){var n=this;e.children&&0!==e.children.length&&e.children.forEach(function(e,r){e._constructor?(e.component.$el=t.childNodes[r],n.$initDOMBind(t.childNodes[r],e.component.$vTmpTree)):n.$initDOMBind(t.childNodes[r],e)})}}}},function(t,e,n){"use strict";e.a=function(t,e,n){for(var r=arguments.length,c=Array(r>3?r-3:0),a=3;a<r;a++)c[a-3]=arguments[a];if("function"==typeof e||"object"===(void 0===e?"undefined":s(e))){var u=new i.c;return u.tagName="component-"+e.cid,u.properties=n,u.children=c,u.parent=t,u._constructor="function"==typeof e?e:o.a.extend(e),u}return Object(i.c)(e,n,c)};var r=n(7),o=n.n(r),i=n(5),s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}},function(t,e,n){"use strict";var r=n(1),o=n(6);function i(t){return t.trim().replace(/\s+/g," ")}e.a=function(t,e,n){var s=[],c=t,a=void 0,u=void 0;return Object(r.a)(e)?(a={},u=e):(a=e||{},u=n||[]),c&&(c=function(t){return i(t.toUpperCase())}(c)),a=function(t){for(var e in t){var n=t[e];Object(r.c)(n)&&(t[e]=i(String(n)))}return t}(a),u.length>0&&function t(e,n,i,s){if(Object(r.c)(e))n.push(String(e));else if(e instanceof o.a)n.push(e);else{if(!Object(r.a)(e))throw Error(e+" is a unexpected virtual dom node");for(var c=0;c<e.length;c++)t(e[c],n,i,s)}}(u,s,c,a),new o.a(c,a,s)}},function(t,e,n){"use strict";var r=n(28),o=n(1),i={REPLACE:0,REORDER:1,PROPS:2,TEXT:3};function s(t,e,n,c){var a=[];if(null===e);else if(Object(o.d)(t)&&Object(o.d)(e))e!==t&&a.push({type:i.TEXT,text:e});else if(t.tagName===e.tagName&&t.key===e.key){var u=function(t,e){var n,r=0,o=t.properties,i=e.properties,s={};for(n in o)i[n]!==o[n]&&(s[n]=i[n],r++);for(n in i)o.hasOwnProperty(n)||(s[n]=i[n],r++);return 0===r?null:s}(t,e);u&&a.push({type:i.PROPS,props:u}),function(t,e,n,o,c){var a=Object(r.a)(t,e,"key");if(e=a.children,a.moves.length){var u={type:i.REORDER,moves:a.moves};c.push(u)}var f=null,p=n;t.forEach(function(t,n){var r=e[n];p=f&&f.count?p+f.count+1:p+1,s(t,r,p,o),f=t})}(t.children,e.children,n,c,a)}else a.push({type:i.REPLACE,node:e});a.length&&(c[n]=a)}e.a=function(t,e){var n={};return s(t,e,0,n),n}},function(t,e,n){"use strict";e.a=function(t,e,n){var s,c,a=o(t,n),u=o(e,n),f=u.free,p=[],h=[],l=0,d=0,v=a.keyIndex,y=u.keyIndex;for(;l<t.length;){if(s=t[l],c=i(s,n))if(y.hasOwnProperty(c)){var b=y[c];h.push(e[b])}else h.push(null);else{var m=f[d++];h.push(m||null)}l++}var g=0,_=h.slice(0);l=0;for(;l<_.length;)null===_[l]?(T(l),A(l),g--):l++;var O=l=0;for(;l<e.length;){s=e[l],c=i(s,n);var w=_[O],$=i(w,n);if(w)if(Object(r.c)(s)&&s!==w)E(l,s),g++;else if(c===$)O++;else if(v.hasOwnProperty(c)){var j=i(_[O+1],n);j===c?(T(l),A(O),g--,O++):(E(l,s),g++)}else E(l,s),g++;else E(l,s),g++;if(++l===e.length&&g+t.length>l)for(var x=l;x<g+t.length;x++)T(x)}function T(t){var e={index:t,type:0};p.push(e)}function E(t,e){var n={index:t,item:e,type:1};p.push(n)}function A(t){_.splice(t,1)}return{moves:p,children:h}};var r=n(1);function o(t,e){for(var n={},r=[],o=0,s=t.length;o<s;o++){var c=t[o],a=i(c,e);a?n[a]=o:r.push(c)}return{keyIndex:n,free:r}}function i(t,e){return t&&e?t[String(e)]:void 0}},function(t,e,n){"use strict";var r=n(1),o=n(10),i=n(6),s=n(11);e.a=function(t,e){return function t(e,n,c){for(var a=c[n.index],u=e.childNodes.length,f=0;f<u;f++){var p=e.childNodes[f];n.index++,t(p,n,c)}a&&function(t,e){e.forEach(function(e){switch(e.type){case 0:var n=e.node instanceof i.a?Object(s.a)(e.node):document.createTextNode(e.node);t.parentNode.replaceChild(n,t);break;case 1:!function(t,e){var n=Object(r.e)(t.childNodes),o={};n.forEach(function(t){if(1===t.nodeType){var e=t.getAttribute("key");e&&(o[e]=t)}}),e.forEach(function(e){var r=e.index;if(0===e.type)t.childNodes[r]&&t.removeChild(t.childNodes[r]),n.splice(r,1);else if(1===e.type&&3!==t.nodeType){var c=o[e.item.key]?o[e.item.key].cloneNode(!0):e.item instanceof i.a?Object(s.a)(e.item):document.createTextNode(e.item);n.splice(r,0,c),t.insertBefore(c,t.childNodes[r]||null)}})}(t,e.moves);break;case 2:!function(t,e){for(var n in e){var r=e[n];Object(o.a)(t,n,r)}}(t,e.props);break;case 3:t.textContent?t.textContent=e.text:t.nodeValue=e.text}})}(e,a)}(t,{index:0},e),t}},function(t,e,n){"use strict";e.a=function(t,e){var n=null;n=e?function(t,e){var n=Object.assign(new r.c,t);if(t.children.length&&(n.children=t.children.map(function(t){var n=t,r=!1;return t._constructor&&(t.component=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1],n=0,r=t.length;n<r;n++)if(!t[n].used&&t[n]._constructor&&t[n]._constructor.cid===e)return t[n].used=!0,t[n].component}(e.children,t._constructor.cid),t.component?(t.component.$updateProps(t.properties),(n=t.component.$vTmpTree).component=t.component):(t.component=t.parent.$addChild(t._constructor,t.properties),t.component.$vTmpTree=t.component.$getVTmpTree(t.properties),(n=t.component.$vTmpTree).component=t.component,r=!0)),n.children&&n.children.length&&(n=o(n)),r&&(t.component.$vTmpTree=n),n}),e.children&&e.children.length))for(var i=0,s=e.children.length;i<s;i++)e.children[i]._constructor&&!e.children[i].used&&e.children[i].component.$destroy();return n}(t,e):o(t);return function t(e){if("string"==typeof e)return e;var n=null;var o=[];e.children&&0!==e.children.length&&(o=e.children.map(function(e){return t(e)}));n=Object(r.c)(e.tagName,e.properties,o);return n}(n)};var r=n(5);function o(t){var e=Object.assign(new r.c,t);return t.children&&t.children.length&&(e.children=t.children.map(function(t){var e=t;return t._constructor&&(t.component=t.parent.$addChild(t._constructor,t.properties),t.component.$vTmpTree=t.component.$getVTmpTree(t.properties),(e=t.component.$vTmpTree).component=t.component),e.children&&e.children.length&&(e=o(e)),e})),e}},function(t,e,n){"use strict";var r=n(32),o=n(33),i=n(34),s=n(4),c=n.n(s),a=n(35);class u{constructor(t){this.base=t.base,this.routes=t.routes;const e="history"===this.mode&&!r.a&&!1!==t.fallback;this.mode=e?"hash":t.mode||"hash",this.history="history"===this.mode?new i.a(this):new o.a(this),this.init()}push(t){this.history.push(t)}replace(t){this.history.replace(t)}go(t){this.history.go(t)}init(){const t=this.history;c.a.call(this,t.current),t.transitionTo(t.getCurrentLocation())}}u.install=a.a,e.a=u},function(t,e,n){"use strict";const r=void 0!==window&&function(){const t=window.navigator.userAgent;return(-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)}();e.a=r},function(t,e,n){"use strict";var r=n(12);function o(t,e){const n=window.location.href,r=n.indexOf("#"),o=r>=0?n.slice(0,r):n;e?window.history.replaceState({},"",`${o}#/${t}`):window.history.pushState({},"",`${o}#/${t}`)}e.a=class extends r.a{constructor(t){super(t),this.ensureSlash(),window.addEventListener("hashchange",()=>{this.transitionTo(this.getCurrentLocation())})}ensureSlash(){const t=this.getCurrentLocation();return"/"===t.charAt(0)||(o(t),!1)}push(t){const e=Object(r.b)(t,this.router.routes);this.transitionTo(e,()=>{o(this.current.fullPath.substring(1))})}replaceState(t){const e=Object(r.b)(t,this.router.routes);this.transitionTo(e,()=>{o(this.current.fullPath.substring(1),!0)})}getCurrentLocation(){const t=window.location.href,e=t.indexOf("#");return-1===e?"":t.slice(e+1)}}},function(t,e,n){"use strict";var r=n(12);function o(t=""){let e=window.location.pathname;return t&&0===e.indexOf(t)&&(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}function i(t="",e,n){n?window.history.replaceState({},"",(t+e).replace(/\/\//g,"/")):window.history.pushState({},"",(t+e).replace(/\/\//g,"/"))}e.a=class extends r.a{constructor(t){super(t),window.addEventListener("popstate",()=>{this.transitionTo(o())})}push(t){const e=Object(r.b)(t,this.router.routes);this.transitionTo(e,()=>{i(this.router.base,this.current.fullPath)})}replaceState(t){const e=Object(r.b)(t,this.router.routes);this.transitionTo(e,()=>{i(this.router.base,this.current.fullPath,!0)})}go(t){window.history.go(t)}getCurrentLocation(){return o(this.router.base)}}},function(t,e,n){"use strict";e.a=function(t,e){t.mixin({beforeCreate(){}}),Object.defineProperty(t.prototype,"$router",{get:()=>e.history}),Object.defineProperty(t.prototype,"$route",{get:()=>e.history.current})}}])});